Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Common') (more/less context) (show whitespace changes)
15 files changed, 151 insertions, 223 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js index b9d7adf..58b7593 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js | |||
@@ -1,38 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); |
27 | 25 | ||
28 | //############################################################################# | 26 | //############################################################################# |
29 | 27 | ||
30 | var _Clipperz_PM_Components_base_id_ = 0; | 28 | var _Clipperz_PM_Components_base_id_ = 0; |
31 | 29 | ||
32 | //############################################################################# | 30 | //############################################################################# |
33 | 31 | ||
34 | Clipperz.PM.UI.Common.Components.BaseComponent = function(args) { | 32 | Clipperz.PM.UI.Common.Components.BaseComponent = function(args) { |
35 | args = args || {}; | 33 | args = args || {}; |
36 | Clipperz.PM.UI.Common.Components.BaseComponent.superclass.constructor.call(this, args); | 34 | Clipperz.PM.UI.Common.Components.BaseComponent.superclass.constructor.call(this, args); |
37 | 35 | ||
38 | this._element = args.element || null; | 36 | this._element = args.element || null; |
@@ -110,33 +108,32 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.BaseComponent, /*Ext.Compo | |||
110 | 108 | ||
111 | //------------------------------------------------------------------------- | 109 | //------------------------------------------------------------------------- |
112 | /* | 110 | /* |
113 | 'domHelper': function() { | 111 | 'domHelper': function() { |
114 | return Clipperz.YUI.DomHelper; | 112 | return Clipperz.YUI.DomHelper; |
115 | }, | 113 | }, |
116 | */ | 114 | */ |
117 | //------------------------------------------------------------------------- | 115 | //------------------------------------------------------------------------- |
118 | /* | 116 | /* |
119 | 'domHelperAppend': function(aValue) { | 117 | 'domHelperAppend': function(aValue) { |
120 | Clipperz.YUI.DomHelper.append(this.element().dom, aValue); | 118 | Clipperz.YUI.DomHelper.append(this.element().dom, aValue); |
121 | }, | 119 | }, |
122 | */ | 120 | */ |
123 | //------------------------------------------------------------------------- | 121 | //------------------------------------------------------------------------- |
124 | 122 | ||
125 | 'element': function() { | 123 | 'element': function() { |
126 | //MochiKit.Logging.logDebug(">>> BaseComponent.element"); | ||
127 | return MochiKit.DOM.getElement(this._element); | 124 | return MochiKit.DOM.getElement(this._element); |
128 | }, | 125 | }, |
129 | 126 | ||
130 | 'setElement': function(aNode) { | 127 | 'setElement': function(aNode) { |
131 | this._element = aNode; | 128 | this._element = aNode; |
132 | }, | 129 | }, |
133 | 130 | ||
134 | //----------------------------------------------------- | 131 | //----------------------------------------------------- |
135 | 132 | ||
136 | 'displayElement': function() { | 133 | 'displayElement': function() { |
137 | return this.element(); | 134 | return this.element(); |
138 | }, | 135 | }, |
139 | 136 | ||
140 | //------------------------------------------------------------------------- | 137 | //------------------------------------------------------------------------- |
141 | 138 | ||
142 | 'renderInNode': function(aDomNode) { | 139 | 'renderInNode': function(aDomNode) { |
@@ -300,37 +297,34 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.BaseComponent, /*Ext.Compo | |||
300 | this.slotComponents()[aSlotName].remove(); | 297 | this.slotComponents()[aSlotName].remove(); |
301 | } | 298 | } |
302 | 299 | ||
303 | this.slotComponents()[aSlotName] = aComponent; | 300 | this.slotComponents()[aSlotName] = aComponent; |
304 | 301 | ||
305 | // domNode = MochiKit.DOM.getElement(this.slotNamed(aSlotName)); | 302 | // domNode = MochiKit.DOM.getElement(this.slotNamed(aSlotName)); |
306 | domNode = this.elementForSlotNamed(aSlotName); | 303 | domNode = this.elementForSlotNamed(aSlotName); |
307 | 304 | ||
308 | if (domNode != null) { | 305 | if (domNode != null) { |
309 | aComponent.renderInNode(domNode); | 306 | aComponent.renderInNode(domNode); |
310 | } | 307 | } |
311 | }, | 308 | }, |
312 | 309 | ||
313 | //----------------------------------------------------- | 310 | //----------------------------------------------------- |
314 | /* | 311 | /* |
315 | 'purgeListeners': function() { | 312 | 'purgeListeners': function() { |
316 | //MochiKit.Logging.logDebug(">>> Clipperz.PM.UI.Common.Components.BaseComponent.purgeListeners [" + this + "]"); | ||
317 | //MochiKit.Logging.logDebug("--- " + this + ".purgeListeners"); | ||
318 | Clipperz.NotificationCenter.unregister(this); | 313 | Clipperz.NotificationCenter.unregister(this); |
319 | MochiKit.Signal.disconnectAllTo(this); | 314 | MochiKit.Signal.disconnectAllTo(this); |
320 | //MochiKit.Logging.logDebug("<<< Clipperz.PM.UI.Common.Components.BaseComponent.purgeListeners"); | ||
321 | }, | 315 | }, |
322 | */ | 316 | */ |
323 | //----------------------------------------------------- | 317 | //----------------------------------------------------- |
324 | 318 | ||
325 | 'clear': function() { | 319 | 'clear': function() { |
326 | varslotName; | 320 | varslotName; |
327 | var componentId; | 321 | var componentId; |
328 | 322 | ||
329 | MochiKit.Signal.disconnectAllTo(this); | 323 | MochiKit.Signal.disconnectAllTo(this); |
330 | 324 | ||
331 | for (slotName in this.slotComponents()) { | 325 | for (slotName in this.slotComponents()) { |
332 | this.slotComponents()[slotName].clear(); | 326 | this.slotComponents()[slotName].clear(); |
333 | } | 327 | } |
334 | 328 | ||
335 | for (componentId in this.components()) { | 329 | for (componentId in this.components()) { |
336 | this.components()[componentId].clear(); | 330 | this.components()[componentId].clear(); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js index 1010c9d..1268118 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js | |||
@@ -1,38 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Common.Components.Button = function(args) { | 26 | Clipperz.PM.UI.Common.Components.Button = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Common.Components.Button.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Common.Components.Button.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._element = args.element || Clipperz.Base.exception.raise('MandatoryParameter'); | 31 | this._element = args.element || Clipperz.Base.exception.raise('MandatoryParameter'); |
34 | this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); | 32 | this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); |
35 | this._isDefault = args.isDefault|| false; | 33 | this._isDefault = args.isDefault|| false; |
36 | 34 | ||
37 | this.render(); | 35 | this.render(); |
38 | 36 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ComponentSlot.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ComponentSlot.js index 7f56c1e..2f82359 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ComponentSlot.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ComponentSlot.js | |||
@@ -1,38 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); |
27 | 25 | ||
28 | //############################################################################# | 26 | //############################################################################# |
29 | 27 | ||
30 | 28 | ||
31 | Clipperz.PM.UI.Common.Components.ComponentSlot = function(aComponent, aSlotName) { | 29 | Clipperz.PM.UI.Common.Components.ComponentSlot = function(aComponent, aSlotName) { |
32 | this._component = aComponent; | 30 | this._component = aComponent; |
33 | this._slotName = aSlotName; | 31 | this._slotName = aSlotName; |
34 | 32 | ||
35 | return this; | 33 | return this; |
36 | } | 34 | } |
37 | 35 | ||
38 | //============================================================================= | 36 | //============================================================================= |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/FaviconComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/FaviconComponent.js index 2db2489..bf00ffc 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/FaviconComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/FaviconComponent.js | |||
@@ -1,38 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Common.Components.FaviconComponent = function(args) { | 26 | Clipperz.PM.UI.Common.Components.FaviconComponent = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Common.Components.FaviconComponent.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Common.Components.FaviconComponent.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this.render(); | 31 | this.render(); |
34 | this.setSrc(args.src); | 32 | this.setSrc(args.src); |
35 | 33 | ||
36 | return this; | 34 | return this; |
37 | } | 35 | } |
38 | 36 | ||
@@ -64,25 +62,25 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.FaviconComponent, Clipperz | |||
64 | 62 | ||
65 | 'renderSelf': function () { | 63 | 'renderSelf': function () { |
66 | MochiKit.Signal.connect(this.element(), 'onerror',this, 'setDefaultFavicon'); | 64 | MochiKit.Signal.connect(this.element(), 'onerror',this, 'setDefaultFavicon'); |
67 | MochiKit.Signal.connect(this.element(), 'onabort',this, 'setDefaultFavicon'); | 65 | MochiKit.Signal.connect(this.element(), 'onabort',this, 'setDefaultFavicon'); |
68 | MochiKit.Signal.connect(this.element(), 'onload',this, 'handleOnLoad'); | 66 | MochiKit.Signal.connect(this.element(), 'onload',this, 'handleOnLoad'); |
69 | }, | 67 | }, |
70 | 68 | ||
71 | //------------------------------------------------------------------------- | 69 | //------------------------------------------------------------------------- |
72 | 70 | ||
73 | 'setDefaultFavicon': function (anEvent) { | 71 | 'setDefaultFavicon': function (anEvent) { |
74 | MochiKit.Signal.disconnectAll(anEvent.src()); | 72 | MochiKit.Signal.disconnectAll(anEvent.src()); |
75 | this.setSrc(null); | 73 | this.setSrc(null); |
76 | }, | 74 | }, |
77 | 75 | ||
78 | 'handleOnLoad': function (anEvent) { | 76 | 'handleOnLoad': function (anEvent) { |
79 | MochiKit.Signal.disconnectAll(anEvent.src()); | 77 | MochiKit.Signal.disconnectAll(anEvent.src()); |
80 | //console.log("HANDLE ON LOAD", anEvent, anEvent.src().src); | 78 | |
81 | if (anEvent.src().complete == false) { | 79 | if (anEvent.src().complete == false) { |
82 | this.setSrc(null); | 80 | this.setSrc(null); |
83 | } | 81 | } |
84 | }, | 82 | }, |
85 | 83 | ||
86 | //------------------------------------------------------------------------- | 84 | //------------------------------------------------------------------------- |
87 | __syntaxFix__: "syntax fix" | 85 | __syntaxFix__: "syntax fix" |
88 | }); | 86 | }); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js index 2788b79..020290b 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js | |||
@@ -1,38 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar = function(args) { | 26 | Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | // this._openFromElement = args.openFromElement || null; | 31 | // this._openFromElement = args.openFromElement || null; |
34 | this._onOkCloseToElement = args.onOkCloseToElement || null; | 32 | this._onOkCloseToElement = args.onOkCloseToElement || null; |
35 | this._onCancelCloseToElement = args.onCancelCloseToElement|| null; | 33 | this._onCancelCloseToElement = args.onCancelCloseToElement|| null; |
36 | 34 | ||
37 | this._canCancelWhileProcessing= ((typeof(args.canCancelWhileProcessing) == 'undefined') ? true : args.canCancelWhileProcessing); | 35 | this._canCancelWhileProcessing= ((typeof(args.canCancelWhileProcessing) == 'undefined') ? true : args.canCancelWhileProcessing); |
38 | 36 | ||
@@ -118,44 +116,40 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBa | |||
118 | 'showFailure': function (someParameters) { | 116 | 'showFailure': function (someParameters) { |
119 | // this.setType('ALERT'); | 117 | // this.setType('ALERT'); |
120 | this.setType(someParameters['type']); | 118 | this.setType(someParameters['type']); |
121 | // this.setTitle("Login failed"); | 119 | // this.setTitle("Login failed"); |
122 | this.setTitle(someParameters['title']); | 120 | this.setTitle(someParameters['title']); |
123 | // this.setText("Wrong passphrase; the unlock has failed."); | 121 | // this.setText("Wrong passphrase; the unlock has failed."); |
124 | this.setText(someParameters['text']); | 122 | this.setText(someParameters['text']); |
125 | // this.getElement('container').innerHTML = ''; | 123 | // this.getElement('container').innerHTML = ''; |
126 | this.getElement('container').innerHTML = ''; | 124 | this.getElement('container').innerHTML = ''; |
127 | // this.setButtons([{text:"Close", result:'CANCEL', isDefault:true}]); | 125 | // this.setButtons([{text:"Close", result:'CANCEL', isDefault:true}]); |
128 | this.setButtons(someParameters['buttons']); | 126 | this.setButtons(someParameters['buttons']); |
129 | }, | 127 | }, |
130 | 128 | ||
131 | //------------------------------------------------------------------------- | 129 | //------------------------------------------------------------------------- |
132 | 130 | ||
133 | 'closeOk': function () { | 131 | 'closeOk': function () { |
134 | //console.log("=== closeOk"); | ||
135 | this.showProgressBar(); | 132 | this.showProgressBar(); |
136 | MochiKit.Async.callLater(0.5, MochiKit.Base.method(this.deferred(), 'callback')); | 133 | MochiKit.Async.callLater(0.5, MochiKit.Base.method(this.deferred(), 'callback')); |
137 | this._deferred = null; | 134 | this._deferred = null; |
138 | }, | 135 | }, |
139 | 136 | ||
140 | 'closeCancel': function () { | 137 | 'closeCancel': function () { |
141 | //console.log("=== closeCancel"); | ||
142 | this.deferredHideModal({closeToElement:this.onCancelCloseToElement()}); | 138 | this.deferredHideModal({closeToElement:this.onCancelCloseToElement()}); |
143 | this.deferred().cancel(); | 139 | this.deferred().cancel(); |
144 | this._deferred = null; | 140 | this._deferred = null; |
145 | }, | 141 | }, |
146 | 142 | ||
147 | //------------------------------------------------------------------------- | 143 | //------------------------------------------------------------------------- |
148 | 144 | ||
149 | 'deferredDone': function () { | 145 | 'deferredDone': function () { |
150 | //console.log("=== deferredDone"); | ||
151 | return this.deferredHideModal({closeToElement:this.onOkCloseToElement()}); | 146 | return this.deferredHideModal({closeToElement:this.onOkCloseToElement()}); |
152 | }, | 147 | }, |
153 | 148 | ||
154 | 'deferredError': function (someParameters) { | 149 | 'deferredError': function (someParameters) { |
155 | //console.log("=== deferredError"); | ||
156 | this.showFailure(someParameters); | 150 | this.showFailure(someParameters); |
157 | }, | 151 | }, |
158 | 152 | ||
159 | //------------------------------------------------------------------------- | 153 | //------------------------------------------------------------------------- |
160 | __syntaxFix__: "syntax fix" | 154 | __syntaxFix__: "syntax fix" |
161 | }); | 155 | }); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js index 089e3d4..78e8c9b 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/PasswordEntropyDisplay.js | |||
@@ -1,54 +1,50 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay = function(anElement, args) { | 26 | Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay = function(anElement, args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | //MochiKit.Logging.logDebug(">>> new TextFormField"); | ||
32 | Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay.superclass.constructor.call(this, anElement, args); | 29 | Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay.superclass.constructor.call(this, anElement, args); |
33 | 30 | ||
34 | this._wrapperElement = null; | 31 | this._wrapperElement = null; |
35 | this._entropyElement = null; | 32 | this._entropyElement = null; |
36 | 33 | ||
37 | this.render(); | 34 | this.render(); |
38 | //MochiKit.Logging.logDebug("<<< new TextFormField"); | ||
39 | 35 | ||
40 | return this; | 36 | return this; |
41 | }; | 37 | }; |
42 | 38 | ||
43 | Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay, Clipperz.PM.UI.Common.Components.BaseComponent, { | 39 | Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay, Clipperz.PM.UI.Common.Components.BaseComponent, { |
44 | 40 | ||
45 | 'toString': function() { | 41 | 'toString': function() { |
46 | return "Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay"; | 42 | return "Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay"; |
47 | }, | 43 | }, |
48 | 44 | ||
49 | //----------------------------------------------------- | 45 | //----------------------------------------------------- |
50 | 46 | ||
51 | 'wrapperElement': function() { | 47 | 'wrapperElement': function() { |
52 | return this._wrapperElement; | 48 | return this._wrapperElement; |
53 | }, | 49 | }, |
54 | 50 | ||
@@ -97,41 +93,30 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay, Cl | |||
97 | this.updateEntropyElement(); | 93 | this.updateEntropyElement(); |
98 | 94 | ||
99 | this.connect('onkeyup', 'updateEntropyElement'); | 95 | this.connect('onkeyup', 'updateEntropyElement'); |
100 | this.connect('onchange', 'updateEntropyElement'); | 96 | this.connect('onchange', 'updateEntropyElement'); |
101 | this.connect('onblur', 'updateEntropyElement'); | 97 | this.connect('onblur', 'updateEntropyElement'); |
102 | }, | 98 | }, |
103 | 99 | ||
104 | //----------------------------------------------------- | 100 | //----------------------------------------------------- |
105 | 101 | ||
106 | 'computeEntropyForString': function(aValue) { | 102 | 'computeEntropyForString': function(aValue) { |
107 | return Clipperz.PM.Crypto.passwordEntropy(aValue); | 103 | return Clipperz.PM.Crypto.passwordEntropy(aValue); |
108 | }, | 104 | }, |
109 | 105 | ||
110 | //----------------------------------------------------- | 106 | //----------------------------------------------------- |
111 | 107 | ||
112 | 'updateEntropyElement': function(anEvent) { | 108 | 'updateEntropyElement': function(anEvent) { |
113 | /* | ||
114 | //MochiKit.Logging.logDebug(">>> PasswordEntropyDisplay.updateEntropyElement"); | ||
115 | varmaxExtent; | ||
116 | varentropy; | ||
117 | |||
118 | entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value)); | ||
119 | //MochiKit.Logging.logDebug("--- PasswordEntropyDisplay.updateEntropyElement - entropy: " + entropy); | ||
120 | this.entropyElement().setStyle('background-position', "0px " + -entropy + "px"); | ||
121 | this.entropyElement().setWidth(this.passwordElement().getWidth() * (entropy/128)); | ||
122 | //MochiKit.Logging.logDebug("<<< PasswordEntropyDisplay.updateEntropyElement"); | ||
123 | */ | ||
124 | varentropy; | 109 | varentropy; |
125 | 110 | ||
126 | entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value)); | 111 | entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value)); |
127 | 112 | ||
128 | if (entropy == 0) { | 113 | if (entropy == 0) { |
129 | this.entropyElement().setStyle('background-position', "0px 26px"); | 114 | this.entropyElement().setStyle('background-position', "0px 26px"); |
130 | } else { | 115 | } else { |
131 | this.entropyElement().setStyle('background-position', "0px -" + (128-entropy)*26 + "px"); | 116 | this.entropyElement().setStyle('background-position', "0px -" + (128-entropy)*26 + "px"); |
132 | } | 117 | } |
133 | }, | 118 | }, |
134 | 119 | ||
135 | //----------------------------------------------------- | 120 | //----------------------------------------------------- |
136 | __syntaxFix__: '__syntaxFix__' | 121 | __syntaxFix__: '__syntaxFix__' |
137 | }); | 122 | }); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ProgressBar.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ProgressBar.js index 5991530..6638008 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ProgressBar.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/ProgressBar.js | |||
@@ -1,38 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Common.Components.ProgressBar = function(args) { | 26 | Clipperz.PM.UI.Common.Components.ProgressBar = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Common.Components.ProgressBar.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Common.Components.ProgressBar.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._element = args.element|| Clipperz.Base.exception.raise('MandatoryParameter'); | 31 | this._element = args.element|| Clipperz.Base.exception.raise('MandatoryParameter'); |
34 | 32 | ||
35 | this.renderSelf(); | 33 | this.renderSelf(); |
36 | 34 | ||
37 | MochiKit.Signal.connect(Clipperz.PM.UI.Common.Controllers.ProgressBarController.defaultController, 'updateProgress', this, 'updateProgressHandler') | 35 | MochiKit.Signal.connect(Clipperz.PM.UI.Common.Controllers.ProgressBarController.defaultController, 'updateProgress', this, 'updateProgressHandler') |
38 | 36 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js index 1d816a9..8c98811 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js | |||
@@ -1,38 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Common.Components.SimpleMessagePanel = function(args) { | 26 | Clipperz.PM.UI.Common.Components.SimpleMessagePanel = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Common.Components.SimpleMessagePanel.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Common.Components.SimpleMessagePanel.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._title = args.title || Clipperz.Base.exception.raise('MandatoryParameter'); | 31 | this._title = args.title || Clipperz.Base.exception.raise('MandatoryParameter'); |
34 | this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); | 32 | this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); |
35 | this._type = args.type || Clipperz.Base.exception.raise('MandatoryParameter'); //ALERT, INFO, ERROR | 33 | this._type = args.type || Clipperz.Base.exception.raise('MandatoryParameter'); //ALERT, INFO, ERROR |
36 | this._buttons = args.buttons || Clipperz.Base.exception.raise('MandatoryParameter'); | 34 | this._buttons = args.buttons || Clipperz.Base.exception.raise('MandatoryParameter'); |
37 | 35 | ||
38 | this._buttonComponents = []; | 36 | this._buttonComponents = []; |
@@ -205,45 +203,41 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.SimpleMessagePanel, Clippe | |||
205 | this._deferred = null; | 203 | this._deferred = null; |
206 | }, | 204 | }, |
207 | 205 | ||
208 | 'closeError': function () { | 206 | 'closeError': function () { |
209 | this.deferred().errback(); | 207 | this.deferred().errback(); |
210 | this._deferred = null; | 208 | this._deferred = null; |
211 | }, | 209 | }, |
212 | 210 | ||
213 | //------------------------------------------------------------------------- | 211 | //------------------------------------------------------------------------- |
214 | 212 | ||
215 | 'buttonEventHandler': function(aButton, anEvent) { | 213 | 'buttonEventHandler': function(aButton, anEvent) { |
216 | anEvent.preventDefault(); | 214 | anEvent.preventDefault(); |
217 | 215 | ||
218 | // MochiKit.Signal.signal(this, 'cancelEvent'); | 216 | // MochiKit.Signal.signal(this, 'cancelEvent'); |
219 | switch (aButton['result']) { | 217 | switch (aButton['result']) { |
220 | case 'OK': | 218 | case 'OK': |
221 | //console.log("==> OK"); | ||
222 | this.closeOk(); | 219 | this.closeOk(); |
223 | break; | 220 | break; |
224 | case 'CANCEL': | 221 | case 'CANCEL': |
225 | //console.log("==> CANCEL"); | ||
226 | this.closeCancel(); | 222 | this.closeCancel(); |
227 | break; | 223 | break; |
228 | default: | 224 | default: |
229 | //console.log("==> ????"); | ||
230 | this.closeError(); | 225 | this.closeError(); |
231 | break; | 226 | break; |
232 | } | 227 | } |
233 | //console.log("<=="); | ||
234 | }, | 228 | }, |
235 | 229 | ||
236 | //------------------------------------------------------------------------- | 230 | //------------------------------------------------------------------------- |
237 | 231 | ||
238 | 'deferredShow': function (someArgs, aResult) { | 232 | 'deferredShow': function (someArgs, aResult) { |
239 | this.deferredShowModal(someArgs); | 233 | this.deferredShowModal(someArgs); |
240 | 234 | ||
241 | this.deferred().addMethod(this, 'deferredHideModal', {closeToElement:someArgs.onOkCloseToElement }); | 235 | this.deferred().addMethod(this, 'deferredHideModal', {closeToElement:someArgs.onOkCloseToElement }); |
242 | this.deferred().addErrback (MochiKit.Base.method(this, 'deferredHideModal', {closeToElement:someArgs.onCancelCloseToElement })); | 236 | this.deferred().addErrback (MochiKit.Base.method(this, 'deferredHideModal', {closeToElement:someArgs.onCancelCloseToElement })); |
243 | this.deferred().addCallback(MochiKit.Async.succeed, aResult); | 237 | this.deferred().addCallback(MochiKit.Async.succeed, aResult); |
244 | 238 | ||
245 | return this.deferred(); | 239 | return this.deferred(); |
246 | }, | 240 | }, |
247 | 241 | ||
248 | //------------------------------------------------------------------------- | 242 | //------------------------------------------------------------------------- |
249 | 243 | ||
@@ -266,32 +260,28 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.SimpleMessagePanel, Clippe | |||
266 | {tag:'div', id:this.getId('modalDialogWrapper'), cls:'modalDialogWrapper simpleMessagePanelMask', children:[ | 260 | {tag:'div', id:this.getId('modalDialogWrapper'), cls:'modalDialogWrapper simpleMessagePanelMask', children:[ |
267 | {tag:'div', id:this.getId('modalDialogMask'), cls:'modalDialogMask simpleMessagePanelMask'}, | 261 | {tag:'div', id:this.getId('modalDialogMask'), cls:'modalDialogMask simpleMessagePanelMask'}, |
268 | {tag:'div', id:this.getId('modalDialogFrame'), cls:'modalDialogFrame simpleMessagePanelMask'}, | 262 | {tag:'div', id:this.getId('modalDialogFrame'), cls:'modalDialogFrame simpleMessagePanelMask'}, |
269 | {tag:'div', id:this.getId('modalDialog'), cls:'modalDialog simpleMessagePanelMask'} | 263 | {tag:'div', id:this.getId('modalDialog'), cls:'modalDialog simpleMessagePanelMask'} |
270 | ]} | 264 | ]} |
271 | ); | 265 | ); |
272 | 266 | ||
273 | MochiKit.Style.hideElement(this.getId('modalDialogMask')); | 267 | MochiKit.Style.hideElement(this.getId('modalDialogMask')); |
274 | MochiKit.Style.hideElement(this.getId('modalDialogFrame')); | 268 | MochiKit.Style.hideElement(this.getId('modalDialogFrame')); |
275 | }, | 269 | }, |
276 | 270 | ||
277 | //------------------------------------------------------------------------- | 271 | //------------------------------------------------------------------------- |
278 | 272 | ||
279 | 'keyDownHandler': function (anEvent) { | 273 | 'keyDownHandler': function (anEvent) { |
280 | if (anEvent.key().string == 'KEY_ENTER') { | 274 | if (anEvent.key().string == 'KEY_ENTER') { |
281 | anEvent.preventDefault(); | 275 | anEvent.preventDefault(); |
282 | //console.log("13 - RETURN ?", this); | ||
283 | this.closeOk(); | 276 | this.closeOk(); |
284 | //console.log('<<< 13') | ||
285 | } | 277 | } |
286 | 278 | ||
287 | if (anEvent.key().string == 'KEY_ESCAPE') { | 279 | if (anEvent.key().string == 'KEY_ESCAPE') { |
288 | anEvent.preventDefault(); | 280 | anEvent.preventDefault(); |
289 | //console.log("27 - ESC ?", this); | ||
290 | this.closeCancel(); | 281 | this.closeCancel(); |
291 | //console.log("<<< 27"); | ||
292 | } | 282 | } |
293 | }, | 283 | }, |
294 | 284 | ||
295 | //------------------------------------------------------------------------- | 285 | //------------------------------------------------------------------------- |
296 | __syntaxFix__: "syntax fix" | 286 | __syntaxFix__: "syntax fix" |
297 | }); | 287 | }); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js index 936514a..1e2a690 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TabPanelComponent.js | |||
@@ -1,38 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Common.Components.TabPanelComponent = function(args) { | 26 | Clipperz.PM.UI.Common.Components.TabPanelComponent = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | Clipperz.PM.UI.Common.Components.TabPanelComponent.superclass.constructor.call(this, args); | 28 | Clipperz.PM.UI.Common.Components.TabPanelComponent.superclass.constructor.call(this, args); |
31 | 29 | ||
32 | this._tabPanelController = null; | 30 | this._tabPanelController = null; |
33 | 31 | ||
34 | return this; | 32 | return this; |
35 | } | 33 | } |
36 | 34 | ||
37 | //============================================================================= | 35 | //============================================================================= |
38 | 36 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Tooltip.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Tooltip.js index 8df7e0e..6517d2a 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Tooltip.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Tooltip.js | |||
@@ -1,38 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Common.Components.Tooltip = function(args) { | 26 | Clipperz.PM.UI.Common.Components.Tooltip = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Common.Components.Tooltip.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Common.Components.Tooltip.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._element = args.element|| Clipperz.Base.exception.raise('MandatoryParameter'); | 31 | this._element = args.element|| Clipperz.Base.exception.raise('MandatoryParameter'); |
34 | this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); | 32 | this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); |
35 | this._position = args.position || 'BELOW'; //'BELOW', 'ABOVE', 'LEFT', 'RIGHT' | 33 | this._position = args.position || 'BELOW'; //'BELOW', 'ABOVE', 'LEFT', 'RIGHT' |
36 | 34 | ||
37 | this._boxDimensions = null; | 35 | this._boxDimensions = null; |
38 | this._enabled = (typeof(args.enabled) == 'undefined' ? true : args.enabled); | 36 | this._enabled = (typeof(args.enabled) == 'undefined' ? true : args.enabled); |
@@ -128,73 +126,66 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.Tooltip, Clipperz.PM.UI.Co | |||
128 | return this._boxDimensions; | 126 | return this._boxDimensions; |
129 | }, | 127 | }, |
130 | 128 | ||
131 | //------------------------------------------------------------------------- | 129 | //------------------------------------------------------------------------- |
132 | 130 | ||
133 | 'show': function () { | 131 | 'show': function () { |
134 | var elementSizeAndPosition; | 132 | var elementSizeAndPosition; |
135 | var arrowPosition; | 133 | var arrowPosition; |
136 | var bodyPosition; | 134 | var bodyPosition; |
137 | 135 | ||
138 | if (this.isVisible() == false) { | 136 | if (this.isVisible() == false) { |
139 | arrowPosition = {}; | 137 | arrowPosition = {}; |
140 | bodyPosition = {}; | 138 | bodyPosition = {}; |
141 | 139 | ||
142 | this.setIsVisible(true); | 140 | this.setIsVisible(true); |
143 | elementSizeAndPosition = Clipperz.Style.getSizeAndPosition(this.element()); | 141 | elementSizeAndPosition = Clipperz.Style.getSizeAndPosition(this.element()); |
144 | //console.log("ELEMENT SIZE AND POSITION", Clipperz.Base.serializeJSON(elementSizeAndPosition)); | ||
145 | //console.log("BOX DIMENSIONS", Clipperz.Base.serializeJSON(this.boxDimensions())); | ||
146 | switch (this.position()) { | 142 | switch (this.position()) { |
147 | case 'ABOVE': | 143 | case 'ABOVE': |
148 | //console.log("ABOVE"); | ||
149 | // MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:36, h:13}, 'px'); | 144 | // MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:36, h:13}, 'px'); |
150 | bodyPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - this.boxDimensions().w/2); | 145 | bodyPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - this.boxDimensions().w/2); |
151 | bodyPosition.y = elementSizeAndPosition.position.y - this.boxDimensions().h - 13; | 146 | bodyPosition.y = elementSizeAndPosition.position.y - this.boxDimensions().h - 13; |
152 | 147 | ||
153 | // arrowPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - 36/2); | 148 | // arrowPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - 36/2); |
154 | // arrowPosition.y = elementSizeAndPosition.position.y - 13; | 149 | // arrowPosition.y = elementSizeAndPosition.position.y - 13; |
155 | break; | 150 | break; |
156 | case 'BELOW': | 151 | case 'BELOW': |
157 | //console.log("BELOW"); | ||
158 | // MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:36, h:13}, 'px'); | 152 | // MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:36, h:13}, 'px'); |
159 | bodyPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - this.boxDimensions().w/2); | 153 | bodyPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - this.boxDimensions().w/2); |
160 | bodyPosition.y = elementSizeAndPosition.position.y + elementSizeAndPosition.dimensions.h + 13; | 154 | bodyPosition.y = elementSizeAndPosition.position.y + elementSizeAndPosition.dimensions.h + 13; |
161 | 155 | ||
162 | // arrowPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - 36/2); | 156 | // arrowPosition.x = elementSizeAndPosition.position.x + (elementSizeAndPosition.dimensions.w/2 - 36/2); |
163 | // arrowPosition.y = elementSizeAndPosition.position.y + elementSizeAndPosition.dimensions.h; | 157 | // arrowPosition.y = elementSizeAndPosition.position.y + elementSizeAndPosition.dimensions.h; |
164 | break; | 158 | break; |
165 | case 'LEFT': | 159 | case 'LEFT': |
166 | //console.log("LEFT"); | ||
167 | // MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:13, h:36}, 'px'); | 160 | // MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:13, h:36}, 'px'); |
168 | bodyPosition.x = elementSizeAndPosition.position.x - this.boxDimensions().w - 13; | 161 | bodyPosition.x = elementSizeAndPosition.position.x - this.boxDimensions().w - 13; |
169 | bodyPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - this.boxDimensions().h/2); | 162 | bodyPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - this.boxDimensions().h/2); |
170 | 163 | ||
171 | // arrowPosition.x = elementSizeAndPosition.position.x -13; | 164 | // arrowPosition.x = elementSizeAndPosition.position.x -13; |
172 | // arrowPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - 36/2); | 165 | // arrowPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - 36/2); |
173 | break; | 166 | break; |
174 | case 'RIGHT': | 167 | case 'RIGHT': |
175 | //console.log("RIGHT"); | ||
176 | // MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:13, h:36}, 'px'); | 168 | // MochiKit.Style.setElementDimensions(this.getId('arrow'), {w:13, h:36}, 'px'); |
177 | bodyPosition.x = elementSizeAndPosition.position.x + elementSizeAndPosition.dimensions.w + 13; | 169 | bodyPosition.x = elementSizeAndPosition.position.x + elementSizeAndPosition.dimensions.w + 13; |
178 | bodyPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - this.boxDimensions().h/2); | 170 | bodyPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - this.boxDimensions().h/2); |
179 | 171 | ||
180 | // arrowPosition.x = elementSizeAndPosition.position.x + elementSizeAndPosition.dimensions.w; | 172 | // arrowPosition.x = elementSizeAndPosition.position.x + elementSizeAndPosition.dimensions.w; |
181 | // arrowPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - 36/2); | 173 | // arrowPosition.y = elementSizeAndPosition.position.y + (elementSizeAndPosition.dimensions.h/2 - 36/2); |
182 | break; | 174 | break; |
183 | } | 175 | } |
184 | //console.log("X: " + bodyPosition.x + ", Y: " + bodyPosition.y); | ||
185 | 176 | ||
186 | MochiKit.Style.setElementPosition(this.getId('tooltip'), bodyPosition); | 177 | MochiKit.Style.setElementPosition(this.getId('tooltip'), bodyPosition); |
187 | // MochiKit.Style.setElementPosition(this.getId('body'), bodyPosition); | 178 | // MochiKit.Style.setElementPosition(this.getId('body'), bodyPosition); |
188 | // MochiKit.Style.setElementPosition(this.getId('arrow'), arrowPosition); | 179 | // MochiKit.Style.setElementPosition(this.getId('arrow'), arrowPosition); |
189 | MochiKit.Visual.appear(this.displayElement(), {duration:0.4}); | 180 | MochiKit.Visual.appear(this.displayElement(), {duration:0.4}); |
190 | } | 181 | } |
191 | }, | 182 | }, |
192 | 183 | ||
193 | 'hide': function () { | 184 | 'hide': function () { |
194 | if (this.isVisible() == true) { | 185 | if (this.isVisible() == true) { |
195 | MochiKit.Visual.fade(this.displayElement(), {duration:0.4}); | 186 | MochiKit.Visual.fade(this.displayElement(), {duration:0.4}); |
196 | this.setIsVisible(false); | 187 | this.setIsVisible(false); |
197 | } | 188 | } |
198 | }, | 189 | }, |
199 | 190 | ||
200 | //------------------------------------------------------------------------- | 191 | //------------------------------------------------------------------------- |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js index c41fc7c..ba58edd 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/TranslatorWidget.js | |||
@@ -1,38 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Common.Components.TranslatorWidget = function(args) { | 26 | Clipperz.PM.UI.Common.Components.TranslatorWidget = function(args) { |
29 | Clipperz.log(">>> TranslatorWidget.new"); | 27 | Clipperz.log(">>> TranslatorWidget.new"); |
30 | args = args || {}; | 28 | args = args || {}; |
31 | 29 | ||
32 | Clipperz.PM.UI.Common.Components.TranslatorWidget.superclass.constructor.apply(this, arguments); | 30 | Clipperz.PM.UI.Common.Components.TranslatorWidget.superclass.constructor.apply(this, arguments); |
33 | 31 | ||
34 | // this._element = args.element|| Clipperz.Base.exception.raise('MandatoryParameter'); | 32 | // this._element = args.element|| Clipperz.Base.exception.raise('MandatoryParameter'); |
35 | // this._stringID = args.stringID || MochiKit.DOM.getNodeAttribute(this.element(), 'stringID')|| Clipperz.Base.exception.raise('MandatoryParameter'); | 33 | // this._stringID = args.stringID || MochiKit.DOM.getNodeAttribute(this.element(), 'stringID')|| Clipperz.Base.exception.raise('MandatoryParameter'); |
36 | 34 | ||
37 | //MochiKit.Signal.connect(this.element(), 'onmouseenter', this, 'show'); | 35 | //MochiKit.Signal.connect(this.element(), 'onmouseenter', this, 'show'); |
38 | //MochiKit.Signal.connect(this.element(), 'onmouseleave', this, 'hide'); | 36 | //MochiKit.Signal.connect(this.element(), 'onmouseleave', this, 'hide'); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/DirectLoginRunner.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/DirectLoginRunner.js index 5fd10f9..77d59a5 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/DirectLoginRunner.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/DirectLoginRunner.js | |||
@@ -1,38 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Controllers'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Common.Controllers'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Common.Controllers.DirectLoginRunner = function(args) { | 26 | Clipperz.PM.UI.Common.Controllers.DirectLoginRunner = function(args) { |
29 | this._directLogin = args['directLogin'] || Clipperz.Base.exception.raise('MandatoryParameter'); | 27 | this._directLogin = args['directLogin'] || Clipperz.Base.exception.raise('MandatoryParameter'); |
30 | this._target = Clipperz.PM.Crypto.randomKey(); | 28 | this._target = Clipperz.PM.Crypto.randomKey(); |
31 | 29 | ||
32 | return this; | 30 | return this; |
33 | } | 31 | } |
34 | 32 | ||
35 | MochiKit.Base.update(Clipperz.PM.UI.Common.Controllers.DirectLoginRunner.prototype, { | 33 | MochiKit.Base.update(Clipperz.PM.UI.Common.Controllers.DirectLoginRunner.prototype, { |
36 | 34 | ||
37 | 'toString': function() { | 35 | 'toString': function() { |
38 | return "Clipperz.PM.UI.Common.Controllers.DirectLoginRunner"; | 36 | return "Clipperz.PM.UI.Common.Controllers.DirectLoginRunner"; |
@@ -141,88 +139,83 @@ MochiKit.Base.update(Clipperz.PM.UI.Common.Controllers.DirectLoginRunner.prototy | |||
141 | }, MochiKit.Base.items(someAttributes['inputValues']))); | 139 | }, MochiKit.Base.items(someAttributes['inputValues']))); |
142 | 140 | ||
143 | html =''; | 141 | html =''; |
144 | html += '<h3>Loading ' + someAttributes['label'] + ' ...</h3>'; | 142 | html += '<h3>Loading ' + someAttributes['label'] + ' ...</h3>'; |
145 | html +=MochiKit.DOM.appendChildNodes(MochiKit.DOM.DIV(), MochiKit.DOM.appendChildNodes(MochiKit.DOM.DIV({style:'display:none; visibility:hidden;'}), formElement)).innerHTML; | 143 | html +=MochiKit.DOM.appendChildNodes(MochiKit.DOM.DIV(), MochiKit.DOM.appendChildNodes(MochiKit.DOM.DIV({style:'display:none; visibility:hidden;'}), formElement)).innerHTML; |
146 | 144 | ||
147 | this.updateWindowWithHTMLContent(aWindow, html); | 145 | this.updateWindowWithHTMLContent(aWindow, html); |
148 | this.submitLoginForm(aWindow, submitFunction); | 146 | this.submitLoginForm(aWindow, submitFunction); |
149 | }, | 147 | }, |
150 | 148 | ||
151 | //------------------------------------------------------------------------- | 149 | //------------------------------------------------------------------------- |
152 | 150 | ||
153 | 'runHttpAuthDirectLogin': function(aWindow, someAttributes) { | 151 | 'runHttpAuthDirectLogin': function(aWindow, someAttributes) { |
154 | var completeUrl; | 152 | var completeUrl; |
155 | var url; | 153 | var url; |
156 | 154 | ||
157 | //console.log("runHttpAuthDirectLogin", someAttributes); | ||
158 | url = someAttributes['inputValues']['url']; | 155 | url = someAttributes['inputValues']['url']; |
159 | 156 | ||
160 | if (/^https?\:\/\//.test(url) == false) { | 157 | if (/^https?\:\/\//.test(url) == false) { |
161 | url = 'http://' + url; | 158 | url = 'http://' + url; |
162 | } | 159 | } |
163 | 160 | ||
164 | if (Clipperz_IEisBroken === true) { | 161 | if (Clipperz_IEisBroken === true) { |
165 | completeUrl = url; | 162 | completeUrl = url; |
166 | } else { | 163 | } else { |
167 | var username; | 164 | var username; |
168 | var password; | 165 | var password; |
169 | 166 | ||
170 | username = someAttributes['inputValues']['username']; | 167 | username = someAttributes['inputValues']['username']; |
171 | password = someAttributes['inputValues']['password']; | 168 | password = someAttributes['inputValues']['password']; |
172 | /(^https?\:\/\/)?(.*)/.test(url); | 169 | /(^https?\:\/\/)?(.*)/.test(url); |
173 | 170 | ||
174 | completeUrl = RegExp.$1 + username + ':' + password + '@' + RegExp.$2; | 171 | completeUrl = RegExp.$1 + username + ':' + password + '@' + RegExp.$2; |
175 | } | 172 | } |
176 | 173 | ||
177 | window.open(completeUrl, this.target()); | 174 | window.open(completeUrl, this.target()); |
178 | }, | 175 | }, |
179 | 176 | ||
180 | //============================================================================= | 177 | //============================================================================= |
181 | 178 | ||
182 | 'runDirectLogin': function (aWindow) { | 179 | 'runDirectLogin': function (aWindow) { |
183 | var deferredResult; | 180 | var deferredResult; |
184 | 181 | ||
185 | //console.log(">>> runDirectLogin"); | ||
186 | deferredResult = new Clipperz.Async.Deferred("DirectLoginRunner.openDirectLogin", {trace:false}); | 182 | deferredResult = new Clipperz.Async.Deferred("DirectLoginRunner.openDirectLogin", {trace:false}); |
187 | deferredResult.addMethod(this, 'initialWindowSetup', aWindow); | 183 | deferredResult.addMethod(this, 'initialWindowSetup', aWindow); |
188 | deferredResult.addMethod(this.directLogin(), 'label'); | 184 | deferredResult.addMethod(this.directLogin(), 'label'); |
189 | deferredResult.addMethod(this, 'updateWindowWithDirectLoginLabel', aWindow); | 185 | deferredResult.addMethod(this, 'updateWindowWithDirectLoginLabel', aWindow); |
190 | deferredResult.collectResults({ | 186 | deferredResult.collectResults({ |
191 | 'type': MochiKit.Base.method(this.directLogin(), 'type'), | 187 | 'type': MochiKit.Base.method(this.directLogin(), 'type'), |
192 | 'label': MochiKit.Base.method(this.directLogin(), 'label'), | 188 | 'label': MochiKit.Base.method(this.directLogin(), 'label'), |
193 | 'formAttributes':MochiKit.Base.method(this.directLogin(), 'formAttributes'), | 189 | 'formAttributes':MochiKit.Base.method(this.directLogin(), 'formAttributes'), |
194 | 'inputValues': MochiKit.Base.method(this.directLogin(), 'inputValues') | 190 | 'inputValues': MochiKit.Base.method(this.directLogin(), 'inputValues') |
195 | }); | 191 | }); |
196 | //deferredResult.addCallback(function (aValue) { console.log("SOME ATTRIBUTES", aValue); return aValue; }); | ||
197 | deferredResult.addCallback(MochiKit.Base.bind(function (someAttributes) { | 192 | deferredResult.addCallback(MochiKit.Base.bind(function (someAttributes) { |
198 | //console.log("SOME ATTRIBUTES", someAttributes); | ||
199 | switch (someAttributes['type']) { | 193 | switch (someAttributes['type']) { |
200 | case 'http_auth': | 194 | case 'http_auth': |
201 | this.runHttpAuthDirectLogin(aWindow, someAttributes); | 195 | this.runHttpAuthDirectLogin(aWindow, someAttributes); |
202 | break; | 196 | break; |
203 | case 'simple_url': | 197 | case 'simple_url': |
204 | this.runSimpleUrlDirectLogin(aWindow, someAttributes); | 198 | this.runSimpleUrlDirectLogin(aWindow, someAttributes); |
205 | break; | 199 | break; |
206 | default: | 200 | default: |
207 | this.runSubmitFormDirectLogin(aWindow, someAttributes); | 201 | this.runSubmitFormDirectLogin(aWindow, someAttributes); |
208 | break; | 202 | break; |
209 | } | 203 | } |
210 | }, this)); | 204 | }, this)); |
211 | deferredResult.callback(); | 205 | deferredResult.callback(); |
212 | //console.log("<<< runDirectLogin"); | ||
213 | 206 | ||
214 | return deferredResult; | 207 | return deferredResult; |
215 | }, | 208 | }, |
216 | 209 | ||
217 | //============================================================================= | 210 | //============================================================================= |
218 | 211 | ||
219 | 'run': function () { | 212 | 'run': function () { |
220 | var newWindow; | 213 | var newWindow; |
221 | 214 | ||
222 | newWindow = window.open(Clipperz.PM.Strings.getValue('directLoginJumpPageUrl'), this.target()); | 215 | newWindow = window.open(Clipperz.PM.Strings.getValue('directLoginJumpPageUrl'), this.target()); |
223 | 216 | ||
224 | return this.runDirectLogin(newWindow); | 217 | return this.runDirectLogin(newWindow); |
225 | }, | 218 | }, |
226 | 219 | ||
227 | //============================================================================= | 220 | //============================================================================= |
228 | 221 | ||
@@ -243,22 +236,21 @@ MochiKit.Base.update(Clipperz.PM.UI.Common.Controllers.DirectLoginRunner.prototy | |||
243 | }); | 236 | }); |
244 | 237 | ||
245 | //----------------------------------------------------------------------------- | 238 | //----------------------------------------------------------------------------- |
246 | 239 | ||
247 | Clipperz.PM.UI.Common.Controllers.DirectLoginRunner.openDirectLogin = function (aDirectLogin) { | 240 | Clipperz.PM.UI.Common.Controllers.DirectLoginRunner.openDirectLogin = function (aDirectLogin) { |
248 | varrunner; | 241 | varrunner; |
249 | 242 | ||
250 | runner = new Clipperz.PM.UI.Common.Controllers.DirectLoginRunner({directLogin:aDirectLogin}); | 243 | runner = new Clipperz.PM.UI.Common.Controllers.DirectLoginRunner({directLogin:aDirectLogin}); |
251 | return runner.run(); | 244 | return runner.run(); |
252 | }; | 245 | }; |
253 | 246 | ||
254 | //----------------------------------------------------------------------------- | 247 | //----------------------------------------------------------------------------- |
255 | 248 | ||
256 | Clipperz.PM.UI.Common.Controllers.DirectLoginRunner.testDirectLogin = function (aDirectLogin) { | 249 | Clipperz.PM.UI.Common.Controllers.DirectLoginRunner.testDirectLogin = function (aDirectLogin) { |
257 | varrunner; | 250 | varrunner; |
258 | 251 | ||
259 | //console.log(">>>>>> TESTING DIRECT LOGIN"); | ||
260 | runner = new Clipperz.PM.UI.Common.Controllers.DirectLoginRunner({directLogin:aDirectLogin}); | 252 | runner = new Clipperz.PM.UI.Common.Controllers.DirectLoginRunner({directLogin:aDirectLogin}); |
261 | return runner.test(); | 253 | return runner.test(); |
262 | }; | 254 | }; |
263 | 255 | ||
264 | //----------------------------------------------------------------------------- | 256 | //----------------------------------------------------------------------------- |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/ProgressBarController.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/ProgressBarController.js index 41fe17f..52d81d4 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/ProgressBarController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/ProgressBarController.js | |||
@@ -1,38 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Controllers'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Common.Controllers'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Common.Controllers.ProgressBarController = function(args) { | 26 | Clipperz.PM.UI.Common.Controllers.ProgressBarController = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | this._numberOfSteps= 0; | 29 | this._numberOfSteps= 0; |
32 | this._currentStep= 0; | 30 | this._currentStep= 0; |
33 | 31 | ||
34 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'initProgress', this, 'initProgressHandle'); | 32 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'initProgress', this, 'initProgressHandle'); |
35 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'updateProgress',this, 'updateProgressHandle'); | 33 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'updateProgress',this, 'updateProgressHandle'); |
36 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'advanceProgress',this, 'advanceProgressHandle'); | 34 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'advanceProgress',this, 'advanceProgressHandle'); |
37 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'progressDone', this, 'progressDoneHandle'); | 35 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'progressDone', this, 'progressDoneHandle'); |
38 | 36 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/TabPanelController.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/TabPanelController.js index 341fde9..d3e86de 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/TabPanelController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/TabPanelController.js | |||
@@ -1,38 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Controllers'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Common.Controllers'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Common.Controllers.TabPanelController = function(args) { | 26 | Clipperz.PM.UI.Common.Controllers.TabPanelController = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | this._component = args.component; | 29 | this._component = args.component; |
32 | this._configuration = args.configuration; | 30 | this._configuration = args.configuration; |
33 | this._isEnabled = args.enabled || true; | 31 | this._isEnabled = args.enabled || true; |
34 | 32 | ||
35 | this._selectedTab = null; | 33 | this._selectedTab = null; |
36 | return this; | 34 | return this; |
37 | } | 35 | } |
38 | 36 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/WizardController.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/WizardController.js index ef38bc6..c13d96a 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/WizardController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Controllers/WizardController.js | |||
@@ -1,28 +1,26 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | //Still empty, but here it should be reasonable to factor in code duplicated between | 24 | //Still empty, but here it should be reasonable to factor in code duplicated between |
27 | //- DirectLoginWizardController | 25 | //- DirectLoginWizardController |
28 | //- NewUserWizardController \ No newline at end of file | 26 | //- NewUserWizardController \ No newline at end of file |