This commit is contained in:
Giulio Cesare Solaroli 2015-11-26 12:25:53 +01:00
commit 0c056738df
9 changed files with 70 additions and 22 deletions

View File

@ -1699,6 +1699,7 @@ div.help {
font-weight: 100;
margin-right: 10px;
padding-left: 1px;
padding-right: 30px;
line-height: 27px;
/* boxed style test */
/* background-color: $clipperz-orange;
@ -1723,9 +1724,12 @@ div.help {
-ms-user-select: none;
user-select: none;
cursor: pointer;
line-height: 22px;
/*line-height: 22px;*/
color: #ccc;
/*color:white;*/ }
/*color:white;*/
position: absolute;
margin-left: 5px;
line-height: 31px; }
.tagEditor ul li.tag span.tagRemoveButton:hover {
color: #9b0000; }
.tagEditor input {
@ -3575,6 +3579,9 @@ div.cardList.narrow {
list-style-type: none; }
.cardAttachments .skippedFiles ul li .filename {
font-weight: bold; }
.cardAttachments .skippedFiles a {
text-decoration: underline;
cursor: pointer; }
.cardAttachments .attachmentList {
margin-left: 44px;
padding-right: 8px; }
@ -3656,7 +3663,8 @@ div.cardList.narrow {
width: 30px;
cursor: pointer;
font-size: 20pt;
color: #aaa; }
color: #aaa;
margin-top: 1px; }
.cardAttachments .attachmentList li .actions a.cancel, .cardAttachments .attachmentList li .actions a.remove {
font-family: 'clipperz-icons';
-webkit-font-feature-settings: "liga" 1, "dlig" 1;
@ -3671,7 +3679,7 @@ div.cardList.narrow {
.cardAttachments .attachmentList li .actions a.download:hover {
color: #1863a1; }
.cardAttachments .attachmentList li .progress {
width: 30px;
width: 50px;
text-align: center; }
.cardAttachments .attachmentList li .progress .radialProgressIndicator {
width: 25px;
@ -3749,6 +3757,7 @@ div.cardList.narrow {
max-width: 30%; }
.content .tagEditor.readWrite ul li .tagLabel {
width: calc(100% - 30px);
width: 100%;
display: inline-block; }
.content .tagEditor.readWrite ul li input {
width: 100%; }

View File

@ -126,7 +126,9 @@ MochiKit.Base.update(Clipperz.PM.UI.AttachmentController.prototype, {
var reference = anAttachment.reference()
var queueElement = this.getQueueElement(reference);
if (queueElement) {
var isElementInProgress = (queueElement && queueElement['status'] != 'DONE' && queueElement['status'] != 'CANCELED' && queueElement['status'] != 'FAILED');
if (isElementInProgress) {
deferredResult = new Clipperz.Async.Deferred("Clipperz.PM.UI.AttachmentController.cancelAttachment", {trace:false});
deferredResult.addMethod(this, 'updateFileInQueue', reference, {'status': 'CANCELED'});
if (queueElement['deferredRequest']) {

View File

@ -41,6 +41,7 @@ Clipperz.PM.UI.Components.Cards.DetailClass = React.createClass({
result['allTags'] = this.props['allTags'];
result['preferences'] = this.props['preferences'];
result['attachmentQueueInfo'] = this.props['attachmentQueueInfo'];
result['proxyInfo'] = this.props['proxyInfo'];
}
return result;

View File

@ -678,6 +678,9 @@ console.log("DROP"); //, anEvent);
]);
}, this.state['skippedFiles'])
),
React.DOM.a({
'onClick': MochiKit.Base.method(this, 'setState', {'skippedFiles': []}),
}, 'close'),
]);
}

View File

@ -145,7 +145,7 @@ Clipperz.PM.UI.Components.Cards.TagEditorClass = React.createClass({
return React.DOM.div({'className':Clipperz.PM.UI.Components.classNames(classes)}, [
React.DOM.ul({},[
MochiKit.Base.map(this.renderTag, this.props['selectedTags']),
this.isReadOnly() ? null : React.DOM.li({}, React.DOM.input({'type':'text', 'list':'tagListData', 'onKeyDown':this.handleKeyDown, 'onBlur':this.handleBlur, 'placeholder': "tag"})),
this.isReadOnly() ? null : React.DOM.li({}, React.DOM.input({'type':'text', 'list':'tagListData', 'onKeyDown':this.handleKeyDown, 'onBlur':this.handleBlur, 'placeholder': "add tag"})),
]),
this.isReadOnly() ? null : this.renderEditField()
]);

View File

@ -31,6 +31,7 @@ Clipperz.PM.UI.Components.Cards.ViewClass = React.createClass({
propTypes: {
'label': React.PropTypes.string /*.isRequired */ ,
'loading': React.PropTypes.bool,
'proxyInfo': React.PropTypes.object.isRequired,
},
getInitialState: function () {
@ -265,7 +266,7 @@ Clipperz.PM.UI.Components.Cards.ViewClass = React.createClass({
renderAttachmentProgress: function(aStatus, aServerStatus, aProgress) {
var result;
var queueOperationsInProgress = (aStatus != 'DONE' && aStatus != 'CANCELED' && aStatus != 'FAILED');
var queueOperationsInProgress = (aStatus && aStatus != 'DONE' && aStatus != 'CANCELED' && aStatus != 'FAILED');
result = null;
if (aStatus == 'UPLOADING' || aStatus == 'DOWNLOADING') {
@ -321,19 +322,21 @@ Clipperz.PM.UI.Components.Cards.ViewClass = React.createClass({
renderAttachmentActions: function(aStatus, aServerStatus, anAttachment) {
var result;
var queueOperationsInProgress = (aStatus != 'DONE' && aStatus != 'CANCELED' && aStatus != 'FAILED');
var queueOperationsInProgress = (aStatus && aStatus != 'DONE' && aStatus != 'CANCELED' && aStatus != 'FAILED');
result = null;
if (aServerStatus == 'AVAILABLE' && ! queueOperationsInProgress) {
result = React.DOM.a({
'className': 'download',
'onClick': MochiKit.Base.method(this, 'handleGetAttachment', anAttachment),
}, "\u2b07");
} else if (aServerStatus == 'AVAILABLE' && queueOperationsInProgress) {
result = React.DOM.a({
'className': 'cancel',
'onClick': MochiKit.Base.method(this, 'handleCancelDownload', anAttachment)
}, "remove field");
if (this.props['proxyInfo']['proxyType'] != 'OFFLINE_COPY') {
if (aServerStatus == 'AVAILABLE' && ! queueOperationsInProgress) {
result = React.DOM.a({
'className': 'download',
'onClick': MochiKit.Base.method(this, 'handleGetAttachment', anAttachment),
}, "\u2b07");
} else if (aServerStatus == 'AVAILABLE' && queueOperationsInProgress) {
result = React.DOM.a({
'className': 'cancel',
'onClick': MochiKit.Base.method(this, 'handleCancelDownload', anAttachment)
}, "remove field");
}
}
return result;

View File

@ -1368,6 +1368,7 @@ Clipperz.log("THE BROWSER IS OFFLINE");
} else if (aPageName == 'cardDetailPage') {
extraProperties = {
'attachmentQueueInfo': this.attachmentQueueInfo(),
'proxyInfo': this.proxyInfo(),
};
} else if (aPageName == 'errorPage') {
extraProperties = {
@ -1939,7 +1940,7 @@ Clipperz.log("THE BROWSER IS OFFLINE");
isPageInEditMode: function() {
var currentPage = this.pages()[this.currentPage()];
return currentPage.props['mode'] == 'edit';
return currentPage ? currentPage.props['mode'] == 'edit' : false;
},
enterEditMode: function () {
@ -2093,11 +2094,28 @@ Clipperz.log("THE BROWSER IS OFFLINE");
//============================================================================
matchMediaQuery_handler: function (newQueryStyle) {
var wasInEditMode = this.isPageInEditMode();
var currentPage = this.currentPage();
var selectedCardInfo = this.selectedCardInfo();
this._mediaQueryStyle = newQueryStyle;
if (this.currentPage() == 'cardDetailPage') {
if (currentPage == 'cardDetailPage') {
this.moveOutPage(this.currentPage(), 'mainPage');
}
if (selectedCardInfo) {
this.pages()[currentPage].setProps({'mode': 'view'});
if (currentPage == 'mainPage' && newQueryStyle == 'narrow') {
this.selectCard(selectedCardInfo, true);
}
if (wasInEditMode) {
MochiKit.Async.callLater(0.1, MochiKit.Base.method(this, 'enterEditMode'));
MochiKit.Async.callLater(0.1, MochiKit.Base.method(this, 'updateSelectedCard', this.selectedCardInfo(), false, true));
}
}
this.resetPanels();
this.refreshCurrentPage();
},

View File

@ -54,6 +54,7 @@ $tagEditor_lineHeight: 27px;
margin-right: 10px;
padding-left: 1px;
padding-right: 30px;
line-height: $tagEditor_lineHeight;
/* boxed style test */
@ -80,10 +81,14 @@ $tagEditor_lineHeight: 27px;
@include userSelectNone();
cursor: pointer;
line-height: 22px;
/*line-height: 22px;*/
color: #ccc;
/*color:white;*/
position: absolute;
margin-left: 5px;
line-height: 31px;
&:hover {
color: rgb(155, 0, 0);
};

View File

@ -411,6 +411,11 @@ $cardViewBasePadding: 10px;
}
}
}
a {
text-decoration: underline;
cursor: pointer;
}
}
.attachmentList {
@ -488,6 +493,7 @@ $cardViewBasePadding: 10px;
cursor:pointer;
font-size: 20pt;
color: #aaa;
margin-top:1px;
&.cancel, &.remove {
@include icon-font();
@ -505,7 +511,7 @@ $cardViewBasePadding: 10px;
}
.progress {
width: 30px;
width: 50px;
text-align: center;
.radialProgressIndicator {
@ -665,6 +671,7 @@ $cardViewBasePadding: 10px;
.tagLabel {
width: calc(100% - 30px);
width: 100%;
display: inline-block;
}