mirror of
http://git.whoc.org.uk/git/password-manager.git
synced 2024-11-14 08:29:01 +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) {
|
||||
return React.DOM.div({'className':'cardDirectLogin', 'key':aDirectLogin['_reference']}, [
|
||||
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,
|
||||
},
|
||||
|
||||
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 () {
|
||||
@ -120,9 +134,9 @@ Clipperz.PM.UI.Components.Cards.View = React.createClass({
|
||||
//............................................................................
|
||||
|
||||
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.div({'className':'directLoginAction action'}, 'DIRECT LOGIN')
|
||||
// React.DOM.div({'className':'directLoginAction action'}, 'DIRECT LOGIN')
|
||||
]);
|
||||
},
|
||||
|
||||
|
@ -74,6 +74,7 @@ Clipperz.PM.UI.MainController = function() {
|
||||
'goBackToMainPage',
|
||||
'maskClick',
|
||||
'downloadOfflineCopy',
|
||||
'runDirectLogin',
|
||||
]);
|
||||
|
||||
// MochiKit.Signal.connect(MochiKit.DOM.currentDocument(), 'onselectionchange', this, 'selectionChange_handler');
|
||||
@ -719,7 +720,7 @@ console.log("SET USER", aUser);
|
||||
this.moveInPage(this.currentPage(), 'mainPage');
|
||||
return this.renderAccountData();
|
||||
},
|
||||
/*
|
||||
|
||||
runDirectLogin_handler: function (someParameters) {
|
||||
//console.log("RUN DIRECT LOGIN", someParameters);
|
||||
var deferredResult;
|
||||
@ -727,12 +728,12 @@ console.log("SET USER", aUser);
|
||||
deferredResult = new Clipperz.Async.Deferred('MainController.runDirectLogin', {trace:false});
|
||||
deferredResult.addMethod(this.user(), 'getRecord', someParameters['record']);
|
||||
deferredResult.addMethodcaller('directLoginWithReference', someParameters['directLogin']);
|
||||
deferredResult.addCallback(Clipperz.PM.UI.DirectLoginRunner.openDirectLogin);
|
||||
deferredResult.addCallback(Clipperz.PM.UI.DirectLoginController.openDirectLogin);
|
||||
deferredResult.callback();
|
||||
|
||||
return deferredResult;
|
||||
},
|
||||
|
||||
/*
|
||||
shouldExitApp: function (anEvent) {
|
||||
//console.log("SHOULD EXIT APP");
|
||||
anEvent.preventDefault();
|
||||
|
Loading…
Reference in New Issue
Block a user