Added support for Direct Login removal

This commit is contained in:
Dario Chiappetta 2015-08-26 23:03:41 +02:00
parent 5cfd6588d7
commit 4ed3412cd8
6 changed files with 74 additions and 32 deletions

View File

@ -119,7 +119,6 @@ http://jonibologna.com/flexbox-cheatsheet/
-ms-transform: rotate(0deg) translate(0, 0); -ms-transform: rotate(0deg) translate(0, 0);
-o-transform: rotate(0deg) translate(0, 0); -o-transform: rotate(0deg) translate(0, 0);
transform: rotate(0deg) translate(0, 0); } transform: rotate(0deg) translate(0, 0); }
100% { 100% {
-webkit-transform: rotate(359deg) translate(0, 0); -webkit-transform: rotate(359deg) translate(0, 0);
-moz-transform: rotate(359deg) translate(0, 0); -moz-transform: rotate(359deg) translate(0, 0);
@ -133,7 +132,6 @@ http://jonibologna.com/flexbox-cheatsheet/
-ms-transform: rotate(0deg) translate(0, 0); -ms-transform: rotate(0deg) translate(0, 0);
-o-transform: rotate(0deg) translate(0, 0); -o-transform: rotate(0deg) translate(0, 0);
transform: rotate(0deg) translate(0, 0); } transform: rotate(0deg) translate(0, 0); }
100% { 100% {
-webkit-transform: rotate(359deg) translate(0, 0); -webkit-transform: rotate(359deg) translate(0, 0);
-moz-transform: rotate(359deg) translate(0, 0); -moz-transform: rotate(359deg) translate(0, 0);
@ -147,7 +145,6 @@ http://jonibologna.com/flexbox-cheatsheet/
-ms-transform: rotate(0deg) translate(0, 0); -ms-transform: rotate(0deg) translate(0, 0);
-o-transform: rotate(0deg) translate(0, 0); -o-transform: rotate(0deg) translate(0, 0);
transform: rotate(0deg) translate(0, 0); } transform: rotate(0deg) translate(0, 0); }
100% { 100% {
-webkit-transform: rotate(359deg) translate(0, 0); -webkit-transform: rotate(359deg) translate(0, 0);
-moz-transform: rotate(359deg) translate(0, 0); -moz-transform: rotate(359deg) translate(0, 0);
@ -161,7 +158,6 @@ http://jonibologna.com/flexbox-cheatsheet/
-ms-transform: rotate(0deg) translate(0, 0); -ms-transform: rotate(0deg) translate(0, 0);
-o-transform: rotate(0deg) translate(0, 0); -o-transform: rotate(0deg) translate(0, 0);
transform: rotate(0deg) translate(0, 0); } transform: rotate(0deg) translate(0, 0); }
100% { 100% {
-webkit-transform: rotate(359deg) translate(0, 0); -webkit-transform: rotate(359deg) translate(0, 0);
-moz-transform: rotate(359deg) translate(0, 0); -moz-transform: rotate(359deg) translate(0, 0);
@ -480,73 +476,61 @@ div.overlay {
@-webkit-keyframes overlay-spin { @-webkit-keyframes overlay-spin {
from { from {
opacity: 1; } opacity: 1; }
to { to {
opacity: 0.25; } } opacity: 0.25; } }
@-moz-keyframes overlay-spin { @-moz-keyframes overlay-spin {
from { from {
opacity: 1; } opacity: 1; }
to { to {
opacity: 0.25; } } opacity: 0.25; } }
@-ms-keyframes overlay-spin { @-ms-keyframes overlay-spin {
from { from {
opacity: 1; } opacity: 1; }
to { to {
opacity: 0.25; } } opacity: 0.25; } }
@keyframes overlay-spin { @keyframes overlay-spin {
from { from {
opacity: 1; } opacity: 1; }
to { to {
opacity: 0.25; } } opacity: 0.25; } }
@-webkit-keyframes ios-overlay-show { @-webkit-keyframes ios-overlay-show {
0% { 0% {
opacity: 0; } opacity: 0; }
100% { 100% {
opacity: 1; } } opacity: 1; } }
@-moz-keyframes ios-overlay-show { @-moz-keyframes ios-overlay-show {
0% { 0% {
opacity: 0; } opacity: 0; }
100% { 100% {
opacity: 1; } } opacity: 1; } }
@-ms-keyframes ios-overlay-show { @-ms-keyframes ios-overlay-show {
0% { 0% {
opacity: 0; } opacity: 0; }
100% { 100% {
opacity: 1; } } opacity: 1; } }
@keyframes ios-overlay-show { @keyframes ios-overlay-show {
0% { 0% {
opacity: 0; } opacity: 0; }
100% { 100% {
opacity: 1; } } opacity: 1; } }
@-webkit-keyframes ios-overlay-hide { @-webkit-keyframes ios-overlay-hide {
0% { 0% {
opacity: 1; } opacity: 1; }
100% { 100% {
opacity: 0; } } opacity: 0; } }
@-moz-keyframes ios-overlay-hide { @-moz-keyframes ios-overlay-hide {
0% { 0% {
opacity: 1; } opacity: 1; }
100% { 100% {
opacity: 0; } } opacity: 0; } }
@-ms-keyframes ios-overlay-hide { @-ms-keyframes ios-overlay-hide {
0% { 0% {
opacity: 1; } opacity: 1; }
100% { 100% {
opacity: 0; } } opacity: 0; } }
@keyframes ios-overlay-hide { @keyframes ios-overlay-hide {
0% { 0% {
opacity: 1; } opacity: 1; }
100% { 100% {
opacity: 0; } } opacity: 0; } }
/* /*
@ -1596,11 +1580,11 @@ div.help {
flex: 1; flex: 1;
font-size: 8pt; } font-size: 8pt; }
#loginPage div.loginForm footer .applicationVersion span { #loginPage div.loginForm footer .applicationVersion span {
color: #999999; } color: #999; }
#loginPage div.loginForm footer .applicationVersion span:after { #loginPage div.loginForm footer .applicationVersion span:after {
content: ":"; } content: ":"; }
#loginPage div.loginForm footer .applicationVersion a { #loginPage div.loginForm footer .applicationVersion a {
color: #999999; color: #999;
text-decoration: none; text-decoration: none;
padding-left: 5px; padding-left: 5px;
font-weight: bold; } font-weight: bold; }
@ -2227,13 +2211,13 @@ span.count {
#extraFeaturesPanel .extraFeatureIndex footer { #extraFeaturesPanel .extraFeatureIndex footer {
font-size: 8pt; font-size: 8pt;
padding: 5px 5px 5px 5px; padding: 5px 5px 5px 5px;
border-top: 1px solid #999999; } border-top: 1px solid #999; }
#extraFeaturesPanel .extraFeatureIndex footer span { #extraFeaturesPanel .extraFeatureIndex footer span {
color: #999999; } color: #999; }
#extraFeaturesPanel .extraFeatureIndex footer span:after { #extraFeaturesPanel .extraFeatureIndex footer span:after {
content: ":"; } content: ":"; }
#extraFeaturesPanel .extraFeatureIndex footer a { #extraFeaturesPanel .extraFeatureIndex footer a {
color: #999999; color: #999;
text-decoration: none; text-decoration: none;
padding-left: 5px; padding-left: 5px;
font-weight: bold; } font-weight: bold; }
@ -2947,7 +2931,7 @@ div.cardList ul {
padding-right: 0px; padding-right: 0px;
box-shadow: -4px 0px 3px -1px rgba(0, 0, 0, 0.2); } box-shadow: -4px 0px 3px -1px rgba(0, 0, 0, 0.2); }
div.cardList ul li.archived { div.cardList ul li.archived {
background-color: #eeeeee; background-color: #eee;
color: #999; } color: #999; }
div.cardList ul li .favicon { div.cardList ul li .favicon {
width: 48px; width: 48px;
@ -3034,7 +3018,7 @@ div.cardList.narrow {
content: ""; } content: ""; }
#cardDetailPage .view.archived, .cardDetail .view.archived { #cardDetailPage .view.archived, .cardDetail .view.archived {
background-color: #eeeeee; } background-color: #eee; }
#cardDetailPage .view .cardDetailToolbar, .cardDetail .view .cardDetailToolbar { #cardDetailPage .view .cardDetailToolbar, .cardDetail .view .cardDetailToolbar {
background-color: #1863a1; background-color: #1863a1;
color: white; } color: white; }
@ -3124,6 +3108,21 @@ div.cardList.narrow {
#cardDetailPage .edit input:-ms-input-placeholder, #cardDetailPage .edit textarea:-ms-input-placeholder, .cardDetail .edit input:-ms-input-placeholder, .cardDetail .edit textarea:-ms-input-placeholder { #cardDetailPage .edit input:-ms-input-placeholder, #cardDetailPage .edit textarea:-ms-input-placeholder, .cardDetail .edit input:-ms-input-placeholder, .cardDetail .edit textarea:-ms-input-placeholder {
font-style: italic; font-style: italic;
color: #ccc; } color: #ccc; }
#cardDetailPage .edit .removeDirectLogin, .cardDetail .edit .removeDirectLogin {
font-family: 'clipperz-icons';
-webkit-font-feature-settings: "liga" 1, "dlig" 1;
-moz-font-feature-settings: "liga" 1, "dlig" 1;
-ms-font-feature-settings: "liga" 1, "dlig" 1;
-o-font-feature-settings: "liga" 1, "dlig" 1;
font-feature-settings: "liga" 1, "dlig" 1;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-size: 20pt;
padding: 8px 20px 11px 8px; }
#cardDetailPage .edit .removeDirectLogin:hover, .cardDetail .edit .removeDirectLogin:hover {
color: #9b0000; }
#cardDetailPage .edit .directLoginLabel, .cardDetail .edit .directLoginLabel {
vertical-align: bottom; }
.cardDetailToolbar.edit li { .cardDetailToolbar.edit li {
font-weight: 100; } font-weight: 100; }
@ -3244,7 +3243,7 @@ div.cardList.narrow {
cursor: grab; cursor: grab;
cursor: -moz-grab; cursor: -moz-grab;
cursor: -webkit-grab; cursor: -webkit-grab;
background: repeating-linear-gradient(0deg, white, white 2px, #dddddd 2px, #dddddd 3px); background: repeating-linear-gradient(0deg, white, white 2px, #ddd 2px, #ddd 3px);
width: 28px; width: 28px;
height: 20px; height: 20px;
margin-left: 6px; margin-left: 6px;
@ -3469,7 +3468,7 @@ div.cardList.narrow {
min-width: 220px; min-width: 220px;
width: 80%; width: 80%;
max-width: 400px; max-width: 400px;
background-color: #333333; background-color: #333;
color: #fff; color: #fff;
-webkit-border-radius: 6px; -webkit-border-radius: 6px;
-moz-border-radius: 6px; -moz-border-radius: 6px;
@ -3484,7 +3483,7 @@ div.cardList.narrow {
margin-left: 0px; margin-left: 0px;
width: 0; width: 0;
height: 0; height: 0;
border-top: 5px solid #333333; border-top: 5px solid #333;
border-left: 5px solid transparent; border-left: 5px solid transparent;
border-right: 5px solid transparent; } border-right: 5px solid transparent; }
.passwordGenerator .passwordGeneratorBaloon form span { .passwordGenerator .passwordGeneratorBaloon form span {

File diff suppressed because one or more lines are too long

View File

@ -699,7 +699,7 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, {
} else if (someParameters.message == 'updateOneTimePasswords') { } else if (someParameters.message == 'updateOneTimePasswords') {
if (this.isReadOnly() == false) { if (this.isReadOnly() == false) {
console.log("Proxy.Offline.DataStore.updateOneTimePasswords: someParameters:", someParameters); //console.log("Proxy.Offline.DataStore.updateOneTimePasswords: someParameters:", someParameters);
if (aConnection['userData']['lock'] != someParameters['parameters']['user']['lock']) { if (aConnection['userData']['lock'] != someParameters['parameters']['user']['lock']) {
throw "the lock attribute is not processed correctly" throw "the lock attribute is not processed correctly"
@ -709,7 +709,7 @@ console.log("Proxy.Offline.DataStore.updateOneTimePasswords: someParameters:", s
aConnection['userData']['statistics'] = someParameters['parameters']['user']['statistics']; aConnection['userData']['statistics'] = someParameters['parameters']['user']['statistics'];
aConnection['userData']['userDetailsVersion'] = someParameters['parameters']['user']['version']; aConnection['userData']['userDetailsVersion'] = someParameters['parameters']['user']['version'];
console.log("Proxy.Offline.DataStore.updateOneTimePasswords: userOTPs:", aConnection['userOTPs']); //console.log("Proxy.Offline.DataStore.updateOneTimePasswords: userOTPs:", aConnection['userOTPs']);
MochiKit.Base.map(function(aOTP) { MochiKit.Base.map(function(aOTP) {
if (someParameters['parameters']['oneTimePasswords'].indexOf(aOTP.reference) < 0) { if (someParameters['parameters']['oneTimePasswords'].indexOf(aOTP.reference) < 0) {

View File

@ -54,6 +54,10 @@ Clipperz.PM.UI.Components.Cards.EditClass = React.createClass({
return this.props['fields']; return this.props['fields'];
}, },
reference: function() {
return this.props['_reference'];
},
//============================================================================ //============================================================================
positionOfField: function (aFieldReference) { positionOfField: function (aFieldReference) {
@ -446,6 +450,10 @@ console.log("DROP"); //, anEvent);
this.setState({'passwordGeneratorFieldReference': null}); this.setState({'passwordGeneratorFieldReference': null});
}, },
removeDirectLogin: function(aDirectLoginReference) {
MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'removeDirectLogin', this.record(), aDirectLoginReference);
},
//============================================================================ //============================================================================
renderLabel: function (aLabel) { renderLabel: function (aLabel) {
@ -580,6 +588,10 @@ console.log("DROP"); //, anEvent);
renderDirectLogin: function (aDirectLogin) { renderDirectLogin: function (aDirectLogin) {
return React.DOM.div({'className':'cardDirectLogin', 'key':aDirectLogin['_reference']}, [ return React.DOM.div({'className':'cardDirectLogin', 'key':aDirectLogin['_reference']}, [
React.DOM.a({
'className': 'removeDirectLogin',
'onClick': MochiKit.Base.method(this, 'removeDirectLogin', aDirectLogin['_reference'])
}, "remove field"),
React.DOM.span({'className':'directLoginLabel'}, aDirectLogin['label']), React.DOM.span({'className':'directLoginLabel'}, aDirectLogin['label']),
// React.DOM.div({'className':'directLoginAction action'}, 'DIRECT LOGIN') // React.DOM.div({'className':'directLoginAction action'}, 'DIRECT LOGIN')
]); ]);

View File

@ -83,7 +83,7 @@ Clipperz.PM.UI.MainController = function() {
'maskClick', 'maskClick',
'closeHelp', 'closeHelp',
'downloadOfflineCopy', 'downloadOfflineCopy',
'runDirectLogin', 'runDirectLogin', 'removeDirectLogin',
'exitSearch' 'exitSearch'
]); ]);
@ -825,6 +825,21 @@ console.log("THE BROWSER IS OFFLINE");
return deferredResult; return deferredResult;
}, },
removeDirectLogin_handler: function (aRecord, aDirectLoginReference) {
var deferredResult;
deferredResult = new Clipperz.Async.Deferred("MainController.removeDirectLogin_handler", {'trace': false});
deferredResult.addMethodcaller('directLogins');
deferredResult.addCallback(MochiKit.Base.itemgetter(aDirectLoginReference));
deferredResult.addMethodcaller('remove');
deferredResult.addCallback(MochiKit.Base.partial(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'refreshCardEditDetail', aRecord.reference()));
deferredResult.callback(aRecord);
return deferredResult;
},
/* /*
shouldExitApp: function (anEvent) { shouldExitApp: function (anEvent) {
//console.log("SHOULD EXIT APP"); //console.log("SHOULD EXIT APP");

View File

@ -289,6 +289,22 @@ $cardViewBasePadding: 10px;
// font-weight:100; // font-weight:100;
} }
} }
.removeDirectLogin {
@include icon-font();
font-size: 20pt;
padding: 8px 20px 11px 8px;
&:hover {
color: rgb(155, 0, 0);
};
}
.directLoginLabel {
vertical-align: bottom;
}
} }
} }