Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Components') (more/less context) (show whitespace changes)
51 files changed, 510 insertions, 612 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js b/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js index f3a3902..07c0b97 100644 --- a/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | 27 | ||
30 | //############################################################################# | 28 | //############################################################################# |
31 | 29 | ||
32 | var _Clipperz_PM_Components_Panels_base_id_ = 0; | 30 | var _Clipperz_PM_Components_Panels_base_id_ = 0; |
33 | 31 | ||
34 | //############################################################################# | 32 | //############################################################################# |
35 | 33 | ||
36 | Clipperz.PM.Components.BaseComponent = function(anElement, args) { | 34 | Clipperz.PM.Components.BaseComponent = function(anElement, args) { |
37 | args = args || {}; | 35 | args = args || {}; |
38 | //MochiKit.Base.bindMethods(this); | 36 | //MochiKit.Base.bindMethods(this); |
39 | //Clipperz.PM.Components.BaseComponent.superclass.constructor.call(this, args); | 37 | //Clipperz.PM.Components.BaseComponent.superclass.constructor.call(this, args); |
40 | 38 | ||
41 | this._element = anElement; | 39 | this._element = anElement; |
42 | this._ids = {}; | 40 | this._ids = {}; |
43 | 41 | ||
44 | return this; | 42 | return this; |
45 | } | 43 | } |
46 | 44 | ||
47 | //============================================================================= | 45 | //============================================================================= |
48 | 46 | ||
49 | //MochiKit.Base.update(Clipperz.PM.Components.BaseComponent.prototype, { | 47 | //MochiKit.Base.update(Clipperz.PM.Components.BaseComponent.prototype, { |
50 | YAHOO.extendX(Clipperz.PM.Components.BaseComponent, YAHOO.ext.util.Observable, { | 48 | YAHOO.extendX(Clipperz.PM.Components.BaseComponent, YAHOO.ext.util.Observable, { |
51 | 49 | ||
52 | 'isClipperzPMComponent': true, | 50 | 'isClipperzPMComponent': true, |
53 | 51 | ||
54 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
55 | 53 | ||
56 | 'toString': function () { | 54 | 'toString': function () { |
57 | return "Clipperz.PM.Components.BaseComponent component"; | 55 | return "Clipperz.PM.Components.BaseComponent component"; |
58 | }, | 56 | }, |
59 | 57 | ||
60 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
61 | 59 | ||
62 | 'domHelper': function() { | 60 | 'domHelper': function() { |
63 | return Clipperz.YUI.DomHelper; | 61 | return Clipperz.YUI.DomHelper; |
64 | }, | 62 | }, |
65 | 63 | ||
66 | //------------------------------------------------------------------------- | 64 | //------------------------------------------------------------------------- |
67 | 65 | ||
68 | 'element': function() { | 66 | 'element': function() { |
69 | //MochiKit.Logging.logDebug(">>> BaseComponent.element"); | 67 | //MochiKit.Logging.logDebug(">>> BaseComponent.element"); |
70 | return this._element; | 68 | return this._element; |
71 | }, | 69 | }, |
72 | 70 | ||
73 | 'setElement': function(aValue) { | 71 | 'setElement': function(aValue) { |
74 | this._element = aValue; | 72 | this._element = aValue; |
75 | }, | 73 | }, |
76 | 74 | ||
77 | //----------------------------------------------------- | 75 | //----------------------------------------------------- |
78 | 76 | ||
79 | 'remove': function() { | 77 | 'remove': function() { |
80 | //MochiKit.Logging.logDebug(">>> BaseComponent.remove"); | 78 | //MochiKit.Logging.logDebug(">>> BaseComponent.remove"); |
81 | Clipperz.NotificationCenter.unregister(this); | 79 | Clipperz.NotificationCenter.unregister(this); |
82 | MochiKit.Signal.disconnectAllTo(this); | 80 | MochiKit.Signal.disconnectAllTo(this); |
83 | //MochiKit.Logging.logDebug("<<< BaseComponent.remove"); | 81 | //MochiKit.Logging.logDebug("<<< BaseComponent.remove"); |
84 | }, | 82 | }, |
85 | 83 | ||
86 | //------------------------------------------------------------------------- | 84 | //------------------------------------------------------------------------- |
87 | 85 | ||
88 | 'getId': function(aValue) { | 86 | 'getId': function(aValue) { |
89 | varresult; | 87 | varresult; |
90 | 88 | ||
91 | result = this._ids[aValue]; | 89 | result = this._ids[aValue]; |
92 | 90 | ||
93 | if (typeof(result) == 'undefined') { | 91 | if (typeof(result) == 'undefined') { |
94 | _Clipperz_PM_Components_Panels_base_id_ ++; | 92 | _Clipperz_PM_Components_Panels_base_id_ ++; |
95 | 93 | ||
96 | result = "Clipperz_PM_Components_Panels_" + aValue + "_" + _Clipperz_PM_Components_Panels_base_id_; | 94 | result = "Clipperz_PM_Components_Panels_" + aValue + "_" + _Clipperz_PM_Components_Panels_base_id_; |
97 | this._ids[aValue] = result; | 95 | this._ids[aValue] = result; |
98 | //MochiKit.Logging.logDebug(">>> getId(" + aValue + ") = " + result); | 96 | //MochiKit.Logging.logDebug(">>> getId(" + aValue + ") = " + result); |
99 | } else { | 97 | } else { |
100 | //MochiKit.Logging.logDebug("<<< getId(" + aValue + ") = " + result); | 98 | //MochiKit.Logging.logDebug("<<< getId(" + aValue + ") = " + result); |
101 | } | 99 | } |
102 | 100 | ||
103 | return result; | 101 | return result; |
104 | }, | 102 | }, |
105 | 103 | ||
106 | 'getDom': function(aValue) { | 104 | 'getDom': function(aValue) { |
107 | return YAHOO.util.Dom.get(this.getId(aValue)); | 105 | return YAHOO.util.Dom.get(this.getId(aValue)); |
108 | }, | 106 | }, |
109 | 107 | ||
110 | 'getElement': function(aValue) { | 108 | 'getElement': function(aValue) { |
111 | return YAHOO.ext.Element.get(this.getId(aValue)); | 109 | return YAHOO.ext.Element.get(this.getId(aValue)); |
112 | }, | 110 | }, |
113 | 111 | ||
114 | 'getActor': function(aValue, anAnimator) { | 112 | 'getActor': function(aValue, anAnimator) { |
115 | return new YAHOO.ext.Actor(this.getDom(aValue), anAnimator); | 113 | return new YAHOO.ext.Actor(this.getDom(aValue), anAnimator); |
116 | }, | 114 | }, |
117 | 115 | ||
118 | //------------------------------------------------------------------------- | 116 | //------------------------------------------------------------------------- |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js index 7a3b3a3..14e42a5 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js +++ b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js | |||
@@ -1,83 +1,81 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } | 27 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } |
30 | 28 | ||
31 | Clipperz.PM.Components.Compact.CompactHeader = function(anElement, args) { | 29 | Clipperz.PM.Components.Compact.CompactHeader = function(anElement, args) { |
32 | 30 | ||
33 | Clipperz.PM.Components.Compact.CompactHeader.superclass.constructor.call(this, anElement, args); | 31 | Clipperz.PM.Components.Compact.CompactHeader.superclass.constructor.call(this, anElement, args); |
34 | 32 | ||
35 | this.render(); | 33 | this.render(); |
36 | 34 | ||
37 | return this; | 35 | return this; |
38 | }; | 36 | }; |
39 | 37 | ||
40 | YAHOO.extendX(Clipperz.PM.Components.Compact.CompactHeader, Clipperz.PM.Components.BaseComponent, { | 38 | YAHOO.extendX(Clipperz.PM.Components.Compact.CompactHeader, Clipperz.PM.Components.BaseComponent, { |
41 | 39 | ||
42 | 'toString': function() { | 40 | 'toString': function() { |
43 | return "Clipperz.PM.Components.Compact.CompactHeader"; | 41 | return "Clipperz.PM.Components.Compact.CompactHeader"; |
44 | }, | 42 | }, |
45 | 43 | ||
46 | //----------------------------------------------------- | 44 | //----------------------------------------------------- |
47 | 45 | ||
48 | 'render': function() { | 46 | 'render': function() { |
49 | this.element().update(""); | 47 | this.element().update(""); |
50 | 48 | ||
51 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ | 49 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ |
52 | {tag:'img', src:'./images/logo.gif'}, | 50 | {tag:'img', src:'./images/logo.gif'}, |
53 | {tag:'div', id:'lockBlock', children:[ | 51 | {tag:'div', id:'lockBlock', children:[ |
54 | {tag:'input', type:'checkbox', id:'autolock'}, | 52 | {tag:'input', type:'checkbox', id:'autolock'}, |
55 | {tag:'span', html:'auto'}, | 53 | {tag:'span', html:'auto'}, |
56 | {tag:'a', href:'#', htmlString:Clipperz.PM.Strings['lockMenuLabel'], id:'lock'} | 54 | {tag:'a', href:'#', htmlString:Clipperz.PM.Strings['lockMenuLabel'], id:'lock'} |
57 | ]} | 55 | ]} |
58 | ]}); | 56 | ]}); |
59 | 57 | ||
60 | Clipperz.YUI.DomHelper.append(this.element().dom, | 58 | Clipperz.YUI.DomHelper.append(this.element().dom, |
61 | {tag:'div', id:'compactMiscLinks', children:[ | 59 | {tag:'div', id:'compactMiscLinks', children:[ |
62 | {tag:'a', id:'donateHeaderIconLink', target:'_blank', href:Clipperz.PM.Strings['donateHeaderLinkUrl'], children:[ | 60 | {tag:'a', id:'donateHeaderIconLink', target:'_blank', href:Clipperz.PM.Strings['donateHeaderLinkUrl'], children:[ |
63 | {tag:'img', id:'donateHeaderLinkIcon', src:'./images/smiles_small.gif'} | 61 | {tag:'img', id:'donateHeaderLinkIcon', src:'./images/smiles_small.gif'} |
64 | ]}, | 62 | ]}, |
65 | {tag:'ul', children:[ | 63 | {tag:'ul', children:[ |
66 | {tag:'li', children:[{tag:'a', id:'donateHeaderLink', html:'donate', target:'_blank'}]}, | 64 | {tag:'li', children:[{tag:'a', id:'donateHeaderLink', html:'donate', target:'_blank'}]}, |
67 | {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', html:'credits', target:'_blank'}]}, | 65 | {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', html:'credits', target:'_blank'}]}, |
68 | {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', html:'feedback', target:'_blank'}]}, | 66 | {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', html:'feedback', target:'_blank'}]}, |
69 | {tag:'li', children:[{tag:'a', id:'helpHeaderLink', html:'help', target:'_blank'}]}, | 67 | {tag:'li', children:[{tag:'a', id:'helpHeaderLink', html:'help', target:'_blank'}]}, |
70 | {tag:'li', children:[{tag:'a', id:'forumHeaderLink', html:'forum', target:'_blank'}]} | 68 | {tag:'li', children:[{tag:'a', id:'forumHeaderLink', html:'forum', target:'_blank'}]} |
71 | ]} | 69 | ]} |
72 | ]} | 70 | ]} |
73 | ); | 71 | ); |
74 | 72 | ||
75 | YAHOO.ext.Element.get('lockBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 73 | YAHOO.ext.Element.get('lockBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
76 | Clipperz.NotificationCenter.notify(this, 'switchLanguage'); | 74 | Clipperz.NotificationCenter.notify(this, 'switchLanguage'); |
77 | }, | 75 | }, |
78 | 76 | ||
79 | //----------------------------------------------------- | 77 | //----------------------------------------------------- |
80 | __syntaxFix__: '__syntaxFix__' | 78 | __syntaxFix__: '__syntaxFix__' |
81 | }); | 79 | }); |
82 | 80 | ||
83 | 81 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js index 0f6858a..1312967 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js +++ b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } | 27 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } |
30 | 28 | ||
31 | Clipperz.PM.Components.Compact.CompactInterface = function(anElement, args) { | 29 | Clipperz.PM.Components.Compact.CompactInterface = function(anElement, args) { |
32 | 30 | ||
33 | Clipperz.PM.Components.Compact.CompactInterface.superclass.constructor.call(this, anElement, args); | 31 | Clipperz.PM.Components.Compact.CompactInterface.superclass.constructor.call(this, anElement, args); |
34 | 32 | ||
35 | this._directLoginItemTemplate = null; | 33 | this._directLoginItemTemplate = null; |
36 | this._user = args.user; | 34 | this._user = args.user; |
37 | this._autoLockTimer = null; | 35 | this._autoLockTimer = null; |
38 | 36 | ||
39 | Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') | 37 | Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') |
40 | Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); | 38 | Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); |
41 | 39 | ||
42 | this.render(); | 40 | this.render(); |
43 | 41 | ||
44 | return this; | 42 | return this; |
45 | }; | 43 | }; |
46 | 44 | ||
47 | YAHOO.extendX(Clipperz.PM.Components.Compact.CompactInterface, Clipperz.PM.Components.BaseComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.Compact.CompactInterface, Clipperz.PM.Components.BaseComponent, { |
48 | 46 | ||
49 | 'toString': function() { | 47 | 'toString': function() { |
50 | return "Clipperz.PM.Components.Compact.CompactInterface"; | 48 | return "Clipperz.PM.Components.Compact.CompactInterface"; |
51 | }, | 49 | }, |
52 | 50 | ||
53 | //----------------------------------------------------- | 51 | //----------------------------------------------------- |
54 | 52 | ||
55 | 'render': function() { | 53 | 'render': function() { |
56 | var result; | 54 | var result; |
57 | varlayout; | 55 | varlayout; |
58 | var registerButton; | 56 | var registerButton; |
59 | 57 | ||
60 | //MochiKit.Logging.logDebug(">>> CompactInterface.render"); | 58 | //MochiKit.Logging.logDebug(">>> CompactInterface.render"); |
61 | this.element().update(""); | 59 | this.element().update(""); |
62 | 60 | ||
63 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ | 61 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ |
64 | {tag:'div', id:this.getId('cantentPanel'), children:[ | 62 | {tag:'div', id:this.getId('cantentPanel'), children:[ |
65 | {tag:'h4', id:this.getId('message')}, | 63 | {tag:'h4', id:this.getId('message')}, |
66 | {tag:'ul', id:'directLogins', children:[]} | 64 | {tag:'ul', id:'directLogins', children:[]} |
67 | ]}, | 65 | ]}, |
68 | {tag:'div', id:this.getId('lockPanel'), cls:'lockPanel', children:[ | 66 | {tag:'div', id:this.getId('lockPanel'), cls:'lockPanel', children:[ |
69 | {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']}, | 67 | {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']}, |
70 | {tag:'form', id:'lockDialogForm', children:[ | 68 | {tag:'form', id:'lockDialogForm', children:[ |
71 | {tag:'input', type:'password', id:this.getId('lockPassphrase')} | 69 | {tag:'input', type:'password', id:this.getId('lockPassphrase')} |
72 | ]}, | 70 | ]}, |
73 | {tag:'div', id:this.getId('unlock')} | 71 | {tag:'div', id:this.getId('unlock')} |
74 | ]} | 72 | ]} |
75 | ]}); | 73 | ]}); |
76 | 74 | ||
77 | this.getElement('lockPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 75 | this.getElement('lockPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
78 | 76 | ||
79 | YAHOO.ext.Element.get('lockBlock').show(); | 77 | YAHOO.ext.Element.get('lockBlock').show(); |
80 | MochiKit.Signal.connect(YAHOO.ext.Element.get('lock').dom, 'onclick', this, 'doLockEventHandler'); | 78 | MochiKit.Signal.connect(YAHOO.ext.Element.get('lock').dom, 'onclick', this, 'doLockEventHandler'); |
81 | new YAHOO.ext.Button(this.getId('unlock'), {text:Clipperz.PM.Strings['unlockButtonLabel'], handler:this.doUnlockEventHandler, scope:this, minWidth:0}); | 79 | new YAHOO.ext.Button(this.getId('unlock'), {text:Clipperz.PM.Strings['unlockButtonLabel'], handler:this.doUnlockEventHandler, scope:this, minWidth:0}); |
82 | this.getElement('unlock').swallowEvent('click', true); | 80 | this.getElement('unlock').swallowEvent('click', true); |
83 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('lockPassphrase')); | 81 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('lockPassphrase')); |
84 | MochiKit.Signal.connect('lockDialogForm', 'onsubmit', this, 'doUnlockEventHandler'); | 82 | MochiKit.Signal.connect('lockDialogForm', 'onsubmit', this, 'doUnlockEventHandler'); |
85 | 83 | ||
86 | this.getElement('cantentPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 84 | this.getElement('cantentPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
87 | //MochiKit.Logging.logDebug("<<< CompactInterface.render"); | 85 | //MochiKit.Logging.logDebug("<<< CompactInterface.render"); |
88 | 86 | ||
89 | return result; | 87 | return result; |
90 | }, | 88 | }, |
91 | 89 | ||
92 | //----------------------------------------------------- | 90 | //----------------------------------------------------- |
93 | 91 | ||
94 | 'directLoginAddedHandler': function(anEvent) { | 92 | 'directLoginAddedHandler': function(anEvent) { |
95 | this.redrawDirectLoginItems(); | 93 | this.redrawDirectLoginItems(); |
96 | }, | 94 | }, |
97 | 95 | ||
98 | //----------------------------------------------------- | 96 | //----------------------------------------------------- |
99 | 97 | ||
100 | 'compareDirectLogins': function(a, b) { | 98 | 'compareDirectLogins': function(a, b) { |
101 | return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase()); | 99 | return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase()); |
102 | }, | 100 | }, |
103 | 101 | ||
104 | //----------------------------------------------------- | 102 | //----------------------------------------------------- |
105 | 103 | ||
106 | 'redrawDirectLoginItems': function() { | 104 | 'redrawDirectLoginItems': function() { |
107 | var template; | 105 | var template; |
108 | var allDirectLogins; | 106 | var allDirectLogins; |
109 | 107 | ||
110 | this.getElement('message').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 108 | this.getElement('message').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
111 | //MochiKit.Logging.logDebug(">>> CompactInterface.redrawDirectLoginItems"); | 109 | //MochiKit.Logging.logDebug(">>> CompactInterface.redrawDirectLoginItems"); |
112 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 0"); | 110 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 0"); |
113 | MochiKit.Iter.forEach(YAHOO.ext.Element.get('directLogins').getChildrenByTagName('li'), function(aDirectLoginElement) { | 111 | MochiKit.Iter.forEach(YAHOO.ext.Element.get('directLogins').getChildrenByTagName('li'), function(aDirectLoginElement) { |
114 | MochiKit.Signal.disconnectAll(aDirectLoginElement.dom); | 112 | MochiKit.Signal.disconnectAll(aDirectLoginElement.dom); |
115 | //MochiKit.Logging.logDebug("disconnecting IMG " + aDirectLoginElement.getChildrenByTagName('img')[0].dom.src); | 113 | //MochiKit.Logging.logDebug("disconnecting IMG " + aDirectLoginElement.getChildrenByTagName('img')[0].dom.src); |
116 | MochiKit.Signal.disconnectAll(aDirectLoginElement.getChildrenByTagName('img')[0].dom); | 114 | MochiKit.Signal.disconnectAll(aDirectLoginElement.getChildrenByTagName('img')[0].dom); |
117 | }) | 115 | }) |
118 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 1"); | 116 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 1"); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js b/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js index a1e60d8..013dd0d 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js +++ b/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } | 27 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } |
30 | 28 | ||
31 | Clipperz.PM.Components.Compact.LoginForm = function(anElement, args) { | 29 | Clipperz.PM.Components.Compact.LoginForm = function(anElement, args) { |
32 | 30 | ||
33 | Clipperz.PM.Components.Compact.LoginForm.superclass.constructor.call(this, anElement, args); | 31 | Clipperz.PM.Components.Compact.LoginForm.superclass.constructor.call(this, anElement, args); |
34 | 32 | ||
35 | this.render(); | 33 | this.render(); |
36 | Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') | 34 | Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') |
37 | 35 | ||
38 | return this; | 36 | return this; |
39 | }; | 37 | }; |
40 | 38 | ||
41 | YAHOO.extendX(Clipperz.PM.Components.Compact.LoginForm, Clipperz.PM.Components.BaseComponent, { | 39 | YAHOO.extendX(Clipperz.PM.Components.Compact.LoginForm, Clipperz.PM.Components.BaseComponent, { |
42 | 40 | ||
43 | 'toString': function() { | 41 | 'toString': function() { |
44 | return "Clipperz.PM.Components.Compact.LoginForm"; | 42 | return "Clipperz.PM.Components.Compact.LoginForm"; |
45 | }, | 43 | }, |
46 | 44 | ||
47 | //----------------------------------------------------- | 45 | //----------------------------------------------------- |
48 | 46 | ||
49 | 'render': function() { | 47 | 'render': function() { |
50 | var result; | 48 | var result; |
51 | varlayout; | 49 | varlayout; |
52 | 50 | ||
53 | MochiKit.Signal.disconnectAllTo(this); | 51 | MochiKit.Signal.disconnectAllTo(this); |
54 | this.element().update(""); | 52 | this.element().update(""); |
55 | 53 | ||
56 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ | 54 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ |
57 | {tag:'div', id:'compactHeader'}, | 55 | {tag:'div', id:'compactHeader'}, |
58 | {tag:'div', id:'compactBody', children:[ | 56 | {tag:'div', id:'compactBody', children:[ |
59 | {tag:'form', id:this.getId('loginForm_form'), children:[ | 57 | {tag:'form', id:this.getId('loginForm_form'), children:[ |
60 | {tag:'dl', children:[ | 58 | {tag:'dl', children:[ |
61 | {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, | 59 | {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, |
62 | {tag:'dd', children:[ | 60 | {tag:'dd', children:[ |
63 | {tag:'input', id:this.getId('login_username'), type:'text', size:'30', name:'username'} | 61 | {tag:'input', id:this.getId('login_username'), type:'text', size:'30', name:'username'} |
64 | ]}, | 62 | ]}, |
65 | {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, | 63 | {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, |
66 | {tag:'dd', children:[ | 64 | {tag:'dd', children:[ |
67 | {tag:'input', id:this.getId('login_passphrase'), type:'password', size:'30', name:'passphrase'} | 65 | {tag:'input', id:this.getId('login_passphrase'), type:'password', size:'30', name:'passphrase'} |
68 | ]} | 66 | ]} |
69 | ]}, | 67 | ]}, |
70 | {tag:'div', id:this.getId('login_submit')} | 68 | {tag:'div', id:this.getId('login_submit')} |
71 | ]}, | 69 | ]}, |
72 | {tag:'h4', id:this.getId('message')} | 70 | {tag:'h4', id:this.getId('message')} |
73 | ]} | 71 | ]} |
74 | ]}); | 72 | ]}); |
75 | 73 | ||
76 | new Clipperz.PM.Components.Compact.CompactHeader(YAHOO.ext.Element.get('compactHeader')); | 74 | new Clipperz.PM.Components.Compact.CompactHeader(YAHOO.ext.Element.get('compactHeader')); |
77 | 75 | ||
78 | MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', this, 'stopFormSubmit'); | 76 | MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', this, 'stopFormSubmit'); |
79 | new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0}); | 77 | new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0}); |
80 | this.getElement('login_submit').swallowEvent('click', true); | 78 | this.getElement('login_submit').swallowEvent('click', true); |
81 | 79 | ||
82 | MochiKit.Signal.connect(this.getId('loginForm_form'), 'onkeydown', this, 'onkeydown'); | 80 | MochiKit.Signal.connect(this.getId('loginForm_form'), 'onkeydown', this, 'onkeydown'); |
83 | 81 | ||
84 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase')); | 82 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase')); |
85 | this.getElement('login_username').focus(); | 83 | this.getElement('login_username').focus(); |
86 | 84 | ||
87 | return result; | 85 | return result; |
88 | }, | 86 | }, |
89 | 87 | ||
90 | //----------------------------------------------------- | 88 | //----------------------------------------------------- |
91 | 89 | ||
92 | 'doLogin': function(e) { | 90 | 'doLogin': function(e) { |
93 | //MochiKit.Logging.logDebug(">>> compact.LoginForm.doLogin"); | 91 | //MochiKit.Logging.logDebug(">>> compact.LoginForm.doLogin"); |
94 | if (this.checkLoginForm()) { | 92 | if (this.checkLoginForm()) { |
95 | this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value); | 93 | this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value); |
96 | } | 94 | } |
97 | //MochiKit.Logging.logDebug("<<< compact.LoginForm.doLogin"); | 95 | //MochiKit.Logging.logDebug("<<< compact.LoginForm.doLogin"); |
98 | }, | 96 | }, |
99 | 97 | ||
100 | //......................................................................... | 98 | //......................................................................... |
101 | 99 | ||
102 | 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) { | 100 | 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) { |
103 | var deferredResult; | 101 | var deferredResult; |
104 | var user; | 102 | var user; |
105 | 103 | ||
106 | //MochiKit.Logging.logDebug(">>> compact.LoginForm.doLoginWithUsernameAndPassphrase"); | 104 | //MochiKit.Logging.logDebug(">>> compact.LoginForm.doLoginWithUsernameAndPassphrase"); |
107 | user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase}); | 105 | user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase}); |
108 | 106 | ||
109 | deferredResult = new MochiKit.Async.Deferred(); | 107 | deferredResult = new MochiKit.Async.Deferred(); |
110 | deferredResult.addCallback(MochiKit.Base.method(user, 'connect')); | 108 | deferredResult.addCallback(MochiKit.Base.method(user, 'connect')); |
111 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadPreferences')); | 109 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadPreferences')); |
112 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadRecords')); | 110 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadRecords')); |
113 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadDirectLogins')); | 111 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadDirectLogins')); |
114 | deferredResult.addErrback(MochiKit.Base.bind(function() { | 112 | deferredResult.addErrback(MochiKit.Base.bind(function() { |
115 | this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); | 113 | this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); |
116 | this.getElement('message').update(Clipperz.PM.Strings['loginMessagePanelFailureText']); | 114 | this.getElement('message').update(Clipperz.PM.Strings['loginMessagePanelFailureText']); |
117 | this.getDom('login_passphrase').value = ""; | 115 | this.getDom('login_passphrase').value = ""; |
118 | this.getElement('login_passphrase').focus(); | 116 | this.getElement('login_passphrase').focus(); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js index 3f4952d..fef8e9e 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 28 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
31 | 29 | ||
32 | //############################################################################# | 30 | //############################################################################# |
33 | 31 | ||
34 | Clipperz.PM.Components.Import.CSVImport.CSVImportColumns = function(anElement, args) { | 32 | Clipperz.PM.Components.Import.CSVImport.CSVImportColumns = function(anElement, args) { |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportColumns.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.Import.CSVImport.CSVImportColumns.superclass.constructor.call(this, anElement, args); |
38 | this._mainComponent = args.mainComponent; | 36 | this._mainComponent = args.mainComponent; |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportColumns, Clipperz.PM.Components.BaseComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportColumns, Clipperz.PM.Components.BaseComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportColumns component"; | 46 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportColumns component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'mainComponent': function() { | 51 | 'mainComponent': function() { |
54 | return this._mainComponent; | 52 | return this._mainComponent; |
55 | }, | 53 | }, |
56 | 54 | ||
57 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
58 | 56 | ||
59 | 'render': function() { | 57 | 'render': function() { |
60 | var i,c; | 58 | var i,c; |
61 | var columnSelectorCheckboxCells; | 59 | var columnSelectorCheckboxCells; |
62 | var checkboxes; | 60 | var checkboxes; |
63 | var data; | 61 | var data; |
64 | 62 | ||
65 | //MochiKit.Logging.logDebug(">>> CSVImportColumns.render"); | 63 | //MochiKit.Logging.logDebug(">>> CSVImportColumns.render"); |
66 | Clipperz.NotificationCenter.unregister(this); | 64 | Clipperz.NotificationCenter.unregister(this); |
67 | MochiKit.Signal.disconnectAllTo(this); | 65 | MochiKit.Signal.disconnectAllTo(this); |
68 | 66 | ||
69 | this.element().update(""); | 67 | this.element().update(""); |
70 | 68 | ||
71 | data = this.mainComponent().parsedValues(); | 69 | data = this.mainComponent().parsedValues(); |
72 | columnSelectorCheckboxCells = []; | 70 | columnSelectorCheckboxCells = []; |
73 | 71 | ||
74 | c =data[0].length; | 72 | c =data[0].length; |
75 | for (i=0; i<c; i++) { | 73 | for (i=0; i<c; i++) { |
76 | columnSelectorCheckboxCells.push({tag:'th', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), children:[ | 74 | columnSelectorCheckboxCells.push({tag:'th', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), children:[ |
77 | {tag:'input', type:'checkbox', id:this.getId('columnCheckbox_' + i), value:i} | 75 | {tag:'input', type:'checkbox', id:this.getId('columnCheckbox_' + i), value:i} |
78 | ]}) | 76 | ]}) |
79 | } | 77 | } |
80 | 78 | ||
81 | this.domHelper().append(this.element(), {tag:'div', children:[ | 79 | this.domHelper().append(this.element(), {tag:'div', children:[ |
82 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Columns']}, | 80 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Columns']}, |
83 | {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ | 81 | {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ |
84 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview columns', cellspacing:'0', children:[ | 82 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview columns', cellspacing:'0', children:[ |
85 | {tag:'thead', id:this.getId('previewData_thead'), children:[ | 83 | {tag:'thead', id:this.getId('previewData_thead'), children:[ |
86 | {tag:'tr', children:columnSelectorCheckboxCells} | 84 | {tag:'tr', children:columnSelectorCheckboxCells} |
87 | ]}, | 85 | ]}, |
88 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} | 86 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} |
89 | ]} | 87 | ]} |
90 | ]} | 88 | ]} |
91 | ]}); | 89 | ]}); |
92 | 90 | ||
93 | c =data[0].length; | 91 | c =data[0].length; |
94 | for (i=0; i<c; i++) { | 92 | for (i=0; i<c; i++) { |
95 | if (this.mainComponent().isColumnSelected(i)) { | 93 | if (this.mainComponent().isColumnSelected(i)) { |
96 | this.getDom('columnCheckbox_' + i).checked = true; | 94 | this.getDom('columnCheckbox_' + i).checked = true; |
97 | } | 95 | } |
98 | } | 96 | } |
99 | 97 | ||
100 | this.renderData(this.getElement('previewData_tbody'), data); | 98 | this.renderData(this.getElement('previewData_tbody'), data); |
101 | 99 | ||
102 | checkboxes = MochiKit.DOM.getElementsByTagAndClassName('input', null, this.getDom('previewData_thead')); | 100 | checkboxes = MochiKit.DOM.getElementsByTagAndClassName('input', null, this.getDom('previewData_thead')); |
103 | c = checkboxes.length; | 101 | c = checkboxes.length; |
104 | for (i=0; i<c; i++) { | 102 | for (i=0; i<c; i++) { |
105 | MochiKit.Signal.connect(checkboxes[i], 'onclick', this, 'renderDataHandler'); | 103 | MochiKit.Signal.connect(checkboxes[i], 'onclick', this, 'renderDataHandler'); |
106 | } | 104 | } |
107 | //MochiKit.Logging.logDebug("<<< CSVImportColumns.render"); | 105 | //MochiKit.Logging.logDebug("<<< CSVImportColumns.render"); |
108 | }, | 106 | }, |
109 | 107 | ||
110 | //------------------------------------------------------------------------- | 108 | //------------------------------------------------------------------------- |
111 | 109 | ||
112 | 'renderData': function(anElement, someData) { | 110 | 'renderData': function(anElement, someData) { |
113 | var config; | 111 | var config; |
114 | var i,c; | 112 | var i,c; |
115 | 113 | ||
116 | //MochiKit.Logging.logDebug(">>> CSVImportColumns.renderData"); | 114 | //MochiKit.Logging.logDebug(">>> CSVImportColumns.renderData"); |
117 | // anElement.update(""); | 115 | // anElement.update(""); |
118 | MochiKit.DOM.replaceChildNodes(anElement.dom); | 116 | MochiKit.DOM.replaceChildNodes(anElement.dom); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js index f7dbd5d..e816380 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 28 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
31 | 29 | ||
32 | //############################################################################# | 30 | //############################################################################# |
33 | 31 | ||
34 | Clipperz.PM.Components.Import.CSVImport.CSVImportFields = function(anElement, args) { | 32 | Clipperz.PM.Components.Import.CSVImport.CSVImportFields = function(anElement, args) { |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportFields.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.Import.CSVImport.CSVImportFields.superclass.constructor.call(this, anElement, args); |
38 | this._mainComponent = args.mainComponent; | 36 | this._mainComponent = args.mainComponent; |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportFields, Clipperz.PM.Components.BaseComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportFields, Clipperz.PM.Components.BaseComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportFields component"; | 46 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportFields component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'mainComponent': function() { | 51 | 'mainComponent': function() { |
54 | return this._mainComponent; | 52 | return this._mainComponent; |
55 | }, | 53 | }, |
56 | 54 | ||
57 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
58 | 56 | ||
59 | 'render': function() { | 57 | 'render': function() { |
60 | varfieldsHeaderCells; | 58 | varfieldsHeaderCells; |
61 | var titleColumnIndex; | 59 | var titleColumnIndex; |
62 | var notesColumnIndex; | 60 | var notesColumnIndex; |
63 | var i,c; | 61 | var i,c; |
64 | 62 | ||
65 | Clipperz.NotificationCenter.unregister(this); | 63 | Clipperz.NotificationCenter.unregister(this); |
66 | MochiKit.Signal.disconnectAllTo(this); | 64 | MochiKit.Signal.disconnectAllTo(this); |
67 | 65 | ||
68 | this.element().update(""); | 66 | this.element().update(""); |
69 | 67 | ||
70 | titleColumnIndex = this.mainComponent().titleColumnIndex() | 68 | titleColumnIndex = this.mainComponent().titleColumnIndex() |
71 | notesColumnIndex = this.mainComponent().notesColumnIndex() | 69 | notesColumnIndex = this.mainComponent().notesColumnIndex() |
72 | 70 | ||
73 | fieldsHeaderCells = []; | 71 | fieldsHeaderCells = []; |
74 | fieldsHeaderCells.push({tag:'td', valign:'top', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}); | 72 | fieldsHeaderCells.push({tag:'td', valign:'top', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}); |
75 | 73 | ||
76 | c =this.mainComponent().parsedValues()[0].length; | 74 | c =this.mainComponent().parsedValues()[0].length; |
77 | for (i=0; i<c; i++) { | 75 | for (i=0; i<c; i++) { |
78 | if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { | 76 | if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { |
79 | var trimmedLabel; | 77 | var trimmedLabel; |
80 | 78 | ||
81 | trimmedLabel = Clipperz.Base.trim(this.mainComponent().labelForColumn(i)); | 79 | trimmedLabel = Clipperz.Base.trim(this.mainComponent().labelForColumn(i)); |
82 | fieldsHeaderCells.push({tag:'td', valign:'top', id:this.getId('fieldHeaderTD_' + i), cls:((trimmedLabel == "") ? 'missingLabelWarning' : (this.isColumnSetup(i) ? 'configuredColumn': 'unconfiguredColumn')), children:[ | 80 | fieldsHeaderCells.push({tag:'td', valign:'top', id:this.getId('fieldHeaderTD_' + i), cls:((trimmedLabel == "") ? 'missingLabelWarning' : (this.isColumnSetup(i) ? 'configuredColumn': 'unconfiguredColumn')), children:[ |
83 | {tag:'span', html:((trimmedLabel == "") ? Clipperz.PM.Strings['CSV_ImportWizard_Fields_MissingLabelWarning'] : trimmedLabel)/*, cls:((trimmedLabel == "") ? 'missingLabelWarning' : '')*/}, | 81 | {tag:'span', html:((trimmedLabel == "") ? Clipperz.PM.Strings['CSV_ImportWizard_Fields_MissingLabelWarning'] : trimmedLabel)/*, cls:((trimmedLabel == "") ? 'missingLabelWarning' : '')*/}, |
84 | {tag:'select', id:this.getId('select_' + i), name:i, children:[ | 82 | {tag:'select', id:this.getId('select_' + i), name:i, children:[ |
85 | {tag:'option', value:'UNDEFINED', html:"select data type", cls:'disabledOption'}, | 83 | {tag:'option', value:'UNDEFINED', html:"select data type", cls:'disabledOption'}, |
86 | {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, | 84 | {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, |
87 | {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, | 85 | {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, |
88 | {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, | 86 | {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, |
89 | {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, | 87 | {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, |
90 | {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} | 88 | {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} |
91 | ]} | 89 | ]} |
92 | ]}) | 90 | ]}) |
93 | } | 91 | } |
94 | } | 92 | } |
95 | 93 | ||
96 | if (notesColumnIndex != -1) { | 94 | if (notesColumnIndex != -1) { |
97 | fieldsHeaderCells.push({tag:'td', valign:'top', cls:'notes', html:this.mainComponent().labelForColumn(notesColumnIndex)}); | 95 | fieldsHeaderCells.push({tag:'td', valign:'top', cls:'notes', html:this.mainComponent().labelForColumn(notesColumnIndex)}); |
98 | } | 96 | } |
99 | 97 | ||
100 | this.domHelper().append(this.element(), {tag:'div', children:[ | 98 | this.domHelper().append(this.element(), {tag:'div', children:[ |
101 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Fields']}, | 99 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Fields']}, |
102 | {tag:'div', id:this.getId('dataDiv'), children:[ | 100 | {tag:'div', id:this.getId('dataDiv'), children:[ |
103 | {tag:'div', children:[ | 101 | {tag:'div', children:[ |
104 | ]}, | 102 | ]}, |
105 | {tag:'div', cls:'csvImportPreview', children:[ | 103 | {tag:'div', cls:'csvImportPreview', children:[ |
106 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ | 104 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ |
107 | {tag:'thead', id:this.getId('previewData_thead'), children:[ | 105 | {tag:'thead', id:this.getId('previewData_thead'), children:[ |
108 | {tag:'tr', cls:'CSV_previewData_header', children:fieldsHeaderCells} | 106 | {tag:'tr', cls:'CSV_previewData_header', children:fieldsHeaderCells} |
109 | ]}, | 107 | ]}, |
110 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} | 108 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} |
111 | ]} | 109 | ]} |
112 | ]} | 110 | ]} |
113 | ]} | 111 | ]} |
114 | ]}); | 112 | ]}); |
115 | 113 | ||
116 | for (i=0; i<c; i++) { | 114 | for (i=0; i<c; i++) { |
117 | if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { | 115 | if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { |
118 | Clipperz.DOM.selectOptionMatchingValue(this.getDom('select_' + i), this.mainComponent().typeForColumn(i)); | 116 | Clipperz.DOM.selectOptionMatchingValue(this.getDom('select_' + i), this.mainComponent().typeForColumn(i)); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js index 5cb8679..dbde138 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 28 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
31 | 29 | ||
32 | //############################################################################# | 30 | //############################################################################# |
33 | 31 | ||
34 | Clipperz.PM.Components.Import.CSVImport.CSVImportHeader = function(anElement, args) { | 32 | Clipperz.PM.Components.Import.CSVImport.CSVImportHeader = function(anElement, args) { |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportHeader.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.Import.CSVImport.CSVImportHeader.superclass.constructor.call(this, anElement, args); |
38 | this._mainComponent = args.mainComponent; | 36 | this._mainComponent = args.mainComponent; |
39 | 37 | ||
40 | this._pendingDeferredLabelFieldHandlerEvents = 0; | 38 | this._pendingDeferredLabelFieldHandlerEvents = 0; |
41 | 39 | ||
42 | return this; | 40 | return this; |
43 | } | 41 | } |
44 | 42 | ||
45 | //============================================================================= | 43 | //============================================================================= |
46 | 44 | ||
47 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportHeader, Clipperz.PM.Components.BaseComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportHeader, Clipperz.PM.Components.BaseComponent, { |
48 | 46 | ||
49 | 'toString': function() { | 47 | 'toString': function() { |
50 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportHeader component"; | 48 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportHeader component"; |
51 | }, | 49 | }, |
52 | 50 | ||
53 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
54 | 52 | ||
55 | 'mainComponent': function() { | 53 | 'mainComponent': function() { |
56 | return this._mainComponent; | 54 | return this._mainComponent; |
57 | }, | 55 | }, |
58 | 56 | ||
59 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
60 | 58 | ||
61 | 'render': function() { | 59 | 'render': function() { |
62 | var thConfigs; | 60 | var thConfigs; |
63 | var i,c; | 61 | var i,c; |
64 | 62 | ||
65 | //MochiKit.Logging.logDebug(">>> CSVImportHeader.render"); | 63 | //MochiKit.Logging.logDebug(">>> CSVImportHeader.render"); |
66 | Clipperz.NotificationCenter.unregister(this); | 64 | Clipperz.NotificationCenter.unregister(this); |
67 | MochiKit.Signal.disconnectAllTo(this); | 65 | MochiKit.Signal.disconnectAllTo(this); |
68 | 66 | ||
69 | thConfigs = []; | 67 | thConfigs = []; |
70 | c = this.mainComponent().parsedValues()[0].length; | 68 | c = this.mainComponent().parsedValues()[0].length; |
71 | for (i=0; i<c; i++) { | 69 | for (i=0; i<c; i++) { |
72 | if (this.mainComponent().isColumnSelected(i)) { | 70 | if (this.mainComponent().isColumnSelected(i)) { |
73 | // thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:this.mainComponent().labelForColumn(i)}]}); | 71 | // thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:this.mainComponent().labelForColumn(i)}]}); |
74 | thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:""}]}); | 72 | thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:""}]}); |
75 | } | 73 | } |
76 | } | 74 | } |
77 | 75 | ||
78 | this.element().update(""); | 76 | this.element().update(""); |
79 | this.domHelper().append(this.element(), {tag:'div', children:[ | 77 | this.domHelper().append(this.element(), {tag:'div', children:[ |
80 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header']}, | 78 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header']}, |
81 | {tag:'div', cls:'importStepParameters', children:[ | 79 | {tag:'div', cls:'importStepParameters', children:[ |
82 | {tag:'input', type:'checkbox', name:'isFistRowHeader', id:this.getId('isFirstRowHeader_checkbox')}, | 80 | {tag:'input', type:'checkbox', name:'isFistRowHeader', id:this.getId('isFirstRowHeader_checkbox')}, |
83 | {tag:'span', id:this.getId('isFirstRowHeader_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header_Settings_firstRowHeaderLabel']} | 81 | {tag:'span', id:this.getId('isFirstRowHeader_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header_Settings_firstRowHeaderLabel']} |
84 | ]}, | 82 | ]}, |
85 | {tag:'div', id:this.getId('dataDiv'), children:[ | 83 | {tag:'div', id:this.getId('dataDiv'), children:[ |
86 | {tag:'div', cls:'csvImportPreview', children:[ | 84 | {tag:'div', cls:'csvImportPreview', children:[ |
87 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview header', cellspacing:'0', children:[ | 85 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview header', cellspacing:'0', children:[ |
88 | {tag:'thead', children:[{tag:'tr', children:thConfigs}]}, | 86 | {tag:'thead', children:[{tag:'tr', children:thConfigs}]}, |
89 | {tag:'tbody', id:this.getId('previewData_tbody')} | 87 | {tag:'tbody', id:this.getId('previewData_tbody')} |
90 | ]} | 88 | ]} |
91 | ]} | 89 | ]} |
92 | ]} | 90 | ]} |
93 | ]}); | 91 | ]}); |
94 | 92 | ||
95 | for (i=0; i<c; i++) { | 93 | for (i=0; i<c; i++) { |
96 | if (this.mainComponent().isColumnSelected(i)) { | 94 | if (this.mainComponent().isColumnSelected(i)) { |
97 | this.getElement('headerTextField_' + i).dom.value = this.mainComponent().labelForColumn(i); | 95 | this.getElement('headerTextField_' + i).dom.value = this.mainComponent().labelForColumn(i); |
98 | } | 96 | } |
99 | } | 97 | } |
100 | 98 | ||
101 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); | 99 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); |
102 | 100 | ||
103 | if (this.mainComponent().isFirstRowHeader()) { | 101 | if (this.mainComponent().isFirstRowHeader()) { |
104 | this.getDom('isFirstRowHeader_checkbox').click(); | 102 | this.getDom('isFirstRowHeader_checkbox').click(); |
105 | } | 103 | } |
106 | 104 | ||
107 | c = this.mainComponent().parsedValues()[0].length; | 105 | c = this.mainComponent().parsedValues()[0].length; |
108 | for (i=0; i<c; i++) { | 106 | for (i=0; i<c; i++) { |
109 | if (this.mainComponent().isColumnSelected(i)) { | 107 | if (this.mainComponent().isColumnSelected(i)) { |
110 | MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onchange', MochiKit.Base.partial(MochiKit.Base.method(this, 'labelFieldHandler'), i)); | 108 | MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onchange', MochiKit.Base.partial(MochiKit.Base.method(this, 'labelFieldHandler'), i)); |
111 | MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onkeypress', MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandler'), i)); | 109 | MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onkeypress', MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandler'), i)); |
112 | } | 110 | } |
113 | } | 111 | } |
114 | 112 | ||
115 | MochiKit.Signal.connect(this.getDom('isFirstRowHeader_checkbox'), 'onclick', this, 'toggleFirstRowHeaderCheckboxHandler'); | 113 | MochiKit.Signal.connect(this.getDom('isFirstRowHeader_checkbox'), 'onclick', this, 'toggleFirstRowHeaderCheckboxHandler'); |
116 | if (Clipperz_IEisBroken != true) { | 114 | if (Clipperz_IEisBroken != true) { |
117 | MochiKit.Signal.connect(this.getDom('isFirstRowHeader_span'), 'onclick', this.getDom('isFirstRowHeader_checkbox'), 'click'); | 115 | MochiKit.Signal.connect(this.getDom('isFirstRowHeader_span'), 'onclick', this.getDom('isFirstRowHeader_checkbox'), 'click'); |
118 | } | 116 | } |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js index 6344e06..ccfdeca 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 28 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
31 | 29 | ||
32 | //############################################################################# | 30 | //############################################################################# |
33 | 31 | ||
34 | Clipperz.PM.Components.Import.CSVImport.CSVImportNotes = function(anElement, args) { | 32 | Clipperz.PM.Components.Import.CSVImport.CSVImportNotes = function(anElement, args) { |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportNotes.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.Import.CSVImport.CSVImportNotes.superclass.constructor.call(this, anElement, args); |
38 | this._mainComponent = args.mainComponent; | 36 | this._mainComponent = args.mainComponent; |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportNotes, Clipperz.PM.Components.BaseComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportNotes, Clipperz.PM.Components.BaseComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportNotes component"; | 46 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportNotes component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'mainComponent': function() { | 51 | 'mainComponent': function() { |
54 | return this._mainComponent; | 52 | return this._mainComponent; |
55 | }, | 53 | }, |
56 | 54 | ||
57 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
58 | 56 | ||
59 | 'render': function() { | 57 | 'render': function() { |
60 | varnotesSelectorCheckboxCells; | 58 | varnotesSelectorCheckboxCells; |
61 | var totalNumberOfColumns; | 59 | var totalNumberOfColumns; |
62 | var titleColumnIndex; | 60 | var titleColumnIndex; |
63 | var notesColumnIndex; | 61 | var notesColumnIndex; |
64 | var i,c; | 62 | var i,c; |
65 | 63 | ||
66 | Clipperz.NotificationCenter.unregister(this); | 64 | Clipperz.NotificationCenter.unregister(this); |
67 | MochiKit.Signal.disconnectAllTo(this); | 65 | MochiKit.Signal.disconnectAllTo(this); |
68 | 66 | ||
69 | this.element().update(""); | 67 | this.element().update(""); |
70 | 68 | ||
71 | titleColumnIndex = this.mainComponent().titleColumnIndex() | 69 | titleColumnIndex = this.mainComponent().titleColumnIndex() |
72 | notesColumnIndex = this.mainComponent().notesColumnIndex() | 70 | notesColumnIndex = this.mainComponent().notesColumnIndex() |
73 | 71 | ||
74 | totalNumberOfColumns = this.mainComponent().parsedValues()[0].length; | 72 | totalNumberOfColumns = this.mainComponent().parsedValues()[0].length; |
75 | 73 | ||
76 | notesSelectorCheckboxCells = [{tag:'th', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}]; | 74 | notesSelectorCheckboxCells = [{tag:'th', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}]; |
77 | c =totalNumberOfColumns; | 75 | c =totalNumberOfColumns; |
78 | for (i=0; i<c; i++) { | 76 | for (i=0; i<c; i++) { |
79 | if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { | 77 | if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { |
80 | notesSelectorCheckboxCells.push({tag:'th', id:this.getId('th_' + i), valign:'top', children:[ | 78 | notesSelectorCheckboxCells.push({tag:'th', id:this.getId('th_' + i), valign:'top', children:[ |
81 | {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportNotesColumn', value:i}, | 79 | {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportNotesColumn', value:i}, |
82 | {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} | 80 | {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} |
83 | ]}) | 81 | ]}) |
84 | } | 82 | } |
85 | } | 83 | } |
86 | 84 | ||
87 | this.domHelper().append(this.element(), {tag:'div', children:[ | 85 | this.domHelper().append(this.element(), {tag:'div', children:[ |
88 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes']}, | 86 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes']}, |
89 | {tag:'div', id:this.getId('dataDiv'), children:[ | 87 | {tag:'div', id:this.getId('dataDiv'), children:[ |
90 | {tag:'div', cls:'importStepParameters', children:[ | 88 | {tag:'div', cls:'importStepParameters', children:[ |
91 | {tag:'input', id:this.getId('doNotSetNotes_radio'), type:'radio', name:'CSVImportNotesColumn', value:-1}, | 89 | {tag:'input', id:this.getId('doNotSetNotes_radio'), type:'radio', name:'CSVImportNotesColumn', value:-1}, |
92 | {tag:'span', id:this.getId('doNotSetNotes_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes_Settings_noSelectionLabel']} | 90 | {tag:'span', id:this.getId('doNotSetNotes_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes_Settings_noSelectionLabel']} |
93 | ]}, | 91 | ]}, |
94 | {tag:'div', cls:'csvImportPreview', children:[ | 92 | {tag:'div', cls:'csvImportPreview', children:[ |
95 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ | 93 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ |
96 | {tag:'thead', id:this.getId('previewData_thead'), children:[ | 94 | {tag:'thead', id:this.getId('previewData_thead'), children:[ |
97 | {tag:'tr', children:notesSelectorCheckboxCells} | 95 | {tag:'tr', children:notesSelectorCheckboxCells} |
98 | ]}, | 96 | ]}, |
99 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} | 97 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} |
100 | ]} | 98 | ]} |
101 | ]} | 99 | ]} |
102 | ]} | 100 | ]} |
103 | ]}); | 101 | ]}); |
104 | 102 | ||
105 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); | 103 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); |
106 | 104 | ||
107 | if ((notesColumnIndex >= totalNumberOfColumns) || (notesColumnIndex == titleColumnIndex) || !(this.mainComponent().isColumnSelected(notesColumnIndex))) { | 105 | if ((notesColumnIndex >= totalNumberOfColumns) || (notesColumnIndex == titleColumnIndex) || !(this.mainComponent().isColumnSelected(notesColumnIndex))) { |
108 | this.mainComponent().setNotesColumnIndex(-1); | 106 | this.mainComponent().setNotesColumnIndex(-1); |
109 | notesColumnIndex = -1; | 107 | notesColumnIndex = -1; |
110 | } | 108 | } |
111 | 109 | ||
112 | c =totalNumberOfColumns; | 110 | c =totalNumberOfColumns; |
113 | for (i=0; i<c; i++) { | 111 | for (i=0; i<c; i++) { |
114 | if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { | 112 | if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { |
115 | MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); | 113 | MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); |
116 | if (Clipperz_IEisBroken != true) { | 114 | if (Clipperz_IEisBroken != true) { |
117 | MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); | 115 | MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); |
118 | } | 116 | } |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js index aa57580..4b2149a 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 28 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
31 | 29 | ||
32 | //############################################################################# | 30 | //############################################################################# |
33 | 31 | ||
34 | Clipperz.PM.Components.Import.CSVImport.CSVImportTitle = function(anElement, args) { | 32 | Clipperz.PM.Components.Import.CSVImport.CSVImportTitle = function(anElement, args) { |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportTitle.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.Import.CSVImport.CSVImportTitle.superclass.constructor.call(this, anElement, args); |
38 | this._mainComponent = args.mainComponent; | 36 | this._mainComponent = args.mainComponent; |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportTitle, Clipperz.PM.Components.BaseComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportTitle, Clipperz.PM.Components.BaseComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportTitle component"; | 46 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportTitle component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'mainComponent': function() { | 51 | 'mainComponent': function() { |
54 | return this._mainComponent; | 52 | return this._mainComponent; |
55 | }, | 53 | }, |
56 | 54 | ||
57 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
58 | 56 | ||
59 | 'render': function() { | 57 | 'render': function() { |
60 | vartitleSelectorCheckboxCells; | 58 | vartitleSelectorCheckboxCells; |
61 | var titleColumnIndex; | 59 | var titleColumnIndex; |
62 | var i,c; | 60 | var i,c; |
63 | 61 | ||
64 | Clipperz.NotificationCenter.unregister(this); | 62 | Clipperz.NotificationCenter.unregister(this); |
65 | MochiKit.Signal.disconnectAllTo(this); | 63 | MochiKit.Signal.disconnectAllTo(this); |
66 | 64 | ||
67 | this.element().update(""); | 65 | this.element().update(""); |
68 | 66 | ||
69 | titleColumnIndex = this.mainComponent().titleColumnIndex() | 67 | titleColumnIndex = this.mainComponent().titleColumnIndex() |
70 | titleSelectorCheckboxCells = []; | 68 | titleSelectorCheckboxCells = []; |
71 | c =this.mainComponent().parsedValues()[0].length; | 69 | c =this.mainComponent().parsedValues()[0].length; |
72 | for (i=0; i<c; i++) { | 70 | for (i=0; i<c; i++) { |
73 | if (this.mainComponent().isColumnSelected(i)) { | 71 | if (this.mainComponent().isColumnSelected(i)) { |
74 | titleSelectorCheckboxCells.push({tag:'th', valign:'top', id:this.getId('th_' + i), children:[ | 72 | titleSelectorCheckboxCells.push({tag:'th', valign:'top', id:this.getId('th_' + i), children:[ |
75 | {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportTitleColumn', value:i}, | 73 | {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportTitleColumn', value:i}, |
76 | {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} | 74 | {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} |
77 | ]}) | 75 | ]}) |
78 | } | 76 | } |
79 | } | 77 | } |
80 | 78 | ||
81 | if (titleColumnIndex >= titleSelectorCheckboxCells.length) { | 79 | if (titleColumnIndex >= titleSelectorCheckboxCells.length) { |
82 | this.mainComponent().setTitleColumnIndex(-1); | 80 | this.mainComponent().setTitleColumnIndex(-1); |
83 | } | 81 | } |
84 | 82 | ||
85 | this.domHelper().append(this.element(), {tag:'div', children:[ | 83 | this.domHelper().append(this.element(), {tag:'div', children:[ |
86 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, | 84 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, |
87 | {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ | 85 | {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ |
88 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ | 86 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ |
89 | {tag:'thead', id:this.getId('previewData_thead'), children:[ | 87 | {tag:'thead', id:this.getId('previewData_thead'), children:[ |
90 | {tag:'tr', children:titleSelectorCheckboxCells} | 88 | {tag:'tr', children:titleSelectorCheckboxCells} |
91 | ]}, | 89 | ]}, |
92 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} | 90 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} |
93 | ]} | 91 | ]} |
94 | ]} | 92 | ]} |
95 | ]}); | 93 | ]}); |
96 | 94 | ||
97 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); | 95 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); |
98 | 96 | ||
99 | c =this.mainComponent().parsedValues()[0].length; | 97 | c =this.mainComponent().parsedValues()[0].length; |
100 | for (i=0; i<c; i++) { | 98 | for (i=0; i<c; i++) { |
101 | if (this.mainComponent().isColumnSelected(i)) { | 99 | if (this.mainComponent().isColumnSelected(i)) { |
102 | MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); | 100 | MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); |
103 | if (Clipperz_IEisBroken != true) { | 101 | if (Clipperz_IEisBroken != true) { |
104 | MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); | 102 | MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); |
105 | } | 103 | } |
106 | } | 104 | } |
107 | } | 105 | } |
108 | 106 | ||
109 | if (titleColumnIndex != -1) { | 107 | if (titleColumnIndex != -1) { |
110 | this.getDom('radio_' + titleColumnIndex).click(); | 108 | this.getDom('radio_' + titleColumnIndex).click(); |
111 | } else { | 109 | } else { |
112 | this.mainComponent().nextButton().disable(); | 110 | this.mainComponent().nextButton().disable(); |
113 | } | 111 | } |
114 | 112 | ||
115 | }, | 113 | }, |
116 | 114 | ||
117 | //------------------------------------------------------------------------- | 115 | //------------------------------------------------------------------------- |
118 | 116 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js index c1dd1a9..bd305c3 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.CSVImportComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.CSVImportComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | this._steps = this._steps || ['CSV_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; | 34 | this._steps = this._steps || ['CSV_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; |
37 | 35 | ||
38 | Clipperz.PM.Components.Import.CSVImportComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Import.CSVImportComponent.superclass.constructor.call(this, anElement, args); |
39 | 37 | ||
40 | this._step1Component = null; | 38 | this._step1Component = null; |
41 | this._step2Component = null; | 39 | this._step2Component = null; |
42 | this._step3Component = null; | 40 | this._step3Component = null; |
43 | this._step4Component = null; | 41 | this._step4Component = null; |
44 | this._step5Component = null; | 42 | this._step5Component = null; |
45 | 43 | ||
46 | this._isFirstRowHeader = false; | 44 | this._isFirstRowHeader = false; |
47 | this._titleColumnIndex = -1; | 45 | this._titleColumnIndex = -1; |
48 | this._notesColumnIndex = -1; | 46 | this._notesColumnIndex = -1; |
49 | this._fieldSettings = {}; | 47 | this._fieldSettings = {}; |
50 | this._skippedColumns = new Clipperz.Set(); | 48 | this._skippedColumns = new Clipperz.Set(); |
51 | 49 | ||
52 | this.render(); | 50 | this.render(); |
53 | 51 | ||
54 | return this; | 52 | return this; |
55 | } | 53 | } |
56 | 54 | ||
57 | //============================================================================= | 55 | //============================================================================= |
58 | 56 | ||
59 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 57 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
60 | 58 | ||
61 | 'toString': function() { | 59 | 'toString': function() { |
62 | return "Clipperz.PM.Components.Import.CSVImportComponent component"; | 60 | return "Clipperz.PM.Components.Import.CSVImportComponent component"; |
63 | }, | 61 | }, |
64 | 62 | ||
65 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
66 | 64 | ||
67 | 'render': function() { | 65 | 'render': function() { |
68 | this.domHelper().append(this.element(), {tag:'div', cls:'csvImportWizard', children:[ | 66 | this.domHelper().append(this.element(), {tag:'div', cls:'csvImportWizard', children:[ |
69 | {tag:'h3', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, | 67 | {tag:'h3', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, |
70 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 68 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
71 | {tag:'div', cls:'importStepBlocks', children:[ | 69 | {tag:'div', cls:'importStepBlocks', children:[ |
72 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 70 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
73 | {tag:'div', children:[ | 71 | {tag:'div', children:[ |
74 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_csv_description']}, | 72 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_csv_description']}, |
75 | {tag:'div', cls:'importOptionsParameters', children:[ | 73 | {tag:'div', cls:'importOptionsParameters', children:[ |
76 | {tag:'div', cls:'CSVImportOptionsParameters', children:[ | 74 | {tag:'div', cls:'CSVImportOptionsParameters', children:[ |
77 | {tag:'ul', children:[ | 75 | {tag:'ul', children:[ |
78 | {tag:'li', children:[ | 76 | {tag:'li', children:[ |
79 | {tag:'label', 'for':this.getId('CSV_inputOptions_separator'), html:"separator"}, | 77 | {tag:'label', 'for':this.getId('CSV_inputOptions_separator'), html:"separator"}, |
80 | {tag:'select', name:this.getId('CSV_inputOptions_separator'), id:this.getId('CSV_inputOptions_separator'), children:[ | 78 | {tag:'select', name:this.getId('CSV_inputOptions_separator'), id:this.getId('CSV_inputOptions_separator'), children:[ |
81 | {tag:'option', name:'comma', value:',', html:"comma (,)", selected:true}, | 79 | {tag:'option', name:'comma', value:',', html:"comma (,)", selected:true}, |
82 | {tag:'option', name:'tab', value:'\t', html:"tab"} | 80 | {tag:'option', name:'tab', value:'\t', html:"tab"} |
83 | ]} | 81 | ]} |
84 | ]}, | 82 | ]}, |
85 | 83 | ||
86 | {tag:'li', children:[ | 84 | {tag:'li', children:[ |
87 | {tag:'label', 'for':this.getId('CSV_inputOptions_quote'), html:"quote"}, | 85 | {tag:'label', 'for':this.getId('CSV_inputOptions_quote'), html:"quote"}, |
88 | {tag:'select', name:this.getId('CSV_inputOptions_quote'), id:this.getId('CSV_inputOptions_quote'), children:[ | 86 | {tag:'select', name:this.getId('CSV_inputOptions_quote'), id:this.getId('CSV_inputOptions_quote'), children:[ |
89 | {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, | 87 | {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, |
90 | {tag:'option', name:'singleQuote', value:'\'', html:"single quote (\')"} | 88 | {tag:'option', name:'singleQuote', value:'\'', html:"single quote (\')"} |
91 | ]} | 89 | ]} |
92 | ]}, | 90 | ]}, |
93 | 91 | ||
94 | {tag:'li', children:[ | 92 | {tag:'li', children:[ |
95 | {tag:'label', 'for':this.getId('CSV_inputOptions_escape'), html:"escape"}, | 93 | {tag:'label', 'for':this.getId('CSV_inputOptions_escape'), html:"escape"}, |
96 | {tag:'select', name:this.getId('CSV_inputOptions_escape'), id:this.getId('CSV_inputOptions_escape'), children:[ | 94 | {tag:'select', name:this.getId('CSV_inputOptions_escape'), id:this.getId('CSV_inputOptions_escape'), children:[ |
97 | {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, | 95 | {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, |
98 | {tag:'option', name:'slash', value:'\/', html:"slash (\/)"}, | 96 | {tag:'option', name:'slash', value:'\/', html:"slash (\/)"}, |
99 | {tag:'option', name:'backslash', value:'\\', html:"backslash (\\)"} | 97 | {tag:'option', name:'backslash', value:'\\', html:"backslash (\\)"} |
100 | ]} | 98 | ]} |
101 | ]} | 99 | ]} |
102 | ]} | 100 | ]} |
103 | ]} | 101 | ]} |
104 | ]}, | 102 | ]}, |
105 | this.textAreaConfig() | 103 | this.textAreaConfig() |
106 | ]} | 104 | ]} |
107 | ]}, | 105 | ]}, |
108 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, | 106 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, |
109 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, | 107 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, |
110 | {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, | 108 | {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, |
111 | {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, | 109 | {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, |
112 | {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, | 110 | {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, |
113 | {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ | 111 | {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ |
114 | {tag:'div', children:[ | 112 | {tag:'div', children:[ |
115 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 113 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
116 | ]} | 114 | ]} |
117 | ]}, | 115 | ]}, |
118 | {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ | 116 | {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js index c3d2fac..d74961b 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.ClipperzImportComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.ClipperzImportComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Import.ClipperzImportComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.Import.ClipperzImportComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this.render(); | 36 | this.render(); |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.ClipperzImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.ClipperzImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.ClipperzImportComponent component"; | 46 | return "Clipperz.PM.Components.Import.ClipperzImportComponent component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'render': function() { | 51 | 'render': function() { |
54 | //MochiKit.Logging.logDebug(">>> Import.ClipperzImportComponent.render"); | 52 | //MochiKit.Logging.logDebug(">>> Import.ClipperzImportComponent.render"); |
55 | this.domHelper().append(this.element(), {tag:'div', cls:'clipperzImportWizard', children:[ | 53 | this.domHelper().append(this.element(), {tag:'div', cls:'clipperzImportWizard', children:[ |
56 | {tag:'h3', htmlString:Clipperz.PM.Strings['Clipperz_ImportWizard_Title']}, | 54 | {tag:'h3', htmlString:Clipperz.PM.Strings['Clipperz_ImportWizard_Title']}, |
57 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 55 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
58 | {tag:'div', cls:'importStepBlocks', children:[ | 56 | {tag:'div', cls:'importStepBlocks', children:[ |
59 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 57 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
60 | {tag:'div', children:[ | 58 | {tag:'div', children:[ |
61 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_clipperz_description']}, | 59 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_clipperz_description']}, |
62 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 60 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
63 | this.textAreaConfig() | 61 | this.textAreaConfig() |
64 | ]} | 62 | ]} |
65 | ]}, | 63 | ]}, |
66 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ | 64 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ |
67 | {tag:'div', children:[ | 65 | {tag:'div', children:[ |
68 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 66 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
69 | ]} | 67 | ]} |
70 | ]}, | 68 | ]}, |
71 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ | 69 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ |
72 | {tag:'div', children:[ | 70 | {tag:'div', children:[ |
73 | {tag:'h4', html:"done"} | 71 | {tag:'h4', html:"done"} |
74 | ]} | 72 | ]} |
75 | ]} | 73 | ]} |
76 | ]}, | 74 | ]}, |
77 | {tag:'div', cls:'importOptionsButtons', children:[ | 75 | {tag:'div', cls:'importOptionsButtons', children:[ |
78 | {tag:'table', children:[ | 76 | {tag:'table', children:[ |
79 | {tag:'tbody', children:[ | 77 | {tag:'tbody', children:[ |
80 | {tag:'tr', children:[ | 78 | {tag:'tr', children:[ |
81 | {tag:'td', html:' '}, | 79 | {tag:'td', html:' '}, |
82 | {tag:'td', children:[ | 80 | {tag:'td', children:[ |
83 | {tag:'div', id:this.getId('backActionButton')} | 81 | {tag:'div', id:this.getId('backActionButton')} |
84 | ]}, | 82 | ]}, |
85 | {tag:'td', html:' '}, | 83 | {tag:'td', html:' '}, |
86 | {tag:'td', children:[ | 84 | {tag:'td', children:[ |
87 | {tag:'div', id:this.getId('nextActionButton')} | 85 | {tag:'div', id:this.getId('nextActionButton')} |
88 | ]}, | 86 | ]}, |
89 | {tag:'td', html:' '} | 87 | {tag:'td', html:' '} |
90 | ]} | 88 | ]} |
91 | ]} | 89 | ]} |
92 | ]} | 90 | ]} |
93 | ]} | 91 | ]} |
94 | ]}); | 92 | ]}); |
95 | 93 | ||
96 | this.updateSteps(); | 94 | this.updateSteps(); |
97 | 95 | ||
98 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); | 96 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); |
99 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); | 97 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); |
100 | 98 | ||
101 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() | 99 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() |
102 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 100 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
103 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 101 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
104 | //MochiKit.Logging.logDebug("<<< Import.ClipperzImportComponent.render"); | 102 | //MochiKit.Logging.logDebug("<<< Import.ClipperzImportComponent.render"); |
105 | }, | 103 | }, |
106 | 104 | ||
107 | //------------------------------------------------------------------------- | 105 | //------------------------------------------------------------------------- |
108 | 106 | ||
109 | 'nextAction': function() { | 107 | 'nextAction': function() { |
110 | switch (this.currentStep()) { | 108 | switch (this.currentStep()) { |
111 | case 0: //-> 1 | 109 | case 0: //-> 1 |
112 | this.previewValues(); | 110 | this.previewValues(); |
113 | break; | 111 | break; |
114 | case 1: //-> 2 | 112 | case 1: //-> 2 |
115 | this.importValues(); | 113 | this.importValues(); |
116 | break; | 114 | break; |
117 | } | 115 | } |
118 | }, | 116 | }, |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js index ad0d985..859c190 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.ExcelImportComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.ExcelImportComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | this._steps = ['EXCEL_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; | 34 | this._steps = ['EXCEL_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; |
37 | 35 | ||
38 | Clipperz.PM.Components.Import.ExcelImportComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Import.ExcelImportComponent.superclass.constructor.call(this, anElement, args); |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.ExcelImportComponent, Clipperz.PM.Components.Import.CSVImportComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.ExcelImportComponent, Clipperz.PM.Components.Import.CSVImportComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.ExcelImportComponent component"; | 46 | return "Clipperz.PM.Components.Import.ExcelImportComponent component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'render': function() { | 51 | 'render': function() { |
54 | //MochiKit.Logging.logDebug(">>> Import.ExcelImportComponent.render"); | 52 | //MochiKit.Logging.logDebug(">>> Import.ExcelImportComponent.render"); |
55 | this.domHelper().append(this.element(), {tag:'div', cls:'excelImportWizard', children:[ | 53 | this.domHelper().append(this.element(), {tag:'div', cls:'excelImportWizard', children:[ |
56 | {tag:'h3', htmlString:Clipperz.PM.Strings['Excel_ImportWizard_Title']}, | 54 | {tag:'h3', htmlString:Clipperz.PM.Strings['Excel_ImportWizard_Title']}, |
57 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 55 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
58 | {tag:'div', cls:'importStepBlocks', children:[ | 56 | {tag:'div', cls:'importStepBlocks', children:[ |
59 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 57 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
60 | {tag:'div', children:[ | 58 | {tag:'div', children:[ |
61 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_excel_description']}, | 59 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_excel_description']}, |
62 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 60 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
63 | this.textAreaConfig() | 61 | this.textAreaConfig() |
64 | ]} | 62 | ]} |
65 | ]}, | 63 | ]}, |
66 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, | 64 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, |
67 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, | 65 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, |
68 | {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, | 66 | {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, |
69 | {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, | 67 | {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, |
70 | {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, | 68 | {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, |
71 | {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ | 69 | {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ |
72 | {tag:'div', children:[ | 70 | {tag:'div', children:[ |
73 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 71 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
74 | ]} | 72 | ]} |
75 | ]}, | 73 | ]}, |
76 | {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ | 74 | {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ |
77 | {tag:'div', children:[ | 75 | {tag:'div', children:[ |
78 | {tag:'h4', html:"done"} | 76 | {tag:'h4', html:"done"} |
79 | ]} | 77 | ]} |
80 | ]} | 78 | ]} |
81 | ]}, | 79 | ]}, |
82 | {tag:'div', cls:'importOptionsButtons', children:[ | 80 | {tag:'div', cls:'importOptionsButtons', children:[ |
83 | {tag:'table', children:[ | 81 | {tag:'table', children:[ |
84 | {tag:'tbody', children:[ | 82 | {tag:'tbody', children:[ |
85 | {tag:'tr', children:[ | 83 | {tag:'tr', children:[ |
86 | {tag:'td', html:' '}, | 84 | {tag:'td', html:' '}, |
87 | {tag:'td', children:[ | 85 | {tag:'td', children:[ |
88 | {tag:'div', id:this.getId('backActionButton')} | 86 | {tag:'div', id:this.getId('backActionButton')} |
89 | ]}, | 87 | ]}, |
90 | {tag:'td', html:' '}, | 88 | {tag:'td', html:' '}, |
91 | {tag:'td', children:[ | 89 | {tag:'td', children:[ |
92 | {tag:'div', id:this.getId('nextActionButton')} | 90 | {tag:'div', id:this.getId('nextActionButton')} |
93 | ]}, | 91 | ]}, |
94 | {tag:'td', html:' '} | 92 | {tag:'td', html:' '} |
95 | ]} | 93 | ]} |
96 | ]} | 94 | ]} |
97 | ]} | 95 | ]} |
98 | ]} | 96 | ]} |
99 | ]}); | 97 | ]}); |
100 | 98 | ||
101 | this.updateSteps(); | 99 | this.updateSteps(); |
102 | 100 | ||
103 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); | 101 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); |
104 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); | 102 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); |
105 | 103 | ||
106 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() | 104 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() |
107 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 105 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
108 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 106 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
109 | this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 107 | this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
110 | this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 108 | this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
111 | this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 109 | this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
112 | this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 110 | this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
113 | this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 111 | this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
114 | //MochiKit.Logging.logDebug("<<< Import.ExcelImportComponent.render"); | 112 | //MochiKit.Logging.logDebug("<<< Import.ExcelImportComponent.render"); |
115 | }, | 113 | }, |
116 | 114 | ||
117 | //------------------------------------------------------------------------- | 115 | //------------------------------------------------------------------------- |
118 | 116 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js index a55455a..3c23b1c 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.GenericImportComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.GenericImportComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | this._steps = this._steps || ['EDIT', 'PREVIEW', 'IMPORT']; | 34 | this._steps = this._steps || ['EDIT', 'PREVIEW', 'IMPORT']; |
37 | 35 | ||
38 | Clipperz.PM.Components.Import.GenericImportComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Import.GenericImportComponent.superclass.constructor.call(this, anElement, args); |
39 | 37 | ||
40 | this._user = args['user']; | 38 | this._user = args['user']; |
41 | 39 | ||
42 | this._currentStep = 0; | 40 | this._currentStep = 0; |
43 | this._currentStatus = 'IDLE'; //'PROCESSING' | 41 | this._currentStatus = 'IDLE'; //'PROCESSING' |
44 | 42 | ||
45 | this._parsedValues = null; | 43 | this._parsedValues = null; |
46 | this._processedValues = null; | 44 | this._processedValues = null; |
47 | 45 | ||
48 | this._backButton = null; | 46 | this._backButton = null; |
49 | this._nextButton = null; | 47 | this._nextButton = null; |
50 | 48 | ||
51 | Clipperz.NotificationCenter.register(null, 'importProcessorProgressUpdate', this, 'updateProgressDialogStatus'); | 49 | Clipperz.NotificationCenter.register(null, 'importProcessorProgressUpdate', this, 'updateProgressDialogStatus'); |
52 | 50 | ||
53 | return this; | 51 | return this; |
54 | } | 52 | } |
55 | 53 | ||
56 | //============================================================================= | 54 | //============================================================================= |
57 | 55 | ||
58 | YAHOO.extendX(Clipperz.PM.Components.Import.GenericImportComponent, Clipperz.PM.Components.BaseComponent, { | 56 | YAHOO.extendX(Clipperz.PM.Components.Import.GenericImportComponent, Clipperz.PM.Components.BaseComponent, { |
59 | 57 | ||
60 | 'toString': function() { | 58 | 'toString': function() { |
61 | return "Clipperz.PM.Components.Import.GenericImportComponent component"; | 59 | return "Clipperz.PM.Components.Import.GenericImportComponent component"; |
62 | }, | 60 | }, |
63 | 61 | ||
64 | //------------------------------------------------------------------------- | 62 | //------------------------------------------------------------------------- |
65 | 63 | ||
66 | 'user': function() { | 64 | 'user': function() { |
67 | return this._user; | 65 | return this._user; |
68 | }, | 66 | }, |
69 | 67 | ||
70 | //------------------------------------------------------------------------- | 68 | //------------------------------------------------------------------------- |
71 | 69 | ||
72 | 'textAreaConfig': function() { | 70 | 'textAreaConfig': function() { |
73 | return {tag:'textarea', name:this.getId('importTextArea'), cls:'importTextArea', id:this.getId('importTextArea'), cols:60, rows:15, html:""}; | 71 | return {tag:'textarea', name:this.getId('importTextArea'), cls:'importTextArea', id:this.getId('importTextArea'), cols:60, rows:15, html:""}; |
74 | }, | 72 | }, |
75 | 73 | ||
76 | 'textAreaContent': function() { | 74 | 'textAreaContent': function() { |
77 | return this.getDom('importTextArea').value | 75 | return this.getDom('importTextArea').value |
78 | }, | 76 | }, |
79 | 77 | ||
80 | //------------------------------------------------------------------------- | 78 | //------------------------------------------------------------------------- |
81 | 79 | ||
82 | 'steps': function() { | 80 | 'steps': function() { |
83 | return this._steps; | 81 | return this._steps; |
84 | }, | 82 | }, |
85 | 83 | ||
86 | 'currentStep': function() { | 84 | 'currentStep': function() { |
87 | return this._currentStep; | 85 | return this._currentStep; |
88 | }, | 86 | }, |
89 | 87 | ||
90 | 'setCurrentStep': function(aValue) { | 88 | 'setCurrentStep': function(aValue) { |
91 | this._currentStep = aValue; | 89 | this._currentStep = aValue; |
92 | this.updateSteps(); | 90 | this.updateSteps(); |
93 | }, | 91 | }, |
94 | 92 | ||
95 | //------------------------------------------------------------------------- | 93 | //------------------------------------------------------------------------- |
96 | 94 | ||
97 | 'currentStatus': function() { | 95 | 'currentStatus': function() { |
98 | return this._currentStatus; | 96 | return this._currentStatus; |
99 | }, | 97 | }, |
100 | 98 | ||
101 | 'startProcessing': function() { | 99 | 'startProcessing': function() { |
102 | this._currentStatus = 'PROCESSING'; | 100 | this._currentStatus = 'PROCESSING'; |
103 | this.updateSteps(); | 101 | this.updateSteps(); |
104 | }, | 102 | }, |
105 | 103 | ||
106 | 'processingDone': function() { | 104 | 'processingDone': function() { |
107 | this._currentStatus = 'IDLE'; | 105 | this._currentStatus = 'IDLE'; |
108 | this.setCurrentStep(this.currentStep() + 1); | 106 | this.setCurrentStep(this.currentStep() + 1); |
109 | }, | 107 | }, |
110 | 108 | ||
111 | 'processingAborted': function() { | 109 | 'processingAborted': function() { |
112 | this._currentStatus = 'IDLE'; | 110 | this._currentStatus = 'IDLE'; |
113 | this.updateSteps(); | 111 | this.updateSteps(); |
114 | }, | 112 | }, |
115 | 113 | ||
116 | //------------------------------------------------------------------------- | 114 | //------------------------------------------------------------------------- |
117 | 115 | ||
118 | 'stepsConfig': function() { | 116 | 'stepsConfig': function() { |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js index 5f4fe33..0570704 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.KeePassImportComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.KeePassImportComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Import.KeePassImportComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.Import.KeePassImportComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._steps = ['EDIT', 'KEEPASS_SETTINGS', 'PREVIEW', 'IMPORT']; | 36 | this._steps = ['EDIT', 'KEEPASS_SETTINGS', 'PREVIEW', 'IMPORT']; |
39 | this._definedFields = ['Group', 'Group Tree', 'UserName', 'URL', 'Password', 'Notes', 'UUID', 'Icon', 'Creation Time', 'Last Access', 'Last Modification', 'Expires', 'Attachment Description', 'Attachment']; | 37 | this._definedFields = ['Group', 'Group Tree', 'UserName', 'URL', 'Password', 'Notes', 'UUID', 'Icon', 'Creation Time', 'Last Access', 'Last Modification', 'Expires', 'Attachment Description', 'Attachment']; |
40 | 38 | ||
41 | this.render(); | 39 | this.render(); |
42 | 40 | ||
43 | return this; | 41 | return this; |
44 | } | 42 | } |
45 | 43 | ||
46 | //============================================================================= | 44 | //============================================================================= |
47 | 45 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.Import.KeePassImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 46 | YAHOO.extendX(Clipperz.PM.Components.Import.KeePassImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
49 | 47 | ||
50 | 'toString': function() { | 48 | 'toString': function() { |
51 | return "Clipperz.PM.Components.Import.KeePassImportComponent component"; | 49 | return "Clipperz.PM.Components.Import.KeePassImportComponent component"; |
52 | }, | 50 | }, |
53 | 51 | ||
54 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
55 | 53 | ||
56 | 'render': function() { | 54 | 'render': function() { |
57 | //MochiKit.Logging.logDebug(">>> Import.KeePassImportComponent.render"); | 55 | //MochiKit.Logging.logDebug(">>> Import.KeePassImportComponent.render"); |
58 | this.domHelper().append(this.element(), {tag:'div', cls:'keePassImportWizard', children:[ | 56 | this.domHelper().append(this.element(), {tag:'div', cls:'keePassImportWizard', children:[ |
59 | {tag:'h3', htmlString:Clipperz.PM.Strings['KeePass_ImportWizard_Title']}, | 57 | {tag:'h3', htmlString:Clipperz.PM.Strings['KeePass_ImportWizard_Title']}, |
60 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 58 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
61 | {tag:'div', cls:'importStepBlocks', children:[ | 59 | {tag:'div', cls:'importStepBlocks', children:[ |
62 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 60 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
63 | {tag:'div', children:[ | 61 | {tag:'div', children:[ |
64 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_keePass_description']}, | 62 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_keePass_description']}, |
65 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 63 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
66 | this.textAreaConfig() | 64 | this.textAreaConfig() |
67 | ]} | 65 | ]} |
68 | ]}, | 66 | ]}, |
69 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ | 67 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ |
70 | {tag:'div', children:[ | 68 | {tag:'div', children:[ |
71 | {tag:'div', id:this.getId('settingsDiv'), children:[ | 69 | {tag:'div', id:this.getId('settingsDiv'), children:[ |
72 | {tag:'table', id:'KeePassSettings', children:[ | 70 | {tag:'table', id:'KeePassSettings', children:[ |
73 | {tag:'tbody', children:[ | 71 | {tag:'tbody', children:[ |
74 | {tag:'tr', children:[ | 72 | {tag:'tr', children:[ |
75 | {tag:'td', width:'50%', valign:'top', children:[ | 73 | {tag:'td', width:'50%', valign:'top', children:[ |
76 | {tag:'table', children:[ | 74 | {tag:'table', children:[ |
77 | {tag:'tbody', children:[ | 75 | {tag:'tbody', children:[ |
78 | {tag:'tr', children:[ | 76 | {tag:'tr', children:[ |
79 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group_checkbox'), name:'Group'/*, checked:true*/}]}, | 77 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group_checkbox'), name:'Group'/*, checked:true*/}]}, |
80 | {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group_label'), html:"Group"}]} | 78 | {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group_label'), html:"Group"}]} |
81 | ]}, | 79 | ]}, |
82 | {tag:'tr', children:[ | 80 | {tag:'tr', children:[ |
83 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group Tree_checkbox'), name:'Group Tree'/*, checked:true*/}]}, | 81 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group Tree_checkbox'), name:'Group Tree'/*, checked:true*/}]}, |
84 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group Tree_label'), html:"Group Tree"}]} | 82 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group Tree_label'), html:"Group Tree"}]} |
85 | ]}, | 83 | ]}, |
86 | {tag:'tr', children:[ | 84 | {tag:'tr', children:[ |
87 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UserName_checkbox'), name:'UserName', checked:true}]}, | 85 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UserName_checkbox'), name:'UserName', checked:true}]}, |
88 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UserName_label'), html:"UserName"}]} | 86 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UserName_label'), html:"UserName"}]} |
89 | ]}, | 87 | ]}, |
90 | {tag:'tr', children:[ | 88 | {tag:'tr', children:[ |
91 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('URL_checkbox'), name:'URL', checked:true}]}, | 89 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('URL_checkbox'), name:'URL', checked:true}]}, |
92 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('URL_label'), html:"URL"}]} | 90 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('URL_label'), html:"URL"}]} |
93 | ]}, | 91 | ]}, |
94 | {tag:'tr', children:[ | 92 | {tag:'tr', children:[ |
95 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Password_checkbox'), name:'Password', checked:true}]}, | 93 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Password_checkbox'), name:'Password', checked:true}]}, |
96 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Password_label'), html:"Password"}]} | 94 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Password_label'), html:"Password"}]} |
97 | ]}, | 95 | ]}, |
98 | {tag:'tr', children:[ | 96 | {tag:'tr', children:[ |
99 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Notes_checkbox'), name:'Notes', checked:true}]}, | 97 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Notes_checkbox'), name:'Notes', checked:true}]}, |
100 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Notes_label'), html:"Notes"}]} | 98 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Notes_label'), html:"Notes"}]} |
101 | ]}, | 99 | ]}, |
102 | {tag:'tr', children:[ | 100 | {tag:'tr', children:[ |
103 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UUID_checkbox'), name:'UUID'/*, checked:true*/}]}, | 101 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UUID_checkbox'), name:'UUID'/*, checked:true*/}]}, |
104 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UUID_label'), html:"UUID"}]} | 102 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UUID_label'), html:"UUID"}]} |
105 | ]} | 103 | ]} |
106 | ]} | 104 | ]} |
107 | ]} | 105 | ]} |
108 | ]}, | 106 | ]}, |
109 | {tag:'td', width:'50%', valign:'top', children:[ | 107 | {tag:'td', width:'50%', valign:'top', children:[ |
110 | {tag:'table', children:[ | 108 | {tag:'table', children:[ |
111 | {tag:'tbody', children:[ | 109 | {tag:'tbody', children:[ |
112 | {tag:'tr', children:[ | 110 | {tag:'tr', children:[ |
113 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Icon_checkbox'), name:'Icon'/*, checked:true*/}]}, | 111 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Icon_checkbox'), name:'Icon'/*, checked:true*/}]}, |
114 | {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Icon_label'), html:"Icon"}]} | 112 | {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Icon_label'), html:"Icon"}]} |
115 | ]}, | 113 | ]}, |
116 | {tag:'tr', children:[ | 114 | {tag:'tr', children:[ |
117 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Creation Time_checkbox'), name:'Creation Time'/*, checked:true*/}]}, | 115 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Creation Time_checkbox'), name:'Creation Time'/*, checked:true*/}]}, |
118 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Creation Time_label'), html:"Creation Time"}]} | 116 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Creation Time_label'), html:"Creation Time"}]} |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js index 05baf46..f97ce78 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.MainComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.MainComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Import.MainComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.Import.MainComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._user = args.user; | 36 | this._user = args.user; |
39 | this._wizardComponent = null; | 37 | this._wizardComponent = null; |
40 | 38 | ||
41 | this._backButton = null; | 39 | this._backButton = null; |
42 | this._nextButton = null; | 40 | this._nextButton = null; |
43 | 41 | ||
44 | this._selectedComponent = null; | 42 | this._selectedComponent = null; |
45 | 43 | ||
46 | this.render(); | 44 | this.render(); |
47 | 45 | ||
48 | return this; | 46 | return this; |
49 | } | 47 | } |
50 | 48 | ||
51 | //============================================================================= | 49 | //============================================================================= |
52 | 50 | ||
53 | YAHOO.extendX(Clipperz.PM.Components.Import.MainComponent, Clipperz.PM.Components.BaseComponent, { | 51 | YAHOO.extendX(Clipperz.PM.Components.Import.MainComponent, Clipperz.PM.Components.BaseComponent, { |
54 | 52 | ||
55 | 'toString': function() { | 53 | 'toString': function() { |
56 | return "Clipperz.PM.Components.Import.MainComponent component"; | 54 | return "Clipperz.PM.Components.Import.MainComponent component"; |
57 | }, | 55 | }, |
58 | 56 | ||
59 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
60 | 58 | ||
61 | 'user': function() { | 59 | 'user': function() { |
62 | return this._user; | 60 | return this._user; |
63 | }, | 61 | }, |
64 | 62 | ||
65 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
66 | 64 | ||
67 | 'wizardComponent': function() { | 65 | 'wizardComponent': function() { |
68 | return this._wizardComponent; | 66 | return this._wizardComponent; |
69 | }, | 67 | }, |
70 | 68 | ||
71 | 'setWizardComponent': function(aValue) { | 69 | 'setWizardComponent': function(aValue) { |
72 | if (this._wizardComponent != null) { | 70 | if (this._wizardComponent != null) { |
73 | this._wizardComponent.remove(); | 71 | this._wizardComponent.remove(); |
74 | } | 72 | } |
75 | 73 | ||
76 | if (aValue != null) { | 74 | if (aValue != null) { |
77 | this.getElement('importCover').hide(); | 75 | this.getElement('importCover').hide(); |
78 | this.getElement('importWizard').show(); | 76 | this.getElement('importWizard').show(); |
79 | } | 77 | } |
80 | this._wizardComponent = aValue; | 78 | this._wizardComponent = aValue; |
81 | }, | 79 | }, |
82 | 80 | ||
83 | 'resetImportComponent': function() { | 81 | 'resetImportComponent': function() { |
84 | //MochiKit.Logging.logDebug(">>> resetImportComponent"); | 82 | //MochiKit.Logging.logDebug(">>> resetImportComponent"); |
85 | this.setWizardComponent(null); | 83 | this.setWizardComponent(null); |
86 | this.getElement('wizardComponent').update(""); | 84 | this.getElement('wizardComponent').update(""); |
87 | 85 | ||
88 | this.getElement('importCover').show(); | 86 | this.getElement('importCover').show(); |
89 | this.getElement('importWizard').hide(); | 87 | this.getElement('importWizard').hide(); |
90 | //MochiKit.Logging.logDebug("<<< resetImportComponent"); | 88 | //MochiKit.Logging.logDebug("<<< resetImportComponent"); |
91 | }, | 89 | }, |
92 | 90 | ||
93 | //------------------------------------------------------------------------- | 91 | //------------------------------------------------------------------------- |
94 | 92 | ||
95 | 'backButton': function() { | 93 | 'backButton': function() { |
96 | return this._backButton; | 94 | return this._backButton; |
97 | }, | 95 | }, |
98 | 96 | ||
99 | 'setBackButton': function(aValue) { | 97 | 'setBackButton': function(aValue) { |
100 | this._backButton = aValue; | 98 | this._backButton = aValue; |
101 | }, | 99 | }, |
102 | 100 | ||
103 | 'nextButton': function() { | 101 | 'nextButton': function() { |
104 | return this._nextButton; | 102 | return this._nextButton; |
105 | }, | 103 | }, |
106 | 104 | ||
107 | 'setNextButton': function(aValue) { | 105 | 'setNextButton': function(aValue) { |
108 | this._nextButton = aValue; | 106 | this._nextButton = aValue; |
109 | }, | 107 | }, |
110 | 108 | ||
111 | //------------------------------------------------------------------------- | 109 | //------------------------------------------------------------------------- |
112 | 110 | ||
113 | 'render': function() { | 111 | 'render': function() { |
114 | //MochiKit.Logging.logDebug(">>> Import.MainComponent.render"); | 112 | //MochiKit.Logging.logDebug(">>> Import.MainComponent.render"); |
115 | Clipperz.NotificationCenter.unregister(this); | 113 | Clipperz.NotificationCenter.unregister(this); |
116 | MochiKit.Signal.disconnectAllTo(this); | 114 | MochiKit.Signal.disconnectAllTo(this); |
117 | 115 | ||
118 | this.element().update(""); | 116 | this.element().update(""); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js index 24dc785..f58d913 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.PasswordPlusImportComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.PasswordPlusImportComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Import.PasswordPlusImportComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.Import.PasswordPlusImportComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this.render(); | 36 | this.render(); |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.PasswordPlusImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.PasswordPlusImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.PasswordPlusImportComponent component"; | 46 | return "Clipperz.PM.Components.Import.PasswordPlusImportComponent component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'render': function() { | 51 | 'render': function() { |
54 | //MochiKit.Logging.logDebug(">>> Import.PasswordPlusImportComponent.render"); | 52 | //MochiKit.Logging.logDebug(">>> Import.PasswordPlusImportComponent.render"); |
55 | this.domHelper().append(this.element(), {tag:'div', cls:'passwordPlusImportWizard', children:[ | 53 | this.domHelper().append(this.element(), {tag:'div', cls:'passwordPlusImportWizard', children:[ |
56 | {tag:'h3', htmlString:Clipperz.PM.Strings['PasswordPlus_ImportWizard_Title']}, | 54 | {tag:'h3', htmlString:Clipperz.PM.Strings['PasswordPlus_ImportWizard_Title']}, |
57 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 55 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
58 | {tag:'div', cls:'importStepBlocks', children:[ | 56 | {tag:'div', cls:'importStepBlocks', children:[ |
59 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 57 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
60 | {tag:'div', children:[ | 58 | {tag:'div', children:[ |
61 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_passwordPlus_description']}, | 59 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_passwordPlus_description']}, |
62 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 60 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
63 | this.textAreaConfig() | 61 | this.textAreaConfig() |
64 | ]} | 62 | ]} |
65 | ]}, | 63 | ]}, |
66 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ | 64 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ |
67 | {tag:'div', children:[ | 65 | {tag:'div', children:[ |
68 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 66 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
69 | ]} | 67 | ]} |
70 | ]}, | 68 | ]}, |
71 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ | 69 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ |
72 | {tag:'div', children:[ | 70 | {tag:'div', children:[ |
73 | {tag:'h4', html:"done"} | 71 | {tag:'h4', html:"done"} |
74 | ]} | 72 | ]} |
75 | ]} | 73 | ]} |
76 | ]}, | 74 | ]}, |
77 | {tag:'div', cls:'importOptionsButtons', children:[ | 75 | {tag:'div', cls:'importOptionsButtons', children:[ |
78 | {tag:'table', children:[ | 76 | {tag:'table', children:[ |
79 | {tag:'tbody', children:[ | 77 | {tag:'tbody', children:[ |
80 | {tag:'tr', children:[ | 78 | {tag:'tr', children:[ |
81 | {tag:'td', html:' '}, | 79 | {tag:'td', html:' '}, |
82 | {tag:'td', children:[ | 80 | {tag:'td', children:[ |
83 | {tag:'div', id:this.getId('backActionButton')} | 81 | {tag:'div', id:this.getId('backActionButton')} |
84 | ]}, | 82 | ]}, |
85 | {tag:'td', html:' '}, | 83 | {tag:'td', html:' '}, |
86 | {tag:'td', children:[ | 84 | {tag:'td', children:[ |
87 | {tag:'div', id:this.getId('nextActionButton')} | 85 | {tag:'div', id:this.getId('nextActionButton')} |
88 | ]}, | 86 | ]}, |
89 | {tag:'td', html:' '} | 87 | {tag:'td', html:' '} |
90 | ]} | 88 | ]} |
91 | ]} | 89 | ]} |
92 | ]} | 90 | ]} |
93 | ]} | 91 | ]} |
94 | ]}); | 92 | ]}); |
95 | 93 | ||
96 | this.updateSteps(); | 94 | this.updateSteps(); |
97 | 95 | ||
98 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); | 96 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); |
99 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); | 97 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); |
100 | 98 | ||
101 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() | 99 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() |
102 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 100 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
103 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 101 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
104 | //MochiKit.Logging.logDebug("<<< Import.PasswordPlusImportComponent.render"); | 102 | //MochiKit.Logging.logDebug("<<< Import.PasswordPlusImportComponent.render"); |
105 | }, | 103 | }, |
106 | 104 | ||
107 | //------------------------------------------------------------------------- | 105 | //------------------------------------------------------------------------- |
108 | /* | 106 | /* |
109 | 'backAction': function() { | 107 | 'backAction': function() { |
110 | switch (this.currentStep()) { | 108 | switch (this.currentStep()) { |
111 | case 1: //-> 0 | 109 | case 1: //-> 0 |
112 | this.backButton().disable(); | 110 | this.backButton().disable(); |
113 | this.getElement('step_1').hide(); | 111 | this.getElement('step_1').hide(); |
114 | this.setCurrentStep(0); | 112 | this.setCurrentStep(0); |
115 | this.getElement('step_0').show(); | 113 | this.getElement('step_0').show(); |
116 | break; | 114 | break; |
117 | } | 115 | } |
118 | }, | 116 | }, |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js index fe4d45c..443ee17 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.RoboFormImportComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.RoboFormImportComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Import.RoboFormImportComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.Import.RoboFormImportComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this.render(); | 36 | this.render(); |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.RoboFormImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.RoboFormImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.RoboFormImportComponent component"; | 46 | return "Clipperz.PM.Components.Import.RoboFormImportComponent component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'render': function() { | 51 | 'render': function() { |
54 | //MochiKit.Logging.logDebug(">>> Import.RoboFormImportComponent.render"); | 52 | //MochiKit.Logging.logDebug(">>> Import.RoboFormImportComponent.render"); |
55 | this.domHelper().append(this.element(), {tag:'div', cls:'roboFormImportWizard', children:[ | 53 | this.domHelper().append(this.element(), {tag:'div', cls:'roboFormImportWizard', children:[ |
56 | {tag:'h3', htmlString:Clipperz.PM.Strings['RoboForm_ImportWizard_Title']}, | 54 | {tag:'h3', htmlString:Clipperz.PM.Strings['RoboForm_ImportWizard_Title']}, |
57 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 55 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
58 | {tag:'div', cls:'importStepBlocks', children:[ | 56 | {tag:'div', cls:'importStepBlocks', children:[ |
59 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 57 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
60 | {tag:'div', children:[ | 58 | {tag:'div', children:[ |
61 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_roboForm_description']}, | 59 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_roboForm_description']}, |
62 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 60 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
63 | this.textAreaConfig() | 61 | this.textAreaConfig() |
64 | ]} | 62 | ]} |
65 | ]}, | 63 | ]}, |
66 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ | 64 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ |
67 | {tag:'div', children:[ | 65 | {tag:'div', children:[ |
68 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 66 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
69 | ]} | 67 | ]} |
70 | ]}, | 68 | ]}, |
71 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ | 69 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ |
72 | {tag:'div', children:[ | 70 | {tag:'div', children:[ |
73 | {tag:'h4', html:"done"} | 71 | {tag:'h4', html:"done"} |
74 | ]} | 72 | ]} |
75 | ]} | 73 | ]} |
76 | ]}, | 74 | ]}, |
77 | {tag:'div', cls:'importOptionsButtons', children:[ | 75 | {tag:'div', cls:'importOptionsButtons', children:[ |
78 | {tag:'table', children:[ | 76 | {tag:'table', children:[ |
79 | {tag:'tbody', children:[ | 77 | {tag:'tbody', children:[ |
80 | {tag:'tr', children:[ | 78 | {tag:'tr', children:[ |
81 | {tag:'td', html:' '}, | 79 | {tag:'td', html:' '}, |
82 | {tag:'td', children:[ | 80 | {tag:'td', children:[ |
83 | {tag:'div', id:this.getId('backActionButton')} | 81 | {tag:'div', id:this.getId('backActionButton')} |
84 | ]}, | 82 | ]}, |
85 | {tag:'td', html:' '}, | 83 | {tag:'td', html:' '}, |
86 | {tag:'td', children:[ | 84 | {tag:'td', children:[ |
87 | {tag:'div', id:this.getId('nextActionButton')} | 85 | {tag:'div', id:this.getId('nextActionButton')} |
88 | ]}, | 86 | ]}, |
89 | {tag:'td', html:' '} | 87 | {tag:'td', html:' '} |
90 | ]} | 88 | ]} |
91 | ]} | 89 | ]} |
92 | ]} | 90 | ]} |
93 | ]} | 91 | ]} |
94 | ]}); | 92 | ]}); |
95 | 93 | ||
96 | this.updateSteps(); | 94 | this.updateSteps(); |
97 | 95 | ||
98 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); | 96 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); |
99 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); | 97 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); |
100 | 98 | ||
101 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() | 99 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() |
102 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 100 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
103 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 101 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
104 | //MochiKit.Logging.logDebug("<<< Import.RoboFormImportComponent.render"); | 102 | //MochiKit.Logging.logDebug("<<< Import.RoboFormImportComponent.render"); |
105 | }, | 103 | }, |
106 | 104 | ||
107 | //------------------------------------------------------------------------- | 105 | //------------------------------------------------------------------------- |
108 | 106 | ||
109 | 'nextAction': function() { | 107 | 'nextAction': function() { |
110 | switch (this.currentStep()) { | 108 | switch (this.currentStep()) { |
111 | case 0: //-> 1 | 109 | case 0: //-> 1 |
112 | this.previewValues(); | 110 | this.previewValues(); |
113 | break; | 111 | break; |
114 | case 1: //-> 2 | 112 | case 1: //-> 2 |
115 | this.importValues(); | 113 | this.importValues(); |
116 | break; | 114 | break; |
117 | } | 115 | } |
118 | }, | 116 | }, |
diff --git a/frontend/beta/js/Clipperz/PM/Components/MessageBox.js b/frontend/beta/js/Clipperz/PM/Components/MessageBox.js index cf9ec86..f9b845e 100644 --- a/frontend/beta/js/Clipperz/PM/Components/MessageBox.js +++ b/frontend/beta/js/Clipperz/PM/Components/MessageBox.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | 27 | ||
30 | 28 | ||
31 | 29 | ||
32 | Clipperz.PM.Components.MessageBoxImplementation = function() { | 30 | Clipperz.PM.Components.MessageBoxImplementation = function() { |
33 | this._step = 0; | 31 | this._step = 0; |
34 | this._steps = 0; | 32 | this._steps = 0; |
35 | 33 | ||
36 | return this; | 34 | return this; |
37 | }; | 35 | }; |
38 | 36 | ||
39 | //YAHOO.extendX(Clipperz.PM.Components.MessageBoxImplementation, Clipperz.PM.Components.BaseComponent, { | 37 | //YAHOO.extendX(Clipperz.PM.Components.MessageBoxImplementation, Clipperz.PM.Components.BaseComponent, { |
40 | Clipperz.PM.Components.MessageBoxImplementation.prototype = MochiKit.Base.update(null, { | 38 | Clipperz.PM.Components.MessageBoxImplementation.prototype = MochiKit.Base.update(null, { |
41 | 39 | ||
42 | 'toString': function() { | 40 | 'toString': function() { |
43 | return "Clipperz.PM.Components.MessageBox"; | 41 | return "Clipperz.PM.Components.MessageBox"; |
44 | }, | 42 | }, |
45 | 43 | ||
46 | //----------------------------------------------------- | 44 | //----------------------------------------------------- |
47 | 45 | ||
48 | 'step': function() { | 46 | 'step': function() { |
49 | return this._step; | 47 | return this._step; |
50 | }, | 48 | }, |
51 | 49 | ||
52 | 'setStep': function(aValue) { | 50 | 'setStep': function(aValue) { |
53 | if (aValue == 'next') { | 51 | if (aValue == 'next') { |
54 | this._step = this._step + 1; | 52 | this._step = this._step + 1; |
55 | } else { | 53 | } else { |
56 | this._step = aValue; | 54 | this._step = aValue; |
57 | } | 55 | } |
58 | 56 | ||
59 | if (this._step > this.steps()) { | 57 | if (this._step > this.steps()) { |
60 | //MochiKit.Logging.logDebug("overstepping: " + this._step + " (" + this.steps() + ")"); | 58 | //MochiKit.Logging.logDebug("overstepping: " + this._step + " (" + this.steps() + ")"); |
61 | this._step = this.steps(); | 59 | this._step = this.steps(); |
62 | } | 60 | } |
63 | }, | 61 | }, |
64 | 62 | ||
65 | //----------------------------------------------------- | 63 | //----------------------------------------------------- |
66 | 64 | ||
67 | 'steps': function() { | 65 | 'steps': function() { |
68 | return this._steps; | 66 | return this._steps; |
69 | }, | 67 | }, |
70 | 68 | ||
71 | 'setSteps': function(aValue) { | 69 | 'setSteps': function(aValue) { |
72 | if (aValue.constructor == String) { | 70 | if (aValue.constructor == String) { |
73 | if (aValue.charAt(0) == '+') { | 71 | if (aValue.charAt(0) == '+') { |
74 | this._steps += aValue.substring(1)*1; | 72 | this._steps += aValue.substring(1)*1; |
75 | } else if (aValue.charAt(0) == '-') { | 73 | } else if (aValue.charAt(0) == '-') { |
76 | this._steps -= aValue.substring(1)*1; | 74 | this._steps -= aValue.substring(1)*1; |
77 | } else { | 75 | } else { |
78 | this._steps = aValue.substring(1)*1; | 76 | this._steps = aValue.substring(1)*1; |
79 | } | 77 | } |
80 | } else { | 78 | } else { |
81 | this._steps = aValue; | 79 | this._steps = aValue; |
82 | } | 80 | } |
83 | }, | 81 | }, |
84 | 82 | ||
85 | //----------------------------------------------------- | 83 | //----------------------------------------------------- |
86 | 84 | ||
87 | 'deferredShow': function(aConfiguration, anAnimationTargetElement, aValue) { | 85 | 'deferredShow': function(aConfiguration, anAnimationTargetElement, aValue) { |
88 | this.show(aConfiguration, anAnimationTargetElement); | 86 | this.show(aConfiguration, anAnimationTargetElement); |
89 | 87 | ||
90 | return aValue; | 88 | return aValue; |
91 | }, | 89 | }, |
92 | 90 | ||
93 | 'show': function(aConfiguration, anAnimationTargetElement) { | 91 | 'show': function(aConfiguration, anAnimationTargetElement) { |
94 | varmessageBoxConfiguration; | 92 | varmessageBoxConfiguration; |
95 | 93 | ||
96 | messageBoxConfiguration = MochiKit.Base.clone(aConfiguration); | 94 | messageBoxConfiguration = MochiKit.Base.clone(aConfiguration); |
97 | messageBoxConfiguration.msg = messageBoxConfiguration.text; | 95 | messageBoxConfiguration.msg = messageBoxConfiguration.text; |
98 | messageBoxConfiguration.animEl = anAnimationTargetElement; | 96 | messageBoxConfiguration.animEl = anAnimationTargetElement; |
99 | messageBoxConfiguration.progress = messageBoxConfiguration.showProgressBar; | 97 | messageBoxConfiguration.progress = messageBoxConfiguration.showProgressBar; |
100 | messageBoxConfiguration.closable = messageBoxConfiguration.showCloseButton; | 98 | messageBoxConfiguration.closable = messageBoxConfiguration.showCloseButton; |
101 | this.setSteps(aConfiguration.steps || 0); | 99 | this.setSteps(aConfiguration.steps || 0); |
102 | this.setStep(aConfiguration.step || 0); | 100 | this.setStep(aConfiguration.step || 0); |
103 | delete messageBoxConfiguration.buttons; | 101 | delete messageBoxConfiguration.buttons; |
104 | 102 | ||
105 | Clipperz.YUI.MessageBox.show(messageBoxConfiguration); | 103 | Clipperz.YUI.MessageBox.show(messageBoxConfiguration); |
106 | }, | 104 | }, |
107 | 105 | ||
108 | //----------------------------------------------------- | 106 | //----------------------------------------------------- |
109 | 107 | ||
110 | 'update': function(someValues) { | 108 | 'update': function(someValues) { |
111 | //MochiKit.Logging.logDebug(">>> MessageBox.update"); | 109 | //MochiKit.Logging.logDebug(">>> MessageBox.update"); |
112 | if (someValues.title) { | 110 | if (someValues.title) { |
113 | Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title); | 111 | Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title); |
114 | }; | 112 | }; |
115 | 113 | ||
116 | if (someValues.text) { | 114 | if (someValues.text) { |
117 | Clipperz.YUI.MessageBox.updateText(someValues.text); | 115 | Clipperz.YUI.MessageBox.updateText(someValues.text); |
118 | }; | 116 | }; |
diff --git a/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js index 7b0b12b..1e94c4b 100644 --- a/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.OTP) == 'undefined') { Clipperz.PM.Components.OTP = {}; } | 27 | if (typeof(Clipperz.PM.Components.OTP) == 'undefined') { Clipperz.PM.Components.OTP = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.OTP.MainComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.OTP.MainComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | //MochiKit.Logging.logDebug("new OTP.MainComponent"); | 34 | //MochiKit.Logging.logDebug("new OTP.MainComponent"); |
37 | Clipperz.PM.Components.OTP.MainComponent.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.OTP.MainComponent.superclass.constructor.call(this, anElement, args); |
38 | 36 | ||
39 | this._user = args.user; | 37 | this._user = args.user; |
40 | this._shouldRender = true; | 38 | this._shouldRender = true; |
41 | 39 | ||
42 | this._deleteButton = null; | 40 | this._deleteButton = null; |
43 | this._printButton = null; | 41 | this._printButton = null; |
44 | 42 | ||
45 | Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler'); | 43 | Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler'); |
46 | //Clipperz.NotificationCenter.register(null, 'oneTimePasswordAdded', this, 'render'); | 44 | //Clipperz.NotificationCenter.register(null, 'oneTimePasswordAdded', this, 'render'); |
47 | 45 | ||
48 | return this; | 46 | return this; |
49 | } | 47 | } |
50 | 48 | ||
51 | //============================================================================= | 49 | //============================================================================= |
52 | 50 | ||
53 | YAHOO.extendX(Clipperz.PM.Components.OTP.MainComponent, Clipperz.PM.Components.BaseComponent, { | 51 | YAHOO.extendX(Clipperz.PM.Components.OTP.MainComponent, Clipperz.PM.Components.BaseComponent, { |
54 | 52 | ||
55 | 'toString': function() { | 53 | 'toString': function() { |
56 | return "Clipperz.PM.Components.OTP.MainComponent component"; | 54 | return "Clipperz.PM.Components.OTP.MainComponent component"; |
57 | }, | 55 | }, |
58 | 56 | ||
59 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
60 | 58 | ||
61 | 'render': function() { | 59 | 'render': function() { |
62 | //MochiKit.Logging.logDebug("### OTP.MainComponent.render"); | 60 | //MochiKit.Logging.logDebug("### OTP.MainComponent.render"); |
63 | Clipperz.NotificationCenter.unregister(this); | 61 | Clipperz.NotificationCenter.unregister(this); |
64 | MochiKit.Signal.disconnectAllTo(this); | 62 | MochiKit.Signal.disconnectAllTo(this); |
65 | 63 | ||
66 | if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { | 64 | if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { |
67 | this.element().update(""); | 65 | this.element().update(""); |
68 | this.domHelper().append(this.element(), {tag:'div', cls:'oneTimePasswordReadOnlyMessage', htmlString:Clipperz.PM.Strings['oneTimePasswordReadOnlyMessage']}); | 66 | this.domHelper().append(this.element(), {tag:'div', cls:'oneTimePasswordReadOnlyMessage', htmlString:Clipperz.PM.Strings['oneTimePasswordReadOnlyMessage']}); |
69 | } else { | 67 | } else { |
70 | var deferredResult; | 68 | var deferredResult; |
71 | 69 | ||
72 | deferredResult = new MochiKit.Async.Deferred(); | 70 | deferredResult = new MochiKit.Async.Deferred(); |
73 | 71 | ||
74 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 1: " + res); return res;}); | 72 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 1: " + res); return res;}); |
75 | deferredResult.addCallback(MochiKit.Base.bind(function() { | 73 | deferredResult.addCallback(MochiKit.Base.bind(function() { |
76 | this.element().update(""); | 74 | this.element().update(""); |
77 | Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', htmlString:Clipperz.PM.Strings['oneTimePasswordLoadingMessage']}); | 75 | Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', htmlString:Clipperz.PM.Strings['oneTimePasswordLoadingMessage']}); |
78 | }, this)); | 76 | }, this)); |
79 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 2: " + res); return res;}); | 77 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 2: " + res); return res;}); |
80 | deferredResult.addCallback(MochiKit.Base.method(this.user(), 'loadOneTimePasswords')); | 78 | deferredResult.addCallback(MochiKit.Base.method(this.user(), 'loadOneTimePasswords')); |
81 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3: " + res); return res;}); | 79 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3: " + res); return res;}); |
82 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3.1: " + Clipperz.Base.serializeJSON(res.serializedData())); return res;}); | 80 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3.1: " + Clipperz.Base.serializeJSON(res.serializedData())); return res;}); |
83 | deferredResult.addCallback(MochiKit.Base.bind(function(aResult) { | 81 | deferredResult.addCallback(MochiKit.Base.bind(function(aResult) { |
84 | vartbodyElement; | 82 | vartbodyElement; |
85 | varoneTimePasswordReferenceKeys; | 83 | varoneTimePasswordReferenceKeys; |
86 | var imageExtension; | 84 | var imageExtension; |
87 | var isThereAnyActiveOneTimePassword; | 85 | var isThereAnyActiveOneTimePassword; |
88 | 86 | ||
89 | isThereAnyActiveOneTimePassword = false; | 87 | isThereAnyActiveOneTimePassword = false; |
90 | 88 | ||
91 | this.element().update(""); | 89 | this.element().update(""); |
92 | Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', id:'oneTimePasswordList', children:[ | 90 | Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', id:'oneTimePasswordList', children:[ |
93 | {tag:'div', id:'oneTimePasswords_header', children:[ | 91 | {tag:'div', id:'oneTimePasswords_header', children:[ |
94 | {tag:'table', width:'100%', children:[ | 92 | {tag:'table', width:'100%', children:[ |
95 | {tag:'tbody', children:[ | 93 | {tag:'tbody', children:[ |
96 | {tag:'tr', children:[ | 94 | {tag:'tr', children:[ |
97 | {tag:'td', width:'10%', children:[ | 95 | {tag:'td', width:'10%', children:[ |
98 | {tag:'div', id:this.getId('createNewOneTimePasswordButton')} | 96 | {tag:'div', id:this.getId('createNewOneTimePasswordButton')} |
99 | ]}, | 97 | ]}, |
100 | {tag:'td', width:'40%', children:[ | 98 | {tag:'td', width:'40%', children:[ |
101 | {tag:'div', id:this.getId('deleteSelectedOneTimePasswordButton')} | 99 | {tag:'div', id:this.getId('deleteSelectedOneTimePasswordButton')} |
102 | ]}, | 100 | ]}, |
103 | {tag:'td', width:'50%', align:'right', children:[ | 101 | {tag:'td', width:'50%', align:'right', children:[ |
104 | {tag:'div', id:this.getId('printOneTimePasswordButton')} | 102 | {tag:'div', id:this.getId('printOneTimePasswordButton')} |
105 | ]} | 103 | ]} |
106 | ]} | 104 | ]} |
107 | ]} | 105 | ]} |
108 | ]}, | 106 | ]}, |
109 | {tag:'div', children:[ | 107 | {tag:'div', children:[ |
110 | {tag:'ul', children:[ | 108 | {tag:'ul', children:[ |
111 | {tag:'li', children:[ | 109 | {tag:'li', children:[ |
112 | {tag:'span', htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_selectLabel']} | 110 | {tag:'span', htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_selectLabel']} |
113 | ]}, | 111 | ]}, |
114 | {tag:'li', children:[ | 112 | {tag:'li', children:[ |
115 | {tag:'a', href:'#', id:this.getId('selectAllOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_all']} | 113 | {tag:'a', href:'#', id:this.getId('selectAllOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_all']} |
116 | ]}, | 114 | ]}, |
117 | {tag:'li', children:[ | 115 | {tag:'li', children:[ |
118 | {tag:'a', href:'#', id:this.getId('selectNoneOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_none']} | 116 | {tag:'a', href:'#', id:this.getId('selectNoneOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_none']} |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js index f7991f1..defce91 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 27 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Panels.AccountPanel = function(anElement, args) { | 31 | Clipperz.PM.Components.Panels.AccountPanel = function(anElement, args) { |
34 | //MochiKit.Logging.logDebug(">>> new AccountPanel"); | 32 | //MochiKit.Logging.logDebug(">>> new AccountPanel"); |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | Clipperz.PM.Components.Panels.AccountPanel.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.Panels.AccountPanel.superclass.constructor.call(this, anElement, args); |
38 | 36 | ||
39 | Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); | 37 | Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); |
40 | 38 | ||
41 | this._shouldLoadLoginHistory = true; | 39 | this._shouldLoadLoginHistory = true; |
42 | 40 | ||
43 | //this.render(); | 41 | //this.render(); |
44 | //MochiKit.Logging.logDebug("<<< new AccountPanel"); | 42 | //MochiKit.Logging.logDebug("<<< new AccountPanel"); |
45 | 43 | ||
46 | return this; | 44 | return this; |
47 | } | 45 | } |
48 | 46 | ||
49 | //============================================================================= | 47 | //============================================================================= |
50 | 48 | ||
51 | YAHOO.extendX(Clipperz.PM.Components.Panels.AccountPanel, Clipperz.PM.Components.Panels.BasePanel, { | 49 | YAHOO.extendX(Clipperz.PM.Components.Panels.AccountPanel, Clipperz.PM.Components.Panels.BasePanel, { |
52 | 50 | ||
53 | 'toString': function() { | 51 | 'toString': function() { |
54 | return "Clipperz.PM.Components.AccountPanel component"; | 52 | return "Clipperz.PM.Components.AccountPanel component"; |
55 | }, | 53 | }, |
56 | 54 | ||
57 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
58 | 56 | ||
59 | 'render': function() { | 57 | 'render': function() { |
60 | var errorMessageActor; | 58 | var errorMessageActor; |
61 | varchangePasswordButton; | 59 | varchangePasswordButton; |
62 | var deleteAccountButton; | 60 | var deleteAccountButton; |
63 | 61 | ||
64 | try { | 62 | try { |
65 | //MochiKit.Logging.logDebug(">>> AccountPanel.render"); | 63 | //MochiKit.Logging.logDebug(">>> AccountPanel.render"); |
66 | Clipperz.NotificationCenter.unregister(this); | 64 | Clipperz.NotificationCenter.unregister(this); |
67 | MochiKit.Signal.disconnectAllTo(this); | 65 | MochiKit.Signal.disconnectAllTo(this); |
68 | 66 | ||
69 | this.element().update(""); | 67 | this.element().update(""); |
70 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 68 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
71 | {tag:'tbody', children:[ | 69 | {tag:'tbody', children:[ |
72 | {tag:'tr', children:[ | 70 | {tag:'tr', children:[ |
73 | {tag:'td', valign:'top', width:'200', children:[ | 71 | {tag:'td', valign:'top', width:'200', children:[ |
74 | {tag:'ul', id:"accountSubMenu", cls:'subMenu', children:[ | 72 | {tag:'ul', id:"accountSubMenu", cls:'subMenu', children:[ |
75 | {tag:'li', id:'changePassphraseTab', htmlString:Clipperz.PM.Strings['changePasswordTabLabel']}, | 73 | {tag:'li', id:'changePassphraseTab', htmlString:Clipperz.PM.Strings['changePasswordTabLabel']}, |
76 | {tag:'li', id:'manageOTPTab', htmlString:Clipperz.PM.Strings['manageOTPTabLabel']}, | 74 | {tag:'li', id:'manageOTPTab', htmlString:Clipperz.PM.Strings['manageOTPTabLabel']}, |
77 | {tag:'li', id:'accountPreferencesTab', htmlString:Clipperz.PM.Strings['accountPreferencesLabel']}, | 75 | {tag:'li', id:'accountPreferencesTab', htmlString:Clipperz.PM.Strings['accountPreferencesLabel']}, |
78 | {tag:'li', id:'loginHistoryTab', htmlString:Clipperz.PM.Strings['accountLoginHistoryLabel']}, | 76 | {tag:'li', id:'loginHistoryTab', htmlString:Clipperz.PM.Strings['accountLoginHistoryLabel']}, |
79 | {tag:'li', id:'deleteAccountTab', htmlString:Clipperz.PM.Strings['deleteAccountTabLabel']} | 77 | {tag:'li', id:'deleteAccountTab', htmlString:Clipperz.PM.Strings['deleteAccountTabLabel']} |
80 | // {tag:'li', id:'paidAccountTab'), htmlString:Clipperz.PM.Strings['paidAccountTabLabel']} | 78 | // {tag:'li', id:'paidAccountTab'), htmlString:Clipperz.PM.Strings['paidAccountTabLabel']} |
81 | ]} | 79 | ]} |
82 | ]}, | 80 | ]}, |
83 | {tag:'td', valign:'top', children:[ | 81 | {tag:'td', valign:'top', children:[ |
84 | {tag:'ul', cls:'clipperzTabPanels', children:[ | 82 | {tag:'ul', cls:'clipperzTabPanels', children:[ |
85 | {tag:'li', id:this.getId('changePassphrasePanel'), children:[ | 83 | {tag:'li', id:this.getId('changePassphrasePanel'), children:[ |
86 | {tag:'div', cls:'clipperzSubPanel', children:[ | 84 | {tag:'div', cls:'clipperzSubPanel', children:[ |
87 | {tag:'h5', htmlString:Clipperz.PM.Strings['changePasswordTabTitle']}, | 85 | {tag:'h5', htmlString:Clipperz.PM.Strings['changePasswordTabTitle']}, |
88 | {tag:'div', cls:'panelBody', id:'changePassphraseBlock', children:[ | 86 | {tag:'div', cls:'panelBody', id:'changePassphraseBlock', children:[ |
89 | {tag:'form', id:this.getId('changePassphraseForm'), children:[ | 87 | {tag:'form', id:this.getId('changePassphraseForm'), children:[ |
90 | {tag:'h5', cls:'errorMessage', id:this.getId('changePassphrase_errorMessage')}, | 88 | {tag:'h5', cls:'errorMessage', id:this.getId('changePassphrase_errorMessage')}, |
91 | {tag:'table', cls:'panelBody', children:[ | 89 | {tag:'table', cls:'panelBody', children:[ |
92 | {tag:'tr', children:[ | 90 | {tag:'tr', children:[ |
93 | {tag:'td', children:[ | 91 | {tag:'td', children:[ |
94 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormUsernameLabel']} | 92 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormUsernameLabel']} |
95 | ]}, | 93 | ]}, |
96 | {tag:'td', children:[ | 94 | {tag:'td', children:[ |
97 | {tag:'input', type:'text', name:'username', id:this.getId('changePassphrase_username')} | 95 | {tag:'input', type:'text', name:'username', id:this.getId('changePassphrase_username')} |
98 | ]} | 96 | ]} |
99 | ]}, | 97 | ]}, |
100 | {tag:'tr', children:[ | 98 | {tag:'tr', children:[ |
101 | {tag:'td', children:[ | 99 | {tag:'td', children:[ |
102 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormOldPassphraseLabel']} | 100 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormOldPassphraseLabel']} |
103 | ]}, | 101 | ]}, |
104 | {tag:'td', children:[ | 102 | {tag:'td', children:[ |
105 | {tag:'input', type:'password', name:'oldPassphrase', id:this.getId('changePassphrase_oldPassphrase')} | 103 | {tag:'input', type:'password', name:'oldPassphrase', id:this.getId('changePassphrase_oldPassphrase')} |
106 | ]} | 104 | ]} |
107 | ]}, | 105 | ]}, |
108 | {tag:'tr', children:[ | 106 | {tag:'tr', children:[ |
109 | {tag:'td', children:[ | 107 | {tag:'td', children:[ |
110 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormNewPassphraseLabel']} | 108 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormNewPassphraseLabel']} |
111 | ]}, | 109 | ]}, |
112 | {tag:'td', children:[ | 110 | {tag:'td', children:[ |
113 | {tag:'input', type:'password', name:'newPassphrase', id:this.getId('changePassphrase_newPassphrase')} | 111 | {tag:'input', type:'password', name:'newPassphrase', id:this.getId('changePassphrase_newPassphrase')} |
114 | ]} | 112 | ]} |
115 | ]}, | 113 | ]}, |
116 | {tag:'tr', children:[ | 114 | {tag:'tr', children:[ |
117 | {tag:'td', children:[ | 115 | {tag:'td', children:[ |
118 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormRetypePassphraseLabel']} | 116 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormRetypePassphraseLabel']} |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js index 15dd622..f36e8b0 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js | |||
@@ -1,93 +1,91 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 27 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
30 | 28 | ||
31 | //var _Clipperz_PM_Components_Panels_base_id_ = 0; | 29 | //var _Clipperz_PM_Components_Panels_base_id_ = 0; |
32 | 30 | ||
33 | //############################################################################# | 31 | //############################################################################# |
34 | 32 | ||
35 | Clipperz.PM.Components.Panels.BasePanel = function(anElement, args) { | 33 | Clipperz.PM.Components.Panels.BasePanel = function(anElement, args) { |
36 | args = args || {}; | 34 | args = args || {}; |
37 | 35 | ||
38 | Clipperz.PM.Components.Panels.BasePanel.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Panels.BasePanel.superclass.constructor.call(this, anElement, args); |
39 | 37 | ||
40 | this._user = args.user || null; | 38 | this._user = args.user || null; |
41 | this._delegate = args.delegate || null; | 39 | this._delegate = args.delegate || null; |
42 | this._tabPanelController = null; | 40 | this._tabPanelController = null; |
43 | //Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); | 41 | //Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); |
44 | 42 | ||
45 | //this._ids = {}; | 43 | //this._ids = {}; |
46 | 44 | ||
47 | return this; | 45 | return this; |
48 | } | 46 | } |
49 | 47 | ||
50 | //============================================================================= | 48 | //============================================================================= |
51 | 49 | ||
52 | YAHOO.extendX(Clipperz.PM.Components.Panels.BasePanel, Clipperz.PM.Components.BaseComponent, { | 50 | YAHOO.extendX(Clipperz.PM.Components.Panels.BasePanel, Clipperz.PM.Components.BaseComponent, { |
53 | 51 | ||
54 | 'toString': function() { | 52 | 'toString': function() { |
55 | return "Clipperz.PM.Components.Panels.BasePanel component"; | 53 | return "Clipperz.PM.Components.Panels.BasePanel component"; |
56 | }, | 54 | }, |
57 | 55 | ||
58 | //------------------------------------------------------------------------- | 56 | //------------------------------------------------------------------------- |
59 | 57 | ||
60 | 'user': function() { | 58 | 'user': function() { |
61 | return this._user; | 59 | return this._user; |
62 | }, | 60 | }, |
63 | 61 | ||
64 | 'setUser': function(aValue) { | 62 | 'setUser': function(aValue) { |
65 | this._user = aValue; | 63 | this._user = aValue; |
66 | }, | 64 | }, |
67 | 65 | ||
68 | //------------------------------------------------------------------------- | 66 | //------------------------------------------------------------------------- |
69 | 67 | ||
70 | 'delegate': function() { | 68 | 'delegate': function() { |
71 | return this._delegate; | 69 | return this._delegate; |
72 | }, | 70 | }, |
73 | 71 | ||
74 | 'setDelegate': function(aValue) { | 72 | 'setDelegate': function(aValue) { |
75 | this._delegate = aValue; | 73 | this._delegate = aValue; |
76 | }, | 74 | }, |
77 | 75 | ||
78 | //------------------------------------------------------------------------- | 76 | //------------------------------------------------------------------------- |
79 | 77 | ||
80 | 'tabPanelController': function() { | 78 | 'tabPanelController': function() { |
81 | return this._tabPanelController; | 79 | return this._tabPanelController; |
82 | }, | 80 | }, |
83 | 81 | ||
84 | 'switchLanguageHandler': function() { | 82 | 'switchLanguageHandler': function() { |
85 | //MochiKit.Logging.logDebug(">>> BasePanel.switchLanguageHandler [" + this.toString() + "]"); | 83 | //MochiKit.Logging.logDebug(">>> BasePanel.switchLanguageHandler [" + this.toString() + "]"); |
86 | this.render(); | 84 | this.render(); |
87 | //MochiKit.Logging.logDebug("<<< BasePanel.switchLanguageHandler [" + this.toString() + "]"); | 85 | //MochiKit.Logging.logDebug("<<< BasePanel.switchLanguageHandler [" + this.toString() + "]"); |
88 | }, | 86 | }, |
89 | 87 | ||
90 | //------------------------------------------------------------------------- | 88 | //------------------------------------------------------------------------- |
91 | __syntaxFix__: "syntax fix" | 89 | __syntaxFix__: "syntax fix" |
92 | 90 | ||
93 | }); | 91 | }); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js index 5a91d83..3feed3d 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js | |||
@@ -1,102 +1,100 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 27 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Panels.ContactsPanel = function(anElement, args) { | 31 | Clipperz.PM.Components.Panels.ContactsPanel = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Panels.ContactsPanel.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.Panels.ContactsPanel.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this.render(); | 36 | this.render(); |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Panels.ContactsPanel, Clipperz.PM.Components.Panels.BasePanel, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Panels.ContactsPanel, Clipperz.PM.Components.Panels.BasePanel, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.ContactsPanel component"; | 46 | return "Clipperz.PM.Components.ContactsPanel component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'render': function() { | 51 | 'render': function() { |
54 | // var tabPanelControllerConfig; | 52 | // var tabPanelControllerConfig; |
55 | 53 | ||
56 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 54 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
57 | {tag:'tbody', children:[ | 55 | {tag:'tbody', children:[ |
58 | {tag:'tr', children:[ | 56 | {tag:'tr', children:[ |
59 | {tag:'td', valign:'top', width:'200', children:[ | 57 | {tag:'td', valign:'top', width:'200', children:[ |
60 | {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ | 58 | {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ |
61 | {tag:'li', id:this.getId('contacts'), htmlString:Clipperz.PM.Strings['contactsTabLabel']}, | 59 | {tag:'li', id:this.getId('contacts'), htmlString:Clipperz.PM.Strings['contactsTabLabel']}, |
62 | ]} | 60 | ]} |
63 | ]}, | 61 | ]}, |
64 | {tag:'td', valign:'top', children:[ | 62 | {tag:'td', valign:'top', children:[ |
65 | {tag:'ul', cls:'clipperzTabPanels', children:[ | 63 | {tag:'ul', cls:'clipperzTabPanels', children:[ |
66 | {tag:'li', id:this.getId('contactsPanel'), children:[ | 64 | {tag:'li', id:this.getId('contactsPanel'), children:[ |
67 | {tag:'div', cls:'clipperzSubPanel', children:[ | 65 | {tag:'div', cls:'clipperzSubPanel', children:[ |
68 | {tag:'h5', htmlString:Clipperz.PM.Strings['contactsTabTitle']}, | 66 | {tag:'h5', htmlString:Clipperz.PM.Strings['contactsTabTitle']}, |
69 | {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']} | 67 | {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']} |
70 | ]} | 68 | ]} |
71 | ]} | 69 | ]} |
72 | ]} | 70 | ]} |
73 | ]} | 71 | ]} |
74 | ]} | 72 | ]} |
75 | ]} | 73 | ]} |
76 | ]}); | 74 | ]}); |
77 | 75 | ||
78 | // tabPanelControllerConfig = {} | 76 | // tabPanelControllerConfig = {} |
79 | // tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel'); | 77 | // tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel'); |
80 | // new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') }); | 78 | // new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') }); |
81 | this.tabPanelController().setUp(); | 79 | this.tabPanelController().setUp(); |
82 | }, | 80 | }, |
83 | 81 | ||
84 | //------------------------------------------------------------------------- | 82 | //------------------------------------------------------------------------- |
85 | 83 | ||
86 | 'tabPanelController': function() { | 84 | 'tabPanelController': function() { |
87 | if (this._tabPanelController == null) { | 85 | if (this._tabPanelController == null) { |
88 | var tabPanelControllerConfig; | 86 | var tabPanelControllerConfig; |
89 | 87 | ||
90 | tabPanelControllerConfig = {} | 88 | tabPanelControllerConfig = {} |
91 | tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel'); | 89 | tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel'); |
92 | this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') }); | 90 | this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') }); |
93 | } | 91 | } |
94 | 92 | ||
95 | return this._tabPanelController; | 93 | return this._tabPanelController; |
96 | }, | 94 | }, |
97 | 95 | ||
98 | //------------------------------------------------------------------------- | 96 | //------------------------------------------------------------------------- |
99 | __syntaxFix__: "syntax fix" | 97 | __syntaxFix__: "syntax fix" |
100 | 98 | ||
101 | }); | 99 | }); |
102 | 100 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js index 11d4bd7..520542c 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 27 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Panels.DataPanel = function(anElement, args) { | 31 | Clipperz.PM.Components.Panels.DataPanel = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Panels.DataPanel.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.Panels.DataPanel.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._progressWidth = 400; | 36 | this._progressWidth = 400; |
39 | 37 | ||
40 | 38 | ||
41 | this.render(); | 39 | this.render(); |
42 | 40 | ||
43 | return this; | 41 | return this; |
44 | } | 42 | } |
45 | 43 | ||
46 | //============================================================================= | 44 | //============================================================================= |
47 | 45 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.Panels.DataPanel, Clipperz.PM.Components.Panels.BasePanel, { | 46 | YAHOO.extendX(Clipperz.PM.Components.Panels.DataPanel, Clipperz.PM.Components.Panels.BasePanel, { |
49 | 47 | ||
50 | 'toString': function() { | 48 | 'toString': function() { |
51 | return "Clipperz.PM.Components.DataPanel component"; | 49 | return "Clipperz.PM.Components.DataPanel component"; |
52 | }, | 50 | }, |
53 | 51 | ||
54 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
55 | 53 | ||
56 | 'render': function() { | 54 | 'render': function() { |
57 | MochiKit.Signal.disconnectAllTo(this); | 55 | MochiKit.Signal.disconnectAllTo(this); |
58 | Clipperz.NotificationCenter.unregister(this); | 56 | Clipperz.NotificationCenter.unregister(this); |
59 | this.element().update(""); | 57 | this.element().update(""); |
60 | 58 | ||
61 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 59 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
62 | {tag:'tbody', children:[ | 60 | {tag:'tbody', children:[ |
63 | {tag:'tr', children:[ | 61 | {tag:'tr', children:[ |
64 | {tag:'td', valign:'top', width:'200', children:[ | 62 | {tag:'td', valign:'top', width:'200', children:[ |
65 | {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ | 63 | {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ |
66 | {tag:'li', id:'offlineCopyTab', htmlString:Clipperz.PM.Strings['offlineCopyTabLabel']}, | 64 | {tag:'li', id:'offlineCopyTab', htmlString:Clipperz.PM.Strings['offlineCopyTabLabel']}, |
67 | {tag:'li', id:'sharingTab', htmlString:Clipperz.PM.Strings['sharingTabLabel']}, | 65 | {tag:'li', id:'sharingTab', htmlString:Clipperz.PM.Strings['sharingTabLabel']}, |
68 | {tag:'li', id:'importTab', htmlString:Clipperz.PM.Strings['importTabLabel']}, | 66 | {tag:'li', id:'importTab', htmlString:Clipperz.PM.Strings['importTabLabel']}, |
69 | {tag:'li', id:'printingTab', htmlString:Clipperz.PM.Strings['printingTabLabel']} | 67 | {tag:'li', id:'printingTab', htmlString:Clipperz.PM.Strings['printingTabLabel']} |
70 | ]} | 68 | ]} |
71 | ]}, | 69 | ]}, |
72 | {tag:'td', valign:'top', children:[ | 70 | {tag:'td', valign:'top', children:[ |
73 | {tag:'ul', cls:'clipperzTabPanels', children:[ | 71 | {tag:'ul', cls:'clipperzTabPanels', children:[ |
74 | {tag:'li', id:this.getId('offlineCopyPanel'), children:[ | 72 | {tag:'li', id:this.getId('offlineCopyPanel'), children:[ |
75 | {tag:'div', cls:'clipperzSubPanel', children:[ | 73 | {tag:'div', cls:'clipperzSubPanel', children:[ |
76 | {tag:'h5', htmlString:Clipperz.PM.Strings['offlineCopyTabTitle']}, | 74 | {tag:'h5', htmlString:Clipperz.PM.Strings['offlineCopyTabTitle']}, |
77 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['offlineCopyTabDescription']}, | 75 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['offlineCopyTabDescription']}, |
78 | {tag:'div', id:this.getId('offlineCopyLinkBox'), children:[ | 76 | {tag:'div', id:this.getId('offlineCopyLinkBox'), children:[ |
79 | {tag:'a', id:'offlineCopyLink', href:'#', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']} | 77 | {tag:'a', id:'offlineCopyLink', href:'#', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']} |
80 | ]}, | 78 | ]}, |
81 | {tag:'div', id:this.getId('offlineCopyLinkBox_read-only'), children:[ | 79 | {tag:'div', id:this.getId('offlineCopyLinkBox_read-only'), children:[ |
82 | {tag:'span', cls:'read-only', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']} | 80 | {tag:'span', cls:'read-only', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']} |
83 | ]} | 81 | ]} |
84 | ]} | 82 | ]} |
85 | ]}, | 83 | ]}, |
86 | {tag:'li', id:this.getId('sharingPanel'), children:[ | 84 | {tag:'li', id:this.getId('sharingPanel'), children:[ |
87 | {tag:'div', cls:'clipperzSubPanel', children:[ | 85 | {tag:'div', cls:'clipperzSubPanel', children:[ |
88 | {tag:'h5', htmlString:Clipperz.PM.Strings['sharingTabTitle']}, | 86 | {tag:'h5', htmlString:Clipperz.PM.Strings['sharingTabTitle']}, |
89 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['sharingTabDescription']} | 87 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['sharingTabDescription']} |
90 | ]} | 88 | ]} |
91 | ]}, | 89 | ]}, |
92 | {tag:'li', id:this.getId('importPanel'), children:[ | 90 | {tag:'li', id:this.getId('importPanel'), children:[ |
93 | {tag:'div', cls:'clipperzSubPanel', children:[ | 91 | {tag:'div', cls:'clipperzSubPanel', children:[ |
94 | {tag:'div', id:this.getId('importPanelMainComponent')} | 92 | {tag:'div', id:this.getId('importPanelMainComponent')} |
95 | ]} | 93 | ]} |
96 | ]}, | 94 | ]}, |
97 | {tag:'li', id:this.getId('printingPanel'), children:[ | 95 | {tag:'li', id:this.getId('printingPanel'), children:[ |
98 | {tag:'div', cls:'clipperzSubPanel', children:[ | 96 | {tag:'div', cls:'clipperzSubPanel', children:[ |
99 | {tag:'h5', htmlString:Clipperz.PM.Strings['printingTabTitle']}, | 97 | {tag:'h5', htmlString:Clipperz.PM.Strings['printingTabTitle']}, |
100 | 98 | ||
101 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['printingTabDescription']}, | 99 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['printingTabDescription']}, |
102 | {tag:'div', id:this.getId('printingLinkBox'), children:[ | 100 | {tag:'div', id:this.getId('printingLinkBox'), children:[ |
103 | {tag:'a', id:'printingLink', href:'#', htmlString:Clipperz.PM.Strings['printingLinkLabel']} | 101 | {tag:'a', id:'printingLink', href:'#', htmlString:Clipperz.PM.Strings['printingLinkLabel']} |
104 | ]}, | 102 | ]}, |
105 | 103 | ||
106 | {tag:'hr'}, | 104 | {tag:'hr'}, |
107 | 105 | ||
108 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['exportTabDescription']}, | 106 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['exportTabDescription']}, |
109 | {tag:'div', id:this.getId('exportLinkBox'), children:[ | 107 | {tag:'div', id:this.getId('exportLinkBox'), children:[ |
110 | {tag:'a', id:'exportLink', href:'#', htmlString:Clipperz.PM.Strings['exportLinkLabel']} | 108 | {tag:'a', id:'exportLink', href:'#', htmlString:Clipperz.PM.Strings['exportLinkLabel']} |
111 | ]} | 109 | ]} |
112 | ]} | 110 | ]} |
113 | ]} | 111 | ]} |
114 | ]} | 112 | ]} |
115 | ]} | 113 | ]} |
116 | ]} | 114 | ]} |
117 | ]} | 115 | ]} |
118 | ]}); | 116 | ]}); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js index ef2b91c..3081a9d 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 27 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
30 | 28 | ||
31 | 29 | ||
32 | Clipperz.PM.Components.Panels.LoginPanel = function(anElement, args) { | 30 | Clipperz.PM.Components.Panels.LoginPanel = function(anElement, args) { |
33 | args = args || {}; | 31 | args = args || {}; |
34 | 32 | ||
35 | Clipperz.PM.Components.Panels.LoginPanel.superclass.constructor.call(this, anElement, args); | 33 | Clipperz.PM.Components.Panels.LoginPanel.superclass.constructor.call(this, anElement, args); |
36 | 34 | ||
37 | this._showLoginFormAnimator = null; | 35 | this._showLoginFormAnimator = null; |
38 | this._showRegistrationFormAnimator = null; | 36 | this._showRegistrationFormAnimator = null; |
39 | this._shouldShowRegistrationAlert = true; | 37 | this._shouldShowRegistrationAlert = true; |
40 | 38 | ||
41 | this._visibleForm = null; | 39 | this._visibleForm = null; |
42 | //this._isPassphraseVisible = true; | 40 | //this._isPassphraseVisible = true; |
43 | 41 | ||
44 | Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); | 42 | Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); |
45 | 43 | ||
46 | this.render(); | 44 | this.render(); |
47 | 45 | ||
48 | return this; | 46 | return this; |
49 | } | 47 | } |
50 | 48 | ||
51 | //============================================================================= | 49 | //============================================================================= |
52 | 50 | ||
53 | //MochiKit.Base.update(Clipperz.PM.Components.Panels.LoginPanel.prototype, { | 51 | //MochiKit.Base.update(Clipperz.PM.Components.Panels.LoginPanel.prototype, { |
54 | YAHOO.extendX(Clipperz.PM.Components.Panels.LoginPanel, Clipperz.PM.Components.Panels.BasePanel, { | 52 | YAHOO.extendX(Clipperz.PM.Components.Panels.LoginPanel, Clipperz.PM.Components.Panels.BasePanel, { |
55 | 53 | ||
56 | 'toString': function() { | 54 | 'toString': function() { |
57 | return "Clipperz.PM.Components.LoginPanel component"; | 55 | return "Clipperz.PM.Components.LoginPanel component"; |
58 | }, | 56 | }, |
59 | 57 | ||
60 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
61 | 59 | ||
62 | 'render': function() { | 60 | 'render': function() { |
63 | var result; | 61 | var result; |
64 | varlayout; | 62 | varlayout; |
65 | var registerButton; | 63 | var registerButton; |
66 | 64 | ||
67 | MochiKit.Signal.disconnectAllTo(this); | 65 | MochiKit.Signal.disconnectAllTo(this); |
68 | this.element().update(""); | 66 | this.element().update(""); |
69 | 67 | ||
70 | //MochiKit.Logging.logDebug(">>> LoginPanel.initPanel"); | 68 | //MochiKit.Logging.logDebug(">>> LoginPanel.initPanel"); |
71 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ | 69 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ |
72 | {tag:'table', children:[ | 70 | {tag:'table', children:[ |
73 | {tag:'thead'}, | 71 | {tag:'thead'}, |
74 | {tag:'tbody', children:[ | 72 | {tag:'tbody', children:[ |
75 | {tag:'tr', children:[ | 73 | {tag:'tr', children:[ |
76 | {tag:'td', valign:'top', children:[ | 74 | {tag:'td', valign:'top', children:[ |
77 | {tag:'div', cls:'clipperzServiceDescription', htmlString:Clipperz.PM.Strings['clipperzServiceDescription']} | 75 | {tag:'div', cls:'clipperzServiceDescription', htmlString:Clipperz.PM.Strings['clipperzServiceDescription']} |
78 | ]}, | 76 | ]}, |
79 | {tag:'td', valign:'top', align:'right', children:[ | 77 | {tag:'td', valign:'top', align:'right', children:[ |
80 | {tag:'div', id:this.getId('forms'), cls:'clipperzLoginForm', children:[ | 78 | {tag:'div', id:this.getId('forms'), cls:'clipperzLoginForm', children:[ |
81 | {tag:'div', id:this.getId('loginForm'), cls:'loginForm', children:[ | 79 | {tag:'div', id:this.getId('loginForm'), cls:'loginForm', children:[ |
82 | {tag:'div', cls:'loginFormHeaderBox', children:[{tag:'h3', htmlString:Clipperz.PM.Strings['loginFormTitle']}]}, | 80 | {tag:'div', cls:'loginFormHeaderBox', children:[{tag:'h3', htmlString:Clipperz.PM.Strings['loginFormTitle']}]}, |
83 | {tag:'form', id:this.getId('loginForm_form'), autocomplete:'off', children:[ | 81 | {tag:'form', id:this.getId('loginForm_form'), autocomplete:'off', children:[ |
84 | 82 | ||
85 | {tag:'table', cls:'formLayout', children:[ | 83 | {tag:'table', cls:'formLayout', children:[ |
86 | {tag:'thead'}, | 84 | {tag:'thead'}, |
87 | {tag:'tbody', children:[ | 85 | {tag:'tbody', children:[ |
88 | {tag:'tr', cls:'formFieldTR', children:[ | 86 | {tag:'tr', cls:'formFieldTR', children:[ |
89 | {tag:'td', width:'90', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, | 87 | {tag:'td', width:'90', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, |
90 | {tag:'td', children:[ | 88 | {tag:'td', children:[ |
91 | {tag:'input', id:this.getId('login_username'), cls:'loginFormField', type:'text', name:'username'} | 89 | {tag:'input', id:this.getId('login_username'), cls:'loginFormField', type:'text', name:'username'} |
92 | ]} | 90 | ]} |
93 | ]}, | 91 | ]}, |
94 | {tag:'tr', cls:'formFieldTR', children:[ | 92 | {tag:'tr', cls:'formFieldTR', children:[ |
95 | {tag:'td', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, | 93 | {tag:'td', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, |
96 | {tag:'td', children:[ | 94 | {tag:'td', children:[ |
97 | {tag:'div', id:this.getId('passphraseDIV'), children:[ | 95 | {tag:'div', id:this.getId('passphraseDIV'), children:[ |
98 | {tag:'input', id:this.getId('login_passphrase'), cls:'loginFormField', type:'password', name:'passphrase'} | 96 | {tag:'input', id:this.getId('login_passphrase'), cls:'loginFormField', type:'password', name:'passphrase'} |
99 | ]}, | 97 | ]}, |
100 | {tag:'div', cls:'oneTimePassword', id:this.getId('oneTimePasswordDIV'), children:[ | 98 | {tag:'div', cls:'oneTimePassword', id:this.getId('oneTimePasswordDIV'), children:[ |
101 | {tag:'input', type:'text', id:this.getId('oneTimePassword_1'), name:'passphrase'}, | 99 | {tag:'input', type:'text', id:this.getId('oneTimePassword_1'), name:'passphrase'}, |
102 | {tag:'span', html:'-'}, | 100 | {tag:'span', html:'-'}, |
103 | {tag:'input', type:'text', id:this.getId('oneTimePassword_2'), name:'passphrase'}, | 101 | {tag:'input', type:'text', id:this.getId('oneTimePassword_2'), name:'passphrase'}, |
104 | {tag:'span', html:'-'}, | 102 | {tag:'span', html:'-'}, |
105 | {tag:'input', type:'text', id:this.getId('oneTimePassword_3'), name:'passphrase'}, | 103 | {tag:'input', type:'text', id:this.getId('oneTimePassword_3'), name:'passphrase'}, |
106 | {tag:'span', html:'-'}, | 104 | {tag:'span', html:'-'}, |
107 | {tag:'input', type:'text', id:this.getId('oneTimePassword_4'), name:'passphrase'} | 105 | {tag:'input', type:'text', id:this.getId('oneTimePassword_4'), name:'passphrase'} |
108 | ]} | 106 | ]} |
109 | ]} | 107 | ]} |
110 | ]}, | 108 | ]}, |
111 | {tag:'tr', cls:'formFieldTR', id:this.getId('passwordTypeChooserTR'), children:[ | 109 | {tag:'tr', cls:'formFieldTR', id:this.getId('passwordTypeChooserTR'), children:[ |
112 | {tag:'td', valign:'top', align:'right', children:[ | 110 | {tag:'td', valign:'top', align:'right', children:[ |
113 | {tag:'input', type:'checkbox', cls:'passwordTypeCheckbox', id:this.getId('useOneTimePasswordCheckbox')} | 111 | {tag:'input', type:'checkbox', cls:'passwordTypeCheckbox', id:this.getId('useOneTimePasswordCheckbox')} |
114 | ]}, | 112 | ]}, |
115 | {tag:'td', children:[ | 113 | {tag:'td', children:[ |
116 | {tag:'div', cls:'passwordTypeChooser', children:[ | 114 | {tag:'div', cls:'passwordTypeChooser', children:[ |
117 | {tag:'h4', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxLabel']}, | 115 | {tag:'h4', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxLabel']}, |
118 | {tag:'span', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxDescription']} | 116 | {tag:'span', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxDescription']} |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js index b8cc556..17ed8e4 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js | |||
@@ -1,70 +1,68 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 27 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Panels.LogoutPanel = function(args) { | 31 | Clipperz.PM.Components.Panels.LogoutPanel = function(args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Panels.LogoutPanel.superclass.constructor.call(this, args); | 34 | Clipperz.PM.Components.Panels.LogoutPanel.superclass.constructor.call(this, args); |
37 | 35 | ||
38 | return this; | 36 | return this; |
39 | } | 37 | } |
40 | 38 | ||
41 | //============================================================================= | 39 | //============================================================================= |
42 | 40 | ||
43 | YAHOO.extendX(Clipperz.PM.Components.Panels.LogoutPanel, Clipperz.PM.Components.Panels.BasePanel, { | 41 | YAHOO.extendX(Clipperz.PM.Components.Panels.LogoutPanel, Clipperz.PM.Components.Panels.BasePanel, { |
44 | 42 | ||
45 | 'toString': function() { | 43 | 'toString': function() { |
46 | return "Clipperz.PM.Components.LogoutPanel component"; | 44 | return "Clipperz.PM.Components.LogoutPanel component"; |
47 | }, | 45 | }, |
48 | 46 | ||
49 | //------------------------------------------------------------------------- | 47 | //------------------------------------------------------------------------- |
50 | 48 | ||
51 | 'initPanel': function() { | 49 | 'initPanel': function() { |
52 | var result; | 50 | var result; |
53 | varlayout; | 51 | varlayout; |
54 | 52 | ||
55 | result = new YAHOO.ext.ContentPanel(this.getId('panel'), {title:'logout', closable:false, autoCreate:true}); | 53 | result = new YAHOO.ext.ContentPanel(this.getId('panel'), {title:'logout', closable:false, autoCreate:true}); |
56 | 54 | ||
57 | Clipperz.YUI.DomHelper.append(result.getEl().dom, | 55 | Clipperz.YUI.DomHelper.append(result.getEl().dom, |
58 | {tag:'div', children:[ | 56 | {tag:'div', children:[ |
59 | {tag:'h2', html:'Logout panel'} | 57 | {tag:'h2', html:'Logout panel'} |
60 | ]} | 58 | ]} |
61 | ); | 59 | ); |
62 | 60 | ||
63 | return result; | 61 | return result; |
64 | }, | 62 | }, |
65 | 63 | ||
66 | //------------------------------------------------------------------------- | 64 | //------------------------------------------------------------------------- |
67 | __syntaxFix__: "syntax fix" | 65 | __syntaxFix__: "syntax fix" |
68 | 66 | ||
69 | }); | 67 | }); |
70 | 68 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js index 29ef516..c19a8a3 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 27 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Panels.MainPanel = function(anElement, args) { | 31 | Clipperz.PM.Components.Panels.MainPanel = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Panels.MainPanel.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.Panels.MainPanel.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._recordListDataModel = null; | 36 | this._recordListDataModel = null; |
39 | this._selectedRecord = null; | 37 | this._selectedRecord = null; |
40 | this._recordDetailComponent = null; | 38 | this._recordDetailComponent = null; |
41 | this._recordListGrid = null; | 39 | this._recordListGrid = null; |
42 | 40 | ||
43 | this._directLinkItemTemplate = null; | 41 | this._directLinkItemTemplate = null; |
44 | this._recordItemTemplate = null; | 42 | this._recordItemTemplate = null; |
45 | 43 | ||
46 | this._addNewRecordButton = null; | 44 | this._addNewRecordButton = null; |
47 | this._deleteRecordButton = null; | 45 | this._deleteRecordButton = null; |
48 | 46 | ||
49 | this._creationWizard = null; | 47 | this._creationWizard = null; |
50 | 48 | ||
51 | Clipperz.NotificationCenter.register(null, 'selectAndEnterEditMode', this, 'selectRecordAndEnterEditModeHandler'); | 49 | Clipperz.NotificationCenter.register(null, 'selectAndEnterEditMode', this, 'selectRecordAndEnterEditModeHandler'); |
52 | 50 | ||
53 | Clipperz.NotificationCenter.register(null, 'recordAdded', this, 'recordAddedHandler'); | 51 | Clipperz.NotificationCenter.register(null, 'recordAdded', this, 'recordAddedHandler'); |
54 | Clipperz.NotificationCenter.register(null, 'recordUpdated', this, 'recordUpdatedHandler'); | 52 | Clipperz.NotificationCenter.register(null, 'recordUpdated', this, 'recordUpdatedHandler'); |
55 | Clipperz.NotificationCenter.register(null, 'recordRemoved', this, 'recordRemovedHandler'); | 53 | Clipperz.NotificationCenter.register(null, 'recordRemoved', this, 'recordRemovedHandler'); |
56 | 54 | ||
57 | Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); | 55 | Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); |
58 | Clipperz.NotificationCenter.register(null, 'directLoginUpdated', this, 'directLoginUpdatedHandler'); | 56 | Clipperz.NotificationCenter.register(null, 'directLoginUpdated', this, 'directLoginUpdatedHandler'); |
59 | Clipperz.NotificationCenter.register(null, 'directLoginRemoved', this, 'directLoginRemovedHandler'); | 57 | Clipperz.NotificationCenter.register(null, 'directLoginRemoved', this, 'directLoginRemovedHandler'); |
60 | 58 | ||
61 | Clipperz.NotificationCenter.register(null, 'accountLocked', this, 'accountLockedHandler'); | 59 | Clipperz.NotificationCenter.register(null, 'accountLocked', this, 'accountLockedHandler'); |
62 | 60 | ||
63 | MochiKit.Signal.connect(MochiKit.DOM.currentWindow(), 'onresize', this, 'resizeModalMask'); | 61 | MochiKit.Signal.connect(MochiKit.DOM.currentWindow(), 'onresize', this, 'resizeModalMask'); |
64 | this.render(); | 62 | this.render(); |
65 | 63 | ||
66 | return this; | 64 | return this; |
67 | } | 65 | } |
68 | 66 | ||
69 | //============================================================================= | 67 | //============================================================================= |
70 | 68 | ||
71 | YAHOO.extendX(Clipperz.PM.Components.Panels.MainPanel, Clipperz.PM.Components.Panels.BasePanel, { | 69 | YAHOO.extendX(Clipperz.PM.Components.Panels.MainPanel, Clipperz.PM.Components.Panels.BasePanel, { |
72 | 70 | ||
73 | 'toString': function() { | 71 | 'toString': function() { |
74 | return "Clipperz.PM.Components.Panels.MainPanel component"; | 72 | return "Clipperz.PM.Components.Panels.MainPanel component"; |
75 | }, | 73 | }, |
76 | 74 | ||
77 | //------------------------------------------------------------------------- | 75 | //------------------------------------------------------------------------- |
78 | 76 | ||
79 | 'render': function() { | 77 | 'render': function() { |
80 | this.element().update(""); | 78 | this.element().update(""); |
81 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', id:'mainPanelTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 79 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', id:'mainPanelTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
82 | {tag:'tbody', children:[ | 80 | {tag:'tbody', children:[ |
83 | {tag:'tr', children:[ | 81 | {tag:'tr', children:[ |
84 | {tag:'td', width:'15', children:[ | 82 | {tag:'td', width:'15', children:[ |
85 | {tag:'div', cls:'mainPanelMinHeightDiv'} | 83 | {tag:'div', cls:'mainPanelMinHeightDiv'} |
86 | ]}, | 84 | ]}, |
87 | {tag:'td', valign:'top', id:'directLoginsTD', width:'200', children:[ | 85 | {tag:'td', valign:'top', id:'directLoginsTD', width:'200', children:[ |
88 | {tag:'div', id:'directLoginsBlock', children:[ | 86 | {tag:'div', id:'directLoginsBlock', children:[ |
89 | {tag:'div', cls:'directLoginsBlockHeaderBox', children:[{tag:'h3', id:'directLoginTitle', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockLabel']}]}, | 87 | {tag:'div', cls:'directLoginsBlockHeaderBox', children:[{tag:'h3', id:'directLoginTitle', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockLabel']}]}, |
90 | {tag:'div', id:'directLoginsDescription', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockDescription']}, | 88 | {tag:'div', id:'directLoginsDescription', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockDescription']}, |
91 | {tag:'ul', id:'directLogins'} | 89 | {tag:'ul', id:'directLogins'} |
92 | ]} | 90 | ]} |
93 | ]}, | 91 | ]}, |
94 | {tag:'td', width:'15', children:[ | 92 | {tag:'td', width:'15', children:[ |
95 | {tag:'div', cls:'mainPanelMinHeightDiv'} | 93 | {tag:'div', cls:'mainPanelMinHeightDiv'} |
96 | ]}, | 94 | ]}, |
97 | {tag:'td', valign:'top', children:[ | 95 | {tag:'td', valign:'top', children:[ |
98 | {tag:'div', id:'mainContent', children:[ | 96 | {tag:'div', id:'mainContent', children:[ |
99 | {tag:'div', id:'recordListBlockHeader'}, | 97 | {tag:'div', id:'recordListBlockHeader'}, |
100 | {tag:'div', id:'recordListAndDetailBlock', children:[ | 98 | {tag:'div', id:'recordListAndDetailBlock', children:[ |
101 | {tag:'table', id:'recordListAndDetailBlockTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 99 | {tag:'table', id:'recordListAndDetailBlockTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
102 | {tag:'tbody', children:[ | 100 | {tag:'tbody', children:[ |
103 | {tag:'tr', children:[ | 101 | {tag:'tr', children:[ |
104 | {tag:'td', valign:'top', width:'250', children:[ | 102 | {tag:'td', valign:'top', width:'250', children:[ |
105 | {tag:'div', id:'recordListBlock', children:[ | 103 | {tag:'div', id:'recordListBlock', children:[ |
106 | {tag:'div', id:'recordListFilterHeader'}, | 104 | {tag:'div', id:'recordListFilterHeader'}, |
107 | {tag:'ul', id:'records'} | 105 | {tag:'ul', id:'records'} |
108 | ]} | 106 | ]} |
109 | ]}, | 107 | ]}, |
110 | {tag:'td', id:'recordDetailSeparatorTD', rowspan:'2', valign:'top', bgcolor:'#ddddff', html:' '}, | 108 | {tag:'td', id:'recordDetailSeparatorTD', rowspan:'2', valign:'top', bgcolor:'#ddddff', html:' '}, |
111 | {tag:'td', valign:'top', children:[ | 109 | {tag:'td', valign:'top', children:[ |
112 | {tag:'div', id:'recordDetailMainBlock', children:[ | 110 | {tag:'div', id:'recordDetailMainBlock', children:[ |
113 | {tag:'div', id:'recordTitleTopBlock'}, | 111 | {tag:'div', id:'recordTitleTopBlock'}, |
114 | {tag:'div', id:'recordDetailBlock', children:[ | 112 | {tag:'div', id:'recordDetailBlock', children:[ |
115 | {tag:'div', id:'recordDetail'} | 113 | {tag:'div', id:'recordDetail'} |
116 | ]} | 114 | ]} |
117 | ]}, | 115 | ]}, |
118 | {tag:'div', id:'recordCreationWizardMainBlock', children:[ | 116 | {tag:'div', id:'recordCreationWizardMainBlock', children:[ |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js index 4f2a015..1c799d0 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 27 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Panels.ToolsPanel = function(anElement, args) { | 31 | Clipperz.PM.Components.Panels.ToolsPanel = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Panels.ToolsPanel.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.Panels.ToolsPanel.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._generateButtonElement = null; | 36 | this._generateButtonElement = null; |
39 | this._needsRenderingUponTabSwitch = false; | 37 | this._needsRenderingUponTabSwitch = false; |
40 | 38 | ||
41 | this.render(); | 39 | this.render(); |
42 | 40 | ||
43 | return this; | 41 | return this; |
44 | } | 42 | } |
45 | 43 | ||
46 | //============================================================================= | 44 | //============================================================================= |
47 | 45 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.Panels.ToolsPanel, Clipperz.PM.Components.Panels.BasePanel, { | 46 | YAHOO.extendX(Clipperz.PM.Components.Panels.ToolsPanel, Clipperz.PM.Components.Panels.BasePanel, { |
49 | 47 | ||
50 | 'toString': function() { | 48 | 'toString': function() { |
51 | return "Clipperz.PM.Components.Panels.ToolsPanel component"; | 49 | return "Clipperz.PM.Components.Panels.ToolsPanel component"; |
52 | }, | 50 | }, |
53 | 51 | ||
54 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
55 | 53 | ||
56 | 'render': function() { | 54 | 'render': function() { |
57 | var bookmarkletUrl; | 55 | var bookmarkletUrl; |
58 | 56 | ||
59 | //MochiKit.Logging.logDebug(">>> ToolsPanel.render"); | 57 | //MochiKit.Logging.logDebug(">>> ToolsPanel.render"); |
60 | Clipperz.NotificationCenter.unregister(this); | 58 | Clipperz.NotificationCenter.unregister(this); |
61 | MochiKit.Signal.disconnectAllTo(this); | 59 | MochiKit.Signal.disconnectAllTo(this); |
62 | 60 | ||
63 | if (Clipperz_IEisBroken == true) { | 61 | if (Clipperz_IEisBroken == true) { |
64 | bookmarkletUrl = bookmarklet_ie; | 62 | bookmarkletUrl = bookmarklet_ie; |
65 | } else { | 63 | } else { |
66 | bookmarkletUrl = bookmarklet; | 64 | bookmarkletUrl = bookmarklet; |
67 | } | 65 | } |
68 | 66 | ||
69 | this.element().update(""); | 67 | this.element().update(""); |
70 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 68 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
71 | {tag:'tbody', children:[ | 69 | {tag:'tbody', children:[ |
72 | {tag:'tr', children:[ | 70 | {tag:'tr', children:[ |
73 | {tag:'td', valign:'top', width:'200', children:[ | 71 | {tag:'td', valign:'top', width:'200', children:[ |
74 | {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ | 72 | {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ |
75 | {tag:'li', id:this.getId('passwordGenerator'), htmlString:Clipperz.PM.Strings['passwordGeneratorTabLabel']}, | 73 | {tag:'li', id:this.getId('passwordGenerator'), htmlString:Clipperz.PM.Strings['passwordGeneratorTabLabel']}, |
76 | {tag:'li', id:this.getId('bookmarklet'), htmlString:Clipperz.PM.Strings['bookmarkletTabLabel']}, | 74 | {tag:'li', id:this.getId('bookmarklet'), htmlString:Clipperz.PM.Strings['bookmarkletTabLabel']}, |
77 | {tag:'li', id:this.getId('compact'), htmlString:Clipperz.PM.Strings['compactTabLabel']}, | 75 | {tag:'li', id:this.getId('compact'), htmlString:Clipperz.PM.Strings['compactTabLabel']}, |
78 | {tag:'li', id:this.getId('httpAuth'), htmlString:Clipperz.PM.Strings['httpAuthTabLabel']} | 76 | {tag:'li', id:this.getId('httpAuth'), htmlString:Clipperz.PM.Strings['httpAuthTabLabel']} |
79 | ]} | 77 | ]} |
80 | ]}, | 78 | ]}, |
81 | {tag:'td', valign:'top', children:[ | 79 | {tag:'td', valign:'top', children:[ |
82 | {tag:'ul', cls:'clipperzTabPanels', children:[ | 80 | {tag:'ul', cls:'clipperzTabPanels', children:[ |
83 | {tag:'li', id:this.getId('passwordGeneratorPanel'), children:[ | 81 | {tag:'li', id:this.getId('passwordGeneratorPanel'), children:[ |
84 | {tag:'div', cls:'clipperzSubPanel', children:[ | 82 | {tag:'div', cls:'clipperzSubPanel', children:[ |
85 | {tag:'h5', htmlString:Clipperz.PM.Strings['passwordGeneratorTabTitle']}, | 83 | {tag:'h5', htmlString:Clipperz.PM.Strings['passwordGeneratorTabTitle']}, |
86 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['paswordGeneratorTabDescription']}, | 84 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['paswordGeneratorTabDescription']}, |
87 | 85 | ||
88 | //--------------------------------------------------- | 86 | //--------------------------------------------------- |
89 | {tag:'div', children:[ | 87 | {tag:'div', children:[ |
90 | {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[ | 88 | {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[ |
91 | {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')}, | 89 | {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')}, |
92 | {tag:'table', children:[ | 90 | {tag:'table', children:[ |
93 | {tag:'tbody', children:[ | 91 | {tag:'tbody', children:[ |
94 | {tag:'tr', children:[ | 92 | {tag:'tr', children:[ |
95 | {tag:'td', width:'20%', children:[ | 93 | {tag:'td', width:'20%', children:[ |
96 | {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true}, | 94 | {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true}, |
97 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']} | 95 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']} |
98 | ]}, | 96 | ]}, |
99 | {tag:'td', width:'20%', children:[ | 97 | {tag:'td', width:'20%', children:[ |
100 | {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true}, | 98 | {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true}, |
101 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']} | 99 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']} |
102 | ]}, | 100 | ]}, |
103 | {tag:'td', width:'20%', children:[ | 101 | {tag:'td', width:'20%', children:[ |
104 | {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true}, | 102 | {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true}, |
105 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']} | 103 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']} |
106 | ]}, | 104 | ]}, |
107 | {tag:'td', width:'20%', children:[ | 105 | {tag:'td', width:'20%', children:[ |
108 | {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true}, | 106 | {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true}, |
109 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']} | 107 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']} |
110 | ]}, | 108 | ]}, |
111 | {tag:'td', width:'20%', children:[ | 109 | {tag:'td', width:'20%', children:[ |
112 | {tag:'span', cls:'passwordGeneratorLength', children:[ | 110 | {tag:'span', cls:'passwordGeneratorLength', children:[ |
113 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']}, | 111 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']}, |
114 | {tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'} | 112 | {tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'} |
115 | ]} | 113 | ]} |
116 | ]} | 114 | ]} |
117 | ]} | 115 | ]} |
118 | ]} | 116 | ]} |
diff --git a/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js b/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js index 784dce9..b64e0f7 100644 --- a/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js +++ b/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js | |||
@@ -1,115 +1,113 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | 27 | ||
30 | Clipperz.PM.Components.PasswordEntropyDisplay = function(anElement, args) { | 28 | Clipperz.PM.Components.PasswordEntropyDisplay = function(anElement, args) { |
31 | args = args || {}; | 29 | args = args || {}; |
32 | 30 | ||
33 | //MochiKit.Logging.logDebug(">>> new TextFormField"); | 31 | //MochiKit.Logging.logDebug(">>> new TextFormField"); |
34 | Clipperz.PM.Components.PasswordEntropyDisplay.superclass.constructor.call(this, anElement, args); | 32 | Clipperz.PM.Components.PasswordEntropyDisplay.superclass.constructor.call(this, anElement, args); |
35 | 33 | ||
36 | this._wrapperElement = null; | 34 | this._wrapperElement = null; |
37 | this._entropyElement = null; | 35 | this._entropyElement = null; |
38 | 36 | ||
39 | this.render(); | 37 | this.render(); |
40 | //MochiKit.Logging.logDebug("<<< new TextFormField"); | 38 | //MochiKit.Logging.logDebug("<<< new TextFormField"); |
41 | 39 | ||
42 | return this; | 40 | return this; |
43 | }; | 41 | }; |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.PasswordEntropyDisplay, Clipperz.PM.Components.BaseComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.PasswordEntropyDisplay, Clipperz.PM.Components.BaseComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.PasswordEntropyDisplay"; | 46 | return "Clipperz.PM.Components.PasswordEntropyDisplay"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //----------------------------------------------------- | 49 | //----------------------------------------------------- |
52 | 50 | ||
53 | 'wrapperElement': function() { | 51 | 'wrapperElement': function() { |
54 | return this._wrapperElement; | 52 | return this._wrapperElement; |
55 | }, | 53 | }, |
56 | 54 | ||
57 | 'setWrapperElement': function(aValue) { | 55 | 'setWrapperElement': function(aValue) { |
58 | this._wrapperElement = aValue; | 56 | this._wrapperElement = aValue; |
59 | }, | 57 | }, |
60 | 58 | ||
61 | //----------------------------------------------------- | 59 | //----------------------------------------------------- |
62 | 60 | ||
63 | 'passwordElement': function() { | 61 | 'passwordElement': function() { |
64 | return this.element(); | 62 | return this.element(); |
65 | }, | 63 | }, |
66 | 64 | ||
67 | //----------------------------------------------------- | 65 | //----------------------------------------------------- |
68 | 66 | ||
69 | 'entropyElement': function() { | 67 | 'entropyElement': function() { |
70 | return this._entropyElement; | 68 | return this._entropyElement; |
71 | }, | 69 | }, |
72 | 70 | ||
73 | 'setEntropyElement': function(aValue) { | 71 | 'setEntropyElement': function(aValue) { |
74 | this._entropyElement = aValue; | 72 | this._entropyElement = aValue; |
75 | }, | 73 | }, |
76 | 74 | ||
77 | //----------------------------------------------------- | 75 | //----------------------------------------------------- |
78 | 76 | ||
79 | 'render': function() { | 77 | 'render': function() { |
80 | MochiKit.Signal.disconnectAllTo(this); | 78 | MochiKit.Signal.disconnectAllTo(this); |
81 | 79 | ||
82 | this.setWrapperElement(this.element().wrap({tag:'div'})); | 80 | this.setWrapperElement(this.element().wrap({tag:'div'})); |
83 | this.setEntropyElement(Clipperz.YUI.DomHelper.append(this.wrapperElement().dom, {tag:'div', cls:'passwordEntropy', html:" "}, true)); | 81 | this.setEntropyElement(Clipperz.YUI.DomHelper.append(this.wrapperElement().dom, {tag:'div', cls:'passwordEntropy', html:" "}, true)); |
84 | 82 | ||
85 | // this.entropyElement().setWidth(this.passwordElement().getWidth()); | 83 | // this.entropyElement().setWidth(this.passwordElement().getWidth()); |
86 | this.updateEntropyElement(); | 84 | this.updateEntropyElement(); |
87 | 85 | ||
88 | MochiKit.Signal.connect(this.element().dom, 'onkeyup', this, 'updateEntropyElement'); | 86 | MochiKit.Signal.connect(this.element().dom, 'onkeyup', this, 'updateEntropyElement'); |
89 | MochiKit.Signal.connect(this.element().dom, 'onchange', this, 'updateEntropyElement'); | 87 | MochiKit.Signal.connect(this.element().dom, 'onchange', this, 'updateEntropyElement'); |
90 | MochiKit.Signal.connect(this.element().dom, 'onblur', this, 'updateEntropyElement'); | 88 | MochiKit.Signal.connect(this.element().dom, 'onblur', this, 'updateEntropyElement'); |
91 | }, | 89 | }, |
92 | 90 | ||
93 | //----------------------------------------------------- | 91 | //----------------------------------------------------- |
94 | 92 | ||
95 | 'computeEntropyForString': function(aValue) { | 93 | 'computeEntropyForString': function(aValue) { |
96 | return Clipperz.PM.Crypto.passwordEntropy(aValue); | 94 | return Clipperz.PM.Crypto.passwordEntropy(aValue); |
97 | }, | 95 | }, |
98 | 96 | ||
99 | //----------------------------------------------------- | 97 | //----------------------------------------------------- |
100 | 98 | ||
101 | 'updateEntropyElement': function(anEvent) { | 99 | 'updateEntropyElement': function(anEvent) { |
102 | //MochiKit.Logging.logDebug(">>> PasswordEntropyDisplay.updateEntropyElement"); | 100 | //MochiKit.Logging.logDebug(">>> PasswordEntropyDisplay.updateEntropyElement"); |
103 | varmaxExtent; | 101 | varmaxExtent; |
104 | varentropy; | 102 | varentropy; |
105 | 103 | ||
106 | entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value)); | 104 | entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value)); |
107 | //MochiKit.Logging.logDebug("--- PasswordEntropyDisplay.updateEntropyElement - entropy: " + entropy); | 105 | //MochiKit.Logging.logDebug("--- PasswordEntropyDisplay.updateEntropyElement - entropy: " + entropy); |
108 | this.entropyElement().setStyle('background-position', "0px " + -entropy + "px"); | 106 | this.entropyElement().setStyle('background-position', "0px " + -entropy + "px"); |
109 | this.entropyElement().setWidth(this.passwordElement().getWidth() * (entropy/128)); | 107 | this.entropyElement().setWidth(this.passwordElement().getWidth() * (entropy/128)); |
110 | //MochiKit.Logging.logDebug("<<< PasswordEntropyDisplay.updateEntropyElement"); | 108 | //MochiKit.Logging.logDebug("<<< PasswordEntropyDisplay.updateEntropyElement"); |
111 | }, | 109 | }, |
112 | 110 | ||
113 | //----------------------------------------------------- | 111 | //----------------------------------------------------- |
114 | __syntaxFix__: '__syntaxFix__' | 112 | __syntaxFix__: '__syntaxFix__' |
115 | }); | 113 | }); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js b/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js index 87c52b2..67db50a 100644 --- a/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js +++ b/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | 27 | ||
30 | Clipperz.PM.Components.PasswordGenerator = function(anElement, aFieldValueComponent, args) { | 28 | Clipperz.PM.Components.PasswordGenerator = function(anElement, aFieldValueComponent, args) { |
31 | args = args || {}; | 29 | args = args || {}; |
32 | 30 | ||
33 | //MochiKit.Logging.logDebug(">>> new TextFormField"); | 31 | //MochiKit.Logging.logDebug(">>> new TextFormField"); |
34 | Clipperz.PM.Components.PasswordGenerator.superclass.constructor.call(this, anElement, args); | 32 | Clipperz.PM.Components.PasswordGenerator.superclass.constructor.call(this, anElement, args); |
35 | 33 | ||
36 | this._fieldValueComponent = aFieldValueComponent; | 34 | this._fieldValueComponent = aFieldValueComponent; |
37 | this._panelButton = null; | 35 | this._panelButton = null; |
38 | this.render(); | 36 | this.render(); |
39 | //MochiKit.Logging.logDebug("<<< new TextFormField"); | 37 | //MochiKit.Logging.logDebug("<<< new TextFormField"); |
40 | 38 | ||
41 | return this; | 39 | return this; |
42 | }; | 40 | }; |
43 | 41 | ||
44 | YAHOO.extendX(Clipperz.PM.Components.PasswordGenerator, Clipperz.PM.Components.BaseComponent, { | 42 | YAHOO.extendX(Clipperz.PM.Components.PasswordGenerator, Clipperz.PM.Components.BaseComponent, { |
45 | 43 | ||
46 | 'toString': function() { | 44 | 'toString': function() { |
47 | return "Clipperz.PM.Components.PasswordGenerator"; | 45 | return "Clipperz.PM.Components.PasswordGenerator"; |
48 | }, | 46 | }, |
49 | 47 | ||
50 | //----------------------------------------------------- | 48 | //----------------------------------------------------- |
51 | 49 | ||
52 | 'fieldValueComponent': function() { | 50 | 'fieldValueComponent': function() { |
53 | return this._fieldValueComponent; | 51 | return this._fieldValueComponent; |
54 | }, | 52 | }, |
55 | 53 | ||
56 | //----------------------------------------------------- | 54 | //----------------------------------------------------- |
57 | 55 | ||
58 | 'render': function() { | 56 | 'render': function() { |
59 | MochiKit.Signal.disconnectAllTo(this); | 57 | MochiKit.Signal.disconnectAllTo(this); |
60 | 58 | ||
61 | // this._panelButton = new YAHOO.ext.Button(this.element().dom, {text:Clipperz.PM.Strings['passwordGeneratorButtonLabel'], handler:this.openPasswordPanel, scope:this}); | 59 | // this._panelButton = new YAHOO.ext.Button(this.element().dom, {text:Clipperz.PM.Strings['passwordGeneratorButtonLabel'], handler:this.openPasswordPanel, scope:this}); |
62 | MochiKit.Signal.connect(this.element().dom, 'onmouseenter', this, 'onMouseEnter'); | 60 | MochiKit.Signal.connect(this.element().dom, 'onmouseenter', this, 'onMouseEnter'); |
63 | MochiKit.Signal.connect(this.element().dom, 'onmouseleave', this, 'onMouseLeave'); | 61 | MochiKit.Signal.connect(this.element().dom, 'onmouseleave', this, 'onMouseLeave'); |
64 | MochiKit.Signal.connect(this.element().dom, 'onclick', this, 'openPasswordPanel'); | 62 | MochiKit.Signal.connect(this.element().dom, 'onclick', this, 'openPasswordPanel'); |
65 | }, | 63 | }, |
66 | 64 | ||
67 | //----------------------------------------------------- | 65 | //----------------------------------------------------- |
68 | 66 | ||
69 | 'onMouseEnter': function() { | 67 | 'onMouseEnter': function() { |
70 | this.element().addClass('hover'); | 68 | this.element().addClass('hover'); |
71 | }, | 69 | }, |
72 | 70 | ||
73 | 'onMouseLeave': function() { | 71 | 'onMouseLeave': function() { |
74 | this.element().removeClass('hover'); | 72 | this.element().removeClass('hover'); |
75 | }, | 73 | }, |
76 | 74 | ||
77 | //----------------------------------------------------- | 75 | //----------------------------------------------------- |
78 | 76 | ||
79 | 'panelButton': function() { | 77 | 'panelButton': function() { |
80 | return this._panelButton; | 78 | return this._panelButton; |
81 | }, | 79 | }, |
82 | 80 | ||
83 | //----------------------------------------------------- | 81 | //----------------------------------------------------- |
84 | 82 | ||
85 | 'openPasswordPanel': function() { | 83 | 'openPasswordPanel': function() { |
86 | var passwordGeneratorElement; | 84 | var passwordGeneratorElement; |
87 | var passwordGeneratorDialog; | 85 | var passwordGeneratorDialog; |
88 | var cancelButton; | 86 | var cancelButton; |
89 | var okButton; | 87 | var okButton; |
90 | var cancelFunction; | 88 | var cancelFunction; |
91 | var okFunction; | 89 | var okFunction; |
92 | 90 | ||
93 | //MochiKit.Logging.logDebug(">>> PasswordGenerator.openPasswordPanel"); | 91 | //MochiKit.Logging.logDebug(">>> PasswordGenerator.openPasswordPanel"); |
94 | passwordGeneratorElement = Clipperz.YUI.DomHelper.append(document.body, {tag:'div', id:'passwordGenerator', children:[ | 92 | passwordGeneratorElement = Clipperz.YUI.DomHelper.append(document.body, {tag:'div', id:'passwordGenerator', children:[ |
95 | {tag:'div', cls:'ydlg-hd', htmlString:Clipperz.PM.Strings['passwordGeneratorPanelTitle']}, | 93 | {tag:'div', cls:'ydlg-hd', htmlString:Clipperz.PM.Strings['passwordGeneratorPanelTitle']}, |
96 | {tag:'div', cls:'ydlg-bd', children:[ | 94 | {tag:'div', cls:'ydlg-bd', children:[ |
97 | {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[ | 95 | {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[ |
98 | {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')}, | 96 | {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')}, |
99 | {tag:'table', children:[ | 97 | {tag:'table', children:[ |
100 | {tag:'tbody', children:[ | 98 | {tag:'tbody', children:[ |
101 | {tag:'tr', children:[ | 99 | {tag:'tr', children:[ |
102 | {tag:'td', width:'20%', children:[ | 100 | {tag:'td', width:'20%', children:[ |
103 | {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true}, | 101 | {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true}, |
104 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']} | 102 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']} |
105 | ]}, | 103 | ]}, |
106 | {tag:'td', width:'20%', children:[ | 104 | {tag:'td', width:'20%', children:[ |
107 | {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true}, | 105 | {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true}, |
108 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']} | 106 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']} |
109 | ]}, | 107 | ]}, |
110 | {tag:'td', width:'20%', children:[ | 108 | {tag:'td', width:'20%', children:[ |
111 | {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true}, | 109 | {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true}, |
112 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']} | 110 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']} |
113 | ]}, | 111 | ]}, |
114 | {tag:'td', width:'20%', children:[ | 112 | {tag:'td', width:'20%', children:[ |
115 | {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true}, | 113 | {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true}, |
116 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']} | 114 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']} |
117 | ]}, | 115 | ]}, |
118 | {tag:'td', width:'20%', children:[ | 116 | {tag:'td', width:'20%', children:[ |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js index b3debad..821dc94 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js +++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js | |||
@@ -1,25 +1,23 @@ | |||
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 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js index b3debad..821dc94 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js +++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js | |||
@@ -1,25 +1,23 @@ | |||
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 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js index 5f5c29f..170bd09 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js +++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js | |||
@@ -1,92 +1,90 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Printing) == 'undefined') { Clipperz.PM.Components.Printing = {}; } | 27 | if (typeof(Clipperz.PM.Components.Printing) == 'undefined') { Clipperz.PM.Components.Printing = {}; } |
30 | 28 | ||
31 | Clipperz.PM.Components.Printing.Record = function(args) { | 29 | Clipperz.PM.Components.Printing.Record = function(args) { |
32 | args = args || {}; | 30 | args = args || {}; |
33 | 31 | ||
34 | this._record = args['record']; | 32 | this._record = args['record']; |
35 | 33 | ||
36 | return this; | 34 | return this; |
37 | } | 35 | } |
38 | 36 | ||
39 | MochiKit.Base.update(Clipperz.PM.Components.Printing.Record.prototype, { | 37 | MochiKit.Base.update(Clipperz.PM.Components.Printing.Record.prototype, { |
40 | 38 | ||
41 | 'record': function() { | 39 | 'record': function() { |
42 | return this._record; | 40 | return this._record; |
43 | }, | 41 | }, |
44 | 42 | ||
45 | //------------------------------------------------------------------------- | 43 | //------------------------------------------------------------------------- |
46 | 44 | ||
47 | 'deferredDrawToWindow': function(aWindow) { | 45 | 'deferredDrawToWindow': function(aWindow) { |
48 | vardeferredResult; | 46 | vardeferredResult; |
49 | 47 | ||
50 | deferredResult = new MochiKit.Async.Deferred(); | 48 | deferredResult = new MochiKit.Async.Deferred(); |
51 | deferredResult.addCallback(MochiKit.Base.method(this.record(), 'deferredData')); | 49 | deferredResult.addCallback(MochiKit.Base.method(this.record(), 'deferredData')); |
52 | deferredResult.addCallback(MochiKit.Base.method(this, 'appendToWindow', aWindow)); | 50 | deferredResult.addCallback(MochiKit.Base.method(this, 'appendToWindow', aWindow)); |
53 | deferredResult.callback(); | 51 | deferredResult.callback(); |
54 | return deferredResult; | 52 | return deferredResult; |
55 | }, | 53 | }, |
56 | 54 | ||
57 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
58 | 56 | ||
59 | 'appendToWindow': function(aWindow) { | 57 | 'appendToWindow': function(aWindow) { |
60 | MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() { | 58 | MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() { |
61 | var newBlock; | 59 | var newBlock; |
62 | var fields; | 60 | var fields; |
63 | 61 | ||
64 | fields = MochiKit.Base.concat( | 62 | fields = MochiKit.Base.concat( |
65 | MochiKit.Base.map(MochiKit.Base.bind(function(aField) { | 63 | MochiKit.Base.map(MochiKit.Base.bind(function(aField) { |
66 | var result; | 64 | var result; |
67 | var dt, dd; | 65 | var dt, dd; |
68 | var label, value; | 66 | var label, value; |
69 | 67 | ||
70 | label = aField.label(); | 68 | label = aField.label(); |
71 | value = aField.value(); | 69 | value = aField.value(); |
72 | dt = MochiKit.DOM.createDOM('DT', null, label); | 70 | dt = MochiKit.DOM.createDOM('DT', null, label); |
73 | dd = MochiKit.DOM.createDOM('DD', null, value) | 71 | dd = MochiKit.DOM.createDOM('DD', null, value) |
74 | result = [dt, dd]; | 72 | result = [dt, dd]; |
75 | 73 | ||
76 | return result | 74 | return result |
77 | }, this), MochiKit.Base.values(this.record().currentVersion().fields())) | 75 | }, this), MochiKit.Base.values(this.record().currentVersion().fields())) |
78 | ); | 76 | ); |
79 | 77 | ||
80 | newBlock = MochiKit.DOM.DIV({'class': 'recordBlock'}, | 78 | newBlock = MochiKit.DOM.DIV({'class': 'recordBlock'}, |
81 | MochiKit.DOM.H2(null, this.record().label()), | 79 | MochiKit.DOM.H2(null, this.record().label()), |
82 | MochiKit.DOM.DIV({'class': 'recordNotes'}, MochiKit.Base.map(MochiKit.Base.partial(MochiKit.DOM.P, null), this.record().notes().split("\n"))), | 80 | MochiKit.DOM.DIV({'class': 'recordNotes'}, MochiKit.Base.map(MochiKit.Base.partial(MochiKit.DOM.P, null), this.record().notes().split("\n"))), |
83 | MochiKit.DOM.createDOM('DL', null, fields) | 81 | MochiKit.DOM.createDOM('DL', null, fields) |
84 | ); | 82 | ); |
85 | MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, newBlock); | 83 | MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, newBlock); |
86 | 84 | ||
87 | }, this)); | 85 | }, this)); |
88 | }, | 86 | }, |
89 | 87 | ||
90 | //------------------------------------------------------------------------- | 88 | //------------------------------------------------------------------------- |
91 | __syntaxFix__: "syntax fix" | 89 | __syntaxFix__: "syntax fix" |
92 | }); | 90 | }); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js index 5b50284..d6fde5c 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js | |||
@@ -1,102 +1,100 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.AbstractComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.AbstractComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.RecordDetail.AbstractComponent.superclass.constructor.call(this, args); | 34 | Clipperz.PM.Components.RecordDetail.AbstractComponent.superclass.constructor.call(this, args); |
37 | 35 | ||
38 | this._element = anElement; | 36 | this._element = anElement; |
39 | this._mainComponent = args.mainComponent; | 37 | this._mainComponent = args.mainComponent; |
40 | 38 | ||
41 | return this; | 39 | return this; |
42 | } | 40 | } |
43 | 41 | ||
44 | //============================================================================= | 42 | //============================================================================= |
45 | 43 | ||
46 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractComponent, Clipperz.PM.Components.BaseComponent, { | 44 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractComponent, Clipperz.PM.Components.BaseComponent, { |
47 | 45 | ||
48 | 'toString': function() { | 46 | 'toString': function() { |
49 | return "Clipperz.PM.Components.RecordDetail.AbstractComponent"; | 47 | return "Clipperz.PM.Components.RecordDetail.AbstractComponent"; |
50 | }, | 48 | }, |
51 | 49 | ||
52 | //------------------------------------------------------------------------- | 50 | //------------------------------------------------------------------------- |
53 | 51 | ||
54 | 'mainComponent': function() { | 52 | 'mainComponent': function() { |
55 | return this._mainComponent; | 53 | return this._mainComponent; |
56 | }, | 54 | }, |
57 | 55 | ||
58 | //------------------------------------------------------------------------- | 56 | //------------------------------------------------------------------------- |
59 | 57 | ||
60 | 'record': function() { | 58 | 'record': function() { |
61 | return this.mainComponent().record(); | 59 | return this.mainComponent().record(); |
62 | }, | 60 | }, |
63 | 61 | ||
64 | //------------------------------------------------------------------------- | 62 | //------------------------------------------------------------------------- |
65 | 63 | ||
66 | 'editMode': function() { | 64 | 'editMode': function() { |
67 | return this.mainComponent().editMode(); | 65 | return this.mainComponent().editMode(); |
68 | }, | 66 | }, |
69 | 67 | ||
70 | //------------------------------------------------------------------------- | 68 | //------------------------------------------------------------------------- |
71 | 69 | ||
72 | 'render': function() { | 70 | 'render': function() { |
73 | this.element().update(""); | 71 | this.element().update(""); |
74 | this.update(); | 72 | this.update(); |
75 | }, | 73 | }, |
76 | 74 | ||
77 | //------------------------------------------------------------------------- | 75 | //------------------------------------------------------------------------- |
78 | 76 | ||
79 | 'update': function(anEvent) { | 77 | 'update': function(anEvent) { |
80 | if (this.editMode() == 'EDIT') { | 78 | if (this.editMode() == 'EDIT') { |
81 | this.updateEditMode(); | 79 | this.updateEditMode(); |
82 | } else if (this.editMode() == 'VIEW') { | 80 | } else if (this.editMode() == 'VIEW') { |
83 | this.updateViewMode(); | 81 | this.updateViewMode(); |
84 | } | 82 | } |
85 | }, | 83 | }, |
86 | 84 | ||
87 | //------------------------------------------------------------------------- | 85 | //------------------------------------------------------------------------- |
88 | 86 | ||
89 | 'updateViewMode': function() {}, | 87 | 'updateViewMode': function() {}, |
90 | 'updateEditMode': function() {}, | 88 | 'updateEditMode': function() {}, |
91 | 'synchronizeComponentValues': function() {}, | 89 | 'synchronizeComponentValues': function() {}, |
92 | 90 | ||
93 | //------------------------------------------------------------------------- | 91 | //------------------------------------------------------------------------- |
94 | 92 | ||
95 | 'destroy': function() { | 93 | 'destroy': function() { |
96 | this.element().remove(); | 94 | this.element().remove(); |
97 | }, | 95 | }, |
98 | 96 | ||
99 | //------------------------------------------------------------------------- | 97 | //------------------------------------------------------------------------- |
100 | __syntaxFix__: "syntax fix" | 98 | __syntaxFix__: "syntax fix" |
101 | }); | 99 | }); |
102 | 100 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js index ad733aa..ede42c2 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js | |||
@@ -1,74 +1,72 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._fieldComponent = args.fieldComponent || null; | 36 | this._fieldComponent = args.fieldComponent || null; |
39 | 37 | ||
40 | this.render(); | 38 | this.render(); |
41 | 39 | ||
42 | return this; | 40 | return this; |
43 | } | 41 | } |
44 | 42 | ||
45 | //============================================================================= | 43 | //============================================================================= |
46 | 44 | ||
47 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
48 | 46 | ||
49 | 'toString': function() { | 47 | 'toString': function() { |
50 | return "Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent"; | 48 | return "Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent"; |
51 | }, | 49 | }, |
52 | 50 | ||
53 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
54 | 52 | ||
55 | 'fieldComponent': function() { | 53 | 'fieldComponent': function() { |
56 | return this._fieldComponent; | 54 | return this._fieldComponent; |
57 | }, | 55 | }, |
58 | 56 | ||
59 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
60 | 58 | ||
61 | 'mainComponent': function() { | 59 | 'mainComponent': function() { |
62 | return this.fieldComponent().mainComponent(); | 60 | return this.fieldComponent().mainComponent(); |
63 | }, | 61 | }, |
64 | 62 | ||
65 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
66 | 64 | ||
67 | 'recordField': function() { | 65 | 'recordField': function() { |
68 | return this.fieldComponent().recordField(); | 66 | return this.fieldComponent().recordField(); |
69 | }, | 67 | }, |
70 | 68 | ||
71 | //------------------------------------------------------------------------- | 69 | //------------------------------------------------------------------------- |
72 | __syntaxFix__: "syntax fix" | 70 | __syntaxFix__: "syntax fix" |
73 | }); | 71 | }); |
74 | 72 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js index d4c7837..c703db4 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.CreationWizard = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.CreationWizard = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.RecordDetail.CreationWizard.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.RecordDetail.CreationWizard.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._mainComponent = args.mainComponent; | 36 | this._mainComponent = args.mainComponent; |
39 | this._previouslySelectedRecord = args.previouslySelectedRecord; | 37 | this._previouslySelectedRecord = args.previouslySelectedRecord; |
40 | //MochiKit.Logging.logDebug("--- new CreationWizard - previouslySelectedRecord: " + args.previouslySelectedRecord); | 38 | //MochiKit.Logging.logDebug("--- new CreationWizard - previouslySelectedRecord: " + args.previouslySelectedRecord); |
41 | this._createButton_header = null; | 39 | this._createButton_header = null; |
42 | this._createButton_footer = null; | 40 | this._createButton_footer = null; |
43 | 41 | ||
44 | this._cancelButton_header = null; | 42 | this._cancelButton_header = null; |
45 | this._cancelButton_footer = null; | 43 | this._cancelButton_footer = null; |
46 | 44 | ||
47 | this.render(); | 45 | this.render(); |
48 | 46 | ||
49 | return this; | 47 | return this; |
50 | } | 48 | } |
51 | 49 | ||
52 | //============================================================================= | 50 | //============================================================================= |
53 | 51 | ||
54 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.CreationWizard, Clipperz.PM.Components.BaseComponent, { | 52 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.CreationWizard, Clipperz.PM.Components.BaseComponent, { |
55 | 53 | ||
56 | 'toString': function() { | 54 | 'toString': function() { |
57 | return "Clipperz.PM.Components.RecordDetail.CreationWizard component"; | 55 | return "Clipperz.PM.Components.RecordDetail.CreationWizard component"; |
58 | }, | 56 | }, |
59 | 57 | ||
60 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
61 | 59 | ||
62 | 'previouslySelectedRecord': function() { | 60 | 'previouslySelectedRecord': function() { |
63 | return this._previouslySelectedRecord; | 61 | return this._previouslySelectedRecord; |
64 | }, | 62 | }, |
65 | 63 | ||
66 | //------------------------------------------------------------------------- | 64 | //------------------------------------------------------------------------- |
67 | 65 | ||
68 | 'render': function() { | 66 | 'render': function() { |
69 | vartemplateListElement; | 67 | vartemplateListElement; |
70 | vartemplates; | 68 | vartemplates; |
71 | 69 | ||
72 | this.element().update(""); | 70 | this.element().update(""); |
73 | 71 | ||
74 | Clipperz.YUI.DomHelper.append(this.element().dom, | 72 | Clipperz.YUI.DomHelper.append(this.element().dom, |
75 | {tag:'form', cls:'recordDataFORM', id:this.getId('form'), children:[ | 73 | {tag:'form', cls:'recordDataFORM', id:this.getId('form'), children:[ |
76 | {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[ | 74 | {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[ |
77 | {tag:'div', id:this.getId('wizardBox'), cls:'recordCreationWizard', children:[ | 75 | {tag:'div', id:this.getId('wizardBox'), cls:'recordCreationWizard', children:[ |
78 | {tag:'div', id:this.getId('recordCreationWizardTitleBox'), cls:'recordCreationWizardTitleBox', htmlString:Clipperz.PM.Strings['newRecordWizardTitleBox']}, | 76 | {tag:'div', id:this.getId('recordCreationWizardTitleBox'), cls:'recordCreationWizardTitleBox', htmlString:Clipperz.PM.Strings['newRecordWizardTitleBox']}, |
79 | {tag:'ul', id:this.getId('templateList'), cls:'radioList'} | 77 | {tag:'ul', id:this.getId('templateList'), cls:'radioList'} |
80 | ]} | 78 | ]} |
81 | ]} | 79 | ]} |
82 | ]} | 80 | ]} |
83 | ); | 81 | ); |
84 | 82 | ||
85 | Clipperz.YUI.DomHelper.append(this.getDom('recordCreationWizardTitleBox'), {tag:'div', cls:'newRecordWizardHeader', children:[ | 83 | Clipperz.YUI.DomHelper.append(this.getDom('recordCreationWizardTitleBox'), {tag:'div', cls:'newRecordWizardHeader', children:[ |
86 | {tag:'table', width:'100%', cellpadding:'5', children:[ | 84 | {tag:'table', width:'100%', cellpadding:'5', children:[ |
87 | {tag:'tbody', children:[ | 85 | {tag:'tbody', children:[ |
88 | {tag:'tr', children:[ | 86 | {tag:'tr', children:[ |
89 | {tag:'td', width:'49%', align:'right', children:[ | 87 | {tag:'td', width:'49%', align:'right', children:[ |
90 | {tag:'div', id:this.getId('cancelButton_header')} | 88 | {tag:'div', id:this.getId('cancelButton_header')} |
91 | ]}, | 89 | ]}, |
92 | {tag:'td', width:'10', html:' '}, | 90 | {tag:'td', width:'10', html:' '}, |
93 | {tag:'td', width:'49%', align:'left', children:[ | 91 | {tag:'td', width:'49%', align:'left', children:[ |
94 | {tag:'div', id:this.getId('createButton_header')} | 92 | {tag:'div', id:this.getId('createButton_header')} |
95 | ]} | 93 | ]} |
96 | ]} | 94 | ]} |
97 | ]} | 95 | ]} |
98 | ]} | 96 | ]} |
99 | ]}); | 97 | ]}); |
100 | 98 | ||
101 | templateListElement = this.getElement('templateList'); | 99 | templateListElement = this.getElement('templateList'); |
102 | templates = Clipperz.PM.Strings['recordTemplates']; | 100 | templates = Clipperz.PM.Strings['recordTemplates']; |
103 | MochiKit.Iter.forEach(MochiKit.Base.keys(templates), MochiKit.Base.bind(function(aTemplateKey) { | 101 | MochiKit.Iter.forEach(MochiKit.Base.keys(templates), MochiKit.Base.bind(function(aTemplateKey) { |
104 | Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[ | 102 | Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[ |
105 | {tag:'table', children:[ | 103 | {tag:'table', children:[ |
106 | {tag:'tbody', children:[ | 104 | {tag:'tbody', children:[ |
107 | {tag:'tr', children:[ | 105 | {tag:'tr', children:[ |
108 | {tag:'td', valign:'top', children:[ | 106 | {tag:'td', valign:'top', children:[ |
109 | {tag:'input', id:this.getId(aTemplateKey+"_radio"), type:'radio', name:'recordTemplate', value:"aTemplateKey"} | 107 | {tag:'input', id:this.getId(aTemplateKey+"_radio"), type:'radio', name:'recordTemplate', value:"aTemplateKey"} |
110 | ]}, | 108 | ]}, |
111 | {tag:'td', valign:'top', children:[ | 109 | {tag:'td', valign:'top', children:[ |
112 | {tag:'h4', id:this.getId(aTemplateKey+"_title"), html:templates[aTemplateKey]['title']}, | 110 | {tag:'h4', id:this.getId(aTemplateKey+"_title"), html:templates[aTemplateKey]['title']}, |
113 | {tag:'div', cls:'templateDescription', htmlString:templates[aTemplateKey]['description']} | 111 | {tag:'div', cls:'templateDescription', htmlString:templates[aTemplateKey]['description']} |
114 | ]} | 112 | ]} |
115 | ]} | 113 | ]} |
116 | ]} | 114 | ]} |
117 | ]} | 115 | ]} |
118 | ]}); | 116 | ]}); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js index 36dd9a8..0e4640e 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent = function(anElement, args) { |
34 | //MochiKit.Logging.logDebug(">>> new DirectLoginBindingComponent"); | 32 | //MochiKit.Logging.logDebug(">>> new DirectLoginBindingComponent"); |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent.superclass.constructor.call(this, anElement, args); |
38 | 36 | ||
39 | this._directLoginBinding = args.directLoginBinding || null; | 37 | this._directLoginBinding = args.directLoginBinding || null; |
40 | this.render(); | 38 | this.render(); |
41 | 39 | ||
42 | Clipperz.NotificationCenter.register(this.record(), 'addNewRecordField',this, 'syncAndUpdateEditMode'); | 40 | Clipperz.NotificationCenter.register(this.record(), 'addNewRecordField',this, 'syncAndUpdateEditMode'); |
43 | Clipperz.NotificationCenter.register(this.record(), 'removedField', this, 'syncAndUpdateEditMode'); | 41 | Clipperz.NotificationCenter.register(this.record(), 'removedField', this, 'syncAndUpdateEditMode'); |
44 | Clipperz.NotificationCenter.register(this.record(), 'updatedFieldLabel',this, 'syncAndUpdateEditMode'); | 42 | Clipperz.NotificationCenter.register(this.record(), 'updatedFieldLabel',this, 'syncAndUpdateEditMode'); |
45 | //MochiKit.Logging.logDebug("<<< new DirectLoginBindingComponent"); | 43 | //MochiKit.Logging.logDebug("<<< new DirectLoginBindingComponent"); |
46 | 44 | ||
47 | return this; | 45 | return this; |
48 | } | 46 | } |
49 | 47 | ||
50 | //============================================================================= | 48 | //============================================================================= |
51 | 49 | ||
52 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 50 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
53 | 51 | ||
54 | 'toString': function() { | 52 | 'toString': function() { |
55 | return "Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent component"; | 53 | return "Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent component"; |
56 | }, | 54 | }, |
57 | 55 | ||
58 | //------------------------------------------------------------------------- | 56 | //------------------------------------------------------------------------- |
59 | 57 | ||
60 | 'directLoginBinding': function() { | 58 | 'directLoginBinding': function() { |
61 | return this._directLoginBinding; | 59 | return this._directLoginBinding; |
62 | }, | 60 | }, |
63 | 61 | ||
64 | //------------------------------------------------------------------------- | 62 | //------------------------------------------------------------------------- |
65 | 63 | ||
66 | 'render': function() { | 64 | 'render': function() { |
67 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', style:'font-weight:bold;', html:this.directLoginBinding().key()}) | 65 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', style:'font-weight:bold;', html:this.directLoginBinding().key()}) |
68 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.directLoginBinding().value()}) | 66 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.directLoginBinding().value()}) |
69 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.render"); | 67 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.render"); |
70 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingLabelTD', children:[ | 68 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingLabelTD', children:[ |
71 | {tag:'span', html:this.directLoginBinding().key()} | 69 | {tag:'span', html:this.directLoginBinding().key()} |
72 | ]}); | 70 | ]}); |
73 | //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 1"); | 71 | //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 1"); |
74 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingValueTD', children:[ | 72 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingValueTD', children:[ |
75 | {tag:'div', id:this.getId('editModeBox'), children:[ | 73 | {tag:'div', id:this.getId('editModeBox'), children:[ |
76 | {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()} | 74 | {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()} |
77 | ]}, | 75 | ]}, |
78 | {tag:'div', id:this.getId('viewModeBox'), children:[ | 76 | {tag:'div', id:this.getId('viewModeBox'), children:[ |
79 | {tag:'span', id:this.getId('viewValue'), html:""} | 77 | {tag:'span', id:this.getId('viewValue'), html:""} |
80 | ]} | 78 | ]} |
81 | ]}); | 79 | ]}); |
82 | //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 2"); | 80 | //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 2"); |
83 | this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 81 | this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
84 | this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 82 | this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
85 | 83 | ||
86 | this.update(); | 84 | this.update(); |
87 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.render"); | 85 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.render"); |
88 | }, | 86 | }, |
89 | 87 | ||
90 | //------------------------------------------------------------------------- | 88 | //------------------------------------------------------------------------- |
91 | 89 | ||
92 | 'recordFieldOptions': function() { | 90 | 'recordFieldOptions': function() { |
93 | varresult; | 91 | varresult; |
94 | var option; | 92 | var option; |
95 | varrecordFieldKey; | 93 | varrecordFieldKey; |
96 | varrecordFields; | 94 | varrecordFields; |
97 | 95 | ||
98 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.recordFieldOptions"); | 96 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.recordFieldOptions"); |
99 | recordFields = this.directLoginBinding().directLogin().record().currentVersion().fields(); | 97 | recordFields = this.directLoginBinding().directLogin().record().currentVersion().fields(); |
100 | result = []; | 98 | result = []; |
101 | option = {tag:'option', value:null, html:'---'}; | 99 | option = {tag:'option', value:null, html:'---'}; |
102 | result.push(option); | 100 | result.push(option); |
103 | for (recordFieldKey in recordFields) { | 101 | for (recordFieldKey in recordFields) { |
104 | //TODO: remove the value: field and replace it with element.dom.value = <some value> | 102 | //TODO: remove the value: field and replace it with element.dom.value = <some value> |
105 | option = {tag:'option', value:recordFieldKey, html:recordFields[recordFieldKey].label()} | 103 | option = {tag:'option', value:recordFieldKey, html:recordFields[recordFieldKey].label()} |
106 | if (recordFieldKey == this.directLoginBinding().fieldKey()) { | 104 | if (recordFieldKey == this.directLoginBinding().fieldKey()) { |
107 | option['selected'] = true; | 105 | option['selected'] = true; |
108 | } | 106 | } |
109 | result.push(option); | 107 | result.push(option); |
110 | } | 108 | } |
111 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.recordFieldOptions"); | 109 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.recordFieldOptions"); |
112 | 110 | ||
113 | return result; | 111 | return result; |
114 | }, | 112 | }, |
115 | 113 | ||
116 | //------------------------------------------------------------------------- | 114 | //------------------------------------------------------------------------- |
117 | 115 | ||
118 | 'syncAndUpdateEditMode': function() { | 116 | 'syncAndUpdateEditMode': function() { |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js index 69cad79..883c45c 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.DirectLoginComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.DirectLoginComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._directLogin = args.directLogin || null; | 36 | this._directLogin = args.directLogin || null; |
39 | //this._titleElement = null; | 37 | //this._titleElement = null; |
40 | this._structureElement = null; | 38 | this._structureElement = null; |
41 | this._removeButton = null; | 39 | this._removeButton = null; |
42 | this._directLoginBindingComponents = null; | 40 | this._directLoginBindingComponents = null; |
43 | this._collapser = null; | 41 | this._collapser = null; |
44 | 42 | ||
45 | this.mainComponent().addEditComponent(this); | 43 | this.mainComponent().addEditComponent(this); |
46 | this.render(); | 44 | this.render(); |
47 | 45 | ||
48 | return this; | 46 | return this; |
49 | } | 47 | } |
50 | 48 | ||
51 | //============================================================================= | 49 | //============================================================================= |
52 | 50 | ||
53 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 51 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
54 | 52 | ||
55 | 'toString': function() { | 53 | 'toString': function() { |
56 | return "Clipperz.PM.Components.RecordDetail.DirectLoginComponent component"; | 54 | return "Clipperz.PM.Components.RecordDetail.DirectLoginComponent component"; |
57 | }, | 55 | }, |
58 | 56 | ||
59 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
60 | 58 | ||
61 | 'directLogin': function() { | 59 | 'directLogin': function() { |
62 | return this._directLogin; | 60 | return this._directLogin; |
63 | }, | 61 | }, |
64 | 62 | ||
65 | 'directLoginBindingComponents': function() { | 63 | 'directLoginBindingComponents': function() { |
66 | return this._directLoginBindingComponents; | 64 | return this._directLoginBindingComponents; |
67 | }, | 65 | }, |
68 | 66 | ||
69 | //------------------------------------------------------------------------- | 67 | //------------------------------------------------------------------------- |
70 | 68 | ||
71 | 'removeDirectLogin': function() { | 69 | 'removeDirectLogin': function() { |
72 | //MochiKit.Logging.logDebug(">>> DirectLoginComponent.removeDirectLogin"); | 70 | //MochiKit.Logging.logDebug(">>> DirectLoginComponent.removeDirectLogin"); |
73 | this.mainComponent().synchronizeComponentValues(); | 71 | this.mainComponent().synchronizeComponentValues(); |
74 | this.directLogin().remove(); | 72 | this.directLogin().remove(); |
75 | this.mainComponent().removeEditComponent(this); | 73 | this.mainComponent().removeEditComponent(this); |
76 | this.mainComponent().render(); | 74 | this.mainComponent().render(); |
77 | //MochiKit.Logging.logDebug("<<< DirectLoginComponent.removeDirectLogin"); | 75 | //MochiKit.Logging.logDebug("<<< DirectLoginComponent.removeDirectLogin"); |
78 | }, | 76 | }, |
79 | 77 | ||
80 | //------------------------------------------------------------------------- | 78 | //------------------------------------------------------------------------- |
81 | /* | 79 | /* |
82 | 'formDataValue': function() { | 80 | 'formDataValue': function() { |
83 | return Clipperz.Base.serializeJSON(this.directLogin().formData()); | 81 | return Clipperz.Base.serializeJSON(this.directLogin().formData()); |
84 | }, | 82 | }, |
85 | 83 | ||
86 | 'setFormDataValue': function(aValue) { | 84 | 'setFormDataValue': function(aValue) { |
87 | 85 | ||
88 | }, | 86 | }, |
89 | */ | 87 | */ |
90 | //------------------------------------------------------------------------- | 88 | //------------------------------------------------------------------------- |
91 | 89 | ||
92 | 'removeButton': function() { | 90 | 'removeButton': function() { |
93 | return this._removeButton; | 91 | return this._removeButton; |
94 | }, | 92 | }, |
95 | 93 | ||
96 | 'setRemoveButton': function(aValue) { | 94 | 'setRemoveButton': function(aValue) { |
97 | this._removeButton = aValue; | 95 | this._removeButton = aValue; |
98 | }, | 96 | }, |
99 | 97 | ||
100 | //------------------------------------------------------------------------- | 98 | //------------------------------------------------------------------------- |
101 | /* | 99 | /* |
102 | 'titleElement': function() { | 100 | 'titleElement': function() { |
103 | return this._titleElement; | 101 | return this._titleElement; |
104 | }, | 102 | }, |
105 | 103 | ||
106 | 'setTitleElement': function(aValue) { | 104 | 'setTitleElement': function(aValue) { |
107 | this._titleElement = aValue; | 105 | this._titleElement = aValue; |
108 | }, | 106 | }, |
109 | */ | 107 | */ |
110 | //------------------------------------------------------------------------- | 108 | //------------------------------------------------------------------------- |
111 | 109 | ||
112 | 'structureElement': function() { | 110 | 'structureElement': function() { |
113 | return this._structureElement; | 111 | return this._structureElement; |
114 | }, | 112 | }, |
115 | 113 | ||
116 | 'setStructureElement': function(aValue) { | 114 | 'setStructureElement': function(aValue) { |
117 | this._structureElement = aValue; | 115 | this._structureElement = aValue; |
118 | }, | 116 | }, |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js index d210100..b478d94 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent = function(anElement, args) { |
34 | //MochiKit.Logging.logDebug(">>> new DirectLoginValueComponent"); | 32 | //MochiKit.Logging.logDebug(">>> new DirectLoginValueComponent"); |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent.superclass.constructor.call(this, anElement, args); |
38 | 36 | ||
39 | this._directLoginInputValue = args.directLoginInputValue || null; | 37 | this._directLoginInputValue = args.directLoginInputValue || null; |
40 | this._value = this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()]; | 38 | this._value = this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()]; |
41 | 39 | ||
42 | this.render(); | 40 | this.render(); |
43 | //MochiKit.Logging.logDebug("<<< new DirectLoginValueComponent - record: " + this.record()); | 41 | //MochiKit.Logging.logDebug("<<< new DirectLoginValueComponent - record: " + this.record()); |
44 | 42 | ||
45 | return this; | 43 | return this; |
46 | } | 44 | } |
47 | 45 | ||
48 | //============================================================================= | 46 | //============================================================================= |
49 | 47 | ||
50 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 48 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
51 | 49 | ||
52 | 'toString': function() { | 50 | 'toString': function() { |
53 | return "Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent component - " + this.directLoginInputValue().name(); | 51 | return "Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent component - " + this.directLoginInputValue().name(); |
54 | }, | 52 | }, |
55 | 53 | ||
56 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
57 | 55 | ||
58 | 'directLoginInputValue': function() { | 56 | 'directLoginInputValue': function() { |
59 | return this._directLoginInputValue; | 57 | return this._directLoginInputValue; |
60 | }, | 58 | }, |
61 | 59 | ||
62 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
63 | 61 | ||
64 | 'render': function() { | 62 | 'render': function() { |
65 | //MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.render"); | 63 | //MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.render"); |
66 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataLabelTD', children:[ | 64 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataLabelTD', children:[ |
67 | {tag:'span', html:this.directLoginInputValue().name()} | 65 | {tag:'span', html:this.directLoginInputValue().name()} |
68 | ]}); | 66 | ]}); |
69 | //MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 1"); | 67 | //MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 1"); |
70 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataValueTD', children:[ | 68 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataValueTD', children:[ |
71 | {tag:'span', id:this.getId('inputElement')} | 69 | {tag:'span', id:this.getId('inputElement')} |
72 | ]}); | 70 | ]}); |
73 | //MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 2"); | 71 | //MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 2"); |
74 | this.update(); | 72 | this.update(); |
75 | //MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.render"); | 73 | //MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.render"); |
76 | }, | 74 | }, |
77 | 75 | ||
78 | //------------------------------------------------------------------------- | 76 | //------------------------------------------------------------------------- |
79 | 77 | ||
80 | 'inputElementConfiguration': function() { | 78 | 'inputElementConfiguration': function() { |
81 | var result; | 79 | var result; |
82 | var currentValue; | 80 | var currentValue; |
83 | 81 | ||
84 | //MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.inputElementConfiguration - " + this.directLoginInputValue().name()); | 82 | //MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.inputElementConfiguration - " + this.directLoginInputValue().name()); |
85 | result = []; | 83 | result = []; |
86 | currentValue = this.value(); | 84 | currentValue = this.value(); |
87 | 85 | ||
88 | switch (this.directLoginInputValue().type()) { | 86 | switch (this.directLoginInputValue().type()) { |
89 | case 'checkbox': | 87 | case 'checkbox': |
90 | var checkbox; | 88 | var checkbox; |
91 | //{"type":"checkbox", "name":"rememberUsernameChk", "value":"checkbox"} | 89 | //{"type":"checkbox", "name":"rememberUsernameChk", "value":"checkbox"} |
92 | checkbox = {tag:'input', id:this.getId('checkbox'), type:'checkbox'} | 90 | checkbox = {tag:'input', id:this.getId('checkbox'), type:'checkbox'} |
93 | if (currentValue == true) { | 91 | if (currentValue == true) { |
94 | checkbox.checked = true; | 92 | checkbox.checked = true; |
95 | } | 93 | } |
96 | result.push(checkbox); | 94 | result.push(checkbox); |
97 | break; | 95 | break; |
98 | 96 | ||
99 | case 'select': | 97 | case 'select': |
100 | var input; | 98 | var input; |
101 | //{"type":"select", "name":"DOMAIN", "options":[{"selected":true, "label":"@tin.it", "value":"tin.it"}, {"selected":false, "label":"@virgilio.it", "value":"virgilio.it"}]} | 99 | //{"type":"select", "name":"DOMAIN", "options":[{"selected":true, "label":"@tin.it", "value":"tin.it"}, {"selected":false, "label":"@virgilio.it", "value":"virgilio.it"}]} |
102 | input = {tag:'select', id:this.getId('select'), name:this.directLoginInputValue().name(), children:[]}; | 100 | input = {tag:'select', id:this.getId('select'), name:this.directLoginInputValue().name(), children:[]}; |
103 | input.children.push({tag:'option', value:null, html:"---"}); | 101 | input.children.push({tag:'option', value:null, html:"---"}); |
104 | MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) { | 102 | MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) { |
105 | var option; | 103 | var option; |
106 | 104 | ||
107 | //TODO: remove the value: field and replace it with element.dom.value = <some value> | 105 | //TODO: remove the value: field and replace it with element.dom.value = <some value> |
108 | option = {tag:'option', value:anOption['value'], html:anOption['label']} | 106 | option = {tag:'option', value:anOption['value'], html:anOption['label']} |
109 | if (currentValue == anOption['value']) { | 107 | if (currentValue == anOption['value']) { |
110 | option.selected = true; | 108 | option.selected = true; |
111 | } | 109 | } |
112 | input.children.push(option); | 110 | input.children.push(option); |
113 | }) | 111 | }) |
114 | result.push(input); | 112 | result.push(input); |
115 | break; | 113 | break; |
116 | 114 | ||
117 | case 'radio': | 115 | case 'radio': |
118 | var name; | 116 | var name; |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js index 1396bd8..878adce 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.DirectLoginsComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.DirectLoginsComponent = function(anElement, args) { |
34 | //MochiKit.Logging.logDebug(">>> new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); | 32 | //MochiKit.Logging.logDebug(">>> new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 0"); | 35 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 0"); |
38 | Clipperz.PM.Components.RecordDetail.DirectLoginsComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.RecordDetail.DirectLoginsComponent.superclass.constructor.call(this, anElement, args); |
39 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 1"); | 37 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 1"); |
40 | 38 | ||
41 | this._addDirectLoginButton = null; | 39 | this._addDirectLoginButton = null; |
42 | 40 | ||
43 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 2"); | 41 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 2"); |
44 | this.mainComponent().addEditComponent(this); | 42 | this.mainComponent().addEditComponent(this); |
45 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 3"); | 43 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 3"); |
46 | this.render(); | 44 | this.render(); |
47 | //MochiKit.Logging.logDebug("<<< new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); | 45 | //MochiKit.Logging.logDebug("<<< new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); |
48 | 46 | ||
49 | return this; | 47 | return this; |
50 | } | 48 | } |
51 | 49 | ||
52 | //============================================================================= | 50 | //============================================================================= |
53 | 51 | ||
54 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginsComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 52 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginsComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
55 | 53 | ||
56 | 'toString': function() { | 54 | 'toString': function() { |
57 | return "Clipperz.PM.Components.RecordDetail.DirectLoginsComponent component"; | 55 | return "Clipperz.PM.Components.RecordDetail.DirectLoginsComponent component"; |
58 | }, | 56 | }, |
59 | 57 | ||
60 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
61 | 59 | ||
62 | 'addDirectLoginButton': function() { | 60 | 'addDirectLoginButton': function() { |
63 | return this._addDirectLoginButton; | 61 | return this._addDirectLoginButton; |
64 | }, | 62 | }, |
65 | 63 | ||
66 | 'setAddDirectLoginButton': function(aValue) { | 64 | 'setAddDirectLoginButton': function(aValue) { |
67 | this._addDirectLoginButton = aValue; | 65 | this._addDirectLoginButton = aValue; |
68 | }, | 66 | }, |
69 | 67 | ||
70 | //------------------------------------------------------------------------- | 68 | //------------------------------------------------------------------------- |
71 | 69 | ||
72 | 'render': function() { | 70 | 'render': function() { |
73 | this.element().update(""); | 71 | this.element().update(""); |
74 | 72 | ||
75 | Clipperz.YUI.DomHelper.append(this.element().dom, | 73 | Clipperz.YUI.DomHelper.append(this.element().dom, |
76 | {tag:'div', cls:'directLoginsRecordBox', children:[ | 74 | {tag:'div', cls:'directLoginsRecordBox', children:[ |
77 | {tag:'h3', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockTitle']}, | 75 | {tag:'h3', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockTitle']}, |
78 | {tag:'ul', id:this.getId('directLogins')}, | 76 | {tag:'ul', id:this.getId('directLogins')}, |
79 | 77 | ||
80 | {tag:'div', cls:'addDirectLoginBox', id:this.getId('addDirectLogin'), children:[ | 78 | {tag:'div', cls:'addDirectLoginBox', id:this.getId('addDirectLogin'), children:[ |
81 | {tag:'div', cls:'addDirectLoginBoxContent', children:[ | 79 | {tag:'div', cls:'addDirectLoginBoxContent', children:[ |
82 | {tag:'div', cls:'bookmarkletConfiguration', children:[ | 80 | {tag:'div', cls:'bookmarkletConfiguration', children:[ |
83 | // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']}, | 81 | // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']}, |
84 | {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']}, | 82 | {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']}, |
85 | {tag:'textarea', id:this.getId('addDirectLoginTextarea')} | 83 | {tag:'textarea', id:this.getId('addDirectLoginTextarea')} |
86 | ]}, | 84 | ]}, |
87 | {tag:'div', id:this.getId('addDirectLoginButton')} | 85 | {tag:'div', id:this.getId('addDirectLoginButton')} |
88 | ]} | 86 | ]} |
89 | ]} | 87 | ]} |
90 | ]} | 88 | ]} |
91 | ); | 89 | ); |
92 | 90 | ||
93 | if (MochiKit.Base.keys(this.record().directLogins()).length == 0) { | 91 | if (MochiKit.Base.keys(this.record().directLogins()).length == 0) { |
94 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 3"); | 92 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 3"); |
95 | Clipperz.YUI.DomHelper.append(this.getElement('directLogins'), | 93 | Clipperz.YUI.DomHelper.append(this.getElement('directLogins'), |
96 | {tag:'li', children:[ | 94 | {tag:'li', children:[ |
97 | // {tag:'span', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredLabel']} | 95 | // {tag:'span', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredLabel']} |
98 | {tag:'div', cls:'recordDetailNoDirectLoginDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription']} | 96 | {tag:'div', cls:'recordDetailNoDirectLoginDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription']} |
99 | ]} | 97 | ]} |
100 | ); | 98 | ); |
101 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 4"); | 99 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 4"); |
102 | } else { | 100 | } else { |
103 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 5"); | 101 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 5"); |
104 | for (directLoginReference in this.record().directLogins()) { | 102 | for (directLoginReference in this.record().directLogins()) { |
105 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 6"); | 103 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 6"); |
106 | this.addDirectLogin(this.record().directLogins()[directLoginReference]); | 104 | this.addDirectLogin(this.record().directLogins()[directLoginReference]); |
107 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 7"); | 105 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 7"); |
108 | } | 106 | } |
109 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 8"); | 107 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 8"); |
110 | } | 108 | } |
111 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 9"); | 109 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 9"); |
112 | 110 | ||
113 | this.setAddDirectLoginButton(new YAHOO.ext.Button(this.getDom('addDirectLoginButton'), { | 111 | this.setAddDirectLoginButton(new YAHOO.ext.Button(this.getDom('addDirectLoginButton'), { |
114 | text:Clipperz.PM.Strings['recordDetailAddNewDirectLoginButtonLabel'], | 112 | text:Clipperz.PM.Strings['recordDetailAddNewDirectLoginButtonLabel'], |
115 | handler:this.addNewDirectLogin, | 113 | handler:this.addNewDirectLogin, |
116 | scope:this | 114 | scope:this |
117 | })); | 115 | })); |
118 | MochiKit.Signal.connect(this.getId('addDirectLoginTextarea'), 'onkeydown', this, 'onkeydown'); | 116 | MochiKit.Signal.connect(this.getId('addDirectLoginTextarea'), 'onkeydown', this, 'onkeydown'); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js index b79c365..661f94d 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js | |||
@@ -1,114 +1,112 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.FieldButtonComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.FieldButtonComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.RecordDetail.FieldButtonComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.RecordDetail.FieldButtonComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._button = null; | 36 | this._button = null; |
39 | 37 | ||
40 | this.render(); | 38 | this.render(); |
41 | 39 | ||
42 | return this; | 40 | return this; |
43 | } | 41 | } |
44 | 42 | ||
45 | //============================================================================= | 43 | //============================================================================= |
46 | 44 | ||
47 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldButtonComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldButtonComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { |
48 | 46 | ||
49 | 'toString': function() { | 47 | 'toString': function() { |
50 | return "Clipperz.PM.Components.RecordDetail.FieldButtonComponent"; | 48 | return "Clipperz.PM.Components.RecordDetail.FieldButtonComponent"; |
51 | }, | 49 | }, |
52 | 50 | ||
53 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
54 | 52 | ||
55 | 'buttonText': function() { | 53 | 'buttonText': function() { |
56 | varresult; | 54 | varresult; |
57 | 55 | ||
58 | if (this.recordField() == null) { | 56 | if (this.recordField() == null) { |
59 | //TODO: this is never used. It is just an obsolete legacy chunk of code | 57 | //TODO: this is never used. It is just an obsolete legacy chunk of code |
60 | result = Clipperz.PM.Strings['recordDetailAddFieldButtonLabel']; | 58 | result = Clipperz.PM.Strings['recordDetailAddFieldButtonLabel']; |
61 | } else { | 59 | } else { |
62 | result = Clipperz.PM.Strings['recordDetailRemoveFieldButtonLabel']; | 60 | result = Clipperz.PM.Strings['recordDetailRemoveFieldButtonLabel']; |
63 | } | 61 | } |
64 | 62 | ||
65 | return result; | 63 | return result; |
66 | }, | 64 | }, |
67 | 65 | ||
68 | //------------------------------------------------------------------------- | 66 | //------------------------------------------------------------------------- |
69 | 67 | ||
70 | 'button': function() { | 68 | 'button': function() { |
71 | return this._button; | 69 | return this._button; |
72 | }, | 70 | }, |
73 | 71 | ||
74 | 'setButton': function(aValue) { | 72 | 'setButton': function(aValue) { |
75 | this._button = aValue; | 73 | this._button = aValue; |
76 | }, | 74 | }, |
77 | 75 | ||
78 | //------------------------------------------------------------------------- | 76 | //------------------------------------------------------------------------- |
79 | 77 | ||
80 | 'render': function() { | 78 | 'render': function() { |
81 | this.element().update(""); | 79 | this.element().update(""); |
82 | 80 | ||
83 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('button')}) | 81 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('button')}) |
84 | this.setButton(new YAHOO.ext.Button(this.getDom('button'), {text:this.buttonText(), handler:this.handleButtonClick, scope:this})); | 82 | this.setButton(new YAHOO.ext.Button(this.getDom('button'), {text:this.buttonText(), handler:this.handleButtonClick, scope:this})); |
85 | 83 | ||
86 | this.update(); | 84 | this.update(); |
87 | }, | 85 | }, |
88 | 86 | ||
89 | //------------------------------------------------------------------------- | 87 | //------------------------------------------------------------------------- |
90 | 88 | ||
91 | 'handleButtonClick': function() { | 89 | 'handleButtonClick': function() { |
92 | if (this.recordField() == null) { | 90 | if (this.recordField() == null) { |
93 | this.mainComponent().addNewField(); | 91 | this.mainComponent().addNewField(); |
94 | } else { | 92 | } else { |
95 | this.mainComponent().removeField(this.fieldComponent()); | 93 | this.mainComponent().removeField(this.fieldComponent()); |
96 | } | 94 | } |
97 | }, | 95 | }, |
98 | 96 | ||
99 | //------------------------------------------------------------------------- | 97 | //------------------------------------------------------------------------- |
100 | 98 | ||
101 | 'updateEditMode': function() { | 99 | 'updateEditMode': function() { |
102 | this.button().show(); | 100 | this.button().show(); |
103 | }, | 101 | }, |
104 | 102 | ||
105 | //------------------------------------------------------------------------- | 103 | //------------------------------------------------------------------------- |
106 | 104 | ||
107 | 'updateViewMode': function() { | 105 | 'updateViewMode': function() { |
108 | this.button().hide(); | 106 | this.button().hide(); |
109 | }, | 107 | }, |
110 | 108 | ||
111 | //------------------------------------------------------------------------- | 109 | //------------------------------------------------------------------------- |
112 | __syntaxFix__: "syntax fix" | 110 | __syntaxFix__: "syntax fix" |
113 | }); | 111 | }); |
114 | 112 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js index 978a54e..bfa4658 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.FieldComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.FieldComponent = function(anElement, args) { |
34 | //MochiKit.Logging.logDebug(">>> new FieldComponent"); | 32 | //MochiKit.Logging.logDebug(">>> new FieldComponent"); |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | Clipperz.PM.Components.RecordDetail.FieldComponent.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.RecordDetail.FieldComponent.superclass.constructor.call(this, anElement, args); |
38 | 36 | ||
39 | this._element = anElement; | 37 | this._element = anElement; |
40 | this._recordField = args.recordField || null; | 38 | this._recordField = args.recordField || null; |
41 | 39 | ||
42 | this._buttonComponent = null; | 40 | this._buttonComponent = null; |
43 | this._labelComponent = null; | 41 | this._labelComponent = null; |
44 | this._dragHandler = null; | 42 | this._dragHandler = null; |
45 | this._valueComponent = null; | 43 | this._valueComponent = null; |
46 | this._typeComponent = null; | 44 | this._typeComponent = null; |
47 | 45 | ||
48 | this.mainComponent().addEditComponent(this); | 46 | this.mainComponent().addEditComponent(this); |
49 | 47 | ||
50 | this.render(); | 48 | this.render(); |
51 | 49 | ||
52 | return this; | 50 | return this; |
53 | } | 51 | } |
54 | 52 | ||
55 | //============================================================================= | 53 | //============================================================================= |
56 | 54 | ||
57 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 55 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
58 | 56 | ||
59 | 'toString': function() { | 57 | 'toString': function() { |
60 | return "Clipperz.PM.Components.RecordDetail.FieldComponent component"; | 58 | return "Clipperz.PM.Components.RecordDetail.FieldComponent component"; |
61 | }, | 59 | }, |
62 | 60 | ||
63 | //------------------------------------------------------------------------- | 61 | //------------------------------------------------------------------------- |
64 | 62 | ||
65 | 'recordField': function() { | 63 | 'recordField': function() { |
66 | return this._recordField; | 64 | return this._recordField; |
67 | }, | 65 | }, |
68 | 66 | ||
69 | //------------------------------------------------------------------------- | 67 | //------------------------------------------------------------------------- |
70 | 68 | ||
71 | 'buttonComponent': function() { | 69 | 'buttonComponent': function() { |
72 | return this._buttonComponent; | 70 | return this._buttonComponent; |
73 | }, | 71 | }, |
74 | 72 | ||
75 | 'setButtonComponent': function(aValue) { | 73 | 'setButtonComponent': function(aValue) { |
76 | this._buttonComponent = aValue; | 74 | this._buttonComponent = aValue; |
77 | }, | 75 | }, |
78 | 76 | ||
79 | //------------------------------------------------------------------------- | 77 | //------------------------------------------------------------------------- |
80 | 78 | ||
81 | 'labelComponent': function() { | 79 | 'labelComponent': function() { |
82 | return this._labelComponent; | 80 | return this._labelComponent; |
83 | }, | 81 | }, |
84 | 82 | ||
85 | 'setLabelComponent': function(aValue) { | 83 | 'setLabelComponent': function(aValue) { |
86 | this._labelComponent = aValue; | 84 | this._labelComponent = aValue; |
87 | }, | 85 | }, |
88 | 86 | ||
89 | //------------------------------------------------------------------------- | 87 | //------------------------------------------------------------------------- |
90 | 88 | ||
91 | 'dragHandler': function() { | 89 | 'dragHandler': function() { |
92 | return this._dragHandler; | 90 | return this._dragHandler; |
93 | }, | 91 | }, |
94 | 92 | ||
95 | 'setDragHandler': function(aValue) { | 93 | 'setDragHandler': function(aValue) { |
96 | this._dragHandler = aValue; | 94 | this._dragHandler = aValue; |
97 | }, | 95 | }, |
98 | 96 | ||
99 | //------------------------------------------------------------------------- | 97 | //------------------------------------------------------------------------- |
100 | 98 | ||
101 | 'valueComponent': function() { | 99 | 'valueComponent': function() { |
102 | return this._valueComponent; | 100 | return this._valueComponent; |
103 | }, | 101 | }, |
104 | 102 | ||
105 | 'setValueComponent': function(aValue) { | 103 | 'setValueComponent': function(aValue) { |
106 | this._valueComponent = aValue; | 104 | this._valueComponent = aValue; |
107 | }, | 105 | }, |
108 | 106 | ||
109 | //------------------------------------------------------------------------- | 107 | //------------------------------------------------------------------------- |
110 | 108 | ||
111 | 'typeComponent': function() { | 109 | 'typeComponent': function() { |
112 | return this._typeComponent; | 110 | return this._typeComponent; |
113 | }, | 111 | }, |
114 | 112 | ||
115 | 'setTypeComponent': function(aValue) { | 113 | 'setTypeComponent': function(aValue) { |
116 | this._typeComponent = aValue; | 114 | this._typeComponent = aValue; |
117 | }, | 115 | }, |
118 | 116 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js index f7c5e21..7fea132 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js | |||
@@ -1,56 +1,54 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.FieldDragHandler = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.FieldDragHandler = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.RecordDetail.FieldDragHandler.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.RecordDetail.FieldDragHandler.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._element = anElement; | 36 | this._element = anElement; |
39 | 37 | ||
40 | this.render(); | 38 | this.render(); |
41 | 39 | ||
42 | return this; | 40 | return this; |
43 | } | 41 | } |
44 | 42 | ||
45 | //============================================================================= | 43 | //============================================================================= |
46 | 44 | ||
47 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldDragHandler, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldDragHandler, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { |
48 | 46 | ||
49 | 'toString': function() { | 47 | 'toString': function() { |
50 | return "Clipperz.PM.Components.RecordDetail.FieldDragHandler component"; | 48 | return "Clipperz.PM.Components.RecordDetail.FieldDragHandler component"; |
51 | }, | 49 | }, |
52 | 50 | ||
53 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
54 | __syntaxFix__: "syntax fix" | 52 | __syntaxFix__: "syntax fix" |
55 | }); | 53 | }); |
56 | 54 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js index c58a7e2..c6f8cbf 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.FieldLabelComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.FieldLabelComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.RecordDetail.FieldLabelComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.RecordDetail.FieldLabelComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._inputElement = null; | 36 | this._inputElement = null; |
39 | 37 | ||
40 | this.render(); | 38 | this.render(); |
41 | 39 | ||
42 | return this; | 40 | return this; |
43 | } | 41 | } |
44 | 42 | ||
45 | //============================================================================= | 43 | //============================================================================= |
46 | 44 | ||
47 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldLabelComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldLabelComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { |
48 | 46 | ||
49 | 'toString': function() { | 47 | 'toString': function() { |
50 | return "Clipperz.PM.Components.RecordDetail.FieldLabelComponent component"; | 48 | return "Clipperz.PM.Components.RecordDetail.FieldLabelComponent component"; |
51 | }, | 49 | }, |
52 | 50 | ||
53 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
54 | 52 | ||
55 | 'value': function() { | 53 | 'value': function() { |
56 | return this.recordField().label(); | 54 | return this.recordField().label(); |
57 | }, | 55 | }, |
58 | 56 | ||
59 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
60 | 58 | ||
61 | 'inputElement': function() { | 59 | 'inputElement': function() { |
62 | return this._inputElement; | 60 | return this._inputElement; |
63 | }, | 61 | }, |
64 | 62 | ||
65 | 'setInputElement': function(aValue) { | 63 | 'setInputElement': function(aValue) { |
66 | this._inputElement = aValue; | 64 | this._inputElement = aValue; |
67 | }, | 65 | }, |
68 | 66 | ||
69 | //------------------------------------------------------------------------- | 67 | //------------------------------------------------------------------------- |
70 | 68 | ||
71 | 'render': function() { | 69 | 'render': function() { |
72 | varnewTextFormField; | 70 | varnewTextFormField; |
73 | this.element().update(""); | 71 | this.element().update(""); |
74 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'Clipperz_recordFieldLabel', id:this.getId('label')}); | 72 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'Clipperz_recordFieldLabel', id:this.getId('label')}); |
75 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'font-size:8pt;', html:this.recordField().key()}); | 73 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'font-size:8pt;', html:this.recordField().key()}); |
76 | 74 | ||
77 | // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()})); | 75 | // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()})); |
78 | newTextFormField = new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()}); | 76 | newTextFormField = new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()}); |
79 | // newTextFormField.inputElement().setStyle({border:'3px solid cyan;'}); | 77 | // newTextFormField.inputElement().setStyle({border:'3px solid cyan;'}); |
80 | newTextFormField.on('change', this.notifyChanges, this, true) | 78 | newTextFormField.on('change', this.notifyChanges, this, true) |
81 | // this.inputElement().on('change', function() {alert("CHANGE");}); | 79 | // this.inputElement().on('change', function() {alert("CHANGE");}); |
82 | // this.inputElement().getElement('editComponent_input').on('change', function() {alert("CHANGE");}) | 80 | // this.inputElement().getElement('editComponent_input').on('change', function() {alert("CHANGE");}) |
83 | // this.inputElement().on('blur', this.notifyChanges, this, true); | 81 | // this.inputElement().on('blur', this.notifyChanges, this, true); |
84 | 82 | ||
85 | this.setInputElement(newTextFormField); | 83 | this.setInputElement(newTextFormField); |
86 | this.update(); | 84 | this.update(); |
87 | }, | 85 | }, |
88 | 86 | ||
89 | 'notifyChanges': function() { | 87 | 'notifyChanges': function() { |
90 | //MochiKit.Logging.logDebug(">>> FieldLabelComponent.notifyChanges - " + this); | 88 | //MochiKit.Logging.logDebug(">>> FieldLabelComponent.notifyChanges - " + this); |
91 | this.synchronizeComponentValues(); | 89 | this.synchronizeComponentValues(); |
92 | Clipperz.NotificationCenter.notify(this.recordField().recordVersion().record(), 'updatedFieldLabel'); | 90 | Clipperz.NotificationCenter.notify(this.recordField().recordVersion().record(), 'updatedFieldLabel'); |
93 | //MochiKit.Logging.logDebug("<<< FieldLabelComponent.notifyChanges"); | 91 | //MochiKit.Logging.logDebug("<<< FieldLabelComponent.notifyChanges"); |
94 | }, | 92 | }, |
95 | 93 | ||
96 | //------------------------------------------------------------------------- | 94 | //------------------------------------------------------------------------- |
97 | 95 | ||
98 | 'update': function() { | 96 | 'update': function() { |
99 | //MochiKit.Logging.logDebug(">>> FieldLabelComponent.update"); | 97 | //MochiKit.Logging.logDebug(">>> FieldLabelComponent.update"); |
100 | this.inputElement().update({editMode:this.editMode(), value:this.value()}); | 98 | this.inputElement().update({editMode:this.editMode(), value:this.value()}); |
101 | //MochiKit.Logging.logDebug("<<< FieldLabelComponent.update"); | 99 | //MochiKit.Logging.logDebug("<<< FieldLabelComponent.update"); |
102 | }, | 100 | }, |
103 | 101 | ||
104 | //------------------------------------------------------------------------- | 102 | //------------------------------------------------------------------------- |
105 | /* | 103 | /* |
106 | 'updateViewMode': function() { | 104 | 'updateViewMode': function() { |
107 | varwidth; | 105 | varwidth; |
108 | varelement; | 106 | varelement; |
109 | 107 | ||
110 | this.element().update(""); | 108 | this.element().update(""); |
111 | width = this.element().getWidth(); | 109 | width = this.element().getWidth(); |
112 | element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.value()}, true); | 110 | element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.value()}, true); |
113 | element.setWidth(width-1); | 111 | element.setWidth(width-1); |
114 | }, | 112 | }, |
115 | 113 | ||
116 | //------------------------------------------------------------------------- | 114 | //------------------------------------------------------------------------- |
117 | 115 | ||
118 | 'updateEditMode': function() { | 116 | 'updateEditMode': function() { |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js index 489258a..3108885 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.FieldTypeComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.FieldTypeComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.RecordDetail.FieldTypeComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.RecordDetail.FieldTypeComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._inputElement = null; | 36 | this._inputElement = null; |
39 | 37 | ||
40 | this.render(); | 38 | this.render(); |
41 | 39 | ||
42 | return this; | 40 | return this; |
43 | } | 41 | } |
44 | 42 | ||
45 | //============================================================================= | 43 | //============================================================================= |
46 | 44 | ||
47 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldTypeComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldTypeComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { |
48 | 46 | ||
49 | 'toString': function() { | 47 | 'toString': function() { |
50 | return "Clipperz.PM.Components.RecordDetail.FieldTypeComponent component"; | 48 | return "Clipperz.PM.Components.RecordDetail.FieldTypeComponent component"; |
51 | }, | 49 | }, |
52 | 50 | ||
53 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
54 | 52 | ||
55 | 'inputElement': function() { | 53 | 'inputElement': function() { |
56 | return this._inputElement; | 54 | return this._inputElement; |
57 | }, | 55 | }, |
58 | 56 | ||
59 | 'setInputElement': function(aValue) { | 57 | 'setInputElement': function(aValue) { |
60 | this._inputElement = aValue; | 58 | this._inputElement = aValue; |
61 | }, | 59 | }, |
62 | 60 | ||
63 | //------------------------------------------------------------------------- | 61 | //------------------------------------------------------------------------- |
64 | 62 | ||
65 | 'value': function() { | 63 | 'value': function() { |
66 | return this.recordField().type(); | 64 | return this.recordField().type(); |
67 | }, | 65 | }, |
68 | 66 | ||
69 | 'canChangeType': function() { | 67 | 'canChangeType': function() { |
70 | var value; | 68 | var value; |
71 | var result; | 69 | var result; |
72 | 70 | ||
73 | value = this.value(); | 71 | value = this.value(); |
74 | result = ((value == 'TXT') || (value == 'PWD') || (value == 'URL') || (value == 'DATE') || (value == 'ADDR')); | 72 | result = ((value == 'TXT') || (value == 'PWD') || (value == 'URL') || (value == 'DATE') || (value == 'ADDR')); |
75 | 73 | ||
76 | return result | 74 | return result |
77 | }, | 75 | }, |
78 | 76 | ||
79 | //------------------------------------------------------------------------- | 77 | //------------------------------------------------------------------------- |
80 | 78 | ||
81 | 'updateViewMode': function() { | 79 | 'updateViewMode': function() { |
82 | this.element().update(""); | 80 | this.element().update(""); |
83 | if (this.canChangeType()) { | 81 | if (this.canChangeType()) { |
84 | varwidth; | 82 | varwidth; |
85 | var element; | 83 | var element; |
86 | 84 | ||
87 | width = this.element().getWidth(true); | 85 | width = this.element().getWidth(true); |
88 | element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.recordField().typeShortDescription()}, true); | 86 | element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.recordField().typeShortDescription()}, true); |
89 | element.setWidth(width-1); | 87 | element.setWidth(width-1); |
90 | } | 88 | } |
91 | }, | 89 | }, |
92 | 90 | ||
93 | //------------------------------------------------------------------------- | 91 | //------------------------------------------------------------------------- |
94 | 92 | ||
95 | 'updateEditMode': function() { | 93 | 'updateEditMode': function() { |
96 | this.element().update(""); | 94 | this.element().update(""); |
97 | 95 | ||
98 | if (this.canChangeType()) { | 96 | if (this.canChangeType()) { |
99 | varwidth; | 97 | varwidth; |
100 | 98 | ||
101 | width = this.element().getWidth(true); | 99 | width = this.element().getWidth(true); |
102 | this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'select', children:[ | 100 | this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'select', children:[ |
103 | {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, | 101 | {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, |
104 | {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, | 102 | {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, |
105 | {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, | 103 | {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, |
106 | {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, | 104 | {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, |
107 | {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} | 105 | {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} |
108 | 106 | ||
109 | // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['CHECK']['shortDescription']}, | 107 | // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['CHECK']['shortDescription']}, |
110 | // {tag:'option', value:'RADIO', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['RADIO']['shortDescription']}, | 108 | // {tag:'option', value:'RADIO', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['RADIO']['shortDescription']}, |
111 | // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['SELECT']['shortDescription']} | 109 | // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['SELECT']['shortDescription']} |
112 | // {tag:'option', value:'NOTE', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['NOTE']['shortDescription']} | 110 | // {tag:'option', value:'NOTE', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['NOTE']['shortDescription']} |
113 | ]}, true)); | 111 | ]}, true)); |
114 | this.inputElement().setWidth(width-1); | 112 | this.inputElement().setWidth(width-1); |
115 | this.inputElement().addHandler('change', true, this.onChange, this, true); | 113 | this.inputElement().addHandler('change', true, this.onChange, this, true); |
116 | // this.selectCorrectOption(); | 114 | // this.selectCorrectOption(); |
117 | Clipperz.DOM.selectOptionMatchingValue(this.inputElement().dom, this.value()); | 115 | Clipperz.DOM.selectOptionMatchingValue(this.inputElement().dom, this.value()); |
118 | } | 116 | } |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js index 8621397..f2c70aa 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.FieldValueComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.FieldValueComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.RecordDetail.FieldValueComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.RecordDetail.FieldValueComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._inputElement = null; | 36 | this._inputElement = null; |
39 | this._scrambledStatus = 'SCRAMBLED'; //'UNSCRAMBLED' | 37 | this._scrambledStatus = 'SCRAMBLED'; //'UNSCRAMBLED' |
40 | 38 | ||
41 | this.render(); | 39 | this.render(); |
42 | 40 | ||
43 | return this; | 41 | return this; |
44 | } | 42 | } |
45 | 43 | ||
46 | //============================================================================= | 44 | //============================================================================= |
47 | 45 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { | 46 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { |
49 | 47 | ||
50 | 'toString': function() { | 48 | 'toString': function() { |
51 | return "Clipperz.PM.Components.RecordDetail.FieldValueComponent component"; | 49 | return "Clipperz.PM.Components.RecordDetail.FieldValueComponent component"; |
52 | }, | 50 | }, |
53 | 51 | ||
54 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
55 | 53 | ||
56 | 'value': function() { | 54 | 'value': function() { |
57 | return this.recordField().value(); | 55 | return this.recordField().value(); |
58 | }, | 56 | }, |
59 | 57 | ||
60 | 'setValue': function(aValue) { | 58 | 'setValue': function(aValue) { |
61 | this.recordField().setValue(aValue); | 59 | this.recordField().setValue(aValue); |
62 | }, | 60 | }, |
63 | 61 | ||
64 | //------------------------------------------------------------------------- | 62 | //------------------------------------------------------------------------- |
65 | 63 | ||
66 | 'inputElement': function() { | 64 | 'inputElement': function() { |
67 | return this._inputElement; | 65 | return this._inputElement; |
68 | }, | 66 | }, |
69 | 67 | ||
70 | 'setInputElement': function(aValue) { | 68 | 'setInputElement': function(aValue) { |
71 | this._inputElement = aValue; | 69 | this._inputElement = aValue; |
72 | }, | 70 | }, |
73 | 71 | ||
74 | //------------------------------------------------------------------------- | 72 | //------------------------------------------------------------------------- |
75 | 73 | ||
76 | 'scrambledStatus': function() { | 74 | 'scrambledStatus': function() { |
77 | return this._scrambledStatus; | 75 | return this._scrambledStatus; |
78 | }, | 76 | }, |
79 | 77 | ||
80 | 'setScrambledStatus': function(aValue) { | 78 | 'setScrambledStatus': function(aValue) { |
81 | this._scrambledStatus = aValue; | 79 | this._scrambledStatus = aValue; |
82 | }, | 80 | }, |
83 | 81 | ||
84 | //------------------------------------------------------------------------- | 82 | //------------------------------------------------------------------------- |
85 | 83 | ||
86 | 'handleTypeChange': function() { | 84 | 'handleTypeChange': function() { |
87 | //MochiKit.Logging.logDebug(">>> handling type change - " + this.recordField().type()); | 85 | //MochiKit.Logging.logDebug(">>> handling type change - " + this.recordField().type()); |
88 | this.synchronizeComponentValues(); | 86 | this.synchronizeComponentValues(); |
89 | this.update(); | 87 | this.update(); |
90 | }, | 88 | }, |
91 | 89 | ||
92 | //------------------------------------------------------------------------- | 90 | //------------------------------------------------------------------------- |
93 | 91 | ||
94 | 'addrUrl': function() { | 92 | 'addrUrl': function() { |
95 | var result; | 93 | var result; |
96 | 94 | ||
97 | result = "http://maps.google.com/maps?q=" + this.value().split(' ').join('+'); | 95 | result = "http://maps.google.com/maps?q=" + this.value().split(' ').join('+'); |
98 | 96 | ||
99 | return result; | 97 | return result; |
100 | }, | 98 | }, |
101 | 99 | ||
102 | //------------------------------------------------------------------------- | 100 | //------------------------------------------------------------------------- |
103 | 101 | ||
104 | 'updateViewMode': function() { | 102 | 'updateViewMode': function() { |
105 | var scarmbledStatus; | 103 | var scarmbledStatus; |
106 | 104 | ||
107 | scrambledStatus = this.scrambledStatus() || 'SCRAMBLED'; | 105 | scrambledStatus = this.scrambledStatus() || 'SCRAMBLED'; |
108 | 106 | ||
109 | this.element().update(""); | 107 | this.element().update(""); |
110 | if (this.recordField().hidden() == false) { | 108 | if (this.recordField().hidden() == false) { |
111 | switch(this.recordField().type()) { | 109 | switch(this.recordField().type()) { |
112 | case 'TXT': | 110 | case 'TXT': |
113 | case 'PWD': | 111 | case 'PWD': |
114 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()}); | 112 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()}); |
115 | break; | 113 | break; |
116 | case 'URL': | 114 | case 'URL': |
117 | varurlLocation; | 115 | varurlLocation; |
118 | 116 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js index 46f456b..4f12c88 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.HeaderComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.HeaderComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.RecordDetail.HeaderComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.RecordDetail.HeaderComponent.superclass.constructor.call(this, anElement, args); |
37 | this.mainComponent().addEditComponent(this); | 35 | this.mainComponent().addEditComponent(this); |
38 | 36 | ||
39 | this._saveButton = null; | 37 | this._saveButton = null; |
40 | 38 | ||
41 | this.render(); | 39 | this.render(); |
42 | 40 | ||
43 | return this; | 41 | return this; |
44 | } | 42 | } |
45 | 43 | ||
46 | //============================================================================= | 44 | //============================================================================= |
47 | 45 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.HeaderComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 46 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.HeaderComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
49 | 47 | ||
50 | 'toString': function() { | 48 | 'toString': function() { |
51 | return "Clipperz.PM.Components.RecordDetail.HeaderComponent component"; | 49 | return "Clipperz.PM.Components.RecordDetail.HeaderComponent component"; |
52 | }, | 50 | }, |
53 | 51 | ||
54 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
55 | 53 | ||
56 | 'render': function() { | 54 | 'render': function() { |
57 | var editButton; | 55 | var editButton; |
58 | 56 | ||
59 | //MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.appendTo"); | 57 | //MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.appendTo"); |
60 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'recordDetailButtonsBox', children:[ | 58 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'recordDetailButtonsBox', children:[ |
61 | {tag:'div', id:this.getId('editButtonBox'), children:[ | 59 | {tag:'div', id:this.getId('editButtonBox'), children:[ |
62 | {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ | 60 | {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ |
63 | {tag:'tbody', children:[ | 61 | {tag:'tbody', children:[ |
64 | {tag:'tr', children:[ | 62 | {tag:'tr', children:[ |
65 | {tag:'td', align:'center', children:[ | 63 | {tag:'td', align:'center', children:[ |
66 | {tag:'div', id:this.getId('editButton')} | 64 | {tag:'div', id:this.getId('editButton')} |
67 | ]} | 65 | ]} |
68 | ]} | 66 | ]} |
69 | ]} | 67 | ]} |
70 | ]} | 68 | ]} |
71 | ]}, | 69 | ]}, |
72 | {tag:'div', id:this.getId('saveCancelButtonBox'), children:[ | 70 | {tag:'div', id:this.getId('saveCancelButtonBox'), children:[ |
73 | {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ | 71 | {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ |
74 | {tag:'tbody', children:[ | 72 | {tag:'tbody', children:[ |
75 | {tag:'tr', children:[ | 73 | {tag:'tr', children:[ |
76 | {tag:'td', width:'49%', align:'right', children:[ | 74 | {tag:'td', width:'49%', align:'right', children:[ |
77 | {tag:'div', id:this.getId('saveButton')} | 75 | {tag:'div', id:this.getId('saveButton')} |
78 | ]}, | 76 | ]}, |
79 | {tag:'td', html:' '}, | 77 | {tag:'td', html:' '}, |
80 | {tag:'td', width:'49%', align:'left', children:[ | 78 | {tag:'td', width:'49%', align:'left', children:[ |
81 | {tag:'div', id:this.getId('cancelButton')} | 79 | {tag:'div', id:this.getId('cancelButton')} |
82 | ]} | 80 | ]} |
83 | ]} | 81 | ]} |
84 | ]} | 82 | ]} |
85 | ]} | 83 | ]} |
86 | ]} | 84 | ]} |
87 | ]}); | 85 | ]}); |
88 | 86 | ||
89 | this.getElement('editButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 87 | this.getElement('editButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
90 | this.getElement('saveCancelButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 88 | this.getElement('saveCancelButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
91 | 89 | ||
92 | editButton = new YAHOO.ext.Button(this.getDom('editButton'), {text:Clipperz.PM.Strings['recordDetailEditButtonLabel'], handler:this.editButtonHandler, scope:this}); | 90 | editButton = new YAHOO.ext.Button(this.getDom('editButton'), {text:Clipperz.PM.Strings['recordDetailEditButtonLabel'], handler:this.editButtonHandler, scope:this}); |
93 | this.setSaveButton(new YAHOO.ext.Button(this.getDom('saveButton'), {text:Clipperz.PM.Strings['recordDetailSaveButtonLabel'], handler:this.saveButtonHandler, scope:this})); | 91 | this.setSaveButton(new YAHOO.ext.Button(this.getDom('saveButton'), {text:Clipperz.PM.Strings['recordDetailSaveButtonLabel'], handler:this.saveButtonHandler, scope:this})); |
94 | new YAHOO.ext.Button(this.getDom('cancelButton'), {text:Clipperz.PM.Strings['recordDetailCancelButtonLabel'], handler:this.cancelButtonHandler, scope:this}); | 92 | new YAHOO.ext.Button(this.getDom('cancelButton'), {text:Clipperz.PM.Strings['recordDetailCancelButtonLabel'], handler:this.cancelButtonHandler, scope:this}); |
95 | 93 | ||
96 | if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { | 94 | if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { |
97 | editButton.disable(); | 95 | editButton.disable(); |
98 | } | 96 | } |
99 | 97 | ||
100 | this.update(); | 98 | this.update(); |
101 | //MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.appendTo"); | 99 | //MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.appendTo"); |
102 | }, | 100 | }, |
103 | 101 | ||
104 | //------------------------------------------------------------------------- | 102 | //------------------------------------------------------------------------- |
105 | 103 | ||
106 | 'updateViewMode': function() { | 104 | 'updateViewMode': function() { |
107 | //MochiKit.Logging.logDebug(">>> HeaderComponent.updateViewMode"); | 105 | //MochiKit.Logging.logDebug(">>> HeaderComponent.updateViewMode"); |
108 | this.getElement('editButtonBox').show(); | 106 | this.getElement('editButtonBox').show(); |
109 | this.getElement('saveCancelButtonBox').hide(); | 107 | this.getElement('saveCancelButtonBox').hide(); |
110 | //MochiKit.Logging.logDebug("<<< HeaderComponent.updateViewMode"); | 108 | //MochiKit.Logging.logDebug("<<< HeaderComponent.updateViewMode"); |
111 | }, | 109 | }, |
112 | 110 | ||
113 | //------------------------------------------------------------------------- | 111 | //------------------------------------------------------------------------- |
114 | 112 | ||
115 | 'updateEditMode': function() { | 113 | 'updateEditMode': function() { |
116 | this.getElement('editButtonBox').hide(); | 114 | this.getElement('editButtonBox').hide(); |
117 | this.getElement('saveCancelButtonBox').show(); | 115 | this.getElement('saveCancelButtonBox').show(); |
118 | if (this.mainComponent().enableSaveButton() == true) { | 116 | if (this.mainComponent().enableSaveButton() == true) { |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js index d6a03d7..47ed3e6 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.MainComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.MainComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.RecordDetail.MainComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.RecordDetail.MainComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | //this._element = args.element; | 36 | //this._element = args.element; |
39 | this._user = args.user; | 37 | this._user = args.user; |
40 | this._editMode = args.editMode || 'VIEW'; //[ 'VIEW' | 'EDIT' ] | 38 | this._editMode = args.editMode || 'VIEW'; //[ 'VIEW' | 'EDIT' ] |
41 | this._mainPanel = args.mainPanel; | 39 | this._mainPanel = args.mainPanel; |
42 | 40 | ||
43 | this._record = null; | 41 | this._record = null; |
44 | this._editComponents = []; | 42 | this._editComponents = []; |
45 | this._addFieldButton = null; | 43 | this._addFieldButton = null; |
46 | 44 | ||
47 | this._enableSaveButton = true; | 45 | this._enableSaveButton = true; |
48 | this._shouldShowLoginInfo = (Clipperz.PM.Proxy.defaultProxy.isReadOnly() ? false : true); | 46 | this._shouldShowLoginInfo = (Clipperz.PM.Proxy.defaultProxy.isReadOnly() ? false : true); |
49 | 47 | ||
50 | //this._mainLayoutManager = null; | 48 | //this._mainLayoutManager = null; |
51 | //this._layoutRegion = null; | 49 | //this._layoutRegion = null; |
52 | 50 | ||
53 | Clipperz.NotificationCenter.register(null, 'loadingRecordData', this, 'render'); | 51 | Clipperz.NotificationCenter.register(null, 'loadingRecordData', this, 'render'); |
54 | Clipperz.NotificationCenter.register(null, 'decryptingRecordData', this, 'render'); | 52 | Clipperz.NotificationCenter.register(null, 'decryptingRecordData', this, 'render'); |
55 | Clipperz.NotificationCenter.register(null, 'loadingRecordVersionData', this, 'render'); | 53 | Clipperz.NotificationCenter.register(null, 'loadingRecordVersionData', this, 'render'); |
56 | Clipperz.NotificationCenter.register(null, 'decryptingRecordVersionData', this, 'render'); | 54 | Clipperz.NotificationCenter.register(null, 'decryptingRecordVersionData', this, 'render'); |
57 | Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); | 55 | Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); |
58 | Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'render'); | 56 | Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'render'); |
59 | 57 | ||
60 | this.render(); | 58 | this.render(); |
61 | 59 | ||
62 | return this; | 60 | return this; |
63 | } | 61 | } |
64 | 62 | ||
65 | //============================================================================= | 63 | //============================================================================= |
66 | 64 | ||
67 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.MainComponent, Clipperz.PM.Components.BaseComponent, { | 65 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.MainComponent, Clipperz.PM.Components.BaseComponent, { |
68 | 66 | ||
69 | 'toString': function() { | 67 | 'toString': function() { |
70 | return "Clipperz.PM.Components.RecordDetail.MainComponent component"; | 68 | return "Clipperz.PM.Components.RecordDetail.MainComponent component"; |
71 | }, | 69 | }, |
72 | 70 | ||
73 | //------------------------------------------------------------------------- | 71 | //------------------------------------------------------------------------- |
74 | 72 | ||
75 | 'editMode': function() { | 73 | 'editMode': function() { |
76 | return this._editMode; | 74 | return this._editMode; |
77 | }, | 75 | }, |
78 | 76 | ||
79 | 'setEditMode': function(aValue, aButtonElement, shouldSkipComponentSynchronization) { | 77 | 'setEditMode': function(aValue, aButtonElement, shouldSkipComponentSynchronization) { |
80 | //MochiKit.Logging.logDebug(">>> MainComponent.setEditingMode"); | 78 | //MochiKit.Logging.logDebug(">>> MainComponent.setEditingMode"); |
81 | this.scrollToTop(); | 79 | this.scrollToTop(); |
82 | 80 | ||
83 | if (aValue == 'VIEW') { | 81 | if (aValue == 'VIEW') { |
84 | if (shouldSkipComponentSynchronization == true) { | 82 | if (shouldSkipComponentSynchronization == true) { |
85 | this.exitModalView(); | 83 | this.exitModalView(); |
86 | } else { | 84 | } else { |
87 | this.synchronizeComponentValues(); | 85 | this.synchronizeComponentValues(); |
88 | if (this.record().hasPendingChanges()) { | 86 | if (this.record().hasPendingChanges()) { |
89 | if (this.record().isBrandNew()) { | 87 | if (this.record().isBrandNew()) { |
90 | this.record().removeEmptyFields(); | 88 | this.record().removeEmptyFields(); |
91 | } | 89 | } |
92 | this.saveCurrentRecordChanges(aButtonElement); | 90 | this.saveCurrentRecordChanges(aButtonElement); |
93 | } else { | 91 | } else { |
94 | if (this.record().isBrandNew()) { | 92 | if (this.record().isBrandNew()) { |
95 | this.record().user().removeRecord(this.record()); | 93 | this.record().user().removeRecord(this.record()); |
96 | } | 94 | } |
97 | this.exitModalView(); | 95 | this.exitModalView(); |
98 | } | 96 | } |
99 | } | 97 | } |
100 | } else if (aValue == 'EDIT') { | 98 | } else if (aValue == 'EDIT') { |
101 | this.enterModalView(); | 99 | this.enterModalView(); |
102 | } else { | 100 | } else { |
103 | //???? | 101 | //???? |
104 | } | 102 | } |
105 | 103 | ||
106 | this._editMode = aValue; | 104 | this._editMode = aValue; |
107 | this.render(); | 105 | this.render(); |
108 | }, | 106 | }, |
109 | 107 | ||
110 | //------------------------------------------------------------------------- | 108 | //------------------------------------------------------------------------- |
111 | 109 | ||
112 | 'user': function() { | 110 | 'user': function() { |
113 | return this._user; | 111 | return this._user; |
114 | }, | 112 | }, |
115 | 113 | ||
116 | //------------------------------------------------------------------------- | 114 | //------------------------------------------------------------------------- |
117 | 115 | ||
118 | 'mainPanel': function() { | 116 | 'mainPanel': function() { |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js index 2066543..bb23e8d 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | 31 | ||
34 | 32 | ||
35 | Clipperz.PM.Components.RecordDetail.NotesComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.NotesComponent = function(anElement, args) { |
36 | //MochiKit.Logging.logDebug(">>> new NotesComponent"); | 34 | //MochiKit.Logging.logDebug(">>> new NotesComponent"); |
37 | args = args || {}; | 35 | args = args || {}; |
38 | 36 | ||
39 | Clipperz.PM.Components.RecordDetail.NotesComponent.superclass.constructor.call(this, anElement, args); | 37 | Clipperz.PM.Components.RecordDetail.NotesComponent.superclass.constructor.call(this, anElement, args); |
40 | 38 | ||
41 | this.mainComponent().addEditComponent(this); | 39 | this.mainComponent().addEditComponent(this); |
42 | 40 | ||
43 | this._staticOffset = null; | 41 | this._staticOffset = null; |
44 | this._componentHeight = 50; | 42 | this._componentHeight = 50; |
45 | this._mouseMoveIdentifier = null; | 43 | this._mouseMoveIdentifier = null; |
46 | this._mouseUpIdentifier = null; | 44 | this._mouseUpIdentifier = null; |
47 | 45 | ||
48 | this.element().setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 46 | this.element().setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
49 | 47 | ||
50 | this.render(); | 48 | this.render(); |
51 | //MochiKit.Logging.logDebug("<<< new NotesComponent"); | 49 | //MochiKit.Logging.logDebug("<<< new NotesComponent"); |
52 | 50 | ||
53 | return this; | 51 | return this; |
54 | } | 52 | } |
55 | 53 | ||
56 | //============================================================================= | 54 | //============================================================================= |
57 | 55 | ||
58 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.NotesComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 56 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.NotesComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
59 | 57 | ||
60 | 'toString': function() { | 58 | 'toString': function() { |
61 | return "Clipperz.PM.Components.RecordDetail.NotesComponent component"; | 59 | return "Clipperz.PM.Components.RecordDetail.NotesComponent component"; |
62 | }, | 60 | }, |
63 | 61 | ||
64 | //------------------------------------------------------------------------- | 62 | //------------------------------------------------------------------------- |
65 | 63 | ||
66 | 'value': function() { | 64 | 'value': function() { |
67 | return this.record().notes(); | 65 | return this.record().notes(); |
68 | }, | 66 | }, |
69 | 67 | ||
70 | 'setValue': function(aValue) { | 68 | 'setValue': function(aValue) { |
71 | this.record().setNotes(aValue); | 69 | this.record().setNotes(aValue); |
72 | }, | 70 | }, |
73 | 71 | ||
74 | //------------------------------------------------------------------------- | 72 | //------------------------------------------------------------------------- |
75 | 73 | ||
76 | 'render': function() { | 74 | 'render': function() { |
77 | //MochiKit.Logging.logDebug(">>> NotesComponent.render"); | 75 | //MochiKit.Logging.logDebug(">>> NotesComponent.render"); |
78 | /* | 76 | /* |
79 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:'5', children:[ | 77 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:'5', children:[ |
80 | {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}, | 78 | {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}, |
81 | {tag:'div', cls:'noteFieldContent', id:this.getId('notes')} | 79 | {tag:'div', cls:'noteFieldContent', id:this.getId('notes')} |
82 | ]}); | 80 | ]}); |
83 | */ | 81 | */ |
84 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}); | 82 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}); |
85 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'noteFieldContent', id:this.getId('notes'), children:[ | 83 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'noteFieldContent', id:this.getId('notes'), children:[ |
86 | {tag:'div', id:this.getId('resizableDiv'), cls:'resizable-textarea', children:[ | 84 | {tag:'div', id:this.getId('resizableDiv'), cls:'resizable-textarea', children:[ |
87 | {tag:'div', id:this.getId('contentView'), cls:'viewMode', html:""}, | 85 | {tag:'div', id:this.getId('contentView'), cls:'viewMode', html:""}, |
88 | {tag:'div', id:this.getId('contentEdit'), children:[ | 86 | {tag:'div', id:this.getId('contentEdit'), children:[ |
89 | {tag:'span', children:[ | 87 | {tag:'span', children:[ |
90 | {tag:'textarea', id:this.getId('textarea'), html:""} | 88 | {tag:'textarea', id:this.getId('textarea'), html:""} |
91 | ]} | 89 | ]} |
92 | ]}, | 90 | ]}, |
93 | {tag:'div', id:this.getId('grippie'), cls:'grippie'} | 91 | {tag:'div', id:this.getId('grippie'), cls:'grippie'} |
94 | ]} | 92 | ]} |
95 | ]}); | 93 | ]}); |
96 | 94 | ||
97 | this.getElement('contentView').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 95 | this.getElement('contentView').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
98 | this.getElement('contentEdit').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 96 | this.getElement('contentEdit').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
99 | 97 | ||
100 | MochiKit.Signal.connect(this.getId('grippie'), 'onmousedown', this, 'startResize'); | 98 | MochiKit.Signal.connect(this.getId('grippie'), 'onmousedown', this, 'startResize'); |
101 | 99 | ||
102 | this.update(); | 100 | this.update(); |
103 | //MochiKit.Logging.logDebug("<<< NotesComponent.render"); | 101 | //MochiKit.Logging.logDebug("<<< NotesComponent.render"); |
104 | }, | 102 | }, |
105 | 103 | ||
106 | //------------------------------------------------------------------------- | 104 | //------------------------------------------------------------------------- |
107 | 105 | ||
108 | 'updateViewMode': function() { | 106 | 'updateViewMode': function() { |
109 | //MochiKit.Logging.logDebug(">>> NotesComponent.updateViewMode"); | 107 | //MochiKit.Logging.logDebug(">>> NotesComponent.updateViewMode"); |
110 | // this.getElement('notes').update(this.value().replace(/\n/g, '<br>')); | 108 | // this.getElement('notes').update(this.value().replace(/\n/g, '<br>')); |
111 | 109 | ||
112 | this.getElement('contentView').update(Clipperz.Base.sanitizeString(this.value()).replace(/\n/g, '<br>')); | 110 | this.getElement('contentView').update(Clipperz.Base.sanitizeString(this.value()).replace(/\n/g, '<br>')); |
113 | 111 | ||
114 | if (this.isNoteEmpty()) { | 112 | if (this.isNoteEmpty()) { |
115 | this.element().hide(); | 113 | this.element().hide(); |
116 | } else { | 114 | } else { |
117 | this.getElement('contentView').show(); | 115 | this.getElement('contentView').show(); |
118 | this.getElement('contentView').setHeight(this.componentHeight()); | 116 | this.getElement('contentView').setHeight(this.componentHeight()); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js index 29fe972..d114eaa 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.TitleComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.TitleComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.RecordDetail.TitleComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.RecordDetail.TitleComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | //this._inputElement = null; | 36 | //this._inputElement = null; |
39 | 37 | ||
40 | this.mainComponent().addEditComponent(this); | 38 | this.mainComponent().addEditComponent(this); |
41 | 39 | ||
42 | this.render(); | 40 | this.render(); |
43 | 41 | ||
44 | return this; | 42 | return this; |
45 | } | 43 | } |
46 | 44 | ||
47 | //============================================================================= | 45 | //============================================================================= |
48 | 46 | ||
49 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.TitleComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 47 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.TitleComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
50 | 48 | ||
51 | 'toString': function() { | 49 | 'toString': function() { |
52 | return "Clipperz.PM.Components.RecordDetail.TitleComponent component"; | 50 | return "Clipperz.PM.Components.RecordDetail.TitleComponent component"; |
53 | }, | 51 | }, |
54 | 52 | ||
55 | //------------------------------------------------------------------------- | 53 | //------------------------------------------------------------------------- |
56 | 54 | ||
57 | 'value': function() { | 55 | 'value': function() { |
58 | return this.record().label(); | 56 | return this.record().label(); |
59 | }, | 57 | }, |
60 | 58 | ||
61 | 'setValue': function(aValue) { | 59 | 'setValue': function(aValue) { |
62 | this.record().setLabel(aValue); | 60 | this.record().setLabel(aValue); |
63 | }, | 61 | }, |
64 | 62 | ||
65 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
66 | /* | 64 | /* |
67 | 'inputElement': function() { | 65 | 'inputElement': function() { |
68 | return this._inputElement; | 66 | return this._inputElement; |
69 | }, | 67 | }, |
70 | 68 | ||
71 | 'setInputElement': function(aValue) { | 69 | 'setInputElement': function(aValue) { |
72 | this._inputElement = aValue; | 70 | this._inputElement = aValue; |
73 | }, | 71 | }, |
74 | */ | 72 | */ |
75 | //------------------------------------------------------------------------- | 73 | //------------------------------------------------------------------------- |
76 | 74 | ||
77 | 'render': function() { | 75 | 'render': function() { |
78 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:' '}); | 76 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:' '}); |
79 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:"3", html:' ', children:[ | 77 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:"3", html:' ', children:[ |
80 | // {tag:'div', /*style:'border: 1px solid green;',*/ id:this.getId('title')} | 78 | // {tag:'div', /*style:'border: 1px solid green;',*/ id:this.getId('title')} |
81 | // ]}); | 79 | // ]}); |
82 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:' '}); | 80 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:' '}); |
83 | // | 81 | // |
84 | // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), {editMode:this.editMode(), value:this.value()})); | 82 | // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), {editMode:this.editMode(), value:this.value()})); |
85 | 83 | ||
86 | this.update(); | 84 | this.update(); |
87 | }, | 85 | }, |
88 | 86 | ||
89 | //------------------------------------------------------------------------- | 87 | //------------------------------------------------------------------------- |
90 | /* | 88 | /* |
91 | 'update': function() { | 89 | 'update': function() { |
92 | this.inputElement().update({value:this.value(), editMode:this.editMode()}); | 90 | this.inputElement().update({value:this.value(), editMode:this.editMode()}); |
93 | }, | 91 | }, |
94 | */ | 92 | */ |
95 | //------------------------------------------------------------------------- | 93 | //------------------------------------------------------------------------- |
96 | 94 | ||
97 | 'updateViewMode': function() { | 95 | 'updateViewMode': function() { |
98 | this.element().update(""); | 96 | this.element().update(""); |
99 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'h2', html:this.value()}); | 97 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'h2', html:this.value()}); |
100 | }, | 98 | }, |
101 | 99 | ||
102 | //------------------------------------------------------------------------- | 100 | //------------------------------------------------------------------------- |
103 | 101 | ||
104 | 'updateEditMode': function() { | 102 | 'updateEditMode': function() { |
105 | //MochiKit.Logging.logDebug(">>> TitleComponent.updateEditMode"); | 103 | //MochiKit.Logging.logDebug(">>> TitleComponent.updateEditMode"); |
106 | // this.getElement('title').update(""); | 104 | // this.getElement('title').update(""); |
107 | // Clipperz.YUI.DomHelper.append(this.getDom('title'), {tag:'div', id:this.getId('title_input')}); | 105 | // Clipperz.YUI.DomHelper.append(this.getDom('title'), {tag:'div', id:this.getId('title_input')}); |
108 | // this.setInputElement(Clipperz.YUI.DomHelper.append(this.getDom('title_input'), {tag:'input', type:'text', value:this.value()}, true)); | 106 | // this.setInputElement(Clipperz.YUI.DomHelper.append(this.getDom('title_input'), {tag:'input', type:'text', value:this.value()}, true)); |
109 | 107 | ||
110 | this.element().update(""); | 108 | this.element().update(""); |
111 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', id:this.getId('titleField'), type:'text', value:"this.value()"}); | 109 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', id:this.getId('titleField'), type:'text', value:"this.value()"}); |
112 | this.getElement('titleField').dom.value = this.value(); | 110 | this.getElement('titleField').dom.value = this.value(); |
113 | 111 | ||
114 | //MochiKit.Logging.logDebug("<<< TitleComponent.updateEditMode"); | 112 | //MochiKit.Logging.logDebug("<<< TitleComponent.updateEditMode"); |
115 | }, | 113 | }, |
116 | 114 | ||
117 | //------------------------------------------------------------------------- | 115 | //------------------------------------------------------------------------- |
118 | 116 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js b/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js index b300ba6..d30f514 100644 --- a/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js +++ b/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.TabPanel) == 'undefined') { Clipperz.PM.Components.TabPanel = {}; } | 27 | if (typeof(Clipperz.PM.Components.TabPanel) == 'undefined') { Clipperz.PM.Components.TabPanel = {}; } |
30 | 28 | ||
31 | Clipperz.PM.Components.TabPanel.TabPanelController = function(args) { | 29 | Clipperz.PM.Components.TabPanel.TabPanelController = function(args) { |
32 | args = args || {}; | 30 | args = args || {}; |
33 | 31 | ||
34 | Clipperz.PM.Components.TabPanel.TabPanelController.superclass.constructor.call(this); | 32 | Clipperz.PM.Components.TabPanel.TabPanelController.superclass.constructor.call(this); |
35 | 33 | ||
36 | this._name = args.name || 'undefined'; | 34 | this._name = args.name || 'undefined'; |
37 | this._config = args.config; | 35 | this._config = args.config; |
38 | this._selectedTab = args.selectedTab || ((MochiKit.Base.keys(args.config).length > 0) ? MochiKit.Base.keys(args.config)[0] : null); | 36 | this._selectedTab = args.selectedTab || ((MochiKit.Base.keys(args.config).length > 0) ? MochiKit.Base.keys(args.config)[0] : null); |
39 | 37 | ||
40 | this._tabs = {}; | 38 | this._tabs = {}; |
41 | this._panels = {}; | 39 | this._panels = {}; |
42 | 40 | ||
43 | Clipperz.NotificationCenter.register(null, 'selectTab', this, 'handleSelectTabNotification'); | 41 | Clipperz.NotificationCenter.register(null, 'selectTab', this, 'handleSelectTabNotification'); |
44 | return this; | 42 | return this; |
45 | } | 43 | } |
46 | 44 | ||
47 | //============================================================================= | 45 | //============================================================================= |
48 | 46 | ||
49 | YAHOO.extendX(Clipperz.PM.Components.TabPanel.TabPanelController, YAHOO.ext.util.Observable, { | 47 | YAHOO.extendX(Clipperz.PM.Components.TabPanel.TabPanelController, YAHOO.ext.util.Observable, { |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'name': function() { | 51 | 'name': function() { |
54 | return this._name; | 52 | return this._name; |
55 | }, | 53 | }, |
56 | 54 | ||
57 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
58 | 56 | ||
59 | 'tabs': function() { | 57 | 'tabs': function() { |
60 | return this._tabs; | 58 | return this._tabs; |
61 | }, | 59 | }, |
62 | 60 | ||
63 | //------------------------------------------------------------------------- | 61 | //------------------------------------------------------------------------- |
64 | 62 | ||
65 | 'panels': function() { | 63 | 'panels': function() { |
66 | return this._panels; | 64 | return this._panels; |
67 | }, | 65 | }, |
68 | 66 | ||
69 | //------------------------------------------------------------------------- | 67 | //------------------------------------------------------------------------- |
70 | 68 | ||
71 | 'config': function() { | 69 | 'config': function() { |
72 | return this._config; | 70 | return this._config; |
73 | }, | 71 | }, |
74 | 72 | ||
75 | //------------------------------------------------------------------------- | 73 | //------------------------------------------------------------------------- |
76 | 74 | ||
77 | 'selectedTab': function() { | 75 | 'selectedTab': function() { |
78 | return this._selectedTab; | 76 | return this._selectedTab; |
79 | }, | 77 | }, |
80 | 78 | ||
81 | 'setSelectedTab': function(aValue) { | 79 | 'setSelectedTab': function(aValue) { |
82 | this._selectedTab = aValue; | 80 | this._selectedTab = aValue; |
83 | }, | 81 | }, |
84 | 82 | ||
85 | //------------------------------------------------------------------------- | 83 | //------------------------------------------------------------------------- |
86 | 84 | ||
87 | 'setUp': function() { | 85 | 'setUp': function() { |
88 | vartabId; | 86 | vartabId; |
89 | 87 | ||
90 | //MochiKit.Logging.logDebug(">>> TabPanelController.setUp - config: " + Clipperz.Base.serializeJSON(this.config())); | 88 | //MochiKit.Logging.logDebug(">>> TabPanelController.setUp - config: " + Clipperz.Base.serializeJSON(this.config())); |
91 | for (tabId in this.config()) { | 89 | for (tabId in this.config()) { |
92 | vartabElement; | 90 | vartabElement; |
93 | varpanelElement; | 91 | varpanelElement; |
94 | 92 | ||
95 | //MochiKit.Logging.logDebug("--- TabPanelController.setUp - tabId: " + tabId); | 93 | //MochiKit.Logging.logDebug("--- TabPanelController.setUp - tabId: " + tabId); |
96 | //MochiKit.Logging.logDebug("--- TabPanelController.setUp - panelId: " + this.config()[tabId]); | 94 | //MochiKit.Logging.logDebug("--- TabPanelController.setUp - panelId: " + this.config()[tabId]); |
97 | tabElement = YAHOO.ext.Element.get(tabId); | 95 | tabElement = YAHOO.ext.Element.get(tabId); |
98 | tabElement.addClassOnOver("hover"); | 96 | tabElement.addClassOnOver("hover"); |
99 | MochiKit.Signal.connect(tabId, 'onclick', this, 'selectTabHandler'); | 97 | MochiKit.Signal.connect(tabId, 'onclick', this, 'selectTabHandler'); |
100 | 98 | ||
101 | panelElement = YAHOO.ext.Element.get(this.config()[tabId]); | 99 | panelElement = YAHOO.ext.Element.get(this.config()[tabId]); |
102 | 100 | ||
103 | this._tabs[tabId] = tabElement; | 101 | this._tabs[tabId] = tabElement; |
104 | this._panels[tabId] = panelElement; | 102 | this._panels[tabId] = panelElement; |
105 | 103 | ||
106 | if (tabId == this.selectedTab()) { | 104 | if (tabId == this.selectedTab()) { |
107 | tabElement.addClass('selectedTab'); | 105 | tabElement.addClass('selectedTab'); |
108 | panelElement.addClass('selectedPanel'); | 106 | panelElement.addClass('selectedPanel'); |
109 | } else { | 107 | } else { |
110 | panelElement.addClass('hiddenPanel'); | 108 | panelElement.addClass('hiddenPanel'); |
111 | } | 109 | } |
112 | } | 110 | } |
113 | //MochiKit.Logging.logDebug("<<< TabPanelController.setUp"); | 111 | //MochiKit.Logging.logDebug("<<< TabPanelController.setUp"); |
114 | }, | 112 | }, |
115 | 113 | ||
116 | //------------------------------------------------------------------------- | 114 | //------------------------------------------------------------------------- |
117 | 115 | ||
118 | 'selectTab': function(aTab) { | 116 | 'selectTab': function(aTab) { |
diff --git a/frontend/beta/js/Clipperz/PM/Components/TextFormField.js b/frontend/beta/js/Clipperz/PM/Components/TextFormField.js index c6f0349..2b383ce 100644 --- a/frontend/beta/js/Clipperz/PM/Components/TextFormField.js +++ b/frontend/beta/js/Clipperz/PM/Components/TextFormField.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | 27 | ||
30 | Clipperz.PM.Components.TextFormField = function(anElement, args) { | 28 | Clipperz.PM.Components.TextFormField = function(anElement, args) { |
31 | args = args || {}; | 29 | args = args || {}; |
32 | 30 | ||
33 | //MochiKit.Logging.logDebug(">>> new TextFormField"); | 31 | //MochiKit.Logging.logDebug(">>> new TextFormField"); |
34 | Clipperz.PM.Components.TextFormField.superclass.constructor.call(this, args); | 32 | Clipperz.PM.Components.TextFormField.superclass.constructor.call(this, args); |
35 | 33 | ||
36 | this._element = anElement; | 34 | this._element = anElement; |
37 | this._editMode = args.editMode || 'VIEW'; | 35 | this._editMode = args.editMode || 'VIEW'; |
38 | this._value = args.value || ""; | 36 | this._value = args.value || ""; |
39 | this._inputElement = null; | 37 | this._inputElement = null; |
40 | this._wrapper = null; | 38 | this._wrapper = null; |
41 | this._multiline = args.multiline || false; | 39 | this._multiline = args.multiline || false; |
42 | 40 | ||
43 | //this.multiline = args.multiline || true; | 41 | //this.multiline = args.multiline || true; |
44 | //this.editing = true; | 42 | //this.editing = true; |
45 | //this.completeOnBlur = true; | 43 | //this.completeOnBlur = true; |
46 | //this.autoSizeTask = new YAHOO.ext.util.DelayedTask(this.autoSize, this); | 44 | //this.autoSizeTask = new YAHOO.ext.util.DelayedTask(this.autoSize, this); |
47 | //this.textSizeEl = Clipperz.YUI.DomHelper.append(document.body, { | 45 | //this.textSizeEl = Clipperz.YUI.DomHelper.append(document.body, { |
48 | // tag: 'div', | 46 | // tag: 'div', |
49 | // cls: 'yinline-editor-sizer ' + (this.cls || '') | 47 | // cls: 'yinline-editor-sizer ' + (this.cls || '') |
50 | //}); | 48 | //}); |
51 | 49 | ||
52 | this.render(); | 50 | this.render(); |
53 | //MochiKit.Logging.logDebug("<<< new TextFormField"); | 51 | //MochiKit.Logging.logDebug("<<< new TextFormField"); |
54 | 52 | ||
55 | return this; | 53 | return this; |
56 | }; | 54 | }; |
57 | 55 | ||
58 | YAHOO.extendX(Clipperz.PM.Components.TextFormField, Clipperz.PM.Components.BaseComponent, { | 56 | YAHOO.extendX(Clipperz.PM.Components.TextFormField, Clipperz.PM.Components.BaseComponent, { |
59 | 57 | ||
60 | 'toString': function() { | 58 | 'toString': function() { |
61 | return "Clipperz.PM.Components.TextFormField"; | 59 | return "Clipperz.PM.Components.TextFormField"; |
62 | }, | 60 | }, |
63 | 61 | ||
64 | //----------------------------------------------------- | 62 | //----------------------------------------------------- |
65 | 63 | ||
66 | 'value': function() { | 64 | 'value': function() { |
67 | if (this.inputElement() != null) { | 65 | if (this.inputElement() != null) { |
68 | this._value = this.inputElement().dom.value; | 66 | this._value = this.inputElement().dom.value; |
69 | } | 67 | } |
70 | 68 | ||
71 | return this._value; | 69 | return this._value; |
72 | // return this.inlineEditor().getValue(); | 70 | // return this.inlineEditor().getValue(); |
73 | }, | 71 | }, |
74 | 72 | ||
75 | 'setValue': function(aValue) { | 73 | 'setValue': function(aValue) { |
76 | this._value = aValue; | 74 | this._value = aValue; |
77 | // this.getElement('viewComponent_Content').update(aValue); | 75 | // this.getElement('viewComponent_Content').update(aValue); |
78 | // this.inlineEditor().setValue(aValue); | 76 | // this.inlineEditor().setValue(aValue); |
79 | }, | 77 | }, |
80 | 78 | ||
81 | //----------------------------------------------------- | 79 | //----------------------------------------------------- |
82 | 80 | ||
83 | 'multiline': function() { | 81 | 'multiline': function() { |
84 | return this._multiline; | 82 | return this._multiline; |
85 | }, | 83 | }, |
86 | 84 | ||
87 | //----------------------------------------------------- | 85 | //----------------------------------------------------- |
88 | 86 | ||
89 | 'editMode': function() { | 87 | 'editMode': function() { |
90 | return this._editMode; | 88 | return this._editMode; |
91 | }, | 89 | }, |
92 | 90 | ||
93 | 'setEditMode': function(aValue) { | 91 | 'setEditMode': function(aValue) { |
94 | this._editMode = aValue; | 92 | this._editMode = aValue; |
95 | }, | 93 | }, |
96 | 94 | ||
97 | //----------------------------------------------------- | 95 | //----------------------------------------------------- |
98 | 96 | ||
99 | 'inputElement': function() { | 97 | 'inputElement': function() { |
100 | return this._inputElement; | 98 | return this._inputElement; |
101 | }, | 99 | }, |
102 | 100 | ||
103 | 'setInputElement': function(aValue) { | 101 | 'setInputElement': function(aValue) { |
104 | this._inputElement = aValue; | 102 | this._inputElement = aValue; |
105 | }, | 103 | }, |
106 | 104 | ||
107 | //----------------------------------------------------- | 105 | //----------------------------------------------------- |
108 | 106 | ||
109 | 'on': function(anEventName, anHandler, aScope, shouldOverride) { | 107 | 'on': function(anEventName, anHandler, aScope, shouldOverride) { |
110 | //MochiKit.Logging.logDebug(">>> TextFormField.on - inputElement: " + this.inputElement()); | 108 | //MochiKit.Logging.logDebug(">>> TextFormField.on - inputElement: " + this.inputElement()); |
111 | return this.inputElement().on(anEventName, anHandler, aScope, shouldOverride); | 109 | return this.inputElement().on(anEventName, anHandler, aScope, shouldOverride); |
112 | //MochiKit.Logging.logDebug("<<< TextFormField.on - inputElement: " + this.inputElement()); | 110 | //MochiKit.Logging.logDebug("<<< TextFormField.on - inputElement: " + this.inputElement()); |
113 | }, | 111 | }, |
114 | 112 | ||
115 | //----------------------------------------------------- | 113 | //----------------------------------------------------- |
116 | 114 | ||
117 | 'wrapper': function() { | 115 | 'wrapper': function() { |
118 | return this._wrapper; | 116 | return this._wrapper; |