Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js index 2340aeb..effde31 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js | |||
@@ -1,120 +1,117 @@ | |||
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.CardDialogController = function(args) { | 28 | Clipperz.PM.UI.Web.Controllers.CardDialogController = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Controllers.CardDialogController.superclass.constructor.call(this, args); | 31 | Clipperz.PM.UI.Web.Controllers.CardDialogController.superclass.constructor.call(this, args); |
35 | 32 | ||
36 | this._record = args.record || Clipperz.Base.exception.raise('MandatoryParameter'); | 33 | this._record = args.record || Clipperz.Base.exception.raise('MandatoryParameter'); |
37 | this._delegate = args.delegate || Clipperz.Base.exception.raise('MandatoryParameter'); | 34 | this._delegate = args.delegate || Clipperz.Base.exception.raise('MandatoryParameter'); |
38 | 35 | ||
39 | this._referenceElement = null; | 36 | this._referenceElement = null; |
40 | this._cardDialogComponent = null; | 37 | this._cardDialogComponent = null; |
41 | 38 | ||
42 | this._fieldsReferences = {}; | 39 | this._fieldsReferences = {}; |
43 | this._directLoginReferences = {}; | 40 | this._directLoginReferences = {}; |
44 | 41 | ||
45 | this._directLoginWizardController = null; | 42 | this._directLoginWizardController = null; |
46 | this._directLoginEditingComponent = null; | 43 | this._directLoginEditingComponent = null; |
47 | this._isDirectLoginEditingComponentVisible = false; | 44 | this._isDirectLoginEditingComponentVisible = false; |
48 | 45 | ||
49 | return this; | 46 | return this; |
50 | }; | 47 | }; |
51 | 48 | ||
52 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.CardDialogController, Object, { | 49 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.CardDialogController, Object, { |
53 | 50 | ||
54 | 'toString': function() { | 51 | 'toString': function() { |
55 | return "Clipperz.PM.UI.Web.Controllers.CardDialogController"; | 52 | return "Clipperz.PM.UI.Web.Controllers.CardDialogController"; |
56 | }, | 53 | }, |
57 | 54 | ||
58 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
59 | 56 | ||
60 | 'record': function () { | 57 | 'record': function () { |
61 | return this._record; | 58 | return this._record; |
62 | }, | 59 | }, |
63 | 60 | ||
64 | 'delegate': function () { | 61 | 'delegate': function () { |
65 | return this._delegate; | 62 | return this._delegate; |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | 66 | ||
70 | 'fieldsReferences': function () { | 67 | 'fieldsReferences': function () { |
71 | return this._fieldsReferences; | 68 | return this._fieldsReferences; |
72 | }, | 69 | }, |
73 | 70 | ||
74 | 'directLoginReferences': function () { | 71 | 'directLoginReferences': function () { |
75 | return this._directLoginReferences; | 72 | return this._directLoginReferences; |
76 | }, | 73 | }, |
77 | 74 | ||
78 | //------------------------------------------------------------------------- | 75 | //------------------------------------------------------------------------- |
79 | 76 | ||
80 | 'referenceElement': function () { | 77 | 'referenceElement': function () { |
81 | return this._referenceElement; | 78 | return this._referenceElement; |
82 | }, | 79 | }, |
83 | 80 | ||
84 | 'setReferenceElement': function (anElement) { | 81 | 'setReferenceElement': function (anElement) { |
85 | this._referenceElement = anElement; | 82 | this._referenceElement = anElement; |
86 | }, | 83 | }, |
87 | 84 | ||
88 | //------------------------------------------------------------------------- | 85 | //------------------------------------------------------------------------- |
89 | 86 | ||
90 | 'cardDialogComponent': function () { | 87 | 'cardDialogComponent': function () { |
91 | if (this._cardDialogComponent == null) { | 88 | if (this._cardDialogComponent == null) { |
92 | this._cardDialogComponent = new Clipperz.PM.UI.Web.Components.CardDialogComponent(); | 89 | this._cardDialogComponent = new Clipperz.PM.UI.Web.Components.CardDialogComponent(); |
93 | 90 | ||
94 | MochiKit.Signal.connect(this._cardDialogComponent, 'cancel', this, 'handleCancel'); | 91 | MochiKit.Signal.connect(this._cardDialogComponent, 'cancel', this, 'handleCancel'); |
95 | MochiKit.Signal.connect(this._cardDialogComponent, 'save', this, 'handleSave'); | 92 | MochiKit.Signal.connect(this._cardDialogComponent, 'save', this, 'handleSave'); |
96 | 93 | ||
97 | MochiKit.Signal.connect(this._cardDialogComponent, 'addField', this, 'handleAddField'); | 94 | MochiKit.Signal.connect(this._cardDialogComponent, 'addField', this, 'handleAddField'); |
98 | MochiKit.Signal.connect(this._cardDialogComponent, 'changedValue',this, 'handleChangedValue'); | 95 | MochiKit.Signal.connect(this._cardDialogComponent, 'changedValue',this, 'handleChangedValue'); |
99 | 96 | ||
100 | MochiKit.Signal.connect(this._cardDialogComponent, 'addDirectLogin',this, 'handleAddDirectLogin'); | 97 | MochiKit.Signal.connect(this._cardDialogComponent, 'addDirectLogin',this, 'handleAddDirectLogin'); |
101 | MochiKit.Signal.connect(this._cardDialogComponent, 'keyPressed',this, 'handleCardDialogComponentKeyPressed'); | 98 | MochiKit.Signal.connect(this._cardDialogComponent, 'keyPressed',this, 'handleCardDialogComponentKeyPressed'); |
102 | } | 99 | } |
103 | 100 | ||
104 | return this._cardDialogComponent; | 101 | return this._cardDialogComponent; |
105 | }, | 102 | }, |
106 | 103 | ||
107 | //========================================================================= | 104 | //========================================================================= |
108 | 105 | ||
109 | 'directLoginWizardController': function () { | 106 | 'directLoginWizardController': function () { |
110 | if (this._directLoginWizardController == null) { | 107 | if (this._directLoginWizardController == null) { |
111 | this._directLoginWizardController = new Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController({ | 108 | this._directLoginWizardController = new Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController({ |
112 | 'cardLabel': this.cardDialogComponent().title(), | 109 | 'cardLabel': this.cardDialogComponent().title(), |
113 | 'directLoginEditingComponent': this.directLoginEditingComponent() | 110 | 'directLoginEditingComponent': this.directLoginEditingComponent() |
114 | }) | 111 | }) |
115 | 112 | ||
116 | MochiKit.Signal.connect(this._directLoginWizardController, 'exit',this, 'handleHideDirectLoginEditingComponent'); | 113 | MochiKit.Signal.connect(this._directLoginWizardController, 'exit',this, 'handleHideDirectLoginEditingComponent'); |
117 | MochiKit.Signal.connect(this._directLoginWizardController, 'done',this, 'handleCompleteDirectLoginEditingComponent'); | 114 | MochiKit.Signal.connect(this._directLoginWizardController, 'done',this, 'handleCompleteDirectLoginEditingComponent'); |
118 | } | 115 | } |
119 | 116 | ||
120 | return this._directLoginWizardController; | 117 | return this._directLoginWizardController; |