Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js | 15 |
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,152 +1,149 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController = function(args) { | 28 | Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController = function(args) { |
32 | this._directLoginEditingComponent = args.directLoginEditingComponent|| Clipperz.Base.exception.raise('MandatoryParameter'); | 29 | this._directLoginEditingComponent = args.directLoginEditingComponent|| Clipperz.Base.exception.raise('MandatoryParameter'); |
33 | this._cardLabel = args.cardLabel || Clipperz.Base.exception.raise('MandatoryParameter'); | 30 | this._cardLabel = args.cardLabel || Clipperz.Base.exception.raise('MandatoryParameter'); |
34 | 31 | ||
35 | MochiKit.Signal.connect(this._directLoginEditingComponent, 'changedValue',this, 'handleChangedValue'); | 32 | MochiKit.Signal.connect(this._directLoginEditingComponent, 'changedValue',this, 'handleChangedValue'); |
36 | MochiKit.Signal.connect(this._directLoginEditingComponent, 'moveForward',this, 'handleMoveForward'); | 33 | MochiKit.Signal.connect(this._directLoginEditingComponent, 'moveForward',this, 'handleMoveForward'); |
37 | MochiKit.Signal.connect(this._directLoginEditingComponent, 'keyPressed',this, 'handleDirectLoginEditingComponentKeyPressed'); | 34 | MochiKit.Signal.connect(this._directLoginEditingComponent, 'keyPressed',this, 'handleDirectLoginEditingComponentKeyPressed'); |
38 | 35 | ||
39 | this._directLogin = null; | 36 | this._directLogin = null; |
40 | this._directLoginHasJustBeenAdded = false; | 37 | this._directLoginHasJustBeenAdded = false; |
41 | 38 | ||
42 | this._rulerComponent = null; | 39 | this._rulerComponent = null; |
43 | 40 | ||
44 | this._steps = null; | 41 | this._steps = null; |
45 | this._currentStepIndex = 0; | 42 | this._currentStepIndex = 0; |
46 | this._isNextEnabled = false; | 43 | this._isNextEnabled = false; |
47 | 44 | ||
48 | this._recordFields = null; | 45 | this._recordFields = null; |
49 | this._originalBindings = null; | 46 | this._originalBindings = null; |
50 | 47 | ||
51 | this._bindingComponents = []; | 48 | this._bindingComponents = []; |
52 | this._formValueComponents = []; | 49 | this._formValueComponents = []; |
53 | 50 | ||
54 | return this; | 51 | return this; |
55 | } | 52 | } |
56 | 53 | ||
57 | MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController.prototype, { | 54 | MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController.prototype, { |
58 | 55 | ||
59 | 'toString': function() { | 56 | 'toString': function() { |
60 | return "Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController"; | 57 | return "Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController"; |
61 | }, | 58 | }, |
62 | 59 | ||
63 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
64 | 61 | ||
65 | 'directLogin': function () { | 62 | 'directLogin': function () { |
66 | return this._directLogin; | 63 | return this._directLogin; |
67 | }, | 64 | }, |
68 | 65 | ||
69 | //------------------------------------------------------------------------- | 66 | //------------------------------------------------------------------------- |
70 | 67 | ||
71 | 'directLoginHasJustBeenAdded': function () { | 68 | 'directLoginHasJustBeenAdded': function () { |
72 | return this._directLoginHasJustBeenAdded; | 69 | return this._directLoginHasJustBeenAdded; |
73 | }, | 70 | }, |
74 | 71 | ||
75 | 'setDirectLoginHasJustBeenAdded': function (aValue) { | 72 | 'setDirectLoginHasJustBeenAdded': function (aValue) { |
76 | this._directLoginHasJustBeenAdded = aValue; | 73 | this._directLoginHasJustBeenAdded = aValue; |
77 | }, | 74 | }, |
78 | 75 | ||
79 | //------------------------------------------------------------------------- | 76 | //------------------------------------------------------------------------- |
80 | 77 | ||
81 | 'directLoginEditingComponent': function () { | 78 | 'directLoginEditingComponent': function () { |
82 | return this._directLoginEditingComponent; | 79 | return this._directLoginEditingComponent; |
83 | }, | 80 | }, |
84 | 81 | ||
85 | //============================================================================= | 82 | //============================================================================= |
86 | 83 | ||
87 | 'cardLabel': function () { | 84 | 'cardLabel': function () { |
88 | return this._cardLabel; | 85 | return this._cardLabel; |
89 | }, | 86 | }, |
90 | 87 | ||
91 | //============================================================================= | 88 | //============================================================================= |
92 | 89 | ||
93 | 'resetCurrentStepIndex': function () { | 90 | 'resetCurrentStepIndex': function () { |
94 | this._currentStepIndex = 0; | 91 | this._currentStepIndex = 0; |
95 | this.rulerComponent().resetStatus(); | 92 | this.rulerComponent().resetStatus(); |
96 | }, | 93 | }, |
97 | 94 | ||
98 | //----------------------------------------------------------------------------- | 95 | //----------------------------------------------------------------------------- |
99 | 96 | ||
100 | 'enableNext': function (aValue) { | 97 | 'enableNext': function (aValue) { |
101 | this.rulerComponent().enableNext(aValue); | 98 | this.rulerComponent().enableNext(aValue); |
102 | this._isNextEnabled = aValue; | 99 | this._isNextEnabled = aValue; |
103 | }, | 100 | }, |
104 | 101 | ||
105 | 'isNextEnabled': function () { | 102 | 'isNextEnabled': function () { |
106 | return this._isNextEnabled; | 103 | return this._isNextEnabled; |
107 | }, | 104 | }, |
108 | 105 | ||
109 | //----------------------------------------------------------------------------- | 106 | //----------------------------------------------------------------------------- |
110 | 107 | ||
111 | 'enablePrevious': function (aValue) { | 108 | 'enablePrevious': function (aValue) { |
112 | this.rulerComponent().enablePrevious(aValue); | 109 | this.rulerComponent().enablePrevious(aValue); |
113 | }, | 110 | }, |
114 | 111 | ||
115 | //============================================================================= | 112 | //============================================================================= |
116 | 113 | ||
117 | 'bindingComponents': function () { | 114 | 'bindingComponents': function () { |
118 | return this._bindingComponents; | 115 | return this._bindingComponents; |
119 | }, | 116 | }, |
120 | 117 | ||
121 | 'resetBindingComponents': function () { | 118 | 'resetBindingComponents': function () { |
122 | this.directLoginEditingComponent().clearAllBindingsComponents(); | 119 | this.directLoginEditingComponent().clearAllBindingsComponents(); |
123 | this._bindingComponents = []; | 120 | this._bindingComponents = []; |
124 | }, | 121 | }, |
125 | 122 | ||
126 | //============================================================================= | 123 | //============================================================================= |
127 | 124 | ||
128 | 'formValueComponents': function () { | 125 | 'formValueComponents': function () { |
129 | return this._formValueComponents; | 126 | return this._formValueComponents; |
130 | }, | 127 | }, |
131 | 128 | ||
132 | 'resetFormValueComponents': function () { | 129 | 'resetFormValueComponents': function () { |
133 | this.directLoginEditingComponent().clearAllFormValueComponents(); | 130 | this.directLoginEditingComponent().clearAllFormValueComponents(); |
134 | this._formValueComponents = []; | 131 | this._formValueComponents = []; |
135 | }, | 132 | }, |
136 | 133 | ||
137 | //============================================================================= | 134 | //============================================================================= |
138 | 135 | ||
139 | 'recordFields': function () { | 136 | 'recordFields': function () { |
140 | return this._recordFields; | 137 | return this._recordFields; |
141 | }, | 138 | }, |
142 | 139 | ||
143 | 'setRecordFields': function (aValue) { | 140 | 'setRecordFields': function (aValue) { |
144 | this._recordFields = aValue; | 141 | this._recordFields = aValue; |
145 | }, | 142 | }, |
146 | 143 | ||
147 | 'recordFieldWithReference': function (aReference) { | 144 | 'recordFieldWithReference': function (aReference) { |
148 | var matchingValues; | 145 | var matchingValues; |
149 | var result; | 146 | var result; |
150 | 147 | ||
151 | matchingValues = MochiKit.Base.filter(function (aField) { return aField['reference'] == aReference; }, this.recordFields()); | 148 | matchingValues = MochiKit.Base.filter(function (aField) { return aField['reference'] == aReference; }, this.recordFields()); |
152 | 149 | ||