mirror of
http://git.whoc.org.uk/git/password-manager.git
synced 2024-11-14 18:29:02 +01:00
Merge branch 'master' of https://github.com/dario-chiappetta/password-manager
Conflicts: frontend/delta/css/clipperz.css.map
This commit is contained in:
commit
5fdf12bb5e
@ -1134,7 +1134,7 @@ div.attachmentQueueStatus {
|
|||||||
width: 150px;
|
width: 150px;
|
||||||
text-align: right; }
|
text-align: right; }
|
||||||
div.attachmentQueueStatus ul li .status .statusString {
|
div.attachmentQueueStatus ul li .status .statusString {
|
||||||
font-size: .8em; }
|
font-size: 14px; }
|
||||||
div.attachmentQueueStatus ul li .status .processIcon {
|
div.attachmentQueueStatus ul li .status .processIcon {
|
||||||
margin-left: 1em; }
|
margin-left: 1em; }
|
||||||
div.attachmentQueueStatus ul li .close a {
|
div.attachmentQueueStatus ul li .close a {
|
||||||
@ -1286,6 +1286,7 @@ div.cardContent {
|
|||||||
-moz-flex: auto;
|
-moz-flex: auto;
|
||||||
-ms-flex: auto;
|
-ms-flex: auto;
|
||||||
flex: auto;
|
flex: auto;
|
||||||
|
width: 100%;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
display: -webkit-flex;
|
display: -webkit-flex;
|
||||||
display: -moz-flex;
|
display: -moz-flex;
|
||||||
@ -3684,9 +3685,11 @@ div.cardList.narrow {
|
|||||||
.cardAttachments .attachmentList li .progress .radialProgressIndicator.waiting .border {
|
.cardAttachments .attachmentList li .progress .radialProgressIndicator.waiting .border {
|
||||||
fill: #aaa; }
|
fill: #aaa; }
|
||||||
|
|
||||||
.edit .cardDetailToolbar.commands div, .edit .cardDetailToolbar.commands ul {
|
.edit {
|
||||||
display: none;
|
width: 100%; }
|
||||||
visibility: hidden; }
|
.edit .cardDetailToolbar.commands div, .edit .cardDetailToolbar.commands ul {
|
||||||
|
display: none;
|
||||||
|
visibility: hidden; }
|
||||||
|
|
||||||
.cardDetailToolbar.edit li {
|
.cardDetailToolbar.edit li {
|
||||||
font-weight: 100; }
|
font-weight: 100; }
|
||||||
|
File diff suppressed because one or more lines are too long
@ -514,26 +514,20 @@ Clipperz.log("<<< Connection.messageExceptionHandler")
|
|||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
|
||||||
// 'uploadAttachment': function(someArguments, aProgressCallback) {
|
|
||||||
// return this.message('uploadAttachment', someArguments, {'uploadProgressCallback': aProgressCallback});
|
|
||||||
// },
|
|
||||||
|
|
||||||
'uploadAttachment': function(someArguments, aProgressCallback) {
|
'uploadAttachment': function(someArguments, aProgressCallback) {
|
||||||
return Clipperz.Async.callbacks("Connction.uploadAttachment", [
|
return Clipperz.Async.callbacks("Connction.uploadAttachment", [
|
||||||
MochiKit.Base.method(this, 'message', 'echo', {'echo':"echo"}),
|
MochiKit.Base.method(this, 'message', 'echo', {'echo':"echo"}),
|
||||||
MochiKit.Base.method(this.proxy(), 'uploadAttachment', someArguments, aProgressCallback, this.sharedSecret()),
|
MochiKit.Base.bind(function(){ return this.sharedSecret()}, this),
|
||||||
|
MochiKit.Base.method(this.proxy(), 'uploadAttachment', someArguments, aProgressCallback/*, this.sharedSecret()*/),
|
||||||
], {trace:false});
|
], {trace:false});
|
||||||
|
|
||||||
// return this.proxy().uploadAttachment(someArguments, aProgressCallback, this.sharedSecret());
|
|
||||||
},
|
},
|
||||||
|
|
||||||
'downloadAttachment': function(someArguments, aProgressCallback) {
|
'downloadAttachment': function(someArguments, aProgressCallback) {
|
||||||
return Clipperz.Async.callbacks("Connction.uploadAttachment", [
|
return Clipperz.Async.callbacks("Connction.uploadAttachment", [
|
||||||
MochiKit.Base.method(this, 'message', 'echo', {'echo':"echo"}),
|
MochiKit.Base.method(this, 'message', 'echo', {'echo':"echo"}),
|
||||||
MochiKit.Base.method(this.proxy(), 'downloadAttachment', someArguments, aProgressCallback, this.sharedSecret()),
|
MochiKit.Base.bind(function(){ return this.sharedSecret()}, this),
|
||||||
|
MochiKit.Base.method(this.proxy(), 'downloadAttachment', someArguments, aProgressCallback/*, this.sharedSecret()*/),
|
||||||
], {trace:false});
|
], {trace:false});
|
||||||
|
|
||||||
// return this.proxy().downloadAttachment(someArguments, aProgressCallback, this.sharedSecret());
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
@ -102,7 +102,6 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.JSON, Clipperz.PM.Proxy, {
|
|||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
// TODO: test
|
|
||||||
'_uploadAttachment': function(someArguments, aProgressCallback, aSharedSecret, aToll) {
|
'_uploadAttachment': function(someArguments, aProgressCallback, aSharedSecret, aToll) {
|
||||||
var formData;
|
var formData;
|
||||||
var deferredResult;
|
var deferredResult;
|
||||||
@ -142,7 +141,6 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.JSON, Clipperz.PM.Proxy, {
|
|||||||
throw someValues['message'];
|
throw someValues['message'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: check return value with actual request. Expected: ArrayBuffer
|
|
||||||
return someValues;
|
return someValues;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -151,7 +149,6 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.JSON, Clipperz.PM.Proxy, {
|
|||||||
return deferredResult;
|
return deferredResult;
|
||||||
},
|
},
|
||||||
|
|
||||||
// TODO: test
|
|
||||||
'_downloadAttachment': function(someArguments, aProgressCallback, aSharedSecret, aToll) {
|
'_downloadAttachment': function(someArguments, aProgressCallback, aSharedSecret, aToll) {
|
||||||
var deferredResult;
|
var deferredResult;
|
||||||
var parameters;
|
var parameters;
|
||||||
|
@ -281,6 +281,11 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, {
|
|||||||
uploadAttachment: function(someArguments, aProgressCallback, aSharedSecret, aToll) {
|
uploadAttachment: function(someArguments, aProgressCallback, aSharedSecret, aToll) {
|
||||||
var connection = this.currentStaticConnection();
|
var connection = this.currentStaticConnection();
|
||||||
var attachmentReference = someArguments['attachmentReference'];
|
var attachmentReference = someArguments['attachmentReference'];
|
||||||
|
var payloadSize = someArguments['arrayBufferData'].length;
|
||||||
|
var resultValue = {
|
||||||
|
result: {},
|
||||||
|
toll: this.getTollForRequestType('MESSAGE')
|
||||||
|
};
|
||||||
|
|
||||||
if (this.isReadOnly() == false) {
|
if (this.isReadOnly() == false) {
|
||||||
connection['userData']['attachments'][attachmentReference] = {
|
connection['userData']['attachments'][attachmentReference] = {
|
||||||
@ -290,27 +295,31 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, {
|
|||||||
'version': someArguments['version'],
|
'version': someArguments['version'],
|
||||||
};
|
};
|
||||||
|
|
||||||
return this.simulateNetworkDelayResponse(someArguments['arrayBufferData'].length, aProgressCallback, {
|
return Clipperz.Async.callbacks("Proxy.Offline.DataStore.uploadAttachment", [
|
||||||
result: {},
|
MochiKit.Base.method(this, 'simulateNetworkDelay', payloadSize, aProgressCallback, resultValue),
|
||||||
toll: this.getTollForRequestType('MESSAGE')
|
function () { return resultValue; },
|
||||||
});
|
], {trace:false});
|
||||||
} else {
|
} else {
|
||||||
throw Clipperz.PM.Proxy.Offline.DataStore.exception.ReadOnly;
|
throw Clipperz.PM.Proxy.Offline.DataStore.exception.ReadOnly;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
downloadAttachment: function(someArguments, aProgressCallback, aSharedSecret, aToll) {
|
downloadAttachment: function(someArguments, aProgressCallback, aSharedSecret, aToll) {
|
||||||
var connection = this.currentStaticConnection();
|
var connection = this.currentStaticConnection();
|
||||||
var reference = someArguments['reference'];
|
var reference = someArguments['reference'];
|
||||||
var result = connection['userData']['attachments'][reference]['data'];
|
var resultData = connection['userData']['attachments'][reference]['data'];
|
||||||
|
var resultValue = {
|
||||||
|
result: resultData,
|
||||||
|
// toll: this.getTollForRequestType('MESSAGE')
|
||||||
|
};
|
||||||
|
|
||||||
return this.simulateNetworkDelayResponse(result.length, aProgressCallback, {
|
return Clipperz.Async.callbacks("Proxy.Offline.DataStore.downloadAttachment", [
|
||||||
result: result,
|
MochiKit.Base.method(this, 'simulateNetworkDelay', resultData.length, aProgressCallback, resultValue),
|
||||||
// toll: this.getTollForRequestType('MESSAGE')
|
function () { return resultValue; },
|
||||||
});
|
], {trace:false});
|
||||||
},
|
},
|
||||||
|
|
||||||
simulateNetworkDelayResponse: function(payloadSize, progressCallback, aResponse) {
|
simulateNetworkDelay: function(payloadSize, progressCallback) {
|
||||||
var deferredResult;
|
var deferredResult;
|
||||||
var i;
|
var i;
|
||||||
|
|
||||||
@ -322,8 +331,6 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, {
|
|||||||
deferredResult.addMethod(this, 'runProgressCallback', progressCallback, loaded, payloadSize);
|
deferredResult.addMethod(this, 'runProgressCallback', progressCallback, loaded, payloadSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
deferredResult.addCallback(MochiKit.Async.succeed, aResponse);
|
|
||||||
|
|
||||||
deferredResult.callback();
|
deferredResult.callback();
|
||||||
|
|
||||||
return deferredResult;
|
return deferredResult;
|
||||||
|
@ -25,16 +25,16 @@ refer to http://www.clipperz.com.
|
|||||||
Clipperz.Base.module('Clipperz.PM.UI');
|
Clipperz.Base.module('Clipperz.PM.UI');
|
||||||
|
|
||||||
Clipperz.PM.UI.AttachmentController = function(someParameters) {
|
Clipperz.PM.UI.AttachmentController = function(someParameters) {
|
||||||
this.MAX_SIMULTANEOUS_READ = 1;
|
this.MAX_SIMULTANEOUS_READ = 1;
|
||||||
this.MAX_SIMULTANEOUS_UPLOAD = 1;
|
this.MAX_SIMULTANEOUS_UPLOAD = 1;
|
||||||
this.MAX_SIMULTANEOUS_DOWNLOAD = 1;
|
this.MAX_SIMULTANEOUS_DOWNLOAD = 1;
|
||||||
this.MAX_SIMULTANEOUS_ENCRYPT = 1;
|
this.MAX_SIMULTANEOUS_ENCRYPT = 1;
|
||||||
this.MAX_SIMULTANEOUS_DECRYPT = 1;
|
this.MAX_SIMULTANEOUS_DECRYPT = 1;
|
||||||
|
|
||||||
this.LATEST_ENCRYPTION_VERSION = '1.0'; // Versions aren't handled completely yet!
|
this.LATEST_ENCRYPTION_VERSION = '1.0'; // Versions aren't handled completely yet!
|
||||||
|
|
||||||
this.fileQueue = [];
|
this.fileQueue = [];
|
||||||
this.notifications = [];
|
this.notifications = [];
|
||||||
this.operationsCount = null;
|
this.operationsCount = null;
|
||||||
|
|
||||||
this.encryptedDocument = null;
|
this.encryptedDocument = null;
|
||||||
@ -279,7 +279,7 @@ MochiKit.Base.update(Clipperz.PM.UI.AttachmentController.prototype, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
// Queue Processing
|
// Notifications
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
|
||||||
addNotification: function(aQueueElement) {
|
addNotification: function(aQueueElement) {
|
||||||
|
@ -688,6 +688,7 @@ console.log("DROP"); //, anEvent);
|
|||||||
var result;
|
var result;
|
||||||
|
|
||||||
var broken = (! aServerStatus && (! aStatus || aStatus == 'CANCELED' || aStatus == 'FAILED' || aStatus == 'DONE'));
|
var broken = (! aServerStatus && (! aStatus || aStatus == 'CANCELED' || aStatus == 'FAILED' || aStatus == 'DONE'));
|
||||||
|
var queueOperationsInProgress = (aStatus != 'DONE' && aStatus != 'CANCELED' && aStatus != 'FAILED');
|
||||||
|
|
||||||
result = null;
|
result = null;
|
||||||
if (aStatus == 'UPLOADING' || aStatus == 'DOWNLOADING') {
|
if (aStatus == 'UPLOADING' || aStatus == 'DOWNLOADING') {
|
||||||
@ -695,7 +696,7 @@ console.log("DROP"); //, anEvent);
|
|||||||
'progress': aProgress,
|
'progress': aProgress,
|
||||||
'border': 1
|
'border': 1
|
||||||
});
|
});
|
||||||
} else if (! broken && aStatus != 'DONE' && aStatus != 'FAILED' && aServerStatus != 'AVAILABLE') {
|
} else if (! broken && aServerStatus != 'AVAILABLE' && queueOperationsInProgress) {
|
||||||
result = Clipperz.PM.UI.Components.RadialProgressIndicator({
|
result = Clipperz.PM.UI.Components.RadialProgressIndicator({
|
||||||
'progress': 0,
|
'progress': 0,
|
||||||
'border': 1,
|
'border': 1,
|
||||||
@ -710,6 +711,7 @@ console.log("DROP"); //, anEvent);
|
|||||||
var result;
|
var result;
|
||||||
|
|
||||||
var status = aStatus ? aStatus : false;
|
var status = aStatus ? aStatus : false;
|
||||||
|
var queueOperationsInProgress = (status && (status != 'DONE' && status != 'CANCELED' && status != 'FAILED'));
|
||||||
|
|
||||||
result = null;
|
result = null;
|
||||||
|
|
||||||
@ -730,8 +732,10 @@ console.log("DROP"); //, anEvent);
|
|||||||
result = React.DOM.span({'className': 'broken'}, "failed");
|
result = React.DOM.span({'className': 'broken'}, "failed");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
result = React.DOM.span({'className': 'waiting'}, "waiting");
|
result = React.DOM.span({'className': 'waiting'}, "\u2b06waiting");
|
||||||
}
|
}
|
||||||
|
} else if (queueOperationsInProgress) {
|
||||||
|
result = React.DOM.span({'className': 'waiting'}, "\u2b07waiting");
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -265,7 +265,7 @@ Clipperz.PM.UI.Components.Cards.ViewClass = React.createClass({
|
|||||||
renderAttachmentProgress: function(aStatus, aServerStatus, aProgress) {
|
renderAttachmentProgress: function(aStatus, aServerStatus, aProgress) {
|
||||||
var result;
|
var result;
|
||||||
|
|
||||||
var broken = (! aServerStatus && (! aStatus || aStatus == 'CANCELED' || aStatus == 'FAILED' || aStatus == 'DONE'));
|
var queueOperationsInProgress = (aStatus != 'DONE' && aStatus != 'CANCELED' && aStatus != 'FAILED');
|
||||||
|
|
||||||
result = null;
|
result = null;
|
||||||
if (aStatus == 'UPLOADING' || aStatus == 'DOWNLOADING') {
|
if (aStatus == 'UPLOADING' || aStatus == 'DOWNLOADING') {
|
||||||
@ -273,7 +273,7 @@ Clipperz.PM.UI.Components.Cards.ViewClass = React.createClass({
|
|||||||
'progress': aProgress,
|
'progress': aProgress,
|
||||||
'border': 1
|
'border': 1
|
||||||
});
|
});
|
||||||
} else if (! broken && aStatus != 'DONE' && aServerStatus != 'AVAILABLE') {
|
} else if (queueOperationsInProgress) {
|
||||||
result = Clipperz.PM.UI.Components.RadialProgressIndicator({
|
result = Clipperz.PM.UI.Components.RadialProgressIndicator({
|
||||||
'progress': 0,
|
'progress': 0,
|
||||||
'border': 1,
|
'border': 1,
|
||||||
@ -288,6 +288,7 @@ Clipperz.PM.UI.Components.Cards.ViewClass = React.createClass({
|
|||||||
var result;
|
var result;
|
||||||
|
|
||||||
var status = aStatus ? aStatus : false;
|
var status = aStatus ? aStatus : false;
|
||||||
|
var queueOperationsInProgress = (status && (status != 'DONE' && status != 'CANCELED' && status != 'FAILED'));
|
||||||
|
|
||||||
result = null;
|
result = null;
|
||||||
|
|
||||||
@ -308,8 +309,10 @@ Clipperz.PM.UI.Components.Cards.ViewClass = React.createClass({
|
|||||||
result = React.DOM.span({'className': 'broken'}, "failed");
|
result = React.DOM.span({'className': 'broken'}, "failed");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
result = React.DOM.span({'className': 'waiting'}, "waiting");
|
result = React.DOM.span({'className': 'waiting'}, "\u2b06waiting");
|
||||||
}
|
}
|
||||||
|
} else if (queueOperationsInProgress) {
|
||||||
|
result = React.DOM.span({'className': 'waiting'}, "\u2b07waiting");
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -318,17 +321,19 @@ Clipperz.PM.UI.Components.Cards.ViewClass = React.createClass({
|
|||||||
renderAttachmentActions: function(aStatus, aServerStatus, anAttachment) {
|
renderAttachmentActions: function(aStatus, aServerStatus, anAttachment) {
|
||||||
var result;
|
var result;
|
||||||
|
|
||||||
|
var queueOperationsInProgress = (aStatus != 'DONE' && aStatus != 'CANCELED' && aStatus != 'FAILED');
|
||||||
|
|
||||||
result = null;
|
result = null;
|
||||||
if (aStatus == 'DOWNLOADING') {
|
if (aServerStatus == 'AVAILABLE' && ! queueOperationsInProgress) {
|
||||||
result = React.DOM.a({
|
|
||||||
'className': 'cancel',
|
|
||||||
'onClick': MochiKit.Base.method(this, 'handleCancelDownload', anAttachment)
|
|
||||||
}, "remove field");
|
|
||||||
} else if (aServerStatus == 'AVAILABLE') {
|
|
||||||
result = React.DOM.a({
|
result = React.DOM.a({
|
||||||
'className': 'download',
|
'className': 'download',
|
||||||
'onClick': MochiKit.Base.method(this, 'handleGetAttachment', anAttachment),
|
'onClick': MochiKit.Base.method(this, 'handleGetAttachment', anAttachment),
|
||||||
}, "\u2b07");
|
}, "\u2b07");
|
||||||
|
} else if (aServerStatus == 'AVAILABLE' && queueOperationsInProgress) {
|
||||||
|
result = React.DOM.a({
|
||||||
|
'className': 'cancel',
|
||||||
|
'onClick': MochiKit.Base.method(this, 'handleCancelDownload', anAttachment)
|
||||||
|
}, "remove field");
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -370,7 +375,6 @@ Clipperz.PM.UI.Components.Cards.ViewClass = React.createClass({
|
|||||||
renderAttachments: function(someAttachments) {
|
renderAttachments: function(someAttachments) {
|
||||||
var result;
|
var result;
|
||||||
|
|
||||||
//console.log("View props:", this.props, someAttachments);
|
|
||||||
if (someAttachments.length > 0) {
|
if (someAttachments.length > 0) {
|
||||||
result = React.DOM.div({'className': 'cardAttachments'}, [
|
result = React.DOM.div({'className': 'cardAttachments'}, [
|
||||||
React.DOM.h3({'className': 'summaryText'}, "Attachments"),
|
React.DOM.h3({'className': 'summaryText'}, "Attachments"),
|
||||||
|
@ -483,7 +483,7 @@ div.attachmentQueueStatus {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
||||||
.statusString {
|
.statusString {
|
||||||
font-size: .8em;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.processIcon {
|
.processIcon {
|
||||||
@ -666,6 +666,8 @@ div.cardContent {
|
|||||||
@include flex(auto);
|
@include flex(auto);
|
||||||
@include mask();
|
@include mask();
|
||||||
|
|
||||||
|
width:100%;
|
||||||
|
|
||||||
@include flexbox();
|
@include flexbox();
|
||||||
& > div.edit {
|
& > div.edit {
|
||||||
@include flex(auto);
|
@include flex(auto);
|
||||||
|
@ -536,6 +536,8 @@ $cardViewBasePadding: 10px;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.edit {
|
.edit {
|
||||||
|
width:100%;
|
||||||
|
|
||||||
.cardDetailToolbar {
|
.cardDetailToolbar {
|
||||||
&.commands {
|
&.commands {
|
||||||
div, ul {
|
div, ul {
|
||||||
|
Loading…
Reference in New Issue
Block a user