mirror of
http://git.whoc.org.uk/git/password-manager.git
synced 2025-01-10 06:30:02 +01:00
Enabled direct login execution
This commit is contained in:
parent
132af87411
commit
dadca4dfa0
@ -339,7 +339,7 @@ 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.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')
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -33,6 +33,20 @@ Clipperz.PM.UI.Components.Cards.View = React.createClass({
|
|||||||
'loading': React.PropTypes.bool,
|
'loading': React.PropTypes.bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleDirectLoginClick: function (aDirectLogin) {
|
||||||
|
var directLoginParameters;
|
||||||
|
|
||||||
|
console.log("PROPS", this.props);
|
||||||
|
directLoginParameters = {
|
||||||
|
'record': this.props['_reference'],
|
||||||
|
'directLogin': aDirectLogin['_reference'],
|
||||||
|
};
|
||||||
|
|
||||||
|
return function (anEvent) {
|
||||||
|
MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'runDirectLogin', directLoginParameters);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
renderEmpty: function () {
|
renderEmpty: function () {
|
||||||
@ -120,9 +134,9 @@ Clipperz.PM.UI.Components.Cards.View = React.createClass({
|
|||||||
//............................................................................
|
//............................................................................
|
||||||
|
|
||||||
renderDirectLogin: function (aDirectLogin) {
|
renderDirectLogin: function (aDirectLogin) {
|
||||||
return React.DOM.div({'className':'cardDirectLogin'}, [
|
return React.DOM.div({'className':'cardDirectLogin', 'onClick':this.handleDirectLoginClick(aDirectLogin)}, [
|
||||||
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')
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ Clipperz.PM.UI.MainController = function() {
|
|||||||
'goBackToMainPage',
|
'goBackToMainPage',
|
||||||
'maskClick',
|
'maskClick',
|
||||||
'downloadOfflineCopy',
|
'downloadOfflineCopy',
|
||||||
|
'runDirectLogin',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// MochiKit.Signal.connect(MochiKit.DOM.currentDocument(), 'onselectionchange', this, 'selectionChange_handler');
|
// MochiKit.Signal.connect(MochiKit.DOM.currentDocument(), 'onselectionchange', this, 'selectionChange_handler');
|
||||||
@ -719,7 +720,7 @@ console.log("SET USER", aUser);
|
|||||||
this.moveInPage(this.currentPage(), 'mainPage');
|
this.moveInPage(this.currentPage(), 'mainPage');
|
||||||
return this.renderAccountData();
|
return this.renderAccountData();
|
||||||
},
|
},
|
||||||
/*
|
|
||||||
runDirectLogin_handler: function (someParameters) {
|
runDirectLogin_handler: function (someParameters) {
|
||||||
//console.log("RUN DIRECT LOGIN", someParameters);
|
//console.log("RUN DIRECT LOGIN", someParameters);
|
||||||
var deferredResult;
|
var deferredResult;
|
||||||
@ -727,12 +728,12 @@ console.log("SET USER", aUser);
|
|||||||
deferredResult = new Clipperz.Async.Deferred('MainController.runDirectLogin', {trace:false});
|
deferredResult = new Clipperz.Async.Deferred('MainController.runDirectLogin', {trace:false});
|
||||||
deferredResult.addMethod(this.user(), 'getRecord', someParameters['record']);
|
deferredResult.addMethod(this.user(), 'getRecord', someParameters['record']);
|
||||||
deferredResult.addMethodcaller('directLoginWithReference', someParameters['directLogin']);
|
deferredResult.addMethodcaller('directLoginWithReference', someParameters['directLogin']);
|
||||||
deferredResult.addCallback(Clipperz.PM.UI.DirectLoginRunner.openDirectLogin);
|
deferredResult.addCallback(Clipperz.PM.UI.DirectLoginController.openDirectLogin);
|
||||||
deferredResult.callback();
|
deferredResult.callback();
|
||||||
|
|
||||||
return deferredResult;
|
return deferredResult;
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
shouldExitApp: function (anEvent) {
|
shouldExitApp: function (anEvent) {
|
||||||
//console.log("SHOULD EXIT APP");
|
//console.log("SHOULD EXIT APP");
|
||||||
anEvent.preventDefault();
|
anEvent.preventDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user