summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js
Side-by-side diff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js') (more/less context) (show whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js
index 38fdc08..c025a51 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js
@@ -1,216 +1,213 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* Clipperz Community Edition is free software: you can redistribute
it and/or modify it under the terms of the GNU Affero General Public
License as published by the Free Software Foundation, either version
3 of the License, or (at your option) any later version.
-* Javascript Crypto Library is distributed in the hope that it will
+* Clipperz Community Edition is distributed in the hope that it will
be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public
- License along with Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers');
Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController = function(args) {
this._directLoginEditingComponent = args.directLoginEditingComponent || Clipperz.Base.exception.raise('MandatoryParameter');
this._cardLabel = args.cardLabel || Clipperz.Base.exception.raise('MandatoryParameter');
MochiKit.Signal.connect(this._directLoginEditingComponent, 'changedValue', this, 'handleChangedValue');
MochiKit.Signal.connect(this._directLoginEditingComponent, 'moveForward', this, 'handleMoveForward');
MochiKit.Signal.connect(this._directLoginEditingComponent, 'keyPressed', this, 'handleDirectLoginEditingComponentKeyPressed');
this._directLogin = null;
this._directLoginHasJustBeenAdded = false;
this._rulerComponent = null;
this._steps = null;
this._currentStepIndex = 0;
this._isNextEnabled = false;
this._recordFields = null;
this._originalBindings = null;
this._bindingComponents = [];
this._formValueComponents = [];
return this;
}
MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController.prototype, {
'toString': function() {
return "Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController";
},
//-------------------------------------------------------------------------
'directLogin': function () {
return this._directLogin;
},
//-------------------------------------------------------------------------
'directLoginHasJustBeenAdded': function () {
return this._directLoginHasJustBeenAdded;
},
'setDirectLoginHasJustBeenAdded': function (aValue) {
this._directLoginHasJustBeenAdded = aValue;
},
//-------------------------------------------------------------------------
'directLoginEditingComponent': function () {
return this._directLoginEditingComponent;
},
//=============================================================================
'cardLabel': function () {
return this._cardLabel;
},
//=============================================================================
'resetCurrentStepIndex': function () {
this._currentStepIndex = 0;
this.rulerComponent().resetStatus();
},
//-----------------------------------------------------------------------------
'enableNext': function (aValue) {
this.rulerComponent().enableNext(aValue);
this._isNextEnabled = aValue;
},
'isNextEnabled': function () {
return this._isNextEnabled;
},
//-----------------------------------------------------------------------------
'enablePrevious': function (aValue) {
this.rulerComponent().enablePrevious(aValue);
},
//=============================================================================
'bindingComponents': function () {
return this._bindingComponents;
},
'resetBindingComponents': function () {
this.directLoginEditingComponent().clearAllBindingsComponents();
this._bindingComponents = [];
},
//=============================================================================
'formValueComponents': function () {
return this._formValueComponents;
},
'resetFormValueComponents': function () {
this.directLoginEditingComponent().clearAllFormValueComponents();
this._formValueComponents = [];
},
//=============================================================================
'recordFields': function () {
return this._recordFields;
},
'setRecordFields': function (aValue) {
this._recordFields = aValue;
},
'recordFieldWithReference': function (aReference) {
var matchingValues;
var result;
matchingValues = MochiKit.Base.filter(function (aField) { return aField['reference'] == aReference; }, this.recordFields());
if (matchingValues.length == 0) {
result = null;
} else {
result = matchingValues[0];
}
return result;
},
//-----------------------------------------------------------------------------
'originalBindings': function () {
return this._originalBindings;
},
'setOriginalBindings': function (aValue) {
//console.log("BINDINGS", aValue);
this._originalBindings = aValue;
},
//=============================================================================
'rulerComponent': function () {
if (this._rulerComponent == null) {
this._rulerComponent = new Clipperz.PM.UI.Web.Components.RulerComponent({
translationContext:'Wizards.DirectLoginWizard'
});
this._rulerComponent.render();
MochiKit.Signal.connect(this._rulerComponent, 'exit', this, 'handleExit');
MochiKit.Signal.connect(this._rulerComponent, 'done', this, 'done');
MochiKit.Signal.connect(this._rulerComponent, 'moveForward', this, 'handleMoveForward');
MochiKit.Signal.connect(this._rulerComponent, 'moveBackward', this, 'handleMoveBackward');
MochiKit.Signal.connect(this._rulerComponent, 'cursorMoved', this, 'handleCursorMoved');
}
return this._rulerComponent;
},
//-----------------------------------------------------------------------------
'showRuler': function (someSteps) {
var rulerElement;
this.setSteps(someSteps);
rulerElement = this.rulerComponent().element();
this.directLoginEditingComponent().disableAllPanels();
MochiKit.Style.showElement(rulerElement);
MochiKit.Style.setElementPosition(rulerElement, {x:-1000, y:this.directLoginEditingComponent().bottomMargin()});
new MochiKit.Visual.Move(rulerElement, {
x:0, y:this.directLoginEditingComponent().bottomMargin(),
mode:'absolute',
duration:1,
afterFinish:MochiKit.Base.method(this, 'handleCursorMoved')
});
},
'fixRulerRendering': function (aValue) {
this.rulerComponent().setDisplayMode(aValue);
},
//-----------------------------------------------------------------------------