Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Components') (more/less context) (ignore whitespace changes)
51 files changed, 306 insertions, 459 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js b/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js index 67e257b..f3a3902 100644 --- a/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | 29 | ||
33 | //############################################################################# | 30 | //############################################################################# |
34 | 31 | ||
35 | var _Clipperz_PM_Components_Panels_base_id_ = 0; | 32 | var _Clipperz_PM_Components_Panels_base_id_ = 0; |
36 | 33 | ||
37 | //############################################################################# | 34 | //############################################################################# |
38 | 35 | ||
39 | Clipperz.PM.Components.BaseComponent = function(anElement, args) { | 36 | Clipperz.PM.Components.BaseComponent = function(anElement, args) { |
40 | args = args || {}; | 37 | args = args || {}; |
41 | //MochiKit.Base.bindMethods(this); | 38 | //MochiKit.Base.bindMethods(this); |
42 | //Clipperz.PM.Components.BaseComponent.superclass.constructor.call(this, args); | 39 | //Clipperz.PM.Components.BaseComponent.superclass.constructor.call(this, args); |
43 | 40 | ||
44 | this._element = anElement; | 41 | this._element = anElement; |
45 | this._ids = {}; | 42 | this._ids = {}; |
46 | 43 | ||
47 | return this; | 44 | return this; |
48 | } | 45 | } |
49 | 46 | ||
50 | //============================================================================= | 47 | //============================================================================= |
51 | 48 | ||
52 | //MochiKit.Base.update(Clipperz.PM.Components.BaseComponent.prototype, { | 49 | //MochiKit.Base.update(Clipperz.PM.Components.BaseComponent.prototype, { |
53 | YAHOO.extendX(Clipperz.PM.Components.BaseComponent, YAHOO.ext.util.Observable, { | 50 | YAHOO.extendX(Clipperz.PM.Components.BaseComponent, YAHOO.ext.util.Observable, { |
54 | 51 | ||
55 | 'isClipperzPMComponent': true, | 52 | 'isClipperzPMComponent': true, |
56 | 53 | ||
57 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
58 | 55 | ||
59 | 'toString': function () { | 56 | 'toString': function () { |
60 | return "Clipperz.PM.Components.BaseComponent component"; | 57 | return "Clipperz.PM.Components.BaseComponent component"; |
61 | }, | 58 | }, |
62 | 59 | ||
63 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
64 | 61 | ||
65 | 'domHelper': function() { | 62 | 'domHelper': function() { |
66 | return Clipperz.YUI.DomHelper; | 63 | return Clipperz.YUI.DomHelper; |
67 | }, | 64 | }, |
68 | 65 | ||
69 | //------------------------------------------------------------------------- | 66 | //------------------------------------------------------------------------- |
70 | 67 | ||
71 | 'element': function() { | 68 | 'element': function() { |
72 | //MochiKit.Logging.logDebug(">>> BaseComponent.element"); | 69 | //MochiKit.Logging.logDebug(">>> BaseComponent.element"); |
73 | return this._element; | 70 | return this._element; |
74 | }, | 71 | }, |
75 | 72 | ||
76 | 'setElement': function(aValue) { | 73 | 'setElement': function(aValue) { |
77 | this._element = aValue; | 74 | this._element = aValue; |
78 | }, | 75 | }, |
79 | 76 | ||
80 | //----------------------------------------------------- | 77 | //----------------------------------------------------- |
81 | 78 | ||
82 | 'remove': function() { | 79 | 'remove': function() { |
83 | //MochiKit.Logging.logDebug(">>> BaseComponent.remove"); | 80 | //MochiKit.Logging.logDebug(">>> BaseComponent.remove"); |
84 | Clipperz.NotificationCenter.unregister(this); | 81 | Clipperz.NotificationCenter.unregister(this); |
85 | MochiKit.Signal.disconnectAllTo(this); | 82 | MochiKit.Signal.disconnectAllTo(this); |
86 | //MochiKit.Logging.logDebug("<<< BaseComponent.remove"); | 83 | //MochiKit.Logging.logDebug("<<< BaseComponent.remove"); |
87 | }, | 84 | }, |
88 | 85 | ||
89 | //------------------------------------------------------------------------- | 86 | //------------------------------------------------------------------------- |
90 | 87 | ||
91 | 'getId': function(aValue) { | 88 | 'getId': function(aValue) { |
92 | varresult; | 89 | varresult; |
93 | 90 | ||
94 | result = this._ids[aValue]; | 91 | result = this._ids[aValue]; |
95 | 92 | ||
96 | if (typeof(result) == 'undefined') { | 93 | if (typeof(result) == 'undefined') { |
97 | _Clipperz_PM_Components_Panels_base_id_ ++; | 94 | _Clipperz_PM_Components_Panels_base_id_ ++; |
98 | 95 | ||
99 | result = "Clipperz_PM_Components_Panels_" + aValue + "_" + _Clipperz_PM_Components_Panels_base_id_; | 96 | result = "Clipperz_PM_Components_Panels_" + aValue + "_" + _Clipperz_PM_Components_Panels_base_id_; |
100 | this._ids[aValue] = result; | 97 | this._ids[aValue] = result; |
101 | //MochiKit.Logging.logDebug(">>> getId(" + aValue + ") = " + result); | 98 | //MochiKit.Logging.logDebug(">>> getId(" + aValue + ") = " + result); |
102 | } else { | 99 | } else { |
103 | //MochiKit.Logging.logDebug("<<< getId(" + aValue + ") = " + result); | 100 | //MochiKit.Logging.logDebug("<<< getId(" + aValue + ") = " + result); |
104 | } | 101 | } |
105 | 102 | ||
106 | return result; | 103 | return result; |
107 | }, | 104 | }, |
108 | 105 | ||
109 | 'getDom': function(aValue) { | 106 | 'getDom': function(aValue) { |
110 | return YAHOO.util.Dom.get(this.getId(aValue)); | 107 | return YAHOO.util.Dom.get(this.getId(aValue)); |
111 | }, | 108 | }, |
112 | 109 | ||
113 | 'getElement': function(aValue) { | 110 | 'getElement': function(aValue) { |
114 | return YAHOO.ext.Element.get(this.getId(aValue)); | 111 | return YAHOO.ext.Element.get(this.getId(aValue)); |
115 | }, | 112 | }, |
116 | 113 | ||
117 | 'getActor': function(aValue, anAnimator) { | 114 | 'getActor': function(aValue, anAnimator) { |
118 | return new YAHOO.ext.Actor(this.getDom(aValue), anAnimator); | 115 | return new YAHOO.ext.Actor(this.getDom(aValue), anAnimator); |
119 | }, | 116 | }, |
120 | 117 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js index e51b56f..7a3b3a3 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js +++ b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js | |||
@@ -1,86 +1,83 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } | 29 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } |
33 | 30 | ||
34 | Clipperz.PM.Components.Compact.CompactHeader = function(anElement, args) { | 31 | Clipperz.PM.Components.Compact.CompactHeader = function(anElement, args) { |
35 | 32 | ||
36 | Clipperz.PM.Components.Compact.CompactHeader.superclass.constructor.call(this, anElement, args); | 33 | Clipperz.PM.Components.Compact.CompactHeader.superclass.constructor.call(this, anElement, args); |
37 | 34 | ||
38 | this.render(); | 35 | this.render(); |
39 | 36 | ||
40 | return this; | 37 | return this; |
41 | }; | 38 | }; |
42 | 39 | ||
43 | YAHOO.extendX(Clipperz.PM.Components.Compact.CompactHeader, Clipperz.PM.Components.BaseComponent, { | 40 | YAHOO.extendX(Clipperz.PM.Components.Compact.CompactHeader, Clipperz.PM.Components.BaseComponent, { |
44 | 41 | ||
45 | 'toString': function() { | 42 | 'toString': function() { |
46 | return "Clipperz.PM.Components.Compact.CompactHeader"; | 43 | return "Clipperz.PM.Components.Compact.CompactHeader"; |
47 | }, | 44 | }, |
48 | 45 | ||
49 | //----------------------------------------------------- | 46 | //----------------------------------------------------- |
50 | 47 | ||
51 | 'render': function() { | 48 | 'render': function() { |
52 | this.element().update(""); | 49 | this.element().update(""); |
53 | 50 | ||
54 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ | 51 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ |
55 | {tag:'img', src:'./images/logo.gif'}, | 52 | {tag:'img', src:'./images/logo.gif'}, |
56 | {tag:'div', id:'lockBlock', children:[ | 53 | {tag:'div', id:'lockBlock', children:[ |
57 | {tag:'input', type:'checkbox', id:'autolock'}, | 54 | {tag:'input', type:'checkbox', id:'autolock'}, |
58 | {tag:'span', html:'auto'}, | 55 | {tag:'span', html:'auto'}, |
59 | {tag:'a', href:'#', htmlString:Clipperz.PM.Strings['lockMenuLabel'], id:'lock'} | 56 | {tag:'a', href:'#', htmlString:Clipperz.PM.Strings['lockMenuLabel'], id:'lock'} |
60 | ]} | 57 | ]} |
61 | ]}); | 58 | ]}); |
62 | 59 | ||
63 | Clipperz.YUI.DomHelper.append(this.element().dom, | 60 | Clipperz.YUI.DomHelper.append(this.element().dom, |
64 | {tag:'div', id:'compactMiscLinks', children:[ | 61 | {tag:'div', id:'compactMiscLinks', children:[ |
65 | {tag:'a', id:'donateHeaderIconLink', target:'_blank', href:Clipperz.PM.Strings['donateHeaderLinkUrl'], children:[ | 62 | {tag:'a', id:'donateHeaderIconLink', target:'_blank', href:Clipperz.PM.Strings['donateHeaderLinkUrl'], children:[ |
66 | {tag:'img', id:'donateHeaderLinkIcon', src:'./images/smiles_small.gif'} | 63 | {tag:'img', id:'donateHeaderLinkIcon', src:'./images/smiles_small.gif'} |
67 | ]}, | 64 | ]}, |
68 | {tag:'ul', children:[ | 65 | {tag:'ul', children:[ |
69 | {tag:'li', children:[{tag:'a', id:'donateHeaderLink', html:'donate', target:'_blank'}]}, | 66 | {tag:'li', children:[{tag:'a', id:'donateHeaderLink', html:'donate', target:'_blank'}]}, |
70 | {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', html:'credits', target:'_blank'}]}, | 67 | {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', html:'credits', target:'_blank'}]}, |
71 | {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', html:'feedback', target:'_blank'}]}, | 68 | {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', html:'feedback', target:'_blank'}]}, |
72 | {tag:'li', children:[{tag:'a', id:'helpHeaderLink', html:'help', target:'_blank'}]}, | 69 | {tag:'li', children:[{tag:'a', id:'helpHeaderLink', html:'help', target:'_blank'}]}, |
73 | {tag:'li', children:[{tag:'a', id:'forumHeaderLink', html:'forum', target:'_blank'}]} | 70 | {tag:'li', children:[{tag:'a', id:'forumHeaderLink', html:'forum', target:'_blank'}]} |
74 | ]} | 71 | ]} |
75 | ]} | 72 | ]} |
76 | ); | 73 | ); |
77 | 74 | ||
78 | YAHOO.ext.Element.get('lockBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 75 | YAHOO.ext.Element.get('lockBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
79 | Clipperz.NotificationCenter.notify(this, 'switchLanguage'); | 76 | Clipperz.NotificationCenter.notify(this, 'switchLanguage'); |
80 | }, | 77 | }, |
81 | 78 | ||
82 | //----------------------------------------------------- | 79 | //----------------------------------------------------- |
83 | __syntaxFix__: '__syntaxFix__' | 80 | __syntaxFix__: '__syntaxFix__' |
84 | }); | 81 | }); |
85 | 82 | ||
86 | 83 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js index 492f815..0f6858a 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js +++ b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } | 29 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } |
33 | 30 | ||
34 | Clipperz.PM.Components.Compact.CompactInterface = function(anElement, args) { | 31 | Clipperz.PM.Components.Compact.CompactInterface = function(anElement, args) { |
35 | 32 | ||
36 | Clipperz.PM.Components.Compact.CompactInterface.superclass.constructor.call(this, anElement, args); | 33 | Clipperz.PM.Components.Compact.CompactInterface.superclass.constructor.call(this, anElement, args); |
37 | 34 | ||
38 | this._directLoginItemTemplate = null; | 35 | this._directLoginItemTemplate = null; |
39 | this._user = args.user; | 36 | this._user = args.user; |
40 | this._autoLockTimer = null; | 37 | this._autoLockTimer = null; |
41 | 38 | ||
42 | Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') | 39 | Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') |
43 | Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); | 40 | Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); |
44 | 41 | ||
45 | this.render(); | 42 | this.render(); |
46 | 43 | ||
47 | return this; | 44 | return this; |
48 | }; | 45 | }; |
49 | 46 | ||
50 | YAHOO.extendX(Clipperz.PM.Components.Compact.CompactInterface, Clipperz.PM.Components.BaseComponent, { | 47 | YAHOO.extendX(Clipperz.PM.Components.Compact.CompactInterface, Clipperz.PM.Components.BaseComponent, { |
51 | 48 | ||
52 | 'toString': function() { | 49 | 'toString': function() { |
53 | return "Clipperz.PM.Components.Compact.CompactInterface"; | 50 | return "Clipperz.PM.Components.Compact.CompactInterface"; |
54 | }, | 51 | }, |
55 | 52 | ||
56 | //----------------------------------------------------- | 53 | //----------------------------------------------------- |
57 | 54 | ||
58 | 'render': function() { | 55 | 'render': function() { |
59 | var result; | 56 | var result; |
60 | varlayout; | 57 | varlayout; |
61 | var registerButton; | 58 | var registerButton; |
62 | 59 | ||
63 | //MochiKit.Logging.logDebug(">>> CompactInterface.render"); | 60 | //MochiKit.Logging.logDebug(">>> CompactInterface.render"); |
64 | this.element().update(""); | 61 | this.element().update(""); |
65 | 62 | ||
66 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ | 63 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ |
67 | {tag:'div', id:this.getId('cantentPanel'), children:[ | 64 | {tag:'div', id:this.getId('cantentPanel'), children:[ |
68 | {tag:'h4', id:this.getId('message')}, | 65 | {tag:'h4', id:this.getId('message')}, |
69 | {tag:'ul', id:'directLogins', children:[]} | 66 | {tag:'ul', id:'directLogins', children:[]} |
70 | ]}, | 67 | ]}, |
71 | {tag:'div', id:this.getId('lockPanel'), cls:'lockPanel', children:[ | 68 | {tag:'div', id:this.getId('lockPanel'), cls:'lockPanel', children:[ |
72 | {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']}, | 69 | {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']}, |
73 | {tag:'form', id:'lockDialogForm', children:[ | 70 | {tag:'form', id:'lockDialogForm', children:[ |
74 | {tag:'input', type:'password', id:this.getId('lockPassphrase')} | 71 | {tag:'input', type:'password', id:this.getId('lockPassphrase')} |
75 | ]}, | 72 | ]}, |
76 | {tag:'div', id:this.getId('unlock')} | 73 | {tag:'div', id:this.getId('unlock')} |
77 | ]} | 74 | ]} |
78 | ]}); | 75 | ]}); |
79 | 76 | ||
80 | this.getElement('lockPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 77 | this.getElement('lockPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
81 | 78 | ||
82 | YAHOO.ext.Element.get('lockBlock').show(); | 79 | YAHOO.ext.Element.get('lockBlock').show(); |
83 | MochiKit.Signal.connect(YAHOO.ext.Element.get('lock').dom, 'onclick', this, 'doLockEventHandler'); | 80 | MochiKit.Signal.connect(YAHOO.ext.Element.get('lock').dom, 'onclick', this, 'doLockEventHandler'); |
84 | new YAHOO.ext.Button(this.getId('unlock'), {text:Clipperz.PM.Strings['unlockButtonLabel'], handler:this.doUnlockEventHandler, scope:this, minWidth:0}); | 81 | new YAHOO.ext.Button(this.getId('unlock'), {text:Clipperz.PM.Strings['unlockButtonLabel'], handler:this.doUnlockEventHandler, scope:this, minWidth:0}); |
85 | this.getElement('unlock').swallowEvent('click', true); | 82 | this.getElement('unlock').swallowEvent('click', true); |
86 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('lockPassphrase')); | 83 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('lockPassphrase')); |
87 | MochiKit.Signal.connect('lockDialogForm', 'onsubmit', this, 'doUnlockEventHandler'); | 84 | MochiKit.Signal.connect('lockDialogForm', 'onsubmit', this, 'doUnlockEventHandler'); |
88 | 85 | ||
89 | this.getElement('cantentPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 86 | this.getElement('cantentPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
90 | //MochiKit.Logging.logDebug("<<< CompactInterface.render"); | 87 | //MochiKit.Logging.logDebug("<<< CompactInterface.render"); |
91 | 88 | ||
92 | return result; | 89 | return result; |
93 | }, | 90 | }, |
94 | 91 | ||
95 | //----------------------------------------------------- | 92 | //----------------------------------------------------- |
96 | 93 | ||
97 | 'directLoginAddedHandler': function(anEvent) { | 94 | 'directLoginAddedHandler': function(anEvent) { |
98 | this.redrawDirectLoginItems(); | 95 | this.redrawDirectLoginItems(); |
99 | }, | 96 | }, |
100 | 97 | ||
101 | //----------------------------------------------------- | 98 | //----------------------------------------------------- |
102 | 99 | ||
103 | 'compareDirectLogins': function(a, b) { | 100 | 'compareDirectLogins': function(a, b) { |
104 | return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase()); | 101 | return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase()); |
105 | }, | 102 | }, |
106 | 103 | ||
107 | //----------------------------------------------------- | 104 | //----------------------------------------------------- |
108 | 105 | ||
109 | 'redrawDirectLoginItems': function() { | 106 | 'redrawDirectLoginItems': function() { |
110 | var template; | 107 | var template; |
111 | var allDirectLogins; | 108 | var allDirectLogins; |
112 | 109 | ||
113 | this.getElement('message').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 110 | this.getElement('message').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
114 | //MochiKit.Logging.logDebug(">>> CompactInterface.redrawDirectLoginItems"); | 111 | //MochiKit.Logging.logDebug(">>> CompactInterface.redrawDirectLoginItems"); |
115 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 0"); | 112 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 0"); |
116 | MochiKit.Iter.forEach(YAHOO.ext.Element.get('directLogins').getChildrenByTagName('li'), function(aDirectLoginElement) { | 113 | MochiKit.Iter.forEach(YAHOO.ext.Element.get('directLogins').getChildrenByTagName('li'), function(aDirectLoginElement) { |
117 | MochiKit.Signal.disconnectAll(aDirectLoginElement.dom); | 114 | MochiKit.Signal.disconnectAll(aDirectLoginElement.dom); |
118 | //MochiKit.Logging.logDebug("disconnecting IMG " + aDirectLoginElement.getChildrenByTagName('img')[0].dom.src); | 115 | //MochiKit.Logging.logDebug("disconnecting IMG " + aDirectLoginElement.getChildrenByTagName('img')[0].dom.src); |
119 | MochiKit.Signal.disconnectAll(aDirectLoginElement.getChildrenByTagName('img')[0].dom); | 116 | MochiKit.Signal.disconnectAll(aDirectLoginElement.getChildrenByTagName('img')[0].dom); |
120 | }) | 117 | }) |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js b/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js index d708464..a1e60d8 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js +++ b/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } | 29 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } |
33 | 30 | ||
34 | Clipperz.PM.Components.Compact.LoginForm = function(anElement, args) { | 31 | Clipperz.PM.Components.Compact.LoginForm = function(anElement, args) { |
35 | 32 | ||
36 | Clipperz.PM.Components.Compact.LoginForm.superclass.constructor.call(this, anElement, args); | 33 | Clipperz.PM.Components.Compact.LoginForm.superclass.constructor.call(this, anElement, args); |
37 | 34 | ||
38 | this.render(); | 35 | this.render(); |
39 | Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') | 36 | Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') |
40 | 37 | ||
41 | return this; | 38 | return this; |
42 | }; | 39 | }; |
43 | 40 | ||
44 | YAHOO.extendX(Clipperz.PM.Components.Compact.LoginForm, Clipperz.PM.Components.BaseComponent, { | 41 | YAHOO.extendX(Clipperz.PM.Components.Compact.LoginForm, Clipperz.PM.Components.BaseComponent, { |
45 | 42 | ||
46 | 'toString': function() { | 43 | 'toString': function() { |
47 | return "Clipperz.PM.Components.Compact.LoginForm"; | 44 | return "Clipperz.PM.Components.Compact.LoginForm"; |
48 | }, | 45 | }, |
49 | 46 | ||
50 | //----------------------------------------------------- | 47 | //----------------------------------------------------- |
51 | 48 | ||
52 | 'render': function() { | 49 | 'render': function() { |
53 | var result; | 50 | var result; |
54 | varlayout; | 51 | varlayout; |
55 | 52 | ||
56 | MochiKit.Signal.disconnectAllTo(this); | 53 | MochiKit.Signal.disconnectAllTo(this); |
57 | this.element().update(""); | 54 | this.element().update(""); |
58 | 55 | ||
59 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ | 56 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ |
60 | {tag:'div', id:'compactHeader'}, | 57 | {tag:'div', id:'compactHeader'}, |
61 | {tag:'div', id:'compactBody', children:[ | 58 | {tag:'div', id:'compactBody', children:[ |
62 | {tag:'form', id:this.getId('loginForm_form'), children:[ | 59 | {tag:'form', id:this.getId('loginForm_form'), children:[ |
63 | {tag:'dl', children:[ | 60 | {tag:'dl', children:[ |
64 | {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, | 61 | {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, |
65 | {tag:'dd', children:[ | 62 | {tag:'dd', children:[ |
66 | {tag:'input', id:this.getId('login_username'), type:'text', size:'30', name:'username'} | 63 | {tag:'input', id:this.getId('login_username'), type:'text', size:'30', name:'username'} |
67 | ]}, | 64 | ]}, |
68 | {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, | 65 | {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, |
69 | {tag:'dd', children:[ | 66 | {tag:'dd', children:[ |
70 | {tag:'input', id:this.getId('login_passphrase'), type:'password', size:'30', name:'passphrase'} | 67 | {tag:'input', id:this.getId('login_passphrase'), type:'password', size:'30', name:'passphrase'} |
71 | ]} | 68 | ]} |
72 | ]}, | 69 | ]}, |
73 | {tag:'div', id:this.getId('login_submit')} | 70 | {tag:'div', id:this.getId('login_submit')} |
74 | ]}, | 71 | ]}, |
75 | {tag:'h4', id:this.getId('message')} | 72 | {tag:'h4', id:this.getId('message')} |
76 | ]} | 73 | ]} |
77 | ]}); | 74 | ]}); |
78 | 75 | ||
79 | new Clipperz.PM.Components.Compact.CompactHeader(YAHOO.ext.Element.get('compactHeader')); | 76 | new Clipperz.PM.Components.Compact.CompactHeader(YAHOO.ext.Element.get('compactHeader')); |
80 | 77 | ||
81 | MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', this, 'stopFormSubmit'); | 78 | MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', this, 'stopFormSubmit'); |
82 | new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0}); | 79 | new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0}); |
83 | this.getElement('login_submit').swallowEvent('click', true); | 80 | this.getElement('login_submit').swallowEvent('click', true); |
84 | 81 | ||
85 | MochiKit.Signal.connect(this.getId('loginForm_form'), 'onkeydown', this, 'onkeydown'); | 82 | MochiKit.Signal.connect(this.getId('loginForm_form'), 'onkeydown', this, 'onkeydown'); |
86 | 83 | ||
87 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase')); | 84 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase')); |
88 | this.getElement('login_username').focus(); | 85 | this.getElement('login_username').focus(); |
89 | 86 | ||
90 | return result; | 87 | return result; |
91 | }, | 88 | }, |
92 | 89 | ||
93 | //----------------------------------------------------- | 90 | //----------------------------------------------------- |
94 | 91 | ||
95 | 'doLogin': function(e) { | 92 | 'doLogin': function(e) { |
96 | //MochiKit.Logging.logDebug(">>> compact.LoginForm.doLogin"); | 93 | //MochiKit.Logging.logDebug(">>> compact.LoginForm.doLogin"); |
97 | if (this.checkLoginForm()) { | 94 | if (this.checkLoginForm()) { |
98 | this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value); | 95 | this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value); |
99 | } | 96 | } |
100 | //MochiKit.Logging.logDebug("<<< compact.LoginForm.doLogin"); | 97 | //MochiKit.Logging.logDebug("<<< compact.LoginForm.doLogin"); |
101 | }, | 98 | }, |
102 | 99 | ||
103 | //......................................................................... | 100 | //......................................................................... |
104 | 101 | ||
105 | 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) { | 102 | 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) { |
106 | var deferredResult; | 103 | var deferredResult; |
107 | var user; | 104 | var user; |
108 | 105 | ||
109 | //MochiKit.Logging.logDebug(">>> compact.LoginForm.doLoginWithUsernameAndPassphrase"); | 106 | //MochiKit.Logging.logDebug(">>> compact.LoginForm.doLoginWithUsernameAndPassphrase"); |
110 | user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase}); | 107 | user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase}); |
111 | 108 | ||
112 | deferredResult = new MochiKit.Async.Deferred(); | 109 | deferredResult = new MochiKit.Async.Deferred(); |
113 | deferredResult.addCallback(MochiKit.Base.method(user, 'connect')); | 110 | deferredResult.addCallback(MochiKit.Base.method(user, 'connect')); |
114 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadPreferences')); | 111 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadPreferences')); |
115 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadRecords')); | 112 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadRecords')); |
116 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadDirectLogins')); | 113 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadDirectLogins')); |
117 | deferredResult.addErrback(MochiKit.Base.bind(function() { | 114 | deferredResult.addErrback(MochiKit.Base.bind(function() { |
118 | this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); | 115 | this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); |
119 | this.getElement('message').update(Clipperz.PM.Strings['loginMessagePanelFailureText']); | 116 | this.getElement('message').update(Clipperz.PM.Strings['loginMessagePanelFailureText']); |
120 | this.getDom('login_passphrase').value = ""; | 117 | this.getDom('login_passphrase').value = ""; |
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 18b36da..3f4952d 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
33 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
34 | 31 | ||
35 | //############################################################################# | 32 | //############################################################################# |
36 | 33 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportColumns = function(anElement, args) { | 34 | Clipperz.PM.Components.Import.CSVImport.CSVImportColumns = function(anElement, args) { |
38 | args = args || {}; | 35 | args = args || {}; |
39 | 36 | ||
40 | Clipperz.PM.Components.Import.CSVImport.CSVImportColumns.superclass.constructor.call(this, anElement, args); | 37 | Clipperz.PM.Components.Import.CSVImport.CSVImportColumns.superclass.constructor.call(this, anElement, args); |
41 | this._mainComponent = args.mainComponent; | 38 | this._mainComponent = args.mainComponent; |
42 | 39 | ||
43 | return this; | 40 | return this; |
44 | } | 41 | } |
45 | 42 | ||
46 | //============================================================================= | 43 | //============================================================================= |
47 | 44 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportColumns, Clipperz.PM.Components.BaseComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportColumns, Clipperz.PM.Components.BaseComponent, { |
49 | 46 | ||
50 | 'toString': function() { | 47 | 'toString': function() { |
51 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportColumns component"; | 48 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportColumns component"; |
52 | }, | 49 | }, |
53 | 50 | ||
54 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
55 | 52 | ||
56 | 'mainComponent': function() { | 53 | 'mainComponent': function() { |
57 | return this._mainComponent; | 54 | return this._mainComponent; |
58 | }, | 55 | }, |
59 | 56 | ||
60 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
61 | 58 | ||
62 | 'render': function() { | 59 | 'render': function() { |
63 | var i,c; | 60 | var i,c; |
64 | var columnSelectorCheckboxCells; | 61 | var columnSelectorCheckboxCells; |
65 | var checkboxes; | 62 | var checkboxes; |
66 | var data; | 63 | var data; |
67 | 64 | ||
68 | //MochiKit.Logging.logDebug(">>> CSVImportColumns.render"); | 65 | //MochiKit.Logging.logDebug(">>> CSVImportColumns.render"); |
69 | Clipperz.NotificationCenter.unregister(this); | 66 | Clipperz.NotificationCenter.unregister(this); |
70 | MochiKit.Signal.disconnectAllTo(this); | 67 | MochiKit.Signal.disconnectAllTo(this); |
71 | 68 | ||
72 | this.element().update(""); | 69 | this.element().update(""); |
73 | 70 | ||
74 | data = this.mainComponent().parsedValues(); | 71 | data = this.mainComponent().parsedValues(); |
75 | columnSelectorCheckboxCells = []; | 72 | columnSelectorCheckboxCells = []; |
76 | 73 | ||
77 | c =data[0].length; | 74 | c =data[0].length; |
78 | for (i=0; i<c; i++) { | 75 | for (i=0; i<c; i++) { |
79 | columnSelectorCheckboxCells.push({tag:'th', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), children:[ | 76 | columnSelectorCheckboxCells.push({tag:'th', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), children:[ |
80 | {tag:'input', type:'checkbox', id:this.getId('columnCheckbox_' + i), value:i} | 77 | {tag:'input', type:'checkbox', id:this.getId('columnCheckbox_' + i), value:i} |
81 | ]}) | 78 | ]}) |
82 | } | 79 | } |
83 | 80 | ||
84 | this.domHelper().append(this.element(), {tag:'div', children:[ | 81 | this.domHelper().append(this.element(), {tag:'div', children:[ |
85 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Columns']}, | 82 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Columns']}, |
86 | {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ | 83 | {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ |
87 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview columns', cellspacing:'0', children:[ | 84 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview columns', cellspacing:'0', children:[ |
88 | {tag:'thead', id:this.getId('previewData_thead'), children:[ | 85 | {tag:'thead', id:this.getId('previewData_thead'), children:[ |
89 | {tag:'tr', children:columnSelectorCheckboxCells} | 86 | {tag:'tr', children:columnSelectorCheckboxCells} |
90 | ]}, | 87 | ]}, |
91 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} | 88 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} |
92 | ]} | 89 | ]} |
93 | ]} | 90 | ]} |
94 | ]}); | 91 | ]}); |
95 | 92 | ||
96 | c =data[0].length; | 93 | c =data[0].length; |
97 | for (i=0; i<c; i++) { | 94 | for (i=0; i<c; i++) { |
98 | if (this.mainComponent().isColumnSelected(i)) { | 95 | if (this.mainComponent().isColumnSelected(i)) { |
99 | this.getDom('columnCheckbox_' + i).checked = true; | 96 | this.getDom('columnCheckbox_' + i).checked = true; |
100 | } | 97 | } |
101 | } | 98 | } |
102 | 99 | ||
103 | this.renderData(this.getElement('previewData_tbody'), data); | 100 | this.renderData(this.getElement('previewData_tbody'), data); |
104 | 101 | ||
105 | checkboxes = MochiKit.DOM.getElementsByTagAndClassName('input', null, this.getDom('previewData_thead')); | 102 | checkboxes = MochiKit.DOM.getElementsByTagAndClassName('input', null, this.getDom('previewData_thead')); |
106 | c = checkboxes.length; | 103 | c = checkboxes.length; |
107 | for (i=0; i<c; i++) { | 104 | for (i=0; i<c; i++) { |
108 | MochiKit.Signal.connect(checkboxes[i], 'onclick', this, 'renderDataHandler'); | 105 | MochiKit.Signal.connect(checkboxes[i], 'onclick', this, 'renderDataHandler'); |
109 | } | 106 | } |
110 | //MochiKit.Logging.logDebug("<<< CSVImportColumns.render"); | 107 | //MochiKit.Logging.logDebug("<<< CSVImportColumns.render"); |
111 | }, | 108 | }, |
112 | 109 | ||
113 | //------------------------------------------------------------------------- | 110 | //------------------------------------------------------------------------- |
114 | 111 | ||
115 | 'renderData': function(anElement, someData) { | 112 | 'renderData': function(anElement, someData) { |
116 | var config; | 113 | var config; |
117 | var i,c; | 114 | var i,c; |
118 | 115 | ||
119 | //MochiKit.Logging.logDebug(">>> CSVImportColumns.renderData"); | 116 | //MochiKit.Logging.logDebug(">>> CSVImportColumns.renderData"); |
120 | // anElement.update(""); | 117 | // anElement.update(""); |
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 a368747..f7dbd5d 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
33 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
34 | 31 | ||
35 | //############################################################################# | 32 | //############################################################################# |
36 | 33 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportFields = function(anElement, args) { | 34 | Clipperz.PM.Components.Import.CSVImport.CSVImportFields = function(anElement, args) { |
38 | args = args || {}; | 35 | args = args || {}; |
39 | 36 | ||
40 | Clipperz.PM.Components.Import.CSVImport.CSVImportFields.superclass.constructor.call(this, anElement, args); | 37 | Clipperz.PM.Components.Import.CSVImport.CSVImportFields.superclass.constructor.call(this, anElement, args); |
41 | this._mainComponent = args.mainComponent; | 38 | this._mainComponent = args.mainComponent; |
42 | 39 | ||
43 | return this; | 40 | return this; |
44 | } | 41 | } |
45 | 42 | ||
46 | //============================================================================= | 43 | //============================================================================= |
47 | 44 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportFields, Clipperz.PM.Components.BaseComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportFields, Clipperz.PM.Components.BaseComponent, { |
49 | 46 | ||
50 | 'toString': function() { | 47 | 'toString': function() { |
51 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportFields component"; | 48 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportFields component"; |
52 | }, | 49 | }, |
53 | 50 | ||
54 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
55 | 52 | ||
56 | 'mainComponent': function() { | 53 | 'mainComponent': function() { |
57 | return this._mainComponent; | 54 | return this._mainComponent; |
58 | }, | 55 | }, |
59 | 56 | ||
60 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
61 | 58 | ||
62 | 'render': function() { | 59 | 'render': function() { |
63 | varfieldsHeaderCells; | 60 | varfieldsHeaderCells; |
64 | var titleColumnIndex; | 61 | var titleColumnIndex; |
65 | var notesColumnIndex; | 62 | var notesColumnIndex; |
66 | var i,c; | 63 | var i,c; |
67 | 64 | ||
68 | Clipperz.NotificationCenter.unregister(this); | 65 | Clipperz.NotificationCenter.unregister(this); |
69 | MochiKit.Signal.disconnectAllTo(this); | 66 | MochiKit.Signal.disconnectAllTo(this); |
70 | 67 | ||
71 | this.element().update(""); | 68 | this.element().update(""); |
72 | 69 | ||
73 | titleColumnIndex = this.mainComponent().titleColumnIndex() | 70 | titleColumnIndex = this.mainComponent().titleColumnIndex() |
74 | notesColumnIndex = this.mainComponent().notesColumnIndex() | 71 | notesColumnIndex = this.mainComponent().notesColumnIndex() |
75 | 72 | ||
76 | fieldsHeaderCells = []; | 73 | fieldsHeaderCells = []; |
77 | fieldsHeaderCells.push({tag:'td', valign:'top', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}); | 74 | fieldsHeaderCells.push({tag:'td', valign:'top', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}); |
78 | 75 | ||
79 | c =this.mainComponent().parsedValues()[0].length; | 76 | c =this.mainComponent().parsedValues()[0].length; |
80 | for (i=0; i<c; i++) { | 77 | for (i=0; i<c; i++) { |
81 | if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { | 78 | if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { |
82 | var trimmedLabel; | 79 | var trimmedLabel; |
83 | 80 | ||
84 | trimmedLabel = Clipperz.Base.trim(this.mainComponent().labelForColumn(i)); | 81 | trimmedLabel = Clipperz.Base.trim(this.mainComponent().labelForColumn(i)); |
85 | fieldsHeaderCells.push({tag:'td', valign:'top', id:this.getId('fieldHeaderTD_' + i), cls:((trimmedLabel == "") ? 'missingLabelWarning' : (this.isColumnSetup(i) ? 'configuredColumn': 'unconfiguredColumn')), children:[ | 82 | fieldsHeaderCells.push({tag:'td', valign:'top', id:this.getId('fieldHeaderTD_' + i), cls:((trimmedLabel == "") ? 'missingLabelWarning' : (this.isColumnSetup(i) ? 'configuredColumn': 'unconfiguredColumn')), children:[ |
86 | {tag:'span', html:((trimmedLabel == "") ? Clipperz.PM.Strings['CSV_ImportWizard_Fields_MissingLabelWarning'] : trimmedLabel)/*, cls:((trimmedLabel == "") ? 'missingLabelWarning' : '')*/}, | 83 | {tag:'span', html:((trimmedLabel == "") ? Clipperz.PM.Strings['CSV_ImportWizard_Fields_MissingLabelWarning'] : trimmedLabel)/*, cls:((trimmedLabel == "") ? 'missingLabelWarning' : '')*/}, |
87 | {tag:'select', id:this.getId('select_' + i), name:i, children:[ | 84 | {tag:'select', id:this.getId('select_' + i), name:i, children:[ |
88 | {tag:'option', value:'UNDEFINED', html:"select data type", cls:'disabledOption'}, | 85 | {tag:'option', value:'UNDEFINED', html:"select data type", cls:'disabledOption'}, |
89 | {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, | 86 | {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, |
90 | {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, | 87 | {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, |
91 | {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, | 88 | {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, |
92 | {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, | 89 | {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, |
93 | {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} | 90 | {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} |
94 | ]} | 91 | ]} |
95 | ]}) | 92 | ]}) |
96 | } | 93 | } |
97 | } | 94 | } |
98 | 95 | ||
99 | if (notesColumnIndex != -1) { | 96 | if (notesColumnIndex != -1) { |
100 | fieldsHeaderCells.push({tag:'td', valign:'top', cls:'notes', html:this.mainComponent().labelForColumn(notesColumnIndex)}); | 97 | fieldsHeaderCells.push({tag:'td', valign:'top', cls:'notes', html:this.mainComponent().labelForColumn(notesColumnIndex)}); |
101 | } | 98 | } |
102 | 99 | ||
103 | this.domHelper().append(this.element(), {tag:'div', children:[ | 100 | this.domHelper().append(this.element(), {tag:'div', children:[ |
104 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Fields']}, | 101 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Fields']}, |
105 | {tag:'div', id:this.getId('dataDiv'), children:[ | 102 | {tag:'div', id:this.getId('dataDiv'), children:[ |
106 | {tag:'div', children:[ | 103 | {tag:'div', children:[ |
107 | ]}, | 104 | ]}, |
108 | {tag:'div', cls:'csvImportPreview', children:[ | 105 | {tag:'div', cls:'csvImportPreview', children:[ |
109 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ | 106 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ |
110 | {tag:'thead', id:this.getId('previewData_thead'), children:[ | 107 | {tag:'thead', id:this.getId('previewData_thead'), children:[ |
111 | {tag:'tr', cls:'CSV_previewData_header', children:fieldsHeaderCells} | 108 | {tag:'tr', cls:'CSV_previewData_header', children:fieldsHeaderCells} |
112 | ]}, | 109 | ]}, |
113 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} | 110 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} |
114 | ]} | 111 | ]} |
115 | ]} | 112 | ]} |
116 | ]} | 113 | ]} |
117 | ]}); | 114 | ]}); |
118 | 115 | ||
119 | for (i=0; i<c; i++) { | 116 | for (i=0; i<c; i++) { |
120 | if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { | 117 | if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(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 ebd243a..5cb8679 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
33 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
34 | 31 | ||
35 | //############################################################################# | 32 | //############################################################################# |
36 | 33 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportHeader = function(anElement, args) { | 34 | Clipperz.PM.Components.Import.CSVImport.CSVImportHeader = function(anElement, args) { |
38 | args = args || {}; | 35 | args = args || {}; |
39 | 36 | ||
40 | Clipperz.PM.Components.Import.CSVImport.CSVImportHeader.superclass.constructor.call(this, anElement, args); | 37 | Clipperz.PM.Components.Import.CSVImport.CSVImportHeader.superclass.constructor.call(this, anElement, args); |
41 | this._mainComponent = args.mainComponent; | 38 | this._mainComponent = args.mainComponent; |
42 | 39 | ||
43 | this._pendingDeferredLabelFieldHandlerEvents = 0; | 40 | this._pendingDeferredLabelFieldHandlerEvents = 0; |
44 | 41 | ||
45 | return this; | 42 | return this; |
46 | } | 43 | } |
47 | 44 | ||
48 | //============================================================================= | 45 | //============================================================================= |
49 | 46 | ||
50 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportHeader, Clipperz.PM.Components.BaseComponent, { | 47 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportHeader, Clipperz.PM.Components.BaseComponent, { |
51 | 48 | ||
52 | 'toString': function() { | 49 | 'toString': function() { |
53 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportHeader component"; | 50 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportHeader component"; |
54 | }, | 51 | }, |
55 | 52 | ||
56 | //------------------------------------------------------------------------- | 53 | //------------------------------------------------------------------------- |
57 | 54 | ||
58 | 'mainComponent': function() { | 55 | 'mainComponent': function() { |
59 | return this._mainComponent; | 56 | return this._mainComponent; |
60 | }, | 57 | }, |
61 | 58 | ||
62 | //------------------------------------------------------------------------- | 59 | //------------------------------------------------------------------------- |
63 | 60 | ||
64 | 'render': function() { | 61 | 'render': function() { |
65 | var thConfigs; | 62 | var thConfigs; |
66 | var i,c; | 63 | var i,c; |
67 | 64 | ||
68 | //MochiKit.Logging.logDebug(">>> CSVImportHeader.render"); | 65 | //MochiKit.Logging.logDebug(">>> CSVImportHeader.render"); |
69 | Clipperz.NotificationCenter.unregister(this); | 66 | Clipperz.NotificationCenter.unregister(this); |
70 | MochiKit.Signal.disconnectAllTo(this); | 67 | MochiKit.Signal.disconnectAllTo(this); |
71 | 68 | ||
72 | thConfigs = []; | 69 | thConfigs = []; |
73 | c = this.mainComponent().parsedValues()[0].length; | 70 | c = this.mainComponent().parsedValues()[0].length; |
74 | for (i=0; i<c; i++) { | 71 | for (i=0; i<c; i++) { |
75 | if (this.mainComponent().isColumnSelected(i)) { | 72 | if (this.mainComponent().isColumnSelected(i)) { |
76 | // thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:this.mainComponent().labelForColumn(i)}]}); | 73 | // thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:this.mainComponent().labelForColumn(i)}]}); |
77 | thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:""}]}); | 74 | thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:""}]}); |
78 | } | 75 | } |
79 | } | 76 | } |
80 | 77 | ||
81 | this.element().update(""); | 78 | this.element().update(""); |
82 | this.domHelper().append(this.element(), {tag:'div', children:[ | 79 | this.domHelper().append(this.element(), {tag:'div', children:[ |
83 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header']}, | 80 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header']}, |
84 | {tag:'div', cls:'importStepParameters', children:[ | 81 | {tag:'div', cls:'importStepParameters', children:[ |
85 | {tag:'input', type:'checkbox', name:'isFistRowHeader', id:this.getId('isFirstRowHeader_checkbox')}, | 82 | {tag:'input', type:'checkbox', name:'isFistRowHeader', id:this.getId('isFirstRowHeader_checkbox')}, |
86 | {tag:'span', id:this.getId('isFirstRowHeader_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header_Settings_firstRowHeaderLabel']} | 83 | {tag:'span', id:this.getId('isFirstRowHeader_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header_Settings_firstRowHeaderLabel']} |
87 | ]}, | 84 | ]}, |
88 | {tag:'div', id:this.getId('dataDiv'), children:[ | 85 | {tag:'div', id:this.getId('dataDiv'), children:[ |
89 | {tag:'div', cls:'csvImportPreview', children:[ | 86 | {tag:'div', cls:'csvImportPreview', children:[ |
90 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview header', cellspacing:'0', children:[ | 87 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview header', cellspacing:'0', children:[ |
91 | {tag:'thead', children:[{tag:'tr', children:thConfigs}]}, | 88 | {tag:'thead', children:[{tag:'tr', children:thConfigs}]}, |
92 | {tag:'tbody', id:this.getId('previewData_tbody')} | 89 | {tag:'tbody', id:this.getId('previewData_tbody')} |
93 | ]} | 90 | ]} |
94 | ]} | 91 | ]} |
95 | ]} | 92 | ]} |
96 | ]}); | 93 | ]}); |
97 | 94 | ||
98 | for (i=0; i<c; i++) { | 95 | for (i=0; i<c; i++) { |
99 | if (this.mainComponent().isColumnSelected(i)) { | 96 | if (this.mainComponent().isColumnSelected(i)) { |
100 | this.getElement('headerTextField_' + i).dom.value = this.mainComponent().labelForColumn(i); | 97 | this.getElement('headerTextField_' + i).dom.value = this.mainComponent().labelForColumn(i); |
101 | } | 98 | } |
102 | } | 99 | } |
103 | 100 | ||
104 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); | 101 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); |
105 | 102 | ||
106 | if (this.mainComponent().isFirstRowHeader()) { | 103 | if (this.mainComponent().isFirstRowHeader()) { |
107 | this.getDom('isFirstRowHeader_checkbox').click(); | 104 | this.getDom('isFirstRowHeader_checkbox').click(); |
108 | } | 105 | } |
109 | 106 | ||
110 | c = this.mainComponent().parsedValues()[0].length; | 107 | c = this.mainComponent().parsedValues()[0].length; |
111 | for (i=0; i<c; i++) { | 108 | for (i=0; i<c; i++) { |
112 | if (this.mainComponent().isColumnSelected(i)) { | 109 | if (this.mainComponent().isColumnSelected(i)) { |
113 | MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onchange', MochiKit.Base.partial(MochiKit.Base.method(this, 'labelFieldHandler'), i)); | 110 | MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onchange', MochiKit.Base.partial(MochiKit.Base.method(this, 'labelFieldHandler'), i)); |
114 | MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onkeypress', MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandler'), i)); | 111 | MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onkeypress', MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandler'), i)); |
115 | } | 112 | } |
116 | } | 113 | } |
117 | 114 | ||
118 | MochiKit.Signal.connect(this.getDom('isFirstRowHeader_checkbox'), 'onclick', this, 'toggleFirstRowHeaderCheckboxHandler'); | 115 | MochiKit.Signal.connect(this.getDom('isFirstRowHeader_checkbox'), 'onclick', this, 'toggleFirstRowHeaderCheckboxHandler'); |
119 | if (Clipperz_IEisBroken != true) { | 116 | if (Clipperz_IEisBroken != true) { |
120 | MochiKit.Signal.connect(this.getDom('isFirstRowHeader_span'), 'onclick', this.getDom('isFirstRowHeader_checkbox'), 'click'); | 117 | MochiKit.Signal.connect(this.getDom('isFirstRowHeader_span'), 'onclick', this.getDom('isFirstRowHeader_checkbox'), 'click'); |
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 a53c531..6344e06 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
33 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
34 | 31 | ||
35 | //############################################################################# | 32 | //############################################################################# |
36 | 33 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportNotes = function(anElement, args) { | 34 | Clipperz.PM.Components.Import.CSVImport.CSVImportNotes = function(anElement, args) { |
38 | args = args || {}; | 35 | args = args || {}; |
39 | 36 | ||
40 | Clipperz.PM.Components.Import.CSVImport.CSVImportNotes.superclass.constructor.call(this, anElement, args); | 37 | Clipperz.PM.Components.Import.CSVImport.CSVImportNotes.superclass.constructor.call(this, anElement, args); |
41 | this._mainComponent = args.mainComponent; | 38 | this._mainComponent = args.mainComponent; |
42 | 39 | ||
43 | return this; | 40 | return this; |
44 | } | 41 | } |
45 | 42 | ||
46 | //============================================================================= | 43 | //============================================================================= |
47 | 44 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportNotes, Clipperz.PM.Components.BaseComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportNotes, Clipperz.PM.Components.BaseComponent, { |
49 | 46 | ||
50 | 'toString': function() { | 47 | 'toString': function() { |
51 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportNotes component"; | 48 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportNotes component"; |
52 | }, | 49 | }, |
53 | 50 | ||
54 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
55 | 52 | ||
56 | 'mainComponent': function() { | 53 | 'mainComponent': function() { |
57 | return this._mainComponent; | 54 | return this._mainComponent; |
58 | }, | 55 | }, |
59 | 56 | ||
60 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
61 | 58 | ||
62 | 'render': function() { | 59 | 'render': function() { |
63 | varnotesSelectorCheckboxCells; | 60 | varnotesSelectorCheckboxCells; |
64 | var totalNumberOfColumns; | 61 | var totalNumberOfColumns; |
65 | var titleColumnIndex; | 62 | var titleColumnIndex; |
66 | var notesColumnIndex; | 63 | var notesColumnIndex; |
67 | var i,c; | 64 | var i,c; |
68 | 65 | ||
69 | Clipperz.NotificationCenter.unregister(this); | 66 | Clipperz.NotificationCenter.unregister(this); |
70 | MochiKit.Signal.disconnectAllTo(this); | 67 | MochiKit.Signal.disconnectAllTo(this); |
71 | 68 | ||
72 | this.element().update(""); | 69 | this.element().update(""); |
73 | 70 | ||
74 | titleColumnIndex = this.mainComponent().titleColumnIndex() | 71 | titleColumnIndex = this.mainComponent().titleColumnIndex() |
75 | notesColumnIndex = this.mainComponent().notesColumnIndex() | 72 | notesColumnIndex = this.mainComponent().notesColumnIndex() |
76 | 73 | ||
77 | totalNumberOfColumns = this.mainComponent().parsedValues()[0].length; | 74 | totalNumberOfColumns = this.mainComponent().parsedValues()[0].length; |
78 | 75 | ||
79 | notesSelectorCheckboxCells = [{tag:'th', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}]; | 76 | notesSelectorCheckboxCells = [{tag:'th', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}]; |
80 | c =totalNumberOfColumns; | 77 | c =totalNumberOfColumns; |
81 | for (i=0; i<c; i++) { | 78 | for (i=0; i<c; i++) { |
82 | if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { | 79 | if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { |
83 | notesSelectorCheckboxCells.push({tag:'th', id:this.getId('th_' + i), valign:'top', children:[ | 80 | notesSelectorCheckboxCells.push({tag:'th', id:this.getId('th_' + i), valign:'top', children:[ |
84 | {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportNotesColumn', value:i}, | 81 | {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportNotesColumn', value:i}, |
85 | {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} | 82 | {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} |
86 | ]}) | 83 | ]}) |
87 | } | 84 | } |
88 | } | 85 | } |
89 | 86 | ||
90 | this.domHelper().append(this.element(), {tag:'div', children:[ | 87 | this.domHelper().append(this.element(), {tag:'div', children:[ |
91 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes']}, | 88 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes']}, |
92 | {tag:'div', id:this.getId('dataDiv'), children:[ | 89 | {tag:'div', id:this.getId('dataDiv'), children:[ |
93 | {tag:'div', cls:'importStepParameters', children:[ | 90 | {tag:'div', cls:'importStepParameters', children:[ |
94 | {tag:'input', id:this.getId('doNotSetNotes_radio'), type:'radio', name:'CSVImportNotesColumn', value:-1}, | 91 | {tag:'input', id:this.getId('doNotSetNotes_radio'), type:'radio', name:'CSVImportNotesColumn', value:-1}, |
95 | {tag:'span', id:this.getId('doNotSetNotes_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes_Settings_noSelectionLabel']} | 92 | {tag:'span', id:this.getId('doNotSetNotes_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes_Settings_noSelectionLabel']} |
96 | ]}, | 93 | ]}, |
97 | {tag:'div', cls:'csvImportPreview', children:[ | 94 | {tag:'div', cls:'csvImportPreview', children:[ |
98 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ | 95 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ |
99 | {tag:'thead', id:this.getId('previewData_thead'), children:[ | 96 | {tag:'thead', id:this.getId('previewData_thead'), children:[ |
100 | {tag:'tr', children:notesSelectorCheckboxCells} | 97 | {tag:'tr', children:notesSelectorCheckboxCells} |
101 | ]}, | 98 | ]}, |
102 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} | 99 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} |
103 | ]} | 100 | ]} |
104 | ]} | 101 | ]} |
105 | ]} | 102 | ]} |
106 | ]}); | 103 | ]}); |
107 | 104 | ||
108 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); | 105 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); |
109 | 106 | ||
110 | if ((notesColumnIndex >= totalNumberOfColumns) || (notesColumnIndex == titleColumnIndex) || !(this.mainComponent().isColumnSelected(notesColumnIndex))) { | 107 | if ((notesColumnIndex >= totalNumberOfColumns) || (notesColumnIndex == titleColumnIndex) || !(this.mainComponent().isColumnSelected(notesColumnIndex))) { |
111 | this.mainComponent().setNotesColumnIndex(-1); | 108 | this.mainComponent().setNotesColumnIndex(-1); |
112 | notesColumnIndex = -1; | 109 | notesColumnIndex = -1; |
113 | } | 110 | } |
114 | 111 | ||
115 | c =totalNumberOfColumns; | 112 | c =totalNumberOfColumns; |
116 | for (i=0; i<c; i++) { | 113 | for (i=0; i<c; i++) { |
117 | if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { | 114 | if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { |
118 | MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); | 115 | MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); |
119 | if (Clipperz_IEisBroken != true) { | 116 | if (Clipperz_IEisBroken != true) { |
120 | MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); | 117 | MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); |
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 9162867..aa57580 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
33 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
34 | 31 | ||
35 | //############################################################################# | 32 | //############################################################################# |
36 | 33 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportTitle = function(anElement, args) { | 34 | Clipperz.PM.Components.Import.CSVImport.CSVImportTitle = function(anElement, args) { |
38 | args = args || {}; | 35 | args = args || {}; |
39 | 36 | ||
40 | Clipperz.PM.Components.Import.CSVImport.CSVImportTitle.superclass.constructor.call(this, anElement, args); | 37 | Clipperz.PM.Components.Import.CSVImport.CSVImportTitle.superclass.constructor.call(this, anElement, args); |
41 | this._mainComponent = args.mainComponent; | 38 | this._mainComponent = args.mainComponent; |
42 | 39 | ||
43 | return this; | 40 | return this; |
44 | } | 41 | } |
45 | 42 | ||
46 | //============================================================================= | 43 | //============================================================================= |
47 | 44 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportTitle, Clipperz.PM.Components.BaseComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportTitle, Clipperz.PM.Components.BaseComponent, { |
49 | 46 | ||
50 | 'toString': function() { | 47 | 'toString': function() { |
51 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportTitle component"; | 48 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportTitle component"; |
52 | }, | 49 | }, |
53 | 50 | ||
54 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
55 | 52 | ||
56 | 'mainComponent': function() { | 53 | 'mainComponent': function() { |
57 | return this._mainComponent; | 54 | return this._mainComponent; |
58 | }, | 55 | }, |
59 | 56 | ||
60 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
61 | 58 | ||
62 | 'render': function() { | 59 | 'render': function() { |
63 | vartitleSelectorCheckboxCells; | 60 | vartitleSelectorCheckboxCells; |
64 | var titleColumnIndex; | 61 | var titleColumnIndex; |
65 | var i,c; | 62 | var i,c; |
66 | 63 | ||
67 | Clipperz.NotificationCenter.unregister(this); | 64 | Clipperz.NotificationCenter.unregister(this); |
68 | MochiKit.Signal.disconnectAllTo(this); | 65 | MochiKit.Signal.disconnectAllTo(this); |
69 | 66 | ||
70 | this.element().update(""); | 67 | this.element().update(""); |
71 | 68 | ||
72 | titleColumnIndex = this.mainComponent().titleColumnIndex() | 69 | titleColumnIndex = this.mainComponent().titleColumnIndex() |
73 | titleSelectorCheckboxCells = []; | 70 | titleSelectorCheckboxCells = []; |
74 | c =this.mainComponent().parsedValues()[0].length; | 71 | c =this.mainComponent().parsedValues()[0].length; |
75 | for (i=0; i<c; i++) { | 72 | for (i=0; i<c; i++) { |
76 | if (this.mainComponent().isColumnSelected(i)) { | 73 | if (this.mainComponent().isColumnSelected(i)) { |
77 | titleSelectorCheckboxCells.push({tag:'th', valign:'top', id:this.getId('th_' + i), children:[ | 74 | titleSelectorCheckboxCells.push({tag:'th', valign:'top', id:this.getId('th_' + i), children:[ |
78 | {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportTitleColumn', value:i}, | 75 | {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportTitleColumn', value:i}, |
79 | {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} | 76 | {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} |
80 | ]}) | 77 | ]}) |
81 | } | 78 | } |
82 | } | 79 | } |
83 | 80 | ||
84 | if (titleColumnIndex >= titleSelectorCheckboxCells.length) { | 81 | if (titleColumnIndex >= titleSelectorCheckboxCells.length) { |
85 | this.mainComponent().setTitleColumnIndex(-1); | 82 | this.mainComponent().setTitleColumnIndex(-1); |
86 | } | 83 | } |
87 | 84 | ||
88 | this.domHelper().append(this.element(), {tag:'div', children:[ | 85 | this.domHelper().append(this.element(), {tag:'div', children:[ |
89 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, | 86 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, |
90 | {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ | 87 | {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ |
91 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ | 88 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ |
92 | {tag:'thead', id:this.getId('previewData_thead'), children:[ | 89 | {tag:'thead', id:this.getId('previewData_thead'), children:[ |
93 | {tag:'tr', children:titleSelectorCheckboxCells} | 90 | {tag:'tr', children:titleSelectorCheckboxCells} |
94 | ]}, | 91 | ]}, |
95 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} | 92 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} |
96 | ]} | 93 | ]} |
97 | ]} | 94 | ]} |
98 | ]}); | 95 | ]}); |
99 | 96 | ||
100 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); | 97 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); |
101 | 98 | ||
102 | c =this.mainComponent().parsedValues()[0].length; | 99 | c =this.mainComponent().parsedValues()[0].length; |
103 | for (i=0; i<c; i++) { | 100 | for (i=0; i<c; i++) { |
104 | if (this.mainComponent().isColumnSelected(i)) { | 101 | if (this.mainComponent().isColumnSelected(i)) { |
105 | MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); | 102 | MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); |
106 | if (Clipperz_IEisBroken != true) { | 103 | if (Clipperz_IEisBroken != true) { |
107 | MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); | 104 | MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); |
108 | } | 105 | } |
109 | } | 106 | } |
110 | } | 107 | } |
111 | 108 | ||
112 | if (titleColumnIndex != -1) { | 109 | if (titleColumnIndex != -1) { |
113 | this.getDom('radio_' + titleColumnIndex).click(); | 110 | this.getDom('radio_' + titleColumnIndex).click(); |
114 | } else { | 111 | } else { |
115 | this.mainComponent().nextButton().disable(); | 112 | this.mainComponent().nextButton().disable(); |
116 | } | 113 | } |
117 | 114 | ||
118 | }, | 115 | }, |
119 | 116 | ||
120 | //------------------------------------------------------------------------- | 117 | //------------------------------------------------------------------------- |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js index 707a3d2..c1dd1a9 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Import.CSVImportComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.Import.CSVImportComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | this._steps = this._steps || ['CSV_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; | 36 | this._steps = this._steps || ['CSV_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; |
40 | 37 | ||
41 | Clipperz.PM.Components.Import.CSVImportComponent.superclass.constructor.call(this, anElement, args); | 38 | Clipperz.PM.Components.Import.CSVImportComponent.superclass.constructor.call(this, anElement, args); |
42 | 39 | ||
43 | this._step1Component = null; | 40 | this._step1Component = null; |
44 | this._step2Component = null; | 41 | this._step2Component = null; |
45 | this._step3Component = null; | 42 | this._step3Component = null; |
46 | this._step4Component = null; | 43 | this._step4Component = null; |
47 | this._step5Component = null; | 44 | this._step5Component = null; |
48 | 45 | ||
49 | this._isFirstRowHeader = false; | 46 | this._isFirstRowHeader = false; |
50 | this._titleColumnIndex = -1; | 47 | this._titleColumnIndex = -1; |
51 | this._notesColumnIndex = -1; | 48 | this._notesColumnIndex = -1; |
52 | this._fieldSettings = {}; | 49 | this._fieldSettings = {}; |
53 | this._skippedColumns = new Clipperz.Set(); | 50 | this._skippedColumns = new Clipperz.Set(); |
54 | 51 | ||
55 | this.render(); | 52 | this.render(); |
56 | 53 | ||
57 | return this; | 54 | return this; |
58 | } | 55 | } |
59 | 56 | ||
60 | //============================================================================= | 57 | //============================================================================= |
61 | 58 | ||
62 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 59 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
63 | 60 | ||
64 | 'toString': function() { | 61 | 'toString': function() { |
65 | return "Clipperz.PM.Components.Import.CSVImportComponent component"; | 62 | return "Clipperz.PM.Components.Import.CSVImportComponent component"; |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | 66 | ||
70 | 'render': function() { | 67 | 'render': function() { |
71 | this.domHelper().append(this.element(), {tag:'div', cls:'csvImportWizard', children:[ | 68 | this.domHelper().append(this.element(), {tag:'div', cls:'csvImportWizard', children:[ |
72 | {tag:'h3', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, | 69 | {tag:'h3', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, |
73 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 70 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
74 | {tag:'div', cls:'importStepBlocks', children:[ | 71 | {tag:'div', cls:'importStepBlocks', children:[ |
75 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 72 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
76 | {tag:'div', children:[ | 73 | {tag:'div', children:[ |
77 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_csv_description']}, | 74 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_csv_description']}, |
78 | {tag:'div', cls:'importOptionsParameters', children:[ | 75 | {tag:'div', cls:'importOptionsParameters', children:[ |
79 | {tag:'div', cls:'CSVImportOptionsParameters', children:[ | 76 | {tag:'div', cls:'CSVImportOptionsParameters', children:[ |
80 | {tag:'ul', children:[ | 77 | {tag:'ul', children:[ |
81 | {tag:'li', children:[ | 78 | {tag:'li', children:[ |
82 | {tag:'label', 'for':this.getId('CSV_inputOptions_separator'), html:"separator"}, | 79 | {tag:'label', 'for':this.getId('CSV_inputOptions_separator'), html:"separator"}, |
83 | {tag:'select', name:this.getId('CSV_inputOptions_separator'), id:this.getId('CSV_inputOptions_separator'), children:[ | 80 | {tag:'select', name:this.getId('CSV_inputOptions_separator'), id:this.getId('CSV_inputOptions_separator'), children:[ |
84 | {tag:'option', name:'comma', value:',', html:"comma (,)", selected:true}, | 81 | {tag:'option', name:'comma', value:',', html:"comma (,)", selected:true}, |
85 | {tag:'option', name:'tab', value:'\t', html:"tab"} | 82 | {tag:'option', name:'tab', value:'\t', html:"tab"} |
86 | ]} | 83 | ]} |
87 | ]}, | 84 | ]}, |
88 | 85 | ||
89 | {tag:'li', children:[ | 86 | {tag:'li', children:[ |
90 | {tag:'label', 'for':this.getId('CSV_inputOptions_quote'), html:"quote"}, | 87 | {tag:'label', 'for':this.getId('CSV_inputOptions_quote'), html:"quote"}, |
91 | {tag:'select', name:this.getId('CSV_inputOptions_quote'), id:this.getId('CSV_inputOptions_quote'), children:[ | 88 | {tag:'select', name:this.getId('CSV_inputOptions_quote'), id:this.getId('CSV_inputOptions_quote'), children:[ |
92 | {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, | 89 | {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, |
93 | {tag:'option', name:'singleQuote', value:'\'', html:"single quote (\')"} | 90 | {tag:'option', name:'singleQuote', value:'\'', html:"single quote (\')"} |
94 | ]} | 91 | ]} |
95 | ]}, | 92 | ]}, |
96 | 93 | ||
97 | {tag:'li', children:[ | 94 | {tag:'li', children:[ |
98 | {tag:'label', 'for':this.getId('CSV_inputOptions_escape'), html:"escape"}, | 95 | {tag:'label', 'for':this.getId('CSV_inputOptions_escape'), html:"escape"}, |
99 | {tag:'select', name:this.getId('CSV_inputOptions_escape'), id:this.getId('CSV_inputOptions_escape'), children:[ | 96 | {tag:'select', name:this.getId('CSV_inputOptions_escape'), id:this.getId('CSV_inputOptions_escape'), children:[ |
100 | {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, | 97 | {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, |
101 | {tag:'option', name:'slash', value:'\/', html:"slash (\/)"}, | 98 | {tag:'option', name:'slash', value:'\/', html:"slash (\/)"}, |
102 | {tag:'option', name:'backslash', value:'\\', html:"backslash (\\)"} | 99 | {tag:'option', name:'backslash', value:'\\', html:"backslash (\\)"} |
103 | ]} | 100 | ]} |
104 | ]} | 101 | ]} |
105 | ]} | 102 | ]} |
106 | ]} | 103 | ]} |
107 | ]}, | 104 | ]}, |
108 | this.textAreaConfig() | 105 | this.textAreaConfig() |
109 | ]} | 106 | ]} |
110 | ]}, | 107 | ]}, |
111 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, | 108 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, |
112 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, | 109 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, |
113 | {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, | 110 | {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, |
114 | {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, | 111 | {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, |
115 | {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, | 112 | {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, |
116 | {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ | 113 | {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ |
117 | {tag:'div', children:[ | 114 | {tag:'div', children:[ |
118 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 115 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
119 | ]} | 116 | ]} |
120 | ]}, | 117 | ]}, |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js index 50dcb93..c3d2fac 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Import.ClipperzImportComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.Import.ClipperzImportComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.Import.ClipperzImportComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Import.ClipperzImportComponent.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this.render(); | 38 | this.render(); |
42 | 39 | ||
43 | return this; | 40 | return this; |
44 | } | 41 | } |
45 | 42 | ||
46 | //============================================================================= | 43 | //============================================================================= |
47 | 44 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.Import.ClipperzImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.Import.ClipperzImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
49 | 46 | ||
50 | 'toString': function() { | 47 | 'toString': function() { |
51 | return "Clipperz.PM.Components.Import.ClipperzImportComponent component"; | 48 | return "Clipperz.PM.Components.Import.ClipperzImportComponent component"; |
52 | }, | 49 | }, |
53 | 50 | ||
54 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
55 | 52 | ||
56 | 'render': function() { | 53 | 'render': function() { |
57 | //MochiKit.Logging.logDebug(">>> Import.ClipperzImportComponent.render"); | 54 | //MochiKit.Logging.logDebug(">>> Import.ClipperzImportComponent.render"); |
58 | this.domHelper().append(this.element(), {tag:'div', cls:'clipperzImportWizard', children:[ | 55 | this.domHelper().append(this.element(), {tag:'div', cls:'clipperzImportWizard', children:[ |
59 | {tag:'h3', htmlString:Clipperz.PM.Strings['Clipperz_ImportWizard_Title']}, | 56 | {tag:'h3', htmlString:Clipperz.PM.Strings['Clipperz_ImportWizard_Title']}, |
60 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 57 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
61 | {tag:'div', cls:'importStepBlocks', children:[ | 58 | {tag:'div', cls:'importStepBlocks', children:[ |
62 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 59 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
63 | {tag:'div', children:[ | 60 | {tag:'div', children:[ |
64 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_clipperz_description']}, | 61 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_clipperz_description']}, |
65 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 62 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
66 | this.textAreaConfig() | 63 | this.textAreaConfig() |
67 | ]} | 64 | ]} |
68 | ]}, | 65 | ]}, |
69 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ | 66 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ |
70 | {tag:'div', children:[ | 67 | {tag:'div', children:[ |
71 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 68 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
72 | ]} | 69 | ]} |
73 | ]}, | 70 | ]}, |
74 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ | 71 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ |
75 | {tag:'div', children:[ | 72 | {tag:'div', children:[ |
76 | {tag:'h4', html:"done"} | 73 | {tag:'h4', html:"done"} |
77 | ]} | 74 | ]} |
78 | ]} | 75 | ]} |
79 | ]}, | 76 | ]}, |
80 | {tag:'div', cls:'importOptionsButtons', children:[ | 77 | {tag:'div', cls:'importOptionsButtons', children:[ |
81 | {tag:'table', children:[ | 78 | {tag:'table', children:[ |
82 | {tag:'tbody', children:[ | 79 | {tag:'tbody', children:[ |
83 | {tag:'tr', children:[ | 80 | {tag:'tr', children:[ |
84 | {tag:'td', html:' '}, | 81 | {tag:'td', html:' '}, |
85 | {tag:'td', children:[ | 82 | {tag:'td', children:[ |
86 | {tag:'div', id:this.getId('backActionButton')} | 83 | {tag:'div', id:this.getId('backActionButton')} |
87 | ]}, | 84 | ]}, |
88 | {tag:'td', html:' '}, | 85 | {tag:'td', html:' '}, |
89 | {tag:'td', children:[ | 86 | {tag:'td', children:[ |
90 | {tag:'div', id:this.getId('nextActionButton')} | 87 | {tag:'div', id:this.getId('nextActionButton')} |
91 | ]}, | 88 | ]}, |
92 | {tag:'td', html:' '} | 89 | {tag:'td', html:' '} |
93 | ]} | 90 | ]} |
94 | ]} | 91 | ]} |
95 | ]} | 92 | ]} |
96 | ]} | 93 | ]} |
97 | ]}); | 94 | ]}); |
98 | 95 | ||
99 | this.updateSteps(); | 96 | this.updateSteps(); |
100 | 97 | ||
101 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); | 98 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); |
102 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); | 99 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); |
103 | 100 | ||
104 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() | 101 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() |
105 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 102 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
106 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 103 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
107 | //MochiKit.Logging.logDebug("<<< Import.ClipperzImportComponent.render"); | 104 | //MochiKit.Logging.logDebug("<<< Import.ClipperzImportComponent.render"); |
108 | }, | 105 | }, |
109 | 106 | ||
110 | //------------------------------------------------------------------------- | 107 | //------------------------------------------------------------------------- |
111 | 108 | ||
112 | 'nextAction': function() { | 109 | 'nextAction': function() { |
113 | switch (this.currentStep()) { | 110 | switch (this.currentStep()) { |
114 | case 0: //-> 1 | 111 | case 0: //-> 1 |
115 | this.previewValues(); | 112 | this.previewValues(); |
116 | break; | 113 | break; |
117 | case 1: //-> 2 | 114 | case 1: //-> 2 |
118 | this.importValues(); | 115 | this.importValues(); |
119 | break; | 116 | break; |
120 | } | 117 | } |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js index ecdf509..ad0d985 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Import.ExcelImportComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.Import.ExcelImportComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | this._steps = ['EXCEL_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; | 36 | this._steps = ['EXCEL_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; |
40 | 37 | ||
41 | Clipperz.PM.Components.Import.ExcelImportComponent.superclass.constructor.call(this, anElement, args); | 38 | Clipperz.PM.Components.Import.ExcelImportComponent.superclass.constructor.call(this, anElement, args); |
42 | 39 | ||
43 | return this; | 40 | return this; |
44 | } | 41 | } |
45 | 42 | ||
46 | //============================================================================= | 43 | //============================================================================= |
47 | 44 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.Import.ExcelImportComponent, Clipperz.PM.Components.Import.CSVImportComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.Import.ExcelImportComponent, Clipperz.PM.Components.Import.CSVImportComponent, { |
49 | 46 | ||
50 | 'toString': function() { | 47 | 'toString': function() { |
51 | return "Clipperz.PM.Components.Import.ExcelImportComponent component"; | 48 | return "Clipperz.PM.Components.Import.ExcelImportComponent component"; |
52 | }, | 49 | }, |
53 | 50 | ||
54 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
55 | 52 | ||
56 | 'render': function() { | 53 | 'render': function() { |
57 | //MochiKit.Logging.logDebug(">>> Import.ExcelImportComponent.render"); | 54 | //MochiKit.Logging.logDebug(">>> Import.ExcelImportComponent.render"); |
58 | this.domHelper().append(this.element(), {tag:'div', cls:'excelImportWizard', children:[ | 55 | this.domHelper().append(this.element(), {tag:'div', cls:'excelImportWizard', children:[ |
59 | {tag:'h3', htmlString:Clipperz.PM.Strings['Excel_ImportWizard_Title']}, | 56 | {tag:'h3', htmlString:Clipperz.PM.Strings['Excel_ImportWizard_Title']}, |
60 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 57 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
61 | {tag:'div', cls:'importStepBlocks', children:[ | 58 | {tag:'div', cls:'importStepBlocks', children:[ |
62 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 59 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
63 | {tag:'div', children:[ | 60 | {tag:'div', children:[ |
64 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_excel_description']}, | 61 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_excel_description']}, |
65 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 62 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
66 | this.textAreaConfig() | 63 | this.textAreaConfig() |
67 | ]} | 64 | ]} |
68 | ]}, | 65 | ]}, |
69 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, | 66 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, |
70 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, | 67 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, |
71 | {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, | 68 | {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, |
72 | {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, | 69 | {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, |
73 | {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, | 70 | {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, |
74 | {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ | 71 | {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ |
75 | {tag:'div', children:[ | 72 | {tag:'div', children:[ |
76 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 73 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
77 | ]} | 74 | ]} |
78 | ]}, | 75 | ]}, |
79 | {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ | 76 | {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ |
80 | {tag:'div', children:[ | 77 | {tag:'div', children:[ |
81 | {tag:'h4', html:"done"} | 78 | {tag:'h4', html:"done"} |
82 | ]} | 79 | ]} |
83 | ]} | 80 | ]} |
84 | ]}, | 81 | ]}, |
85 | {tag:'div', cls:'importOptionsButtons', children:[ | 82 | {tag:'div', cls:'importOptionsButtons', children:[ |
86 | {tag:'table', children:[ | 83 | {tag:'table', children:[ |
87 | {tag:'tbody', children:[ | 84 | {tag:'tbody', children:[ |
88 | {tag:'tr', children:[ | 85 | {tag:'tr', children:[ |
89 | {tag:'td', html:' '}, | 86 | {tag:'td', html:' '}, |
90 | {tag:'td', children:[ | 87 | {tag:'td', children:[ |
91 | {tag:'div', id:this.getId('backActionButton')} | 88 | {tag:'div', id:this.getId('backActionButton')} |
92 | ]}, | 89 | ]}, |
93 | {tag:'td', html:' '}, | 90 | {tag:'td', html:' '}, |
94 | {tag:'td', children:[ | 91 | {tag:'td', children:[ |
95 | {tag:'div', id:this.getId('nextActionButton')} | 92 | {tag:'div', id:this.getId('nextActionButton')} |
96 | ]}, | 93 | ]}, |
97 | {tag:'td', html:' '} | 94 | {tag:'td', html:' '} |
98 | ]} | 95 | ]} |
99 | ]} | 96 | ]} |
100 | ]} | 97 | ]} |
101 | ]} | 98 | ]} |
102 | ]}); | 99 | ]}); |
103 | 100 | ||
104 | this.updateSteps(); | 101 | this.updateSteps(); |
105 | 102 | ||
106 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); | 103 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); |
107 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); | 104 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); |
108 | 105 | ||
109 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() | 106 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() |
110 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 107 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
111 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 108 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
112 | this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 109 | this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
113 | this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 110 | this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
114 | this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 111 | this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
115 | this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 112 | this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
116 | this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 113 | this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
117 | //MochiKit.Logging.logDebug("<<< Import.ExcelImportComponent.render"); | 114 | //MochiKit.Logging.logDebug("<<< Import.ExcelImportComponent.render"); |
118 | }, | 115 | }, |
119 | 116 | ||
120 | //------------------------------------------------------------------------- | 117 | //------------------------------------------------------------------------- |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js index 4f6b1e4..a55455a 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Import.GenericImportComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.Import.GenericImportComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | this._steps = this._steps || ['EDIT', 'PREVIEW', 'IMPORT']; | 36 | this._steps = this._steps || ['EDIT', 'PREVIEW', 'IMPORT']; |
40 | 37 | ||
41 | Clipperz.PM.Components.Import.GenericImportComponent.superclass.constructor.call(this, anElement, args); | 38 | Clipperz.PM.Components.Import.GenericImportComponent.superclass.constructor.call(this, anElement, args); |
42 | 39 | ||
43 | this._user = args['user']; | 40 | this._user = args['user']; |
44 | 41 | ||
45 | this._currentStep = 0; | 42 | this._currentStep = 0; |
46 | this._currentStatus = 'IDLE'; //'PROCESSING' | 43 | this._currentStatus = 'IDLE'; //'PROCESSING' |
47 | 44 | ||
48 | this._parsedValues = null; | 45 | this._parsedValues = null; |
49 | this._processedValues = null; | 46 | this._processedValues = null; |
50 | 47 | ||
51 | this._backButton = null; | 48 | this._backButton = null; |
52 | this._nextButton = null; | 49 | this._nextButton = null; |
53 | 50 | ||
54 | Clipperz.NotificationCenter.register(null, 'importProcessorProgressUpdate', this, 'updateProgressDialogStatus'); | 51 | Clipperz.NotificationCenter.register(null, 'importProcessorProgressUpdate', this, 'updateProgressDialogStatus'); |
55 | 52 | ||
56 | return this; | 53 | return this; |
57 | } | 54 | } |
58 | 55 | ||
59 | //============================================================================= | 56 | //============================================================================= |
60 | 57 | ||
61 | YAHOO.extendX(Clipperz.PM.Components.Import.GenericImportComponent, Clipperz.PM.Components.BaseComponent, { | 58 | YAHOO.extendX(Clipperz.PM.Components.Import.GenericImportComponent, Clipperz.PM.Components.BaseComponent, { |
62 | 59 | ||
63 | 'toString': function() { | 60 | 'toString': function() { |
64 | return "Clipperz.PM.Components.Import.GenericImportComponent component"; | 61 | return "Clipperz.PM.Components.Import.GenericImportComponent component"; |
65 | }, | 62 | }, |
66 | 63 | ||
67 | //------------------------------------------------------------------------- | 64 | //------------------------------------------------------------------------- |
68 | 65 | ||
69 | 'user': function() { | 66 | 'user': function() { |
70 | return this._user; | 67 | return this._user; |
71 | }, | 68 | }, |
72 | 69 | ||
73 | //------------------------------------------------------------------------- | 70 | //------------------------------------------------------------------------- |
74 | 71 | ||
75 | 'textAreaConfig': function() { | 72 | 'textAreaConfig': function() { |
76 | return {tag:'textarea', name:this.getId('importTextArea'), cls:'importTextArea', id:this.getId('importTextArea'), cols:60, rows:15, html:""}; | 73 | return {tag:'textarea', name:this.getId('importTextArea'), cls:'importTextArea', id:this.getId('importTextArea'), cols:60, rows:15, html:""}; |
77 | }, | 74 | }, |
78 | 75 | ||
79 | 'textAreaContent': function() { | 76 | 'textAreaContent': function() { |
80 | return this.getDom('importTextArea').value | 77 | return this.getDom('importTextArea').value |
81 | }, | 78 | }, |
82 | 79 | ||
83 | //------------------------------------------------------------------------- | 80 | //------------------------------------------------------------------------- |
84 | 81 | ||
85 | 'steps': function() { | 82 | 'steps': function() { |
86 | return this._steps; | 83 | return this._steps; |
87 | }, | 84 | }, |
88 | 85 | ||
89 | 'currentStep': function() { | 86 | 'currentStep': function() { |
90 | return this._currentStep; | 87 | return this._currentStep; |
91 | }, | 88 | }, |
92 | 89 | ||
93 | 'setCurrentStep': function(aValue) { | 90 | 'setCurrentStep': function(aValue) { |
94 | this._currentStep = aValue; | 91 | this._currentStep = aValue; |
95 | this.updateSteps(); | 92 | this.updateSteps(); |
96 | }, | 93 | }, |
97 | 94 | ||
98 | //------------------------------------------------------------------------- | 95 | //------------------------------------------------------------------------- |
99 | 96 | ||
100 | 'currentStatus': function() { | 97 | 'currentStatus': function() { |
101 | return this._currentStatus; | 98 | return this._currentStatus; |
102 | }, | 99 | }, |
103 | 100 | ||
104 | 'startProcessing': function() { | 101 | 'startProcessing': function() { |
105 | this._currentStatus = 'PROCESSING'; | 102 | this._currentStatus = 'PROCESSING'; |
106 | this.updateSteps(); | 103 | this.updateSteps(); |
107 | }, | 104 | }, |
108 | 105 | ||
109 | 'processingDone': function() { | 106 | 'processingDone': function() { |
110 | this._currentStatus = 'IDLE'; | 107 | this._currentStatus = 'IDLE'; |
111 | this.setCurrentStep(this.currentStep() + 1); | 108 | this.setCurrentStep(this.currentStep() + 1); |
112 | }, | 109 | }, |
113 | 110 | ||
114 | 'processingAborted': function() { | 111 | 'processingAborted': function() { |
115 | this._currentStatus = 'IDLE'; | 112 | this._currentStatus = 'IDLE'; |
116 | this.updateSteps(); | 113 | this.updateSteps(); |
117 | }, | 114 | }, |
118 | 115 | ||
119 | //------------------------------------------------------------------------- | 116 | //------------------------------------------------------------------------- |
120 | 117 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js index 0657520..5f4fe33 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Import.KeePassImportComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.Import.KeePassImportComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.Import.KeePassImportComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Import.KeePassImportComponent.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._steps = ['EDIT', 'KEEPASS_SETTINGS', 'PREVIEW', 'IMPORT']; | 38 | this._steps = ['EDIT', 'KEEPASS_SETTINGS', 'PREVIEW', 'IMPORT']; |
42 | this._definedFields = ['Group', 'Group Tree', 'UserName', 'URL', 'Password', 'Notes', 'UUID', 'Icon', 'Creation Time', 'Last Access', 'Last Modification', 'Expires', 'Attachment Description', 'Attachment']; | 39 | this._definedFields = ['Group', 'Group Tree', 'UserName', 'URL', 'Password', 'Notes', 'UUID', 'Icon', 'Creation Time', 'Last Access', 'Last Modification', 'Expires', 'Attachment Description', 'Attachment']; |
43 | 40 | ||
44 | this.render(); | 41 | this.render(); |
45 | 42 | ||
46 | return this; | 43 | return this; |
47 | } | 44 | } |
48 | 45 | ||
49 | //============================================================================= | 46 | //============================================================================= |
50 | 47 | ||
51 | YAHOO.extendX(Clipperz.PM.Components.Import.KeePassImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 48 | YAHOO.extendX(Clipperz.PM.Components.Import.KeePassImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
52 | 49 | ||
53 | 'toString': function() { | 50 | 'toString': function() { |
54 | return "Clipperz.PM.Components.Import.KeePassImportComponent component"; | 51 | return "Clipperz.PM.Components.Import.KeePassImportComponent component"; |
55 | }, | 52 | }, |
56 | 53 | ||
57 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
58 | 55 | ||
59 | 'render': function() { | 56 | 'render': function() { |
60 | //MochiKit.Logging.logDebug(">>> Import.KeePassImportComponent.render"); | 57 | //MochiKit.Logging.logDebug(">>> Import.KeePassImportComponent.render"); |
61 | this.domHelper().append(this.element(), {tag:'div', cls:'keePassImportWizard', children:[ | 58 | this.domHelper().append(this.element(), {tag:'div', cls:'keePassImportWizard', children:[ |
62 | {tag:'h3', htmlString:Clipperz.PM.Strings['KeePass_ImportWizard_Title']}, | 59 | {tag:'h3', htmlString:Clipperz.PM.Strings['KeePass_ImportWizard_Title']}, |
63 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 60 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
64 | {tag:'div', cls:'importStepBlocks', children:[ | 61 | {tag:'div', cls:'importStepBlocks', children:[ |
65 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 62 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
66 | {tag:'div', children:[ | 63 | {tag:'div', children:[ |
67 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_keePass_description']}, | 64 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_keePass_description']}, |
68 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 65 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
69 | this.textAreaConfig() | 66 | this.textAreaConfig() |
70 | ]} | 67 | ]} |
71 | ]}, | 68 | ]}, |
72 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ | 69 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ |
73 | {tag:'div', children:[ | 70 | {tag:'div', children:[ |
74 | {tag:'div', id:this.getId('settingsDiv'), children:[ | 71 | {tag:'div', id:this.getId('settingsDiv'), children:[ |
75 | {tag:'table', id:'KeePassSettings', children:[ | 72 | {tag:'table', id:'KeePassSettings', children:[ |
76 | {tag:'tbody', children:[ | 73 | {tag:'tbody', children:[ |
77 | {tag:'tr', children:[ | 74 | {tag:'tr', children:[ |
78 | {tag:'td', width:'50%', valign:'top', children:[ | 75 | {tag:'td', width:'50%', valign:'top', children:[ |
79 | {tag:'table', children:[ | 76 | {tag:'table', children:[ |
80 | {tag:'tbody', children:[ | 77 | {tag:'tbody', children:[ |
81 | {tag:'tr', children:[ | 78 | {tag:'tr', children:[ |
82 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group_checkbox'), name:'Group'/*, checked:true*/}]}, | 79 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group_checkbox'), name:'Group'/*, checked:true*/}]}, |
83 | {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group_label'), html:"Group"}]} | 80 | {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group_label'), html:"Group"}]} |
84 | ]}, | 81 | ]}, |
85 | {tag:'tr', children:[ | 82 | {tag:'tr', children:[ |
86 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group Tree_checkbox'), name:'Group Tree'/*, checked:true*/}]}, | 83 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group Tree_checkbox'), name:'Group Tree'/*, checked:true*/}]}, |
87 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group Tree_label'), html:"Group Tree"}]} | 84 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group Tree_label'), html:"Group Tree"}]} |
88 | ]}, | 85 | ]}, |
89 | {tag:'tr', children:[ | 86 | {tag:'tr', children:[ |
90 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UserName_checkbox'), name:'UserName', checked:true}]}, | 87 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UserName_checkbox'), name:'UserName', checked:true}]}, |
91 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UserName_label'), html:"UserName"}]} | 88 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UserName_label'), html:"UserName"}]} |
92 | ]}, | 89 | ]}, |
93 | {tag:'tr', children:[ | 90 | {tag:'tr', children:[ |
94 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('URL_checkbox'), name:'URL', checked:true}]}, | 91 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('URL_checkbox'), name:'URL', checked:true}]}, |
95 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('URL_label'), html:"URL"}]} | 92 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('URL_label'), html:"URL"}]} |
96 | ]}, | 93 | ]}, |
97 | {tag:'tr', children:[ | 94 | {tag:'tr', children:[ |
98 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Password_checkbox'), name:'Password', checked:true}]}, | 95 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Password_checkbox'), name:'Password', checked:true}]}, |
99 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Password_label'), html:"Password"}]} | 96 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Password_label'), html:"Password"}]} |
100 | ]}, | 97 | ]}, |
101 | {tag:'tr', children:[ | 98 | {tag:'tr', children:[ |
102 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Notes_checkbox'), name:'Notes', checked:true}]}, | 99 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Notes_checkbox'), name:'Notes', checked:true}]}, |
103 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Notes_label'), html:"Notes"}]} | 100 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Notes_label'), html:"Notes"}]} |
104 | ]}, | 101 | ]}, |
105 | {tag:'tr', children:[ | 102 | {tag:'tr', children:[ |
106 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UUID_checkbox'), name:'UUID'/*, checked:true*/}]}, | 103 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UUID_checkbox'), name:'UUID'/*, checked:true*/}]}, |
107 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UUID_label'), html:"UUID"}]} | 104 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UUID_label'), html:"UUID"}]} |
108 | ]} | 105 | ]} |
109 | ]} | 106 | ]} |
110 | ]} | 107 | ]} |
111 | ]}, | 108 | ]}, |
112 | {tag:'td', width:'50%', valign:'top', children:[ | 109 | {tag:'td', width:'50%', valign:'top', children:[ |
113 | {tag:'table', children:[ | 110 | {tag:'table', children:[ |
114 | {tag:'tbody', children:[ | 111 | {tag:'tbody', children:[ |
115 | {tag:'tr', children:[ | 112 | {tag:'tr', children:[ |
116 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Icon_checkbox'), name:'Icon'/*, checked:true*/}]}, | 113 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Icon_checkbox'), name:'Icon'/*, checked:true*/}]}, |
117 | {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Icon_label'), html:"Icon"}]} | 114 | {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Icon_label'), html:"Icon"}]} |
118 | ]}, | 115 | ]}, |
119 | {tag:'tr', children:[ | 116 | {tag:'tr', children:[ |
120 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Creation Time_checkbox'), name:'Creation Time'/*, checked:true*/}]}, | 117 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Creation Time_checkbox'), name:'Creation Time'/*, checked:true*/}]}, |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js index 54813bc..05baf46 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Import.MainComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.Import.MainComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.Import.MainComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Import.MainComponent.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._user = args.user; | 38 | this._user = args.user; |
42 | this._wizardComponent = null; | 39 | this._wizardComponent = null; |
43 | 40 | ||
44 | this._backButton = null; | 41 | this._backButton = null; |
45 | this._nextButton = null; | 42 | this._nextButton = null; |
46 | 43 | ||
47 | this._selectedComponent = null; | 44 | this._selectedComponent = null; |
48 | 45 | ||
49 | this.render(); | 46 | this.render(); |
50 | 47 | ||
51 | return this; | 48 | return this; |
52 | } | 49 | } |
53 | 50 | ||
54 | //============================================================================= | 51 | //============================================================================= |
55 | 52 | ||
56 | YAHOO.extendX(Clipperz.PM.Components.Import.MainComponent, Clipperz.PM.Components.BaseComponent, { | 53 | YAHOO.extendX(Clipperz.PM.Components.Import.MainComponent, Clipperz.PM.Components.BaseComponent, { |
57 | 54 | ||
58 | 'toString': function() { | 55 | 'toString': function() { |
59 | return "Clipperz.PM.Components.Import.MainComponent component"; | 56 | return "Clipperz.PM.Components.Import.MainComponent component"; |
60 | }, | 57 | }, |
61 | 58 | ||
62 | //------------------------------------------------------------------------- | 59 | //------------------------------------------------------------------------- |
63 | 60 | ||
64 | 'user': function() { | 61 | 'user': function() { |
65 | return this._user; | 62 | return this._user; |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | 66 | ||
70 | 'wizardComponent': function() { | 67 | 'wizardComponent': function() { |
71 | return this._wizardComponent; | 68 | return this._wizardComponent; |
72 | }, | 69 | }, |
73 | 70 | ||
74 | 'setWizardComponent': function(aValue) { | 71 | 'setWizardComponent': function(aValue) { |
75 | if (this._wizardComponent != null) { | 72 | if (this._wizardComponent != null) { |
76 | this._wizardComponent.remove(); | 73 | this._wizardComponent.remove(); |
77 | } | 74 | } |
78 | 75 | ||
79 | if (aValue != null) { | 76 | if (aValue != null) { |
80 | this.getElement('importCover').hide(); | 77 | this.getElement('importCover').hide(); |
81 | this.getElement('importWizard').show(); | 78 | this.getElement('importWizard').show(); |
82 | } | 79 | } |
83 | this._wizardComponent = aValue; | 80 | this._wizardComponent = aValue; |
84 | }, | 81 | }, |
85 | 82 | ||
86 | 'resetImportComponent': function() { | 83 | 'resetImportComponent': function() { |
87 | //MochiKit.Logging.logDebug(">>> resetImportComponent"); | 84 | //MochiKit.Logging.logDebug(">>> resetImportComponent"); |
88 | this.setWizardComponent(null); | 85 | this.setWizardComponent(null); |
89 | this.getElement('wizardComponent').update(""); | 86 | this.getElement('wizardComponent').update(""); |
90 | 87 | ||
91 | this.getElement('importCover').show(); | 88 | this.getElement('importCover').show(); |
92 | this.getElement('importWizard').hide(); | 89 | this.getElement('importWizard').hide(); |
93 | //MochiKit.Logging.logDebug("<<< resetImportComponent"); | 90 | //MochiKit.Logging.logDebug("<<< resetImportComponent"); |
94 | }, | 91 | }, |
95 | 92 | ||
96 | //------------------------------------------------------------------------- | 93 | //------------------------------------------------------------------------- |
97 | 94 | ||
98 | 'backButton': function() { | 95 | 'backButton': function() { |
99 | return this._backButton; | 96 | return this._backButton; |
100 | }, | 97 | }, |
101 | 98 | ||
102 | 'setBackButton': function(aValue) { | 99 | 'setBackButton': function(aValue) { |
103 | this._backButton = aValue; | 100 | this._backButton = aValue; |
104 | }, | 101 | }, |
105 | 102 | ||
106 | 'nextButton': function() { | 103 | 'nextButton': function() { |
107 | return this._nextButton; | 104 | return this._nextButton; |
108 | }, | 105 | }, |
109 | 106 | ||
110 | 'setNextButton': function(aValue) { | 107 | 'setNextButton': function(aValue) { |
111 | this._nextButton = aValue; | 108 | this._nextButton = aValue; |
112 | }, | 109 | }, |
113 | 110 | ||
114 | //------------------------------------------------------------------------- | 111 | //------------------------------------------------------------------------- |
115 | 112 | ||
116 | 'render': function() { | 113 | 'render': function() { |
117 | //MochiKit.Logging.logDebug(">>> Import.MainComponent.render"); | 114 | //MochiKit.Logging.logDebug(">>> Import.MainComponent.render"); |
118 | Clipperz.NotificationCenter.unregister(this); | 115 | Clipperz.NotificationCenter.unregister(this); |
119 | MochiKit.Signal.disconnectAllTo(this); | 116 | MochiKit.Signal.disconnectAllTo(this); |
120 | 117 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js index f476ac2..24dc785 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Import.PasswordPlusImportComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.Import.PasswordPlusImportComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.Import.PasswordPlusImportComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Import.PasswordPlusImportComponent.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this.render(); | 38 | this.render(); |
42 | 39 | ||
43 | return this; | 40 | return this; |
44 | } | 41 | } |
45 | 42 | ||
46 | //============================================================================= | 43 | //============================================================================= |
47 | 44 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.Import.PasswordPlusImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.Import.PasswordPlusImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
49 | 46 | ||
50 | 'toString': function() { | 47 | 'toString': function() { |
51 | return "Clipperz.PM.Components.Import.PasswordPlusImportComponent component"; | 48 | return "Clipperz.PM.Components.Import.PasswordPlusImportComponent component"; |
52 | }, | 49 | }, |
53 | 50 | ||
54 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
55 | 52 | ||
56 | 'render': function() { | 53 | 'render': function() { |
57 | //MochiKit.Logging.logDebug(">>> Import.PasswordPlusImportComponent.render"); | 54 | //MochiKit.Logging.logDebug(">>> Import.PasswordPlusImportComponent.render"); |
58 | this.domHelper().append(this.element(), {tag:'div', cls:'passwordPlusImportWizard', children:[ | 55 | this.domHelper().append(this.element(), {tag:'div', cls:'passwordPlusImportWizard', children:[ |
59 | {tag:'h3', htmlString:Clipperz.PM.Strings['PasswordPlus_ImportWizard_Title']}, | 56 | {tag:'h3', htmlString:Clipperz.PM.Strings['PasswordPlus_ImportWizard_Title']}, |
60 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 57 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
61 | {tag:'div', cls:'importStepBlocks', children:[ | 58 | {tag:'div', cls:'importStepBlocks', children:[ |
62 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 59 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
63 | {tag:'div', children:[ | 60 | {tag:'div', children:[ |
64 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_passwordPlus_description']}, | 61 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_passwordPlus_description']}, |
65 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 62 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
66 | this.textAreaConfig() | 63 | this.textAreaConfig() |
67 | ]} | 64 | ]} |
68 | ]}, | 65 | ]}, |
69 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ | 66 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ |
70 | {tag:'div', children:[ | 67 | {tag:'div', children:[ |
71 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 68 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
72 | ]} | 69 | ]} |
73 | ]}, | 70 | ]}, |
74 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ | 71 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ |
75 | {tag:'div', children:[ | 72 | {tag:'div', children:[ |
76 | {tag:'h4', html:"done"} | 73 | {tag:'h4', html:"done"} |
77 | ]} | 74 | ]} |
78 | ]} | 75 | ]} |
79 | ]}, | 76 | ]}, |
80 | {tag:'div', cls:'importOptionsButtons', children:[ | 77 | {tag:'div', cls:'importOptionsButtons', children:[ |
81 | {tag:'table', children:[ | 78 | {tag:'table', children:[ |
82 | {tag:'tbody', children:[ | 79 | {tag:'tbody', children:[ |
83 | {tag:'tr', children:[ | 80 | {tag:'tr', children:[ |
84 | {tag:'td', html:' '}, | 81 | {tag:'td', html:' '}, |
85 | {tag:'td', children:[ | 82 | {tag:'td', children:[ |
86 | {tag:'div', id:this.getId('backActionButton')} | 83 | {tag:'div', id:this.getId('backActionButton')} |
87 | ]}, | 84 | ]}, |
88 | {tag:'td', html:' '}, | 85 | {tag:'td', html:' '}, |
89 | {tag:'td', children:[ | 86 | {tag:'td', children:[ |
90 | {tag:'div', id:this.getId('nextActionButton')} | 87 | {tag:'div', id:this.getId('nextActionButton')} |
91 | ]}, | 88 | ]}, |
92 | {tag:'td', html:' '} | 89 | {tag:'td', html:' '} |
93 | ]} | 90 | ]} |
94 | ]} | 91 | ]} |
95 | ]} | 92 | ]} |
96 | ]} | 93 | ]} |
97 | ]}); | 94 | ]}); |
98 | 95 | ||
99 | this.updateSteps(); | 96 | this.updateSteps(); |
100 | 97 | ||
101 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); | 98 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); |
102 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); | 99 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); |
103 | 100 | ||
104 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() | 101 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() |
105 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 102 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
106 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 103 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
107 | //MochiKit.Logging.logDebug("<<< Import.PasswordPlusImportComponent.render"); | 104 | //MochiKit.Logging.logDebug("<<< Import.PasswordPlusImportComponent.render"); |
108 | }, | 105 | }, |
109 | 106 | ||
110 | //------------------------------------------------------------------------- | 107 | //------------------------------------------------------------------------- |
111 | /* | 108 | /* |
112 | 'backAction': function() { | 109 | 'backAction': function() { |
113 | switch (this.currentStep()) { | 110 | switch (this.currentStep()) { |
114 | case 1: //-> 0 | 111 | case 1: //-> 0 |
115 | this.backButton().disable(); | 112 | this.backButton().disable(); |
116 | this.getElement('step_1').hide(); | 113 | this.getElement('step_1').hide(); |
117 | this.setCurrentStep(0); | 114 | this.setCurrentStep(0); |
118 | this.getElement('step_0').show(); | 115 | this.getElement('step_0').show(); |
119 | break; | 116 | break; |
120 | } | 117 | } |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js index d35bdc6..fe4d45c 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Import.RoboFormImportComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.Import.RoboFormImportComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.Import.RoboFormImportComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Import.RoboFormImportComponent.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this.render(); | 38 | this.render(); |
42 | 39 | ||
43 | return this; | 40 | return this; |
44 | } | 41 | } |
45 | 42 | ||
46 | //============================================================================= | 43 | //============================================================================= |
47 | 44 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.Import.RoboFormImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.Import.RoboFormImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
49 | 46 | ||
50 | 'toString': function() { | 47 | 'toString': function() { |
51 | return "Clipperz.PM.Components.Import.RoboFormImportComponent component"; | 48 | return "Clipperz.PM.Components.Import.RoboFormImportComponent component"; |
52 | }, | 49 | }, |
53 | 50 | ||
54 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
55 | 52 | ||
56 | 'render': function() { | 53 | 'render': function() { |
57 | //MochiKit.Logging.logDebug(">>> Import.RoboFormImportComponent.render"); | 54 | //MochiKit.Logging.logDebug(">>> Import.RoboFormImportComponent.render"); |
58 | this.domHelper().append(this.element(), {tag:'div', cls:'roboFormImportWizard', children:[ | 55 | this.domHelper().append(this.element(), {tag:'div', cls:'roboFormImportWizard', children:[ |
59 | {tag:'h3', htmlString:Clipperz.PM.Strings['RoboForm_ImportWizard_Title']}, | 56 | {tag:'h3', htmlString:Clipperz.PM.Strings['RoboForm_ImportWizard_Title']}, |
60 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 57 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
61 | {tag:'div', cls:'importStepBlocks', children:[ | 58 | {tag:'div', cls:'importStepBlocks', children:[ |
62 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 59 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
63 | {tag:'div', children:[ | 60 | {tag:'div', children:[ |
64 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_roboForm_description']}, | 61 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_roboForm_description']}, |
65 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 62 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
66 | this.textAreaConfig() | 63 | this.textAreaConfig() |
67 | ]} | 64 | ]} |
68 | ]}, | 65 | ]}, |
69 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ | 66 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ |
70 | {tag:'div', children:[ | 67 | {tag:'div', children:[ |
71 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 68 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
72 | ]} | 69 | ]} |
73 | ]}, | 70 | ]}, |
74 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ | 71 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ |
75 | {tag:'div', children:[ | 72 | {tag:'div', children:[ |
76 | {tag:'h4', html:"done"} | 73 | {tag:'h4', html:"done"} |
77 | ]} | 74 | ]} |
78 | ]} | 75 | ]} |
79 | ]}, | 76 | ]}, |
80 | {tag:'div', cls:'importOptionsButtons', children:[ | 77 | {tag:'div', cls:'importOptionsButtons', children:[ |
81 | {tag:'table', children:[ | 78 | {tag:'table', children:[ |
82 | {tag:'tbody', children:[ | 79 | {tag:'tbody', children:[ |
83 | {tag:'tr', children:[ | 80 | {tag:'tr', children:[ |
84 | {tag:'td', html:' '}, | 81 | {tag:'td', html:' '}, |
85 | {tag:'td', children:[ | 82 | {tag:'td', children:[ |
86 | {tag:'div', id:this.getId('backActionButton')} | 83 | {tag:'div', id:this.getId('backActionButton')} |
87 | ]}, | 84 | ]}, |
88 | {tag:'td', html:' '}, | 85 | {tag:'td', html:' '}, |
89 | {tag:'td', children:[ | 86 | {tag:'td', children:[ |
90 | {tag:'div', id:this.getId('nextActionButton')} | 87 | {tag:'div', id:this.getId('nextActionButton')} |
91 | ]}, | 88 | ]}, |
92 | {tag:'td', html:' '} | 89 | {tag:'td', html:' '} |
93 | ]} | 90 | ]} |
94 | ]} | 91 | ]} |
95 | ]} | 92 | ]} |
96 | ]} | 93 | ]} |
97 | ]}); | 94 | ]}); |
98 | 95 | ||
99 | this.updateSteps(); | 96 | this.updateSteps(); |
100 | 97 | ||
101 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); | 98 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); |
102 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); | 99 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); |
103 | 100 | ||
104 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() | 101 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() |
105 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 102 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
106 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 103 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
107 | //MochiKit.Logging.logDebug("<<< Import.RoboFormImportComponent.render"); | 104 | //MochiKit.Logging.logDebug("<<< Import.RoboFormImportComponent.render"); |
108 | }, | 105 | }, |
109 | 106 | ||
110 | //------------------------------------------------------------------------- | 107 | //------------------------------------------------------------------------- |
111 | 108 | ||
112 | 'nextAction': function() { | 109 | 'nextAction': function() { |
113 | switch (this.currentStep()) { | 110 | switch (this.currentStep()) { |
114 | case 0: //-> 1 | 111 | case 0: //-> 1 |
115 | this.previewValues(); | 112 | this.previewValues(); |
116 | break; | 113 | break; |
117 | case 1: //-> 2 | 114 | case 1: //-> 2 |
118 | this.importValues(); | 115 | this.importValues(); |
119 | break; | 116 | break; |
120 | } | 117 | } |
diff --git a/frontend/beta/js/Clipperz/PM/Components/MessageBox.js b/frontend/beta/js/Clipperz/PM/Components/MessageBox.js index d2bc09a..cf9ec86 100644 --- a/frontend/beta/js/Clipperz/PM/Components/MessageBox.js +++ b/frontend/beta/js/Clipperz/PM/Components/MessageBox.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | 29 | ||
33 | 30 | ||
34 | 31 | ||
35 | Clipperz.PM.Components.MessageBoxImplementation = function() { | 32 | Clipperz.PM.Components.MessageBoxImplementation = function() { |
36 | this._step = 0; | 33 | this._step = 0; |
37 | this._steps = 0; | 34 | this._steps = 0; |
38 | 35 | ||
39 | return this; | 36 | return this; |
40 | }; | 37 | }; |
41 | 38 | ||
42 | //YAHOO.extendX(Clipperz.PM.Components.MessageBoxImplementation, Clipperz.PM.Components.BaseComponent, { | 39 | //YAHOO.extendX(Clipperz.PM.Components.MessageBoxImplementation, Clipperz.PM.Components.BaseComponent, { |
43 | Clipperz.PM.Components.MessageBoxImplementation.prototype = MochiKit.Base.update(null, { | 40 | Clipperz.PM.Components.MessageBoxImplementation.prototype = MochiKit.Base.update(null, { |
44 | 41 | ||
45 | 'toString': function() { | 42 | 'toString': function() { |
46 | return "Clipperz.PM.Components.MessageBox"; | 43 | return "Clipperz.PM.Components.MessageBox"; |
47 | }, | 44 | }, |
48 | 45 | ||
49 | //----------------------------------------------------- | 46 | //----------------------------------------------------- |
50 | 47 | ||
51 | 'step': function() { | 48 | 'step': function() { |
52 | return this._step; | 49 | return this._step; |
53 | }, | 50 | }, |
54 | 51 | ||
55 | 'setStep': function(aValue) { | 52 | 'setStep': function(aValue) { |
56 | if (aValue == 'next') { | 53 | if (aValue == 'next') { |
57 | this._step = this._step + 1; | 54 | this._step = this._step + 1; |
58 | } else { | 55 | } else { |
59 | this._step = aValue; | 56 | this._step = aValue; |
60 | } | 57 | } |
61 | 58 | ||
62 | if (this._step > this.steps()) { | 59 | if (this._step > this.steps()) { |
63 | //MochiKit.Logging.logDebug("overstepping: " + this._step + " (" + this.steps() + ")"); | 60 | //MochiKit.Logging.logDebug("overstepping: " + this._step + " (" + this.steps() + ")"); |
64 | this._step = this.steps(); | 61 | this._step = this.steps(); |
65 | } | 62 | } |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //----------------------------------------------------- | 65 | //----------------------------------------------------- |
69 | 66 | ||
70 | 'steps': function() { | 67 | 'steps': function() { |
71 | return this._steps; | 68 | return this._steps; |
72 | }, | 69 | }, |
73 | 70 | ||
74 | 'setSteps': function(aValue) { | 71 | 'setSteps': function(aValue) { |
75 | if (aValue.constructor == String) { | 72 | if (aValue.constructor == String) { |
76 | if (aValue.charAt(0) == '+') { | 73 | if (aValue.charAt(0) == '+') { |
77 | this._steps += aValue.substring(1)*1; | 74 | this._steps += aValue.substring(1)*1; |
78 | } else if (aValue.charAt(0) == '-') { | 75 | } else if (aValue.charAt(0) == '-') { |
79 | this._steps -= aValue.substring(1)*1; | 76 | this._steps -= aValue.substring(1)*1; |
80 | } else { | 77 | } else { |
81 | this._steps = aValue.substring(1)*1; | 78 | this._steps = aValue.substring(1)*1; |
82 | } | 79 | } |
83 | } else { | 80 | } else { |
84 | this._steps = aValue; | 81 | this._steps = aValue; |
85 | } | 82 | } |
86 | }, | 83 | }, |
87 | 84 | ||
88 | //----------------------------------------------------- | 85 | //----------------------------------------------------- |
89 | 86 | ||
90 | 'deferredShow': function(aConfiguration, anAnimationTargetElement, aValue) { | 87 | 'deferredShow': function(aConfiguration, anAnimationTargetElement, aValue) { |
91 | this.show(aConfiguration, anAnimationTargetElement); | 88 | this.show(aConfiguration, anAnimationTargetElement); |
92 | 89 | ||
93 | return aValue; | 90 | return aValue; |
94 | }, | 91 | }, |
95 | 92 | ||
96 | 'show': function(aConfiguration, anAnimationTargetElement) { | 93 | 'show': function(aConfiguration, anAnimationTargetElement) { |
97 | varmessageBoxConfiguration; | 94 | varmessageBoxConfiguration; |
98 | 95 | ||
99 | messageBoxConfiguration = MochiKit.Base.clone(aConfiguration); | 96 | messageBoxConfiguration = MochiKit.Base.clone(aConfiguration); |
100 | messageBoxConfiguration.msg = messageBoxConfiguration.text; | 97 | messageBoxConfiguration.msg = messageBoxConfiguration.text; |
101 | messageBoxConfiguration.animEl = anAnimationTargetElement; | 98 | messageBoxConfiguration.animEl = anAnimationTargetElement; |
102 | messageBoxConfiguration.progress = messageBoxConfiguration.showProgressBar; | 99 | messageBoxConfiguration.progress = messageBoxConfiguration.showProgressBar; |
103 | messageBoxConfiguration.closable = messageBoxConfiguration.showCloseButton; | 100 | messageBoxConfiguration.closable = messageBoxConfiguration.showCloseButton; |
104 | this.setSteps(aConfiguration.steps || 0); | 101 | this.setSteps(aConfiguration.steps || 0); |
105 | this.setStep(aConfiguration.step || 0); | 102 | this.setStep(aConfiguration.step || 0); |
106 | delete messageBoxConfiguration.buttons; | 103 | delete messageBoxConfiguration.buttons; |
107 | 104 | ||
108 | Clipperz.YUI.MessageBox.show(messageBoxConfiguration); | 105 | Clipperz.YUI.MessageBox.show(messageBoxConfiguration); |
109 | }, | 106 | }, |
110 | 107 | ||
111 | //----------------------------------------------------- | 108 | //----------------------------------------------------- |
112 | 109 | ||
113 | 'update': function(someValues) { | 110 | 'update': function(someValues) { |
114 | //MochiKit.Logging.logDebug(">>> MessageBox.update"); | 111 | //MochiKit.Logging.logDebug(">>> MessageBox.update"); |
115 | if (someValues.title) { | 112 | if (someValues.title) { |
116 | Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title); | 113 | Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title); |
117 | }; | 114 | }; |
118 | 115 | ||
119 | if (someValues.text) { | 116 | if (someValues.text) { |
120 | Clipperz.YUI.MessageBox.updateText(someValues.text); | 117 | Clipperz.YUI.MessageBox.updateText(someValues.text); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js index 9d191f6..7b0b12b 100644 --- a/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.OTP) == 'undefined') { Clipperz.PM.Components.OTP = {}; } | 29 | if (typeof(Clipperz.PM.Components.OTP) == 'undefined') { Clipperz.PM.Components.OTP = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.OTP.MainComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.OTP.MainComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | //MochiKit.Logging.logDebug("new OTP.MainComponent"); | 36 | //MochiKit.Logging.logDebug("new OTP.MainComponent"); |
40 | Clipperz.PM.Components.OTP.MainComponent.superclass.constructor.call(this, anElement, args); | 37 | Clipperz.PM.Components.OTP.MainComponent.superclass.constructor.call(this, anElement, args); |
41 | 38 | ||
42 | this._user = args.user; | 39 | this._user = args.user; |
43 | this._shouldRender = true; | 40 | this._shouldRender = true; |
44 | 41 | ||
45 | this._deleteButton = null; | 42 | this._deleteButton = null; |
46 | this._printButton = null; | 43 | this._printButton = null; |
47 | 44 | ||
48 | Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler'); | 45 | Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler'); |
49 | //Clipperz.NotificationCenter.register(null, 'oneTimePasswordAdded', this, 'render'); | 46 | //Clipperz.NotificationCenter.register(null, 'oneTimePasswordAdded', this, 'render'); |
50 | 47 | ||
51 | return this; | 48 | return this; |
52 | } | 49 | } |
53 | 50 | ||
54 | //============================================================================= | 51 | //============================================================================= |
55 | 52 | ||
56 | YAHOO.extendX(Clipperz.PM.Components.OTP.MainComponent, Clipperz.PM.Components.BaseComponent, { | 53 | YAHOO.extendX(Clipperz.PM.Components.OTP.MainComponent, Clipperz.PM.Components.BaseComponent, { |
57 | 54 | ||
58 | 'toString': function() { | 55 | 'toString': function() { |
59 | return "Clipperz.PM.Components.OTP.MainComponent component"; | 56 | return "Clipperz.PM.Components.OTP.MainComponent component"; |
60 | }, | 57 | }, |
61 | 58 | ||
62 | //------------------------------------------------------------------------- | 59 | //------------------------------------------------------------------------- |
63 | 60 | ||
64 | 'render': function() { | 61 | 'render': function() { |
65 | //MochiKit.Logging.logDebug("### OTP.MainComponent.render"); | 62 | //MochiKit.Logging.logDebug("### OTP.MainComponent.render"); |
66 | Clipperz.NotificationCenter.unregister(this); | 63 | Clipperz.NotificationCenter.unregister(this); |
67 | MochiKit.Signal.disconnectAllTo(this); | 64 | MochiKit.Signal.disconnectAllTo(this); |
68 | 65 | ||
69 | if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { | 66 | if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { |
70 | this.element().update(""); | 67 | this.element().update(""); |
71 | this.domHelper().append(this.element(), {tag:'div', cls:'oneTimePasswordReadOnlyMessage', htmlString:Clipperz.PM.Strings['oneTimePasswordReadOnlyMessage']}); | 68 | this.domHelper().append(this.element(), {tag:'div', cls:'oneTimePasswordReadOnlyMessage', htmlString:Clipperz.PM.Strings['oneTimePasswordReadOnlyMessage']}); |
72 | } else { | 69 | } else { |
73 | var deferredResult; | 70 | var deferredResult; |
74 | 71 | ||
75 | deferredResult = new MochiKit.Async.Deferred(); | 72 | deferredResult = new MochiKit.Async.Deferred(); |
76 | 73 | ||
77 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 1: " + res); return res;}); | 74 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 1: " + res); return res;}); |
78 | deferredResult.addCallback(MochiKit.Base.bind(function() { | 75 | deferredResult.addCallback(MochiKit.Base.bind(function() { |
79 | this.element().update(""); | 76 | this.element().update(""); |
80 | Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', htmlString:Clipperz.PM.Strings['oneTimePasswordLoadingMessage']}); | 77 | Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', htmlString:Clipperz.PM.Strings['oneTimePasswordLoadingMessage']}); |
81 | }, this)); | 78 | }, this)); |
82 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 2: " + res); return res;}); | 79 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 2: " + res); return res;}); |
83 | deferredResult.addCallback(MochiKit.Base.method(this.user(), 'loadOneTimePasswords')); | 80 | deferredResult.addCallback(MochiKit.Base.method(this.user(), 'loadOneTimePasswords')); |
84 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3: " + res); return res;}); | 81 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3: " + res); return res;}); |
85 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3.1: " + Clipperz.Base.serializeJSON(res.serializedData())); return res;}); | 82 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3.1: " + Clipperz.Base.serializeJSON(res.serializedData())); return res;}); |
86 | deferredResult.addCallback(MochiKit.Base.bind(function(aResult) { | 83 | deferredResult.addCallback(MochiKit.Base.bind(function(aResult) { |
87 | vartbodyElement; | 84 | vartbodyElement; |
88 | varoneTimePasswordReferenceKeys; | 85 | varoneTimePasswordReferenceKeys; |
89 | var imageExtension; | 86 | var imageExtension; |
90 | var isThereAnyActiveOneTimePassword; | 87 | var isThereAnyActiveOneTimePassword; |
91 | 88 | ||
92 | isThereAnyActiveOneTimePassword = false; | 89 | isThereAnyActiveOneTimePassword = false; |
93 | 90 | ||
94 | this.element().update(""); | 91 | this.element().update(""); |
95 | Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', id:'oneTimePasswordList', children:[ | 92 | Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', id:'oneTimePasswordList', children:[ |
96 | {tag:'div', id:'oneTimePasswords_header', children:[ | 93 | {tag:'div', id:'oneTimePasswords_header', children:[ |
97 | {tag:'table', width:'100%', children:[ | 94 | {tag:'table', width:'100%', children:[ |
98 | {tag:'tbody', children:[ | 95 | {tag:'tbody', children:[ |
99 | {tag:'tr', children:[ | 96 | {tag:'tr', children:[ |
100 | {tag:'td', width:'10%', children:[ | 97 | {tag:'td', width:'10%', children:[ |
101 | {tag:'div', id:this.getId('createNewOneTimePasswordButton')} | 98 | {tag:'div', id:this.getId('createNewOneTimePasswordButton')} |
102 | ]}, | 99 | ]}, |
103 | {tag:'td', width:'40%', children:[ | 100 | {tag:'td', width:'40%', children:[ |
104 | {tag:'div', id:this.getId('deleteSelectedOneTimePasswordButton')} | 101 | {tag:'div', id:this.getId('deleteSelectedOneTimePasswordButton')} |
105 | ]}, | 102 | ]}, |
106 | {tag:'td', width:'50%', align:'right', children:[ | 103 | {tag:'td', width:'50%', align:'right', children:[ |
107 | {tag:'div', id:this.getId('printOneTimePasswordButton')} | 104 | {tag:'div', id:this.getId('printOneTimePasswordButton')} |
108 | ]} | 105 | ]} |
109 | ]} | 106 | ]} |
110 | ]} | 107 | ]} |
111 | ]}, | 108 | ]}, |
112 | {tag:'div', children:[ | 109 | {tag:'div', children:[ |
113 | {tag:'ul', children:[ | 110 | {tag:'ul', children:[ |
114 | {tag:'li', children:[ | 111 | {tag:'li', children:[ |
115 | {tag:'span', htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_selectLabel']} | 112 | {tag:'span', htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_selectLabel']} |
116 | ]}, | 113 | ]}, |
117 | {tag:'li', children:[ | 114 | {tag:'li', children:[ |
118 | {tag:'a', href:'#', id:this.getId('selectAllOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_all']} | 115 | {tag:'a', href:'#', id:this.getId('selectAllOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_all']} |
119 | ]}, | 116 | ]}, |
120 | {tag:'li', children:[ | 117 | {tag:'li', children:[ |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js index 6b467d0..f7991f1 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Panels.AccountPanel = function(anElement, args) { | 33 | Clipperz.PM.Components.Panels.AccountPanel = function(anElement, args) { |
37 | //MochiKit.Logging.logDebug(">>> new AccountPanel"); | 34 | //MochiKit.Logging.logDebug(">>> new AccountPanel"); |
38 | args = args || {}; | 35 | args = args || {}; |
39 | 36 | ||
40 | Clipperz.PM.Components.Panels.AccountPanel.superclass.constructor.call(this, anElement, args); | 37 | Clipperz.PM.Components.Panels.AccountPanel.superclass.constructor.call(this, anElement, args); |
41 | 38 | ||
42 | Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); | 39 | Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); |
43 | 40 | ||
44 | this._shouldLoadLoginHistory = true; | 41 | this._shouldLoadLoginHistory = true; |
45 | 42 | ||
46 | //this.render(); | 43 | //this.render(); |
47 | //MochiKit.Logging.logDebug("<<< new AccountPanel"); | 44 | //MochiKit.Logging.logDebug("<<< new AccountPanel"); |
48 | 45 | ||
49 | return this; | 46 | return this; |
50 | } | 47 | } |
51 | 48 | ||
52 | //============================================================================= | 49 | //============================================================================= |
53 | 50 | ||
54 | YAHOO.extendX(Clipperz.PM.Components.Panels.AccountPanel, Clipperz.PM.Components.Panels.BasePanel, { | 51 | YAHOO.extendX(Clipperz.PM.Components.Panels.AccountPanel, Clipperz.PM.Components.Panels.BasePanel, { |
55 | 52 | ||
56 | 'toString': function() { | 53 | 'toString': function() { |
57 | return "Clipperz.PM.Components.AccountPanel component"; | 54 | return "Clipperz.PM.Components.AccountPanel component"; |
58 | }, | 55 | }, |
59 | 56 | ||
60 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
61 | 58 | ||
62 | 'render': function() { | 59 | 'render': function() { |
63 | var errorMessageActor; | 60 | var errorMessageActor; |
64 | varchangePasswordButton; | 61 | varchangePasswordButton; |
65 | var deleteAccountButton; | 62 | var deleteAccountButton; |
66 | 63 | ||
67 | try { | 64 | try { |
68 | //MochiKit.Logging.logDebug(">>> AccountPanel.render"); | 65 | //MochiKit.Logging.logDebug(">>> AccountPanel.render"); |
69 | Clipperz.NotificationCenter.unregister(this); | 66 | Clipperz.NotificationCenter.unregister(this); |
70 | MochiKit.Signal.disconnectAllTo(this); | 67 | MochiKit.Signal.disconnectAllTo(this); |
71 | 68 | ||
72 | this.element().update(""); | 69 | this.element().update(""); |
73 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 70 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
74 | {tag:'tbody', children:[ | 71 | {tag:'tbody', children:[ |
75 | {tag:'tr', children:[ | 72 | {tag:'tr', children:[ |
76 | {tag:'td', valign:'top', width:'200', children:[ | 73 | {tag:'td', valign:'top', width:'200', children:[ |
77 | {tag:'ul', id:"accountSubMenu", cls:'subMenu', children:[ | 74 | {tag:'ul', id:"accountSubMenu", cls:'subMenu', children:[ |
78 | {tag:'li', id:'changePassphraseTab', htmlString:Clipperz.PM.Strings['changePasswordTabLabel']}, | 75 | {tag:'li', id:'changePassphraseTab', htmlString:Clipperz.PM.Strings['changePasswordTabLabel']}, |
79 | {tag:'li', id:'manageOTPTab', htmlString:Clipperz.PM.Strings['manageOTPTabLabel']}, | 76 | {tag:'li', id:'manageOTPTab', htmlString:Clipperz.PM.Strings['manageOTPTabLabel']}, |
80 | {tag:'li', id:'accountPreferencesTab', htmlString:Clipperz.PM.Strings['accountPreferencesLabel']}, | 77 | {tag:'li', id:'accountPreferencesTab', htmlString:Clipperz.PM.Strings['accountPreferencesLabel']}, |
81 | {tag:'li', id:'loginHistoryTab', htmlString:Clipperz.PM.Strings['accountLoginHistoryLabel']}, | 78 | {tag:'li', id:'loginHistoryTab', htmlString:Clipperz.PM.Strings['accountLoginHistoryLabel']}, |
82 | {tag:'li', id:'deleteAccountTab', htmlString:Clipperz.PM.Strings['deleteAccountTabLabel']} | 79 | {tag:'li', id:'deleteAccountTab', htmlString:Clipperz.PM.Strings['deleteAccountTabLabel']} |
83 | // {tag:'li', id:'paidAccountTab'), htmlString:Clipperz.PM.Strings['paidAccountTabLabel']} | 80 | // {tag:'li', id:'paidAccountTab'), htmlString:Clipperz.PM.Strings['paidAccountTabLabel']} |
84 | ]} | 81 | ]} |
85 | ]}, | 82 | ]}, |
86 | {tag:'td', valign:'top', children:[ | 83 | {tag:'td', valign:'top', children:[ |
87 | {tag:'ul', cls:'clipperzTabPanels', children:[ | 84 | {tag:'ul', cls:'clipperzTabPanels', children:[ |
88 | {tag:'li', id:this.getId('changePassphrasePanel'), children:[ | 85 | {tag:'li', id:this.getId('changePassphrasePanel'), children:[ |
89 | {tag:'div', cls:'clipperzSubPanel', children:[ | 86 | {tag:'div', cls:'clipperzSubPanel', children:[ |
90 | {tag:'h5', htmlString:Clipperz.PM.Strings['changePasswordTabTitle']}, | 87 | {tag:'h5', htmlString:Clipperz.PM.Strings['changePasswordTabTitle']}, |
91 | {tag:'div', cls:'panelBody', id:'changePassphraseBlock', children:[ | 88 | {tag:'div', cls:'panelBody', id:'changePassphraseBlock', children:[ |
92 | {tag:'form', id:this.getId('changePassphraseForm'), children:[ | 89 | {tag:'form', id:this.getId('changePassphraseForm'), children:[ |
93 | {tag:'h5', cls:'errorMessage', id:this.getId('changePassphrase_errorMessage')}, | 90 | {tag:'h5', cls:'errorMessage', id:this.getId('changePassphrase_errorMessage')}, |
94 | {tag:'table', cls:'panelBody', children:[ | 91 | {tag:'table', cls:'panelBody', children:[ |
95 | {tag:'tr', children:[ | 92 | {tag:'tr', children:[ |
96 | {tag:'td', children:[ | 93 | {tag:'td', children:[ |
97 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormUsernameLabel']} | 94 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormUsernameLabel']} |
98 | ]}, | 95 | ]}, |
99 | {tag:'td', children:[ | 96 | {tag:'td', children:[ |
100 | {tag:'input', type:'text', name:'username', id:this.getId('changePassphrase_username')} | 97 | {tag:'input', type:'text', name:'username', id:this.getId('changePassphrase_username')} |
101 | ]} | 98 | ]} |
102 | ]}, | 99 | ]}, |
103 | {tag:'tr', children:[ | 100 | {tag:'tr', children:[ |
104 | {tag:'td', children:[ | 101 | {tag:'td', children:[ |
105 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormOldPassphraseLabel']} | 102 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormOldPassphraseLabel']} |
106 | ]}, | 103 | ]}, |
107 | {tag:'td', children:[ | 104 | {tag:'td', children:[ |
108 | {tag:'input', type:'password', name:'oldPassphrase', id:this.getId('changePassphrase_oldPassphrase')} | 105 | {tag:'input', type:'password', name:'oldPassphrase', id:this.getId('changePassphrase_oldPassphrase')} |
109 | ]} | 106 | ]} |
110 | ]}, | 107 | ]}, |
111 | {tag:'tr', children:[ | 108 | {tag:'tr', children:[ |
112 | {tag:'td', children:[ | 109 | {tag:'td', children:[ |
113 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormNewPassphraseLabel']} | 110 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormNewPassphraseLabel']} |
114 | ]}, | 111 | ]}, |
115 | {tag:'td', children:[ | 112 | {tag:'td', children:[ |
116 | {tag:'input', type:'password', name:'newPassphrase', id:this.getId('changePassphrase_newPassphrase')} | 113 | {tag:'input', type:'password', name:'newPassphrase', id:this.getId('changePassphrase_newPassphrase')} |
117 | ]} | 114 | ]} |
118 | ]}, | 115 | ]}, |
119 | {tag:'tr', children:[ | 116 | {tag:'tr', children:[ |
120 | {tag:'td', children:[ | 117 | {tag:'td', children:[ |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js index bf60f45..15dd622 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js | |||
@@ -1,96 +1,93 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
33 | 30 | ||
34 | //var _Clipperz_PM_Components_Panels_base_id_ = 0; | 31 | //var _Clipperz_PM_Components_Panels_base_id_ = 0; |
35 | 32 | ||
36 | //############################################################################# | 33 | //############################################################################# |
37 | 34 | ||
38 | Clipperz.PM.Components.Panels.BasePanel = function(anElement, args) { | 35 | Clipperz.PM.Components.Panels.BasePanel = function(anElement, args) { |
39 | args = args || {}; | 36 | args = args || {}; |
40 | 37 | ||
41 | Clipperz.PM.Components.Panels.BasePanel.superclass.constructor.call(this, anElement, args); | 38 | Clipperz.PM.Components.Panels.BasePanel.superclass.constructor.call(this, anElement, args); |
42 | 39 | ||
43 | this._user = args.user || null; | 40 | this._user = args.user || null; |
44 | this._delegate = args.delegate || null; | 41 | this._delegate = args.delegate || null; |
45 | this._tabPanelController = null; | 42 | this._tabPanelController = null; |
46 | //Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); | 43 | //Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); |
47 | 44 | ||
48 | //this._ids = {}; | 45 | //this._ids = {}; |
49 | 46 | ||
50 | return this; | 47 | return this; |
51 | } | 48 | } |
52 | 49 | ||
53 | //============================================================================= | 50 | //============================================================================= |
54 | 51 | ||
55 | YAHOO.extendX(Clipperz.PM.Components.Panels.BasePanel, Clipperz.PM.Components.BaseComponent, { | 52 | YAHOO.extendX(Clipperz.PM.Components.Panels.BasePanel, Clipperz.PM.Components.BaseComponent, { |
56 | 53 | ||
57 | 'toString': function() { | 54 | 'toString': function() { |
58 | return "Clipperz.PM.Components.Panels.BasePanel component"; | 55 | return "Clipperz.PM.Components.Panels.BasePanel component"; |
59 | }, | 56 | }, |
60 | 57 | ||
61 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
62 | 59 | ||
63 | 'user': function() { | 60 | 'user': function() { |
64 | return this._user; | 61 | return this._user; |
65 | }, | 62 | }, |
66 | 63 | ||
67 | 'setUser': function(aValue) { | 64 | 'setUser': function(aValue) { |
68 | this._user = aValue; | 65 | this._user = aValue; |
69 | }, | 66 | }, |
70 | 67 | ||
71 | //------------------------------------------------------------------------- | 68 | //------------------------------------------------------------------------- |
72 | 69 | ||
73 | 'delegate': function() { | 70 | 'delegate': function() { |
74 | return this._delegate; | 71 | return this._delegate; |
75 | }, | 72 | }, |
76 | 73 | ||
77 | 'setDelegate': function(aValue) { | 74 | 'setDelegate': function(aValue) { |
78 | this._delegate = aValue; | 75 | this._delegate = aValue; |
79 | }, | 76 | }, |
80 | 77 | ||
81 | //------------------------------------------------------------------------- | 78 | //------------------------------------------------------------------------- |
82 | 79 | ||
83 | 'tabPanelController': function() { | 80 | 'tabPanelController': function() { |
84 | return this._tabPanelController; | 81 | return this._tabPanelController; |
85 | }, | 82 | }, |
86 | 83 | ||
87 | 'switchLanguageHandler': function() { | 84 | 'switchLanguageHandler': function() { |
88 | //MochiKit.Logging.logDebug(">>> BasePanel.switchLanguageHandler [" + this.toString() + "]"); | 85 | //MochiKit.Logging.logDebug(">>> BasePanel.switchLanguageHandler [" + this.toString() + "]"); |
89 | this.render(); | 86 | this.render(); |
90 | //MochiKit.Logging.logDebug("<<< BasePanel.switchLanguageHandler [" + this.toString() + "]"); | 87 | //MochiKit.Logging.logDebug("<<< BasePanel.switchLanguageHandler [" + this.toString() + "]"); |
91 | }, | 88 | }, |
92 | 89 | ||
93 | //------------------------------------------------------------------------- | 90 | //------------------------------------------------------------------------- |
94 | __syntaxFix__: "syntax fix" | 91 | __syntaxFix__: "syntax fix" |
95 | 92 | ||
96 | }); | 93 | }); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js index f0eb9c8..5a91d83 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js | |||
@@ -1,105 +1,102 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Panels.ContactsPanel = function(anElement, args) { | 33 | Clipperz.PM.Components.Panels.ContactsPanel = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.Panels.ContactsPanel.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Panels.ContactsPanel.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this.render(); | 38 | this.render(); |
42 | 39 | ||
43 | return this; | 40 | return this; |
44 | } | 41 | } |
45 | 42 | ||
46 | //============================================================================= | 43 | //============================================================================= |
47 | 44 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.Panels.ContactsPanel, Clipperz.PM.Components.Panels.BasePanel, { | 45 | YAHOO.extendX(Clipperz.PM.Components.Panels.ContactsPanel, Clipperz.PM.Components.Panels.BasePanel, { |
49 | 46 | ||
50 | 'toString': function() { | 47 | 'toString': function() { |
51 | return "Clipperz.PM.Components.ContactsPanel component"; | 48 | return "Clipperz.PM.Components.ContactsPanel component"; |
52 | }, | 49 | }, |
53 | 50 | ||
54 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
55 | 52 | ||
56 | 'render': function() { | 53 | 'render': function() { |
57 | // var tabPanelControllerConfig; | 54 | // var tabPanelControllerConfig; |
58 | 55 | ||
59 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 56 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
60 | {tag:'tbody', children:[ | 57 | {tag:'tbody', children:[ |
61 | {tag:'tr', children:[ | 58 | {tag:'tr', children:[ |
62 | {tag:'td', valign:'top', width:'200', children:[ | 59 | {tag:'td', valign:'top', width:'200', children:[ |
63 | {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ | 60 | {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ |
64 | {tag:'li', id:this.getId('contacts'), htmlString:Clipperz.PM.Strings['contactsTabLabel']}, | 61 | {tag:'li', id:this.getId('contacts'), htmlString:Clipperz.PM.Strings['contactsTabLabel']}, |
65 | ]} | 62 | ]} |
66 | ]}, | 63 | ]}, |
67 | {tag:'td', valign:'top', children:[ | 64 | {tag:'td', valign:'top', children:[ |
68 | {tag:'ul', cls:'clipperzTabPanels', children:[ | 65 | {tag:'ul', cls:'clipperzTabPanels', children:[ |
69 | {tag:'li', id:this.getId('contactsPanel'), children:[ | 66 | {tag:'li', id:this.getId('contactsPanel'), children:[ |
70 | {tag:'div', cls:'clipperzSubPanel', children:[ | 67 | {tag:'div', cls:'clipperzSubPanel', children:[ |
71 | {tag:'h5', htmlString:Clipperz.PM.Strings['contactsTabTitle']}, | 68 | {tag:'h5', htmlString:Clipperz.PM.Strings['contactsTabTitle']}, |
72 | {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']} | 69 | {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']} |
73 | ]} | 70 | ]} |
74 | ]} | 71 | ]} |
75 | ]} | 72 | ]} |
76 | ]} | 73 | ]} |
77 | ]} | 74 | ]} |
78 | ]} | 75 | ]} |
79 | ]}); | 76 | ]}); |
80 | 77 | ||
81 | // tabPanelControllerConfig = {} | 78 | // tabPanelControllerConfig = {} |
82 | // tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel'); | 79 | // tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel'); |
83 | // new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') }); | 80 | // new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') }); |
84 | this.tabPanelController().setUp(); | 81 | this.tabPanelController().setUp(); |
85 | }, | 82 | }, |
86 | 83 | ||
87 | //------------------------------------------------------------------------- | 84 | //------------------------------------------------------------------------- |
88 | 85 | ||
89 | 'tabPanelController': function() { | 86 | 'tabPanelController': function() { |
90 | if (this._tabPanelController == null) { | 87 | if (this._tabPanelController == null) { |
91 | var tabPanelControllerConfig; | 88 | var tabPanelControllerConfig; |
92 | 89 | ||
93 | tabPanelControllerConfig = {} | 90 | tabPanelControllerConfig = {} |
94 | tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel'); | 91 | tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel'); |
95 | this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') }); | 92 | this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') }); |
96 | } | 93 | } |
97 | 94 | ||
98 | return this._tabPanelController; | 95 | return this._tabPanelController; |
99 | }, | 96 | }, |
100 | 97 | ||
101 | //------------------------------------------------------------------------- | 98 | //------------------------------------------------------------------------- |
102 | __syntaxFix__: "syntax fix" | 99 | __syntaxFix__: "syntax fix" |
103 | 100 | ||
104 | }); | 101 | }); |
105 | 102 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js index 759903f..11d4bd7 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Panels.DataPanel = function(anElement, args) { | 33 | Clipperz.PM.Components.Panels.DataPanel = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.Panels.DataPanel.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Panels.DataPanel.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._progressWidth = 400; | 38 | this._progressWidth = 400; |
42 | 39 | ||
43 | 40 | ||
44 | this.render(); | 41 | this.render(); |
45 | 42 | ||
46 | return this; | 43 | return this; |
47 | } | 44 | } |
48 | 45 | ||
49 | //============================================================================= | 46 | //============================================================================= |
50 | 47 | ||
51 | YAHOO.extendX(Clipperz.PM.Components.Panels.DataPanel, Clipperz.PM.Components.Panels.BasePanel, { | 48 | YAHOO.extendX(Clipperz.PM.Components.Panels.DataPanel, Clipperz.PM.Components.Panels.BasePanel, { |
52 | 49 | ||
53 | 'toString': function() { | 50 | 'toString': function() { |
54 | return "Clipperz.PM.Components.DataPanel component"; | 51 | return "Clipperz.PM.Components.DataPanel component"; |
55 | }, | 52 | }, |
56 | 53 | ||
57 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
58 | 55 | ||
59 | 'render': function() { | 56 | 'render': function() { |
60 | MochiKit.Signal.disconnectAllTo(this); | 57 | MochiKit.Signal.disconnectAllTo(this); |
61 | Clipperz.NotificationCenter.unregister(this); | 58 | Clipperz.NotificationCenter.unregister(this); |
62 | this.element().update(""); | 59 | this.element().update(""); |
63 | 60 | ||
64 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 61 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
65 | {tag:'tbody', children:[ | 62 | {tag:'tbody', children:[ |
66 | {tag:'tr', children:[ | 63 | {tag:'tr', children:[ |
67 | {tag:'td', valign:'top', width:'200', children:[ | 64 | {tag:'td', valign:'top', width:'200', children:[ |
68 | {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ | 65 | {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ |
69 | {tag:'li', id:'offlineCopyTab', htmlString:Clipperz.PM.Strings['offlineCopyTabLabel']}, | 66 | {tag:'li', id:'offlineCopyTab', htmlString:Clipperz.PM.Strings['offlineCopyTabLabel']}, |
70 | {tag:'li', id:'sharingTab', htmlString:Clipperz.PM.Strings['sharingTabLabel']}, | 67 | {tag:'li', id:'sharingTab', htmlString:Clipperz.PM.Strings['sharingTabLabel']}, |
71 | {tag:'li', id:'importTab', htmlString:Clipperz.PM.Strings['importTabLabel']}, | 68 | {tag:'li', id:'importTab', htmlString:Clipperz.PM.Strings['importTabLabel']}, |
72 | {tag:'li', id:'printingTab', htmlString:Clipperz.PM.Strings['printingTabLabel']} | 69 | {tag:'li', id:'printingTab', htmlString:Clipperz.PM.Strings['printingTabLabel']} |
73 | ]} | 70 | ]} |
74 | ]}, | 71 | ]}, |
75 | {tag:'td', valign:'top', children:[ | 72 | {tag:'td', valign:'top', children:[ |
76 | {tag:'ul', cls:'clipperzTabPanels', children:[ | 73 | {tag:'ul', cls:'clipperzTabPanels', children:[ |
77 | {tag:'li', id:this.getId('offlineCopyPanel'), children:[ | 74 | {tag:'li', id:this.getId('offlineCopyPanel'), children:[ |
78 | {tag:'div', cls:'clipperzSubPanel', children:[ | 75 | {tag:'div', cls:'clipperzSubPanel', children:[ |
79 | {tag:'h5', htmlString:Clipperz.PM.Strings['offlineCopyTabTitle']}, | 76 | {tag:'h5', htmlString:Clipperz.PM.Strings['offlineCopyTabTitle']}, |
80 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['offlineCopyTabDescription']}, | 77 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['offlineCopyTabDescription']}, |
81 | {tag:'div', id:this.getId('offlineCopyLinkBox'), children:[ | 78 | {tag:'div', id:this.getId('offlineCopyLinkBox'), children:[ |
82 | {tag:'a', id:'offlineCopyLink', href:'#', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']} | 79 | {tag:'a', id:'offlineCopyLink', href:'#', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']} |
83 | ]}, | 80 | ]}, |
84 | {tag:'div', id:this.getId('offlineCopyLinkBox_read-only'), children:[ | 81 | {tag:'div', id:this.getId('offlineCopyLinkBox_read-only'), children:[ |
85 | {tag:'span', cls:'read-only', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']} | 82 | {tag:'span', cls:'read-only', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']} |
86 | ]} | 83 | ]} |
87 | ]} | 84 | ]} |
88 | ]}, | 85 | ]}, |
89 | {tag:'li', id:this.getId('sharingPanel'), children:[ | 86 | {tag:'li', id:this.getId('sharingPanel'), children:[ |
90 | {tag:'div', cls:'clipperzSubPanel', children:[ | 87 | {tag:'div', cls:'clipperzSubPanel', children:[ |
91 | {tag:'h5', htmlString:Clipperz.PM.Strings['sharingTabTitle']}, | 88 | {tag:'h5', htmlString:Clipperz.PM.Strings['sharingTabTitle']}, |
92 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['sharingTabDescription']} | 89 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['sharingTabDescription']} |
93 | ]} | 90 | ]} |
94 | ]}, | 91 | ]}, |
95 | {tag:'li', id:this.getId('importPanel'), children:[ | 92 | {tag:'li', id:this.getId('importPanel'), children:[ |
96 | {tag:'div', cls:'clipperzSubPanel', children:[ | 93 | {tag:'div', cls:'clipperzSubPanel', children:[ |
97 | {tag:'div', id:this.getId('importPanelMainComponent')} | 94 | {tag:'div', id:this.getId('importPanelMainComponent')} |
98 | ]} | 95 | ]} |
99 | ]}, | 96 | ]}, |
100 | {tag:'li', id:this.getId('printingPanel'), children:[ | 97 | {tag:'li', id:this.getId('printingPanel'), children:[ |
101 | {tag:'div', cls:'clipperzSubPanel', children:[ | 98 | {tag:'div', cls:'clipperzSubPanel', children:[ |
102 | {tag:'h5', htmlString:Clipperz.PM.Strings['printingTabTitle']}, | 99 | {tag:'h5', htmlString:Clipperz.PM.Strings['printingTabTitle']}, |
103 | 100 | ||
104 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['printingTabDescription']}, | 101 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['printingTabDescription']}, |
105 | {tag:'div', id:this.getId('printingLinkBox'), children:[ | 102 | {tag:'div', id:this.getId('printingLinkBox'), children:[ |
106 | {tag:'a', id:'printingLink', href:'#', htmlString:Clipperz.PM.Strings['printingLinkLabel']} | 103 | {tag:'a', id:'printingLink', href:'#', htmlString:Clipperz.PM.Strings['printingLinkLabel']} |
107 | ]}, | 104 | ]}, |
108 | 105 | ||
109 | {tag:'hr'}, | 106 | {tag:'hr'}, |
110 | 107 | ||
111 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['exportTabDescription']}, | 108 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['exportTabDescription']}, |
112 | {tag:'div', id:this.getId('exportLinkBox'), children:[ | 109 | {tag:'div', id:this.getId('exportLinkBox'), children:[ |
113 | {tag:'a', id:'exportLink', href:'#', htmlString:Clipperz.PM.Strings['exportLinkLabel']} | 110 | {tag:'a', id:'exportLink', href:'#', htmlString:Clipperz.PM.Strings['exportLinkLabel']} |
114 | ]} | 111 | ]} |
115 | ]} | 112 | ]} |
116 | ]} | 113 | ]} |
117 | ]} | 114 | ]} |
118 | ]} | 115 | ]} |
119 | ]} | 116 | ]} |
120 | ]} | 117 | ]} |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js index 84b2475..ef2b91c 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
33 | 30 | ||
34 | 31 | ||
35 | Clipperz.PM.Components.Panels.LoginPanel = function(anElement, args) { | 32 | Clipperz.PM.Components.Panels.LoginPanel = function(anElement, args) { |
36 | args = args || {}; | 33 | args = args || {}; |
37 | 34 | ||
38 | Clipperz.PM.Components.Panels.LoginPanel.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.Panels.LoginPanel.superclass.constructor.call(this, anElement, args); |
39 | 36 | ||
40 | this._showLoginFormAnimator = null; | 37 | this._showLoginFormAnimator = null; |
41 | this._showRegistrationFormAnimator = null; | 38 | this._showRegistrationFormAnimator = null; |
42 | this._shouldShowRegistrationAlert = true; | 39 | this._shouldShowRegistrationAlert = true; |
43 | 40 | ||
44 | this._visibleForm = null; | 41 | this._visibleForm = null; |
45 | //this._isPassphraseVisible = true; | 42 | //this._isPassphraseVisible = true; |
46 | 43 | ||
47 | Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); | 44 | Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); |
48 | 45 | ||
49 | this.render(); | 46 | this.render(); |
50 | 47 | ||
51 | return this; | 48 | return this; |
52 | } | 49 | } |
53 | 50 | ||
54 | //============================================================================= | 51 | //============================================================================= |
55 | 52 | ||
56 | //MochiKit.Base.update(Clipperz.PM.Components.Panels.LoginPanel.prototype, { | 53 | //MochiKit.Base.update(Clipperz.PM.Components.Panels.LoginPanel.prototype, { |
57 | YAHOO.extendX(Clipperz.PM.Components.Panels.LoginPanel, Clipperz.PM.Components.Panels.BasePanel, { | 54 | YAHOO.extendX(Clipperz.PM.Components.Panels.LoginPanel, Clipperz.PM.Components.Panels.BasePanel, { |
58 | 55 | ||
59 | 'toString': function() { | 56 | 'toString': function() { |
60 | return "Clipperz.PM.Components.LoginPanel component"; | 57 | return "Clipperz.PM.Components.LoginPanel component"; |
61 | }, | 58 | }, |
62 | 59 | ||
63 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
64 | 61 | ||
65 | 'render': function() { | 62 | 'render': function() { |
66 | var result; | 63 | var result; |
67 | varlayout; | 64 | varlayout; |
68 | var registerButton; | 65 | var registerButton; |
69 | 66 | ||
70 | MochiKit.Signal.disconnectAllTo(this); | 67 | MochiKit.Signal.disconnectAllTo(this); |
71 | this.element().update(""); | 68 | this.element().update(""); |
72 | 69 | ||
73 | //MochiKit.Logging.logDebug(">>> LoginPanel.initPanel"); | 70 | //MochiKit.Logging.logDebug(">>> LoginPanel.initPanel"); |
74 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ | 71 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ |
75 | {tag:'table', children:[ | 72 | {tag:'table', children:[ |
76 | {tag:'thead'}, | 73 | {tag:'thead'}, |
77 | {tag:'tbody', children:[ | 74 | {tag:'tbody', children:[ |
78 | {tag:'tr', children:[ | 75 | {tag:'tr', children:[ |
79 | {tag:'td', valign:'top', children:[ | 76 | {tag:'td', valign:'top', children:[ |
80 | {tag:'div', cls:'clipperzServiceDescription', htmlString:Clipperz.PM.Strings['clipperzServiceDescription']} | 77 | {tag:'div', cls:'clipperzServiceDescription', htmlString:Clipperz.PM.Strings['clipperzServiceDescription']} |
81 | ]}, | 78 | ]}, |
82 | {tag:'td', valign:'top', align:'right', children:[ | 79 | {tag:'td', valign:'top', align:'right', children:[ |
83 | {tag:'div', id:this.getId('forms'), cls:'clipperzLoginForm', children:[ | 80 | {tag:'div', id:this.getId('forms'), cls:'clipperzLoginForm', children:[ |
84 | {tag:'div', id:this.getId('loginForm'), cls:'loginForm', children:[ | 81 | {tag:'div', id:this.getId('loginForm'), cls:'loginForm', children:[ |
85 | {tag:'div', cls:'loginFormHeaderBox', children:[{tag:'h3', htmlString:Clipperz.PM.Strings['loginFormTitle']}]}, | 82 | {tag:'div', cls:'loginFormHeaderBox', children:[{tag:'h3', htmlString:Clipperz.PM.Strings['loginFormTitle']}]}, |
86 | {tag:'form', id:this.getId('loginForm_form'), autocomplete:'off', children:[ | 83 | {tag:'form', id:this.getId('loginForm_form'), autocomplete:'off', children:[ |
87 | 84 | ||
88 | {tag:'table', cls:'formLayout', children:[ | 85 | {tag:'table', cls:'formLayout', children:[ |
89 | {tag:'thead'}, | 86 | {tag:'thead'}, |
90 | {tag:'tbody', children:[ | 87 | {tag:'tbody', children:[ |
91 | {tag:'tr', cls:'formFieldTR', children:[ | 88 | {tag:'tr', cls:'formFieldTR', children:[ |
92 | {tag:'td', width:'90', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, | 89 | {tag:'td', width:'90', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, |
93 | {tag:'td', children:[ | 90 | {tag:'td', children:[ |
94 | {tag:'input', id:this.getId('login_username'), cls:'loginFormField', type:'text', name:'username'} | 91 | {tag:'input', id:this.getId('login_username'), cls:'loginFormField', type:'text', name:'username'} |
95 | ]} | 92 | ]} |
96 | ]}, | 93 | ]}, |
97 | {tag:'tr', cls:'formFieldTR', children:[ | 94 | {tag:'tr', cls:'formFieldTR', children:[ |
98 | {tag:'td', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, | 95 | {tag:'td', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, |
99 | {tag:'td', children:[ | 96 | {tag:'td', children:[ |
100 | {tag:'div', id:this.getId('passphraseDIV'), children:[ | 97 | {tag:'div', id:this.getId('passphraseDIV'), children:[ |
101 | {tag:'input', id:this.getId('login_passphrase'), cls:'loginFormField', type:'password', name:'passphrase'} | 98 | {tag:'input', id:this.getId('login_passphrase'), cls:'loginFormField', type:'password', name:'passphrase'} |
102 | ]}, | 99 | ]}, |
103 | {tag:'div', cls:'oneTimePassword', id:this.getId('oneTimePasswordDIV'), children:[ | 100 | {tag:'div', cls:'oneTimePassword', id:this.getId('oneTimePasswordDIV'), children:[ |
104 | {tag:'input', type:'text', id:this.getId('oneTimePassword_1'), name:'passphrase'}, | 101 | {tag:'input', type:'text', id:this.getId('oneTimePassword_1'), name:'passphrase'}, |
105 | {tag:'span', html:'-'}, | 102 | {tag:'span', html:'-'}, |
106 | {tag:'input', type:'text', id:this.getId('oneTimePassword_2'), name:'passphrase'}, | 103 | {tag:'input', type:'text', id:this.getId('oneTimePassword_2'), name:'passphrase'}, |
107 | {tag:'span', html:'-'}, | 104 | {tag:'span', html:'-'}, |
108 | {tag:'input', type:'text', id:this.getId('oneTimePassword_3'), name:'passphrase'}, | 105 | {tag:'input', type:'text', id:this.getId('oneTimePassword_3'), name:'passphrase'}, |
109 | {tag:'span', html:'-'}, | 106 | {tag:'span', html:'-'}, |
110 | {tag:'input', type:'text', id:this.getId('oneTimePassword_4'), name:'passphrase'} | 107 | {tag:'input', type:'text', id:this.getId('oneTimePassword_4'), name:'passphrase'} |
111 | ]} | 108 | ]} |
112 | ]} | 109 | ]} |
113 | ]}, | 110 | ]}, |
114 | {tag:'tr', cls:'formFieldTR', id:this.getId('passwordTypeChooserTR'), children:[ | 111 | {tag:'tr', cls:'formFieldTR', id:this.getId('passwordTypeChooserTR'), children:[ |
115 | {tag:'td', valign:'top', align:'right', children:[ | 112 | {tag:'td', valign:'top', align:'right', children:[ |
116 | {tag:'input', type:'checkbox', cls:'passwordTypeCheckbox', id:this.getId('useOneTimePasswordCheckbox')} | 113 | {tag:'input', type:'checkbox', cls:'passwordTypeCheckbox', id:this.getId('useOneTimePasswordCheckbox')} |
117 | ]}, | 114 | ]}, |
118 | {tag:'td', children:[ | 115 | {tag:'td', children:[ |
119 | {tag:'div', cls:'passwordTypeChooser', children:[ | 116 | {tag:'div', cls:'passwordTypeChooser', children:[ |
120 | {tag:'h4', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxLabel']}, | 117 | {tag:'h4', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxLabel']}, |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js index d7abfd6..b8cc556 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js | |||
@@ -1,73 +1,70 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Panels.LogoutPanel = function(args) { | 33 | Clipperz.PM.Components.Panels.LogoutPanel = function(args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.Panels.LogoutPanel.superclass.constructor.call(this, args); | 36 | Clipperz.PM.Components.Panels.LogoutPanel.superclass.constructor.call(this, args); |
40 | 37 | ||
41 | return this; | 38 | return this; |
42 | } | 39 | } |
43 | 40 | ||
44 | //============================================================================= | 41 | //============================================================================= |
45 | 42 | ||
46 | YAHOO.extendX(Clipperz.PM.Components.Panels.LogoutPanel, Clipperz.PM.Components.Panels.BasePanel, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Panels.LogoutPanel, Clipperz.PM.Components.Panels.BasePanel, { |
47 | 44 | ||
48 | 'toString': function() { | 45 | 'toString': function() { |
49 | return "Clipperz.PM.Components.LogoutPanel component"; | 46 | return "Clipperz.PM.Components.LogoutPanel component"; |
50 | }, | 47 | }, |
51 | 48 | ||
52 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
53 | 50 | ||
54 | 'initPanel': function() { | 51 | 'initPanel': function() { |
55 | var result; | 52 | var result; |
56 | varlayout; | 53 | varlayout; |
57 | 54 | ||
58 | result = new YAHOO.ext.ContentPanel(this.getId('panel'), {title:'logout', closable:false, autoCreate:true}); | 55 | result = new YAHOO.ext.ContentPanel(this.getId('panel'), {title:'logout', closable:false, autoCreate:true}); |
59 | 56 | ||
60 | Clipperz.YUI.DomHelper.append(result.getEl().dom, | 57 | Clipperz.YUI.DomHelper.append(result.getEl().dom, |
61 | {tag:'div', children:[ | 58 | {tag:'div', children:[ |
62 | {tag:'h2', html:'Logout panel'} | 59 | {tag:'h2', html:'Logout panel'} |
63 | ]} | 60 | ]} |
64 | ); | 61 | ); |
65 | 62 | ||
66 | return result; | 63 | return result; |
67 | }, | 64 | }, |
68 | 65 | ||
69 | //------------------------------------------------------------------------- | 66 | //------------------------------------------------------------------------- |
70 | __syntaxFix__: "syntax fix" | 67 | __syntaxFix__: "syntax fix" |
71 | 68 | ||
72 | }); | 69 | }); |
73 | 70 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js index e2036d0..29ef516 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Panels.MainPanel = function(anElement, args) { | 33 | Clipperz.PM.Components.Panels.MainPanel = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.Panels.MainPanel.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Panels.MainPanel.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._recordListDataModel = null; | 38 | this._recordListDataModel = null; |
42 | this._selectedRecord = null; | 39 | this._selectedRecord = null; |
43 | this._recordDetailComponent = null; | 40 | this._recordDetailComponent = null; |
44 | this._recordListGrid = null; | 41 | this._recordListGrid = null; |
45 | 42 | ||
46 | this._directLinkItemTemplate = null; | 43 | this._directLinkItemTemplate = null; |
47 | this._recordItemTemplate = null; | 44 | this._recordItemTemplate = null; |
48 | 45 | ||
49 | this._addNewRecordButton = null; | 46 | this._addNewRecordButton = null; |
50 | this._deleteRecordButton = null; | 47 | this._deleteRecordButton = null; |
51 | 48 | ||
52 | this._creationWizard = null; | 49 | this._creationWizard = null; |
53 | 50 | ||
54 | Clipperz.NotificationCenter.register(null, 'selectAndEnterEditMode', this, 'selectRecordAndEnterEditModeHandler'); | 51 | Clipperz.NotificationCenter.register(null, 'selectAndEnterEditMode', this, 'selectRecordAndEnterEditModeHandler'); |
55 | 52 | ||
56 | Clipperz.NotificationCenter.register(null, 'recordAdded', this, 'recordAddedHandler'); | 53 | Clipperz.NotificationCenter.register(null, 'recordAdded', this, 'recordAddedHandler'); |
57 | Clipperz.NotificationCenter.register(null, 'recordUpdated', this, 'recordUpdatedHandler'); | 54 | Clipperz.NotificationCenter.register(null, 'recordUpdated', this, 'recordUpdatedHandler'); |
58 | Clipperz.NotificationCenter.register(null, 'recordRemoved', this, 'recordRemovedHandler'); | 55 | Clipperz.NotificationCenter.register(null, 'recordRemoved', this, 'recordRemovedHandler'); |
59 | 56 | ||
60 | Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); | 57 | Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); |
61 | Clipperz.NotificationCenter.register(null, 'directLoginUpdated', this, 'directLoginUpdatedHandler'); | 58 | Clipperz.NotificationCenter.register(null, 'directLoginUpdated', this, 'directLoginUpdatedHandler'); |
62 | Clipperz.NotificationCenter.register(null, 'directLoginRemoved', this, 'directLoginRemovedHandler'); | 59 | Clipperz.NotificationCenter.register(null, 'directLoginRemoved', this, 'directLoginRemovedHandler'); |
63 | 60 | ||
64 | Clipperz.NotificationCenter.register(null, 'accountLocked', this, 'accountLockedHandler'); | 61 | Clipperz.NotificationCenter.register(null, 'accountLocked', this, 'accountLockedHandler'); |
65 | 62 | ||
66 | MochiKit.Signal.connect(MochiKit.DOM.currentWindow(), 'onresize', this, 'resizeModalMask'); | 63 | MochiKit.Signal.connect(MochiKit.DOM.currentWindow(), 'onresize', this, 'resizeModalMask'); |
67 | this.render(); | 64 | this.render(); |
68 | 65 | ||
69 | return this; | 66 | return this; |
70 | } | 67 | } |
71 | 68 | ||
72 | //============================================================================= | 69 | //============================================================================= |
73 | 70 | ||
74 | YAHOO.extendX(Clipperz.PM.Components.Panels.MainPanel, Clipperz.PM.Components.Panels.BasePanel, { | 71 | YAHOO.extendX(Clipperz.PM.Components.Panels.MainPanel, Clipperz.PM.Components.Panels.BasePanel, { |
75 | 72 | ||
76 | 'toString': function() { | 73 | 'toString': function() { |
77 | return "Clipperz.PM.Components.Panels.MainPanel component"; | 74 | return "Clipperz.PM.Components.Panels.MainPanel component"; |
78 | }, | 75 | }, |
79 | 76 | ||
80 | //------------------------------------------------------------------------- | 77 | //------------------------------------------------------------------------- |
81 | 78 | ||
82 | 'render': function() { | 79 | 'render': function() { |
83 | this.element().update(""); | 80 | this.element().update(""); |
84 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', id:'mainPanelTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 81 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', id:'mainPanelTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
85 | {tag:'tbody', children:[ | 82 | {tag:'tbody', children:[ |
86 | {tag:'tr', children:[ | 83 | {tag:'tr', children:[ |
87 | {tag:'td', width:'15', children:[ | 84 | {tag:'td', width:'15', children:[ |
88 | {tag:'div', cls:'mainPanelMinHeightDiv'} | 85 | {tag:'div', cls:'mainPanelMinHeightDiv'} |
89 | ]}, | 86 | ]}, |
90 | {tag:'td', valign:'top', id:'directLoginsTD', width:'200', children:[ | 87 | {tag:'td', valign:'top', id:'directLoginsTD', width:'200', children:[ |
91 | {tag:'div', id:'directLoginsBlock', children:[ | 88 | {tag:'div', id:'directLoginsBlock', children:[ |
92 | {tag:'div', cls:'directLoginsBlockHeaderBox', children:[{tag:'h3', id:'directLoginTitle', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockLabel']}]}, | 89 | {tag:'div', cls:'directLoginsBlockHeaderBox', children:[{tag:'h3', id:'directLoginTitle', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockLabel']}]}, |
93 | {tag:'div', id:'directLoginsDescription', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockDescription']}, | 90 | {tag:'div', id:'directLoginsDescription', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockDescription']}, |
94 | {tag:'ul', id:'directLogins'} | 91 | {tag:'ul', id:'directLogins'} |
95 | ]} | 92 | ]} |
96 | ]}, | 93 | ]}, |
97 | {tag:'td', width:'15', children:[ | 94 | {tag:'td', width:'15', children:[ |
98 | {tag:'div', cls:'mainPanelMinHeightDiv'} | 95 | {tag:'div', cls:'mainPanelMinHeightDiv'} |
99 | ]}, | 96 | ]}, |
100 | {tag:'td', valign:'top', children:[ | 97 | {tag:'td', valign:'top', children:[ |
101 | {tag:'div', id:'mainContent', children:[ | 98 | {tag:'div', id:'mainContent', children:[ |
102 | {tag:'div', id:'recordListBlockHeader'}, | 99 | {tag:'div', id:'recordListBlockHeader'}, |
103 | {tag:'div', id:'recordListAndDetailBlock', children:[ | 100 | {tag:'div', id:'recordListAndDetailBlock', children:[ |
104 | {tag:'table', id:'recordListAndDetailBlockTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 101 | {tag:'table', id:'recordListAndDetailBlockTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
105 | {tag:'tbody', children:[ | 102 | {tag:'tbody', children:[ |
106 | {tag:'tr', children:[ | 103 | {tag:'tr', children:[ |
107 | {tag:'td', valign:'top', width:'250', children:[ | 104 | {tag:'td', valign:'top', width:'250', children:[ |
108 | {tag:'div', id:'recordListBlock', children:[ | 105 | {tag:'div', id:'recordListBlock', children:[ |
109 | {tag:'div', id:'recordListFilterHeader'}, | 106 | {tag:'div', id:'recordListFilterHeader'}, |
110 | {tag:'ul', id:'records'} | 107 | {tag:'ul', id:'records'} |
111 | ]} | 108 | ]} |
112 | ]}, | 109 | ]}, |
113 | {tag:'td', id:'recordDetailSeparatorTD', rowspan:'2', valign:'top', bgcolor:'#ddddff', html:' '}, | 110 | {tag:'td', id:'recordDetailSeparatorTD', rowspan:'2', valign:'top', bgcolor:'#ddddff', html:' '}, |
114 | {tag:'td', valign:'top', children:[ | 111 | {tag:'td', valign:'top', children:[ |
115 | {tag:'div', id:'recordDetailMainBlock', children:[ | 112 | {tag:'div', id:'recordDetailMainBlock', children:[ |
116 | {tag:'div', id:'recordTitleTopBlock'}, | 113 | {tag:'div', id:'recordTitleTopBlock'}, |
117 | {tag:'div', id:'recordDetailBlock', children:[ | 114 | {tag:'div', id:'recordDetailBlock', children:[ |
118 | {tag:'div', id:'recordDetail'} | 115 | {tag:'div', id:'recordDetail'} |
119 | ]} | 116 | ]} |
120 | ]}, | 117 | ]}, |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js index abd2621..4f2a015 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Panels.ToolsPanel = function(anElement, args) { | 33 | Clipperz.PM.Components.Panels.ToolsPanel = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.Panels.ToolsPanel.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Panels.ToolsPanel.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._generateButtonElement = null; | 38 | this._generateButtonElement = null; |
42 | this._needsRenderingUponTabSwitch = false; | 39 | this._needsRenderingUponTabSwitch = false; |
43 | 40 | ||
44 | this.render(); | 41 | this.render(); |
45 | 42 | ||
46 | return this; | 43 | return this; |
47 | } | 44 | } |
48 | 45 | ||
49 | //============================================================================= | 46 | //============================================================================= |
50 | 47 | ||
51 | YAHOO.extendX(Clipperz.PM.Components.Panels.ToolsPanel, Clipperz.PM.Components.Panels.BasePanel, { | 48 | YAHOO.extendX(Clipperz.PM.Components.Panels.ToolsPanel, Clipperz.PM.Components.Panels.BasePanel, { |
52 | 49 | ||
53 | 'toString': function() { | 50 | 'toString': function() { |
54 | return "Clipperz.PM.Components.Panels.ToolsPanel component"; | 51 | return "Clipperz.PM.Components.Panels.ToolsPanel component"; |
55 | }, | 52 | }, |
56 | 53 | ||
57 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
58 | 55 | ||
59 | 'render': function() { | 56 | 'render': function() { |
60 | var bookmarkletUrl; | 57 | var bookmarkletUrl; |
61 | 58 | ||
62 | //MochiKit.Logging.logDebug(">>> ToolsPanel.render"); | 59 | //MochiKit.Logging.logDebug(">>> ToolsPanel.render"); |
63 | Clipperz.NotificationCenter.unregister(this); | 60 | Clipperz.NotificationCenter.unregister(this); |
64 | MochiKit.Signal.disconnectAllTo(this); | 61 | MochiKit.Signal.disconnectAllTo(this); |
65 | 62 | ||
66 | if (Clipperz_IEisBroken == true) { | 63 | if (Clipperz_IEisBroken == true) { |
67 | bookmarkletUrl = bookmarklet_ie; | 64 | bookmarkletUrl = bookmarklet_ie; |
68 | } else { | 65 | } else { |
69 | bookmarkletUrl = bookmarklet; | 66 | bookmarkletUrl = bookmarklet; |
70 | } | 67 | } |
71 | 68 | ||
72 | this.element().update(""); | 69 | this.element().update(""); |
73 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 70 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
74 | {tag:'tbody', children:[ | 71 | {tag:'tbody', children:[ |
75 | {tag:'tr', children:[ | 72 | {tag:'tr', children:[ |
76 | {tag:'td', valign:'top', width:'200', children:[ | 73 | {tag:'td', valign:'top', width:'200', children:[ |
77 | {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ | 74 | {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ |
78 | {tag:'li', id:this.getId('passwordGenerator'), htmlString:Clipperz.PM.Strings['passwordGeneratorTabLabel']}, | 75 | {tag:'li', id:this.getId('passwordGenerator'), htmlString:Clipperz.PM.Strings['passwordGeneratorTabLabel']}, |
79 | {tag:'li', id:this.getId('bookmarklet'), htmlString:Clipperz.PM.Strings['bookmarkletTabLabel']}, | 76 | {tag:'li', id:this.getId('bookmarklet'), htmlString:Clipperz.PM.Strings['bookmarkletTabLabel']}, |
80 | {tag:'li', id:this.getId('compact'), htmlString:Clipperz.PM.Strings['compactTabLabel']}, | 77 | {tag:'li', id:this.getId('compact'), htmlString:Clipperz.PM.Strings['compactTabLabel']}, |
81 | {tag:'li', id:this.getId('httpAuth'), htmlString:Clipperz.PM.Strings['httpAuthTabLabel']} | 78 | {tag:'li', id:this.getId('httpAuth'), htmlString:Clipperz.PM.Strings['httpAuthTabLabel']} |
82 | ]} | 79 | ]} |
83 | ]}, | 80 | ]}, |
84 | {tag:'td', valign:'top', children:[ | 81 | {tag:'td', valign:'top', children:[ |
85 | {tag:'ul', cls:'clipperzTabPanels', children:[ | 82 | {tag:'ul', cls:'clipperzTabPanels', children:[ |
86 | {tag:'li', id:this.getId('passwordGeneratorPanel'), children:[ | 83 | {tag:'li', id:this.getId('passwordGeneratorPanel'), children:[ |
87 | {tag:'div', cls:'clipperzSubPanel', children:[ | 84 | {tag:'div', cls:'clipperzSubPanel', children:[ |
88 | {tag:'h5', htmlString:Clipperz.PM.Strings['passwordGeneratorTabTitle']}, | 85 | {tag:'h5', htmlString:Clipperz.PM.Strings['passwordGeneratorTabTitle']}, |
89 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['paswordGeneratorTabDescription']}, | 86 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['paswordGeneratorTabDescription']}, |
90 | 87 | ||
91 | //--------------------------------------------------- | 88 | //--------------------------------------------------- |
92 | {tag:'div', children:[ | 89 | {tag:'div', children:[ |
93 | {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[ | 90 | {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[ |
94 | {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')}, | 91 | {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')}, |
95 | {tag:'table', children:[ | 92 | {tag:'table', children:[ |
96 | {tag:'tbody', children:[ | 93 | {tag:'tbody', children:[ |
97 | {tag:'tr', children:[ | 94 | {tag:'tr', children:[ |
98 | {tag:'td', width:'20%', children:[ | 95 | {tag:'td', width:'20%', children:[ |
99 | {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true}, | 96 | {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true}, |
100 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']} | 97 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']} |
101 | ]}, | 98 | ]}, |
102 | {tag:'td', width:'20%', children:[ | 99 | {tag:'td', width:'20%', children:[ |
103 | {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true}, | 100 | {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true}, |
104 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']} | 101 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']} |
105 | ]}, | 102 | ]}, |
106 | {tag:'td', width:'20%', children:[ | 103 | {tag:'td', width:'20%', children:[ |
107 | {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true}, | 104 | {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true}, |
108 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']} | 105 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']} |
109 | ]}, | 106 | ]}, |
110 | {tag:'td', width:'20%', children:[ | 107 | {tag:'td', width:'20%', children:[ |
111 | {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true}, | 108 | {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true}, |
112 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']} | 109 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']} |
113 | ]}, | 110 | ]}, |
114 | {tag:'td', width:'20%', children:[ | 111 | {tag:'td', width:'20%', children:[ |
115 | {tag:'span', cls:'passwordGeneratorLength', children:[ | 112 | {tag:'span', cls:'passwordGeneratorLength', children:[ |
116 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']}, | 113 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']}, |
117 | {tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'} | 114 | {tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'} |
118 | ]} | 115 | ]} |
119 | ]} | 116 | ]} |
120 | ]} | 117 | ]} |
diff --git a/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js b/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js index 530d2cb..784dce9 100644 --- a/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js +++ b/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js | |||
@@ -1,118 +1,115 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | 29 | ||
33 | Clipperz.PM.Components.PasswordEntropyDisplay = function(anElement, args) { | 30 | Clipperz.PM.Components.PasswordEntropyDisplay = function(anElement, args) { |
34 | args = args || {}; | 31 | args = args || {}; |
35 | 32 | ||
36 | //MochiKit.Logging.logDebug(">>> new TextFormField"); | 33 | //MochiKit.Logging.logDebug(">>> new TextFormField"); |
37 | Clipperz.PM.Components.PasswordEntropyDisplay.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.PasswordEntropyDisplay.superclass.constructor.call(this, anElement, args); |
38 | 35 | ||
39 | this._wrapperElement = null; | 36 | this._wrapperElement = null; |
40 | this._entropyElement = null; | 37 | this._entropyElement = null; |
41 | 38 | ||
42 | this.render(); | 39 | this.render(); |
43 | //MochiKit.Logging.logDebug("<<< new TextFormField"); | 40 | //MochiKit.Logging.logDebug("<<< new TextFormField"); |
44 | 41 | ||
45 | return this; | 42 | return this; |
46 | }; | 43 | }; |
47 | 44 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.PasswordEntropyDisplay, Clipperz.PM.Components.BaseComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.PasswordEntropyDisplay, Clipperz.PM.Components.BaseComponent, { |
49 | 46 | ||
50 | 'toString': function() { | 47 | 'toString': function() { |
51 | return "Clipperz.PM.Components.PasswordEntropyDisplay"; | 48 | return "Clipperz.PM.Components.PasswordEntropyDisplay"; |
52 | }, | 49 | }, |
53 | 50 | ||
54 | //----------------------------------------------------- | 51 | //----------------------------------------------------- |
55 | 52 | ||
56 | 'wrapperElement': function() { | 53 | 'wrapperElement': function() { |
57 | return this._wrapperElement; | 54 | return this._wrapperElement; |
58 | }, | 55 | }, |
59 | 56 | ||
60 | 'setWrapperElement': function(aValue) { | 57 | 'setWrapperElement': function(aValue) { |
61 | this._wrapperElement = aValue; | 58 | this._wrapperElement = aValue; |
62 | }, | 59 | }, |
63 | 60 | ||
64 | //----------------------------------------------------- | 61 | //----------------------------------------------------- |
65 | 62 | ||
66 | 'passwordElement': function() { | 63 | 'passwordElement': function() { |
67 | return this.element(); | 64 | return this.element(); |
68 | }, | 65 | }, |
69 | 66 | ||
70 | //----------------------------------------------------- | 67 | //----------------------------------------------------- |
71 | 68 | ||
72 | 'entropyElement': function() { | 69 | 'entropyElement': function() { |
73 | return this._entropyElement; | 70 | return this._entropyElement; |
74 | }, | 71 | }, |
75 | 72 | ||
76 | 'setEntropyElement': function(aValue) { | 73 | 'setEntropyElement': function(aValue) { |
77 | this._entropyElement = aValue; | 74 | this._entropyElement = aValue; |
78 | }, | 75 | }, |
79 | 76 | ||
80 | //----------------------------------------------------- | 77 | //----------------------------------------------------- |
81 | 78 | ||
82 | 'render': function() { | 79 | 'render': function() { |
83 | MochiKit.Signal.disconnectAllTo(this); | 80 | MochiKit.Signal.disconnectAllTo(this); |
84 | 81 | ||
85 | this.setWrapperElement(this.element().wrap({tag:'div'})); | 82 | this.setWrapperElement(this.element().wrap({tag:'div'})); |
86 | this.setEntropyElement(Clipperz.YUI.DomHelper.append(this.wrapperElement().dom, {tag:'div', cls:'passwordEntropy', html:" "}, true)); | 83 | this.setEntropyElement(Clipperz.YUI.DomHelper.append(this.wrapperElement().dom, {tag:'div', cls:'passwordEntropy', html:" "}, true)); |
87 | 84 | ||
88 | // this.entropyElement().setWidth(this.passwordElement().getWidth()); | 85 | // this.entropyElement().setWidth(this.passwordElement().getWidth()); |
89 | this.updateEntropyElement(); | 86 | this.updateEntropyElement(); |
90 | 87 | ||
91 | MochiKit.Signal.connect(this.element().dom, 'onkeyup', this, 'updateEntropyElement'); | 88 | MochiKit.Signal.connect(this.element().dom, 'onkeyup', this, 'updateEntropyElement'); |
92 | MochiKit.Signal.connect(this.element().dom, 'onchange', this, 'updateEntropyElement'); | 89 | MochiKit.Signal.connect(this.element().dom, 'onchange', this, 'updateEntropyElement'); |
93 | MochiKit.Signal.connect(this.element().dom, 'onblur', this, 'updateEntropyElement'); | 90 | MochiKit.Signal.connect(this.element().dom, 'onblur', this, 'updateEntropyElement'); |
94 | }, | 91 | }, |
95 | 92 | ||
96 | //----------------------------------------------------- | 93 | //----------------------------------------------------- |
97 | 94 | ||
98 | 'computeEntropyForString': function(aValue) { | 95 | 'computeEntropyForString': function(aValue) { |
99 | return Clipperz.PM.Crypto.passwordEntropy(aValue); | 96 | return Clipperz.PM.Crypto.passwordEntropy(aValue); |
100 | }, | 97 | }, |
101 | 98 | ||
102 | //----------------------------------------------------- | 99 | //----------------------------------------------------- |
103 | 100 | ||
104 | 'updateEntropyElement': function(anEvent) { | 101 | 'updateEntropyElement': function(anEvent) { |
105 | //MochiKit.Logging.logDebug(">>> PasswordEntropyDisplay.updateEntropyElement"); | 102 | //MochiKit.Logging.logDebug(">>> PasswordEntropyDisplay.updateEntropyElement"); |
106 | varmaxExtent; | 103 | varmaxExtent; |
107 | varentropy; | 104 | varentropy; |
108 | 105 | ||
109 | entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value)); | 106 | entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value)); |
110 | //MochiKit.Logging.logDebug("--- PasswordEntropyDisplay.updateEntropyElement - entropy: " + entropy); | 107 | //MochiKit.Logging.logDebug("--- PasswordEntropyDisplay.updateEntropyElement - entropy: " + entropy); |
111 | this.entropyElement().setStyle('background-position', "0px " + -entropy + "px"); | 108 | this.entropyElement().setStyle('background-position', "0px " + -entropy + "px"); |
112 | this.entropyElement().setWidth(this.passwordElement().getWidth() * (entropy/128)); | 109 | this.entropyElement().setWidth(this.passwordElement().getWidth() * (entropy/128)); |
113 | //MochiKit.Logging.logDebug("<<< PasswordEntropyDisplay.updateEntropyElement"); | 110 | //MochiKit.Logging.logDebug("<<< PasswordEntropyDisplay.updateEntropyElement"); |
114 | }, | 111 | }, |
115 | 112 | ||
116 | //----------------------------------------------------- | 113 | //----------------------------------------------------- |
117 | __syntaxFix__: '__syntaxFix__' | 114 | __syntaxFix__: '__syntaxFix__' |
118 | }); | 115 | }); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js b/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js index 8195f2e..87c52b2 100644 --- a/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js +++ b/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | 29 | ||
33 | Clipperz.PM.Components.PasswordGenerator = function(anElement, aFieldValueComponent, args) { | 30 | Clipperz.PM.Components.PasswordGenerator = function(anElement, aFieldValueComponent, args) { |
34 | args = args || {}; | 31 | args = args || {}; |
35 | 32 | ||
36 | //MochiKit.Logging.logDebug(">>> new TextFormField"); | 33 | //MochiKit.Logging.logDebug(">>> new TextFormField"); |
37 | Clipperz.PM.Components.PasswordGenerator.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.PasswordGenerator.superclass.constructor.call(this, anElement, args); |
38 | 35 | ||
39 | this._fieldValueComponent = aFieldValueComponent; | 36 | this._fieldValueComponent = aFieldValueComponent; |
40 | this._panelButton = null; | 37 | this._panelButton = null; |
41 | this.render(); | 38 | this.render(); |
42 | //MochiKit.Logging.logDebug("<<< new TextFormField"); | 39 | //MochiKit.Logging.logDebug("<<< new TextFormField"); |
43 | 40 | ||
44 | return this; | 41 | return this; |
45 | }; | 42 | }; |
46 | 43 | ||
47 | YAHOO.extendX(Clipperz.PM.Components.PasswordGenerator, Clipperz.PM.Components.BaseComponent, { | 44 | YAHOO.extendX(Clipperz.PM.Components.PasswordGenerator, Clipperz.PM.Components.BaseComponent, { |
48 | 45 | ||
49 | 'toString': function() { | 46 | 'toString': function() { |
50 | return "Clipperz.PM.Components.PasswordGenerator"; | 47 | return "Clipperz.PM.Components.PasswordGenerator"; |
51 | }, | 48 | }, |
52 | 49 | ||
53 | //----------------------------------------------------- | 50 | //----------------------------------------------------- |
54 | 51 | ||
55 | 'fieldValueComponent': function() { | 52 | 'fieldValueComponent': function() { |
56 | return this._fieldValueComponent; | 53 | return this._fieldValueComponent; |
57 | }, | 54 | }, |
58 | 55 | ||
59 | //----------------------------------------------------- | 56 | //----------------------------------------------------- |
60 | 57 | ||
61 | 'render': function() { | 58 | 'render': function() { |
62 | MochiKit.Signal.disconnectAllTo(this); | 59 | MochiKit.Signal.disconnectAllTo(this); |
63 | 60 | ||
64 | // this._panelButton = new YAHOO.ext.Button(this.element().dom, {text:Clipperz.PM.Strings['passwordGeneratorButtonLabel'], handler:this.openPasswordPanel, scope:this}); | 61 | // this._panelButton = new YAHOO.ext.Button(this.element().dom, {text:Clipperz.PM.Strings['passwordGeneratorButtonLabel'], handler:this.openPasswordPanel, scope:this}); |
65 | MochiKit.Signal.connect(this.element().dom, 'onmouseenter', this, 'onMouseEnter'); | 62 | MochiKit.Signal.connect(this.element().dom, 'onmouseenter', this, 'onMouseEnter'); |
66 | MochiKit.Signal.connect(this.element().dom, 'onmouseleave', this, 'onMouseLeave'); | 63 | MochiKit.Signal.connect(this.element().dom, 'onmouseleave', this, 'onMouseLeave'); |
67 | MochiKit.Signal.connect(this.element().dom, 'onclick', this, 'openPasswordPanel'); | 64 | MochiKit.Signal.connect(this.element().dom, 'onclick', this, 'openPasswordPanel'); |
68 | }, | 65 | }, |
69 | 66 | ||
70 | //----------------------------------------------------- | 67 | //----------------------------------------------------- |
71 | 68 | ||
72 | 'onMouseEnter': function() { | 69 | 'onMouseEnter': function() { |
73 | this.element().addClass('hover'); | 70 | this.element().addClass('hover'); |
74 | }, | 71 | }, |
75 | 72 | ||
76 | 'onMouseLeave': function() { | 73 | 'onMouseLeave': function() { |
77 | this.element().removeClass('hover'); | 74 | this.element().removeClass('hover'); |
78 | }, | 75 | }, |
79 | 76 | ||
80 | //----------------------------------------------------- | 77 | //----------------------------------------------------- |
81 | 78 | ||
82 | 'panelButton': function() { | 79 | 'panelButton': function() { |
83 | return this._panelButton; | 80 | return this._panelButton; |
84 | }, | 81 | }, |
85 | 82 | ||
86 | //----------------------------------------------------- | 83 | //----------------------------------------------------- |
87 | 84 | ||
88 | 'openPasswordPanel': function() { | 85 | 'openPasswordPanel': function() { |
89 | var passwordGeneratorElement; | 86 | var passwordGeneratorElement; |
90 | var passwordGeneratorDialog; | 87 | var passwordGeneratorDialog; |
91 | var cancelButton; | 88 | var cancelButton; |
92 | var okButton; | 89 | var okButton; |
93 | var cancelFunction; | 90 | var cancelFunction; |
94 | var okFunction; | 91 | var okFunction; |
95 | 92 | ||
96 | //MochiKit.Logging.logDebug(">>> PasswordGenerator.openPasswordPanel"); | 93 | //MochiKit.Logging.logDebug(">>> PasswordGenerator.openPasswordPanel"); |
97 | passwordGeneratorElement = Clipperz.YUI.DomHelper.append(document.body, {tag:'div', id:'passwordGenerator', children:[ | 94 | passwordGeneratorElement = Clipperz.YUI.DomHelper.append(document.body, {tag:'div', id:'passwordGenerator', children:[ |
98 | {tag:'div', cls:'ydlg-hd', htmlString:Clipperz.PM.Strings['passwordGeneratorPanelTitle']}, | 95 | {tag:'div', cls:'ydlg-hd', htmlString:Clipperz.PM.Strings['passwordGeneratorPanelTitle']}, |
99 | {tag:'div', cls:'ydlg-bd', children:[ | 96 | {tag:'div', cls:'ydlg-bd', children:[ |
100 | {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[ | 97 | {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[ |
101 | {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')}, | 98 | {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')}, |
102 | {tag:'table', children:[ | 99 | {tag:'table', children:[ |
103 | {tag:'tbody', children:[ | 100 | {tag:'tbody', children:[ |
104 | {tag:'tr', children:[ | 101 | {tag:'tr', children:[ |
105 | {tag:'td', width:'20%', children:[ | 102 | {tag:'td', width:'20%', children:[ |
106 | {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true}, | 103 | {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true}, |
107 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']} | 104 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']} |
108 | ]}, | 105 | ]}, |
109 | {tag:'td', width:'20%', children:[ | 106 | {tag:'td', width:'20%', children:[ |
110 | {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true}, | 107 | {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true}, |
111 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']} | 108 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']} |
112 | ]}, | 109 | ]}, |
113 | {tag:'td', width:'20%', children:[ | 110 | {tag:'td', width:'20%', children:[ |
114 | {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true}, | 111 | {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true}, |
115 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']} | 112 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']} |
116 | ]}, | 113 | ]}, |
117 | {tag:'td', width:'20%', children:[ | 114 | {tag:'td', width:'20%', children:[ |
118 | {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true}, | 115 | {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true}, |
119 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']} | 116 | {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']} |
120 | ]}, | 117 | ]}, |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js index 6bede3e..b3debad 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js +++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js | |||
@@ -1,28 +1,25 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js index 6bede3e..b3debad 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js +++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js | |||
@@ -1,28 +1,25 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js index 910d4b1..5f5c29f 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js +++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js | |||
@@ -1,95 +1,92 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Printing) == 'undefined') { Clipperz.PM.Components.Printing = {}; } | 29 | if (typeof(Clipperz.PM.Components.Printing) == 'undefined') { Clipperz.PM.Components.Printing = {}; } |
33 | 30 | ||
34 | Clipperz.PM.Components.Printing.Record = function(args) { | 31 | Clipperz.PM.Components.Printing.Record = function(args) { |
35 | args = args || {}; | 32 | args = args || {}; |
36 | 33 | ||
37 | this._record = args['record']; | 34 | this._record = args['record']; |
38 | 35 | ||
39 | return this; | 36 | return this; |
40 | } | 37 | } |
41 | 38 | ||
42 | MochiKit.Base.update(Clipperz.PM.Components.Printing.Record.prototype, { | 39 | MochiKit.Base.update(Clipperz.PM.Components.Printing.Record.prototype, { |
43 | 40 | ||
44 | 'record': function() { | 41 | 'record': function() { |
45 | return this._record; | 42 | return this._record; |
46 | }, | 43 | }, |
47 | 44 | ||
48 | //------------------------------------------------------------------------- | 45 | //------------------------------------------------------------------------- |
49 | 46 | ||
50 | 'deferredDrawToWindow': function(aWindow) { | 47 | 'deferredDrawToWindow': function(aWindow) { |
51 | vardeferredResult; | 48 | vardeferredResult; |
52 | 49 | ||
53 | deferredResult = new MochiKit.Async.Deferred(); | 50 | deferredResult = new MochiKit.Async.Deferred(); |
54 | deferredResult.addCallback(MochiKit.Base.method(this.record(), 'deferredData')); | 51 | deferredResult.addCallback(MochiKit.Base.method(this.record(), 'deferredData')); |
55 | deferredResult.addCallback(MochiKit.Base.method(this, 'appendToWindow', aWindow)); | 52 | deferredResult.addCallback(MochiKit.Base.method(this, 'appendToWindow', aWindow)); |
56 | deferredResult.callback(); | 53 | deferredResult.callback(); |
57 | return deferredResult; | 54 | return deferredResult; |
58 | }, | 55 | }, |
59 | 56 | ||
60 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
61 | 58 | ||
62 | 'appendToWindow': function(aWindow) { | 59 | 'appendToWindow': function(aWindow) { |
63 | MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() { | 60 | MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() { |
64 | var newBlock; | 61 | var newBlock; |
65 | var fields; | 62 | var fields; |
66 | 63 | ||
67 | fields = MochiKit.Base.concat( | 64 | fields = MochiKit.Base.concat( |
68 | MochiKit.Base.map(MochiKit.Base.bind(function(aField) { | 65 | MochiKit.Base.map(MochiKit.Base.bind(function(aField) { |
69 | var result; | 66 | var result; |
70 | var dt, dd; | 67 | var dt, dd; |
71 | var label, value; | 68 | var label, value; |
72 | 69 | ||
73 | label = aField.label(); | 70 | label = aField.label(); |
74 | value = aField.value(); | 71 | value = aField.value(); |
75 | dt = MochiKit.DOM.createDOM('DT', null, label); | 72 | dt = MochiKit.DOM.createDOM('DT', null, label); |
76 | dd = MochiKit.DOM.createDOM('DD', null, value) | 73 | dd = MochiKit.DOM.createDOM('DD', null, value) |
77 | result = [dt, dd]; | 74 | result = [dt, dd]; |
78 | 75 | ||
79 | return result | 76 | return result |
80 | }, this), MochiKit.Base.values(this.record().currentVersion().fields())) | 77 | }, this), MochiKit.Base.values(this.record().currentVersion().fields())) |
81 | ); | 78 | ); |
82 | 79 | ||
83 | newBlock = MochiKit.DOM.DIV({'class': 'recordBlock'}, | 80 | newBlock = MochiKit.DOM.DIV({'class': 'recordBlock'}, |
84 | MochiKit.DOM.H2(null, this.record().label()), | 81 | MochiKit.DOM.H2(null, this.record().label()), |
85 | MochiKit.DOM.DIV({'class': 'recordNotes'}, MochiKit.Base.map(MochiKit.Base.partial(MochiKit.DOM.P, null), this.record().notes().split("\n"))), | 82 | MochiKit.DOM.DIV({'class': 'recordNotes'}, MochiKit.Base.map(MochiKit.Base.partial(MochiKit.DOM.P, null), this.record().notes().split("\n"))), |
86 | MochiKit.DOM.createDOM('DL', null, fields) | 83 | MochiKit.DOM.createDOM('DL', null, fields) |
87 | ); | 84 | ); |
88 | MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, newBlock); | 85 | MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, newBlock); |
89 | 86 | ||
90 | }, this)); | 87 | }, this)); |
91 | }, | 88 | }, |
92 | 89 | ||
93 | //------------------------------------------------------------------------- | 90 | //------------------------------------------------------------------------- |
94 | __syntaxFix__: "syntax fix" | 91 | __syntaxFix__: "syntax fix" |
95 | }); | 92 | }); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js index 840d555..5b50284 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js | |||
@@ -1,105 +1,102 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.AbstractComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.AbstractComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.RecordDetail.AbstractComponent.superclass.constructor.call(this, args); | 36 | Clipperz.PM.Components.RecordDetail.AbstractComponent.superclass.constructor.call(this, args); |
40 | 37 | ||
41 | this._element = anElement; | 38 | this._element = anElement; |
42 | this._mainComponent = args.mainComponent; | 39 | this._mainComponent = args.mainComponent; |
43 | 40 | ||
44 | return this; | 41 | return this; |
45 | } | 42 | } |
46 | 43 | ||
47 | //============================================================================= | 44 | //============================================================================= |
48 | 45 | ||
49 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractComponent, Clipperz.PM.Components.BaseComponent, { | 46 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractComponent, Clipperz.PM.Components.BaseComponent, { |
50 | 47 | ||
51 | 'toString': function() { | 48 | 'toString': function() { |
52 | return "Clipperz.PM.Components.RecordDetail.AbstractComponent"; | 49 | return "Clipperz.PM.Components.RecordDetail.AbstractComponent"; |
53 | }, | 50 | }, |
54 | 51 | ||
55 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
56 | 53 | ||
57 | 'mainComponent': function() { | 54 | 'mainComponent': function() { |
58 | return this._mainComponent; | 55 | return this._mainComponent; |
59 | }, | 56 | }, |
60 | 57 | ||
61 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
62 | 59 | ||
63 | 'record': function() { | 60 | 'record': function() { |
64 | return this.mainComponent().record(); | 61 | return this.mainComponent().record(); |
65 | }, | 62 | }, |
66 | 63 | ||
67 | //------------------------------------------------------------------------- | 64 | //------------------------------------------------------------------------- |
68 | 65 | ||
69 | 'editMode': function() { | 66 | 'editMode': function() { |
70 | return this.mainComponent().editMode(); | 67 | return this.mainComponent().editMode(); |
71 | }, | 68 | }, |
72 | 69 | ||
73 | //------------------------------------------------------------------------- | 70 | //------------------------------------------------------------------------- |
74 | 71 | ||
75 | 'render': function() { | 72 | 'render': function() { |
76 | this.element().update(""); | 73 | this.element().update(""); |
77 | this.update(); | 74 | this.update(); |
78 | }, | 75 | }, |
79 | 76 | ||
80 | //------------------------------------------------------------------------- | 77 | //------------------------------------------------------------------------- |
81 | 78 | ||
82 | 'update': function(anEvent) { | 79 | 'update': function(anEvent) { |
83 | if (this.editMode() == 'EDIT') { | 80 | if (this.editMode() == 'EDIT') { |
84 | this.updateEditMode(); | 81 | this.updateEditMode(); |
85 | } else if (this.editMode() == 'VIEW') { | 82 | } else if (this.editMode() == 'VIEW') { |
86 | this.updateViewMode(); | 83 | this.updateViewMode(); |
87 | } | 84 | } |
88 | }, | 85 | }, |
89 | 86 | ||
90 | //------------------------------------------------------------------------- | 87 | //------------------------------------------------------------------------- |
91 | 88 | ||
92 | 'updateViewMode': function() {}, | 89 | 'updateViewMode': function() {}, |
93 | 'updateEditMode': function() {}, | 90 | 'updateEditMode': function() {}, |
94 | 'synchronizeComponentValues': function() {}, | 91 | 'synchronizeComponentValues': function() {}, |
95 | 92 | ||
96 | //------------------------------------------------------------------------- | 93 | //------------------------------------------------------------------------- |
97 | 94 | ||
98 | 'destroy': function() { | 95 | 'destroy': function() { |
99 | this.element().remove(); | 96 | this.element().remove(); |
100 | }, | 97 | }, |
101 | 98 | ||
102 | //------------------------------------------------------------------------- | 99 | //------------------------------------------------------------------------- |
103 | __syntaxFix__: "syntax fix" | 100 | __syntaxFix__: "syntax fix" |
104 | }); | 101 | }); |
105 | 102 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js index 7596184..ad733aa 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js | |||
@@ -1,77 +1,74 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._fieldComponent = args.fieldComponent || null; | 38 | this._fieldComponent = args.fieldComponent || null; |
42 | 39 | ||
43 | this.render(); | 40 | this.render(); |
44 | 41 | ||
45 | return this; | 42 | return this; |
46 | } | 43 | } |
47 | 44 | ||
48 | //============================================================================= | 45 | //============================================================================= |
49 | 46 | ||
50 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 47 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
51 | 48 | ||
52 | 'toString': function() { | 49 | 'toString': function() { |
53 | return "Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent"; | 50 | return "Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent"; |
54 | }, | 51 | }, |
55 | 52 | ||
56 | //------------------------------------------------------------------------- | 53 | //------------------------------------------------------------------------- |
57 | 54 | ||
58 | 'fieldComponent': function() { | 55 | 'fieldComponent': function() { |
59 | return this._fieldComponent; | 56 | return this._fieldComponent; |
60 | }, | 57 | }, |
61 | 58 | ||
62 | //------------------------------------------------------------------------- | 59 | //------------------------------------------------------------------------- |
63 | 60 | ||
64 | 'mainComponent': function() { | 61 | 'mainComponent': function() { |
65 | return this.fieldComponent().mainComponent(); | 62 | return this.fieldComponent().mainComponent(); |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | 66 | ||
70 | 'recordField': function() { | 67 | 'recordField': function() { |
71 | return this.fieldComponent().recordField(); | 68 | return this.fieldComponent().recordField(); |
72 | }, | 69 | }, |
73 | 70 | ||
74 | //------------------------------------------------------------------------- | 71 | //------------------------------------------------------------------------- |
75 | __syntaxFix__: "syntax fix" | 72 | __syntaxFix__: "syntax fix" |
76 | }); | 73 | }); |
77 | 74 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js index a92285f..d4c7837 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.CreationWizard = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.CreationWizard = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.RecordDetail.CreationWizard.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.RecordDetail.CreationWizard.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._mainComponent = args.mainComponent; | 38 | this._mainComponent = args.mainComponent; |
42 | this._previouslySelectedRecord = args.previouslySelectedRecord; | 39 | this._previouslySelectedRecord = args.previouslySelectedRecord; |
43 | //MochiKit.Logging.logDebug("--- new CreationWizard - previouslySelectedRecord: " + args.previouslySelectedRecord); | 40 | //MochiKit.Logging.logDebug("--- new CreationWizard - previouslySelectedRecord: " + args.previouslySelectedRecord); |
44 | this._createButton_header = null; | 41 | this._createButton_header = null; |
45 | this._createButton_footer = null; | 42 | this._createButton_footer = null; |
46 | 43 | ||
47 | this._cancelButton_header = null; | 44 | this._cancelButton_header = null; |
48 | this._cancelButton_footer = null; | 45 | this._cancelButton_footer = null; |
49 | 46 | ||
50 | this.render(); | 47 | this.render(); |
51 | 48 | ||
52 | return this; | 49 | return this; |
53 | } | 50 | } |
54 | 51 | ||
55 | //============================================================================= | 52 | //============================================================================= |
56 | 53 | ||
57 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.CreationWizard, Clipperz.PM.Components.BaseComponent, { | 54 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.CreationWizard, Clipperz.PM.Components.BaseComponent, { |
58 | 55 | ||
59 | 'toString': function() { | 56 | 'toString': function() { |
60 | return "Clipperz.PM.Components.RecordDetail.CreationWizard component"; | 57 | return "Clipperz.PM.Components.RecordDetail.CreationWizard component"; |
61 | }, | 58 | }, |
62 | 59 | ||
63 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
64 | 61 | ||
65 | 'previouslySelectedRecord': function() { | 62 | 'previouslySelectedRecord': function() { |
66 | return this._previouslySelectedRecord; | 63 | return this._previouslySelectedRecord; |
67 | }, | 64 | }, |
68 | 65 | ||
69 | //------------------------------------------------------------------------- | 66 | //------------------------------------------------------------------------- |
70 | 67 | ||
71 | 'render': function() { | 68 | 'render': function() { |
72 | vartemplateListElement; | 69 | vartemplateListElement; |
73 | vartemplates; | 70 | vartemplates; |
74 | 71 | ||
75 | this.element().update(""); | 72 | this.element().update(""); |
76 | 73 | ||
77 | Clipperz.YUI.DomHelper.append(this.element().dom, | 74 | Clipperz.YUI.DomHelper.append(this.element().dom, |
78 | {tag:'form', cls:'recordDataFORM', id:this.getId('form'), children:[ | 75 | {tag:'form', cls:'recordDataFORM', id:this.getId('form'), children:[ |
79 | {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[ | 76 | {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[ |
80 | {tag:'div', id:this.getId('wizardBox'), cls:'recordCreationWizard', children:[ | 77 | {tag:'div', id:this.getId('wizardBox'), cls:'recordCreationWizard', children:[ |
81 | {tag:'div', id:this.getId('recordCreationWizardTitleBox'), cls:'recordCreationWizardTitleBox', htmlString:Clipperz.PM.Strings['newRecordWizardTitleBox']}, | 78 | {tag:'div', id:this.getId('recordCreationWizardTitleBox'), cls:'recordCreationWizardTitleBox', htmlString:Clipperz.PM.Strings['newRecordWizardTitleBox']}, |
82 | {tag:'ul', id:this.getId('templateList'), cls:'radioList'} | 79 | {tag:'ul', id:this.getId('templateList'), cls:'radioList'} |
83 | ]} | 80 | ]} |
84 | ]} | 81 | ]} |
85 | ]} | 82 | ]} |
86 | ); | 83 | ); |
87 | 84 | ||
88 | Clipperz.YUI.DomHelper.append(this.getDom('recordCreationWizardTitleBox'), {tag:'div', cls:'newRecordWizardHeader', children:[ | 85 | Clipperz.YUI.DomHelper.append(this.getDom('recordCreationWizardTitleBox'), {tag:'div', cls:'newRecordWizardHeader', children:[ |
89 | {tag:'table', width:'100%', cellpadding:'5', children:[ | 86 | {tag:'table', width:'100%', cellpadding:'5', children:[ |
90 | {tag:'tbody', children:[ | 87 | {tag:'tbody', children:[ |
91 | {tag:'tr', children:[ | 88 | {tag:'tr', children:[ |
92 | {tag:'td', width:'49%', align:'right', children:[ | 89 | {tag:'td', width:'49%', align:'right', children:[ |
93 | {tag:'div', id:this.getId('cancelButton_header')} | 90 | {tag:'div', id:this.getId('cancelButton_header')} |
94 | ]}, | 91 | ]}, |
95 | {tag:'td', width:'10', html:' '}, | 92 | {tag:'td', width:'10', html:' '}, |
96 | {tag:'td', width:'49%', align:'left', children:[ | 93 | {tag:'td', width:'49%', align:'left', children:[ |
97 | {tag:'div', id:this.getId('createButton_header')} | 94 | {tag:'div', id:this.getId('createButton_header')} |
98 | ]} | 95 | ]} |
99 | ]} | 96 | ]} |
100 | ]} | 97 | ]} |
101 | ]} | 98 | ]} |
102 | ]}); | 99 | ]}); |
103 | 100 | ||
104 | templateListElement = this.getElement('templateList'); | 101 | templateListElement = this.getElement('templateList'); |
105 | templates = Clipperz.PM.Strings['recordTemplates']; | 102 | templates = Clipperz.PM.Strings['recordTemplates']; |
106 | MochiKit.Iter.forEach(MochiKit.Base.keys(templates), MochiKit.Base.bind(function(aTemplateKey) { | 103 | MochiKit.Iter.forEach(MochiKit.Base.keys(templates), MochiKit.Base.bind(function(aTemplateKey) { |
107 | Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[ | 104 | Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[ |
108 | {tag:'table', children:[ | 105 | {tag:'table', children:[ |
109 | {tag:'tbody', children:[ | 106 | {tag:'tbody', children:[ |
110 | {tag:'tr', children:[ | 107 | {tag:'tr', children:[ |
111 | {tag:'td', valign:'top', children:[ | 108 | {tag:'td', valign:'top', children:[ |
112 | {tag:'input', id:this.getId(aTemplateKey+"_radio"), type:'radio', name:'recordTemplate', value:"aTemplateKey"} | 109 | {tag:'input', id:this.getId(aTemplateKey+"_radio"), type:'radio', name:'recordTemplate', value:"aTemplateKey"} |
113 | ]}, | 110 | ]}, |
114 | {tag:'td', valign:'top', children:[ | 111 | {tag:'td', valign:'top', children:[ |
115 | {tag:'h4', id:this.getId(aTemplateKey+"_title"), html:templates[aTemplateKey]['title']}, | 112 | {tag:'h4', id:this.getId(aTemplateKey+"_title"), html:templates[aTemplateKey]['title']}, |
116 | {tag:'div', cls:'templateDescription', htmlString:templates[aTemplateKey]['description']} | 113 | {tag:'div', cls:'templateDescription', htmlString:templates[aTemplateKey]['description']} |
117 | ]} | 114 | ]} |
118 | ]} | 115 | ]} |
119 | ]} | 116 | ]} |
120 | ]} | 117 | ]} |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js index 6171a4e..36dd9a8 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent = function(anElement, args) { |
37 | //MochiKit.Logging.logDebug(">>> new DirectLoginBindingComponent"); | 34 | //MochiKit.Logging.logDebug(">>> new DirectLoginBindingComponent"); |
38 | args = args || {}; | 35 | args = args || {}; |
39 | 36 | ||
40 | Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent.superclass.constructor.call(this, anElement, args); | 37 | Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent.superclass.constructor.call(this, anElement, args); |
41 | 38 | ||
42 | this._directLoginBinding = args.directLoginBinding || null; | 39 | this._directLoginBinding = args.directLoginBinding || null; |
43 | this.render(); | 40 | this.render(); |
44 | 41 | ||
45 | Clipperz.NotificationCenter.register(this.record(), 'addNewRecordField',this, 'syncAndUpdateEditMode'); | 42 | Clipperz.NotificationCenter.register(this.record(), 'addNewRecordField',this, 'syncAndUpdateEditMode'); |
46 | Clipperz.NotificationCenter.register(this.record(), 'removedField', this, 'syncAndUpdateEditMode'); | 43 | Clipperz.NotificationCenter.register(this.record(), 'removedField', this, 'syncAndUpdateEditMode'); |
47 | Clipperz.NotificationCenter.register(this.record(), 'updatedFieldLabel',this, 'syncAndUpdateEditMode'); | 44 | Clipperz.NotificationCenter.register(this.record(), 'updatedFieldLabel',this, 'syncAndUpdateEditMode'); |
48 | //MochiKit.Logging.logDebug("<<< new DirectLoginBindingComponent"); | 45 | //MochiKit.Logging.logDebug("<<< new DirectLoginBindingComponent"); |
49 | 46 | ||
50 | return this; | 47 | return this; |
51 | } | 48 | } |
52 | 49 | ||
53 | //============================================================================= | 50 | //============================================================================= |
54 | 51 | ||
55 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 52 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
56 | 53 | ||
57 | 'toString': function() { | 54 | 'toString': function() { |
58 | return "Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent component"; | 55 | return "Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent component"; |
59 | }, | 56 | }, |
60 | 57 | ||
61 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
62 | 59 | ||
63 | 'directLoginBinding': function() { | 60 | 'directLoginBinding': function() { |
64 | return this._directLoginBinding; | 61 | return this._directLoginBinding; |
65 | }, | 62 | }, |
66 | 63 | ||
67 | //------------------------------------------------------------------------- | 64 | //------------------------------------------------------------------------- |
68 | 65 | ||
69 | 'render': function() { | 66 | 'render': function() { |
70 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', style:'font-weight:bold;', html:this.directLoginBinding().key()}) | 67 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', style:'font-weight:bold;', html:this.directLoginBinding().key()}) |
71 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.directLoginBinding().value()}) | 68 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.directLoginBinding().value()}) |
72 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.render"); | 69 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.render"); |
73 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingLabelTD', children:[ | 70 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingLabelTD', children:[ |
74 | {tag:'span', html:this.directLoginBinding().key()} | 71 | {tag:'span', html:this.directLoginBinding().key()} |
75 | ]}); | 72 | ]}); |
76 | //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 1"); | 73 | //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 1"); |
77 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingValueTD', children:[ | 74 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingValueTD', children:[ |
78 | {tag:'div', id:this.getId('editModeBox'), children:[ | 75 | {tag:'div', id:this.getId('editModeBox'), children:[ |
79 | {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()} | 76 | {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()} |
80 | ]}, | 77 | ]}, |
81 | {tag:'div', id:this.getId('viewModeBox'), children:[ | 78 | {tag:'div', id:this.getId('viewModeBox'), children:[ |
82 | {tag:'span', id:this.getId('viewValue'), html:""} | 79 | {tag:'span', id:this.getId('viewValue'), html:""} |
83 | ]} | 80 | ]} |
84 | ]}); | 81 | ]}); |
85 | //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 2"); | 82 | //MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 2"); |
86 | this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 83 | this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
87 | this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 84 | this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
88 | 85 | ||
89 | this.update(); | 86 | this.update(); |
90 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.render"); | 87 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.render"); |
91 | }, | 88 | }, |
92 | 89 | ||
93 | //------------------------------------------------------------------------- | 90 | //------------------------------------------------------------------------- |
94 | 91 | ||
95 | 'recordFieldOptions': function() { | 92 | 'recordFieldOptions': function() { |
96 | varresult; | 93 | varresult; |
97 | var option; | 94 | var option; |
98 | varrecordFieldKey; | 95 | varrecordFieldKey; |
99 | varrecordFields; | 96 | varrecordFields; |
100 | 97 | ||
101 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.recordFieldOptions"); | 98 | //MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.recordFieldOptions"); |
102 | recordFields = this.directLoginBinding().directLogin().record().currentVersion().fields(); | 99 | recordFields = this.directLoginBinding().directLogin().record().currentVersion().fields(); |
103 | result = []; | 100 | result = []; |
104 | option = {tag:'option', value:null, html:'---'}; | 101 | option = {tag:'option', value:null, html:'---'}; |
105 | result.push(option); | 102 | result.push(option); |
106 | for (recordFieldKey in recordFields) { | 103 | for (recordFieldKey in recordFields) { |
107 | //TODO: remove the value: field and replace it with element.dom.value = <some value> | 104 | //TODO: remove the value: field and replace it with element.dom.value = <some value> |
108 | option = {tag:'option', value:recordFieldKey, html:recordFields[recordFieldKey].label()} | 105 | option = {tag:'option', value:recordFieldKey, html:recordFields[recordFieldKey].label()} |
109 | if (recordFieldKey == this.directLoginBinding().fieldKey()) { | 106 | if (recordFieldKey == this.directLoginBinding().fieldKey()) { |
110 | option['selected'] = true; | 107 | option['selected'] = true; |
111 | } | 108 | } |
112 | result.push(option); | 109 | result.push(option); |
113 | } | 110 | } |
114 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.recordFieldOptions"); | 111 | //MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.recordFieldOptions"); |
115 | 112 | ||
116 | return result; | 113 | return result; |
117 | }, | 114 | }, |
118 | 115 | ||
119 | //------------------------------------------------------------------------- | 116 | //------------------------------------------------------------------------- |
120 | 117 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js index 7638f00..69cad79 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.DirectLoginComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.DirectLoginComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._directLogin = args.directLogin || null; | 38 | this._directLogin = args.directLogin || null; |
42 | //this._titleElement = null; | 39 | //this._titleElement = null; |
43 | this._structureElement = null; | 40 | this._structureElement = null; |
44 | this._removeButton = null; | 41 | this._removeButton = null; |
45 | this._directLoginBindingComponents = null; | 42 | this._directLoginBindingComponents = null; |
46 | this._collapser = null; | 43 | this._collapser = null; |
47 | 44 | ||
48 | this.mainComponent().addEditComponent(this); | 45 | this.mainComponent().addEditComponent(this); |
49 | this.render(); | 46 | this.render(); |
50 | 47 | ||
51 | return this; | 48 | return this; |
52 | } | 49 | } |
53 | 50 | ||
54 | //============================================================================= | 51 | //============================================================================= |
55 | 52 | ||
56 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 53 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
57 | 54 | ||
58 | 'toString': function() { | 55 | 'toString': function() { |
59 | return "Clipperz.PM.Components.RecordDetail.DirectLoginComponent component"; | 56 | return "Clipperz.PM.Components.RecordDetail.DirectLoginComponent component"; |
60 | }, | 57 | }, |
61 | 58 | ||
62 | //------------------------------------------------------------------------- | 59 | //------------------------------------------------------------------------- |
63 | 60 | ||
64 | 'directLogin': function() { | 61 | 'directLogin': function() { |
65 | return this._directLogin; | 62 | return this._directLogin; |
66 | }, | 63 | }, |
67 | 64 | ||
68 | 'directLoginBindingComponents': function() { | 65 | 'directLoginBindingComponents': function() { |
69 | return this._directLoginBindingComponents; | 66 | return this._directLoginBindingComponents; |
70 | }, | 67 | }, |
71 | 68 | ||
72 | //------------------------------------------------------------------------- | 69 | //------------------------------------------------------------------------- |
73 | 70 | ||
74 | 'removeDirectLogin': function() { | 71 | 'removeDirectLogin': function() { |
75 | //MochiKit.Logging.logDebug(">>> DirectLoginComponent.removeDirectLogin"); | 72 | //MochiKit.Logging.logDebug(">>> DirectLoginComponent.removeDirectLogin"); |
76 | this.mainComponent().synchronizeComponentValues(); | 73 | this.mainComponent().synchronizeComponentValues(); |
77 | this.directLogin().remove(); | 74 | this.directLogin().remove(); |
78 | this.mainComponent().removeEditComponent(this); | 75 | this.mainComponent().removeEditComponent(this); |
79 | this.mainComponent().render(); | 76 | this.mainComponent().render(); |
80 | //MochiKit.Logging.logDebug("<<< DirectLoginComponent.removeDirectLogin"); | 77 | //MochiKit.Logging.logDebug("<<< DirectLoginComponent.removeDirectLogin"); |
81 | }, | 78 | }, |
82 | 79 | ||
83 | //------------------------------------------------------------------------- | 80 | //------------------------------------------------------------------------- |
84 | /* | 81 | /* |
85 | 'formDataValue': function() { | 82 | 'formDataValue': function() { |
86 | return Clipperz.Base.serializeJSON(this.directLogin().formData()); | 83 | return Clipperz.Base.serializeJSON(this.directLogin().formData()); |
87 | }, | 84 | }, |
88 | 85 | ||
89 | 'setFormDataValue': function(aValue) { | 86 | 'setFormDataValue': function(aValue) { |
90 | 87 | ||
91 | }, | 88 | }, |
92 | */ | 89 | */ |
93 | //------------------------------------------------------------------------- | 90 | //------------------------------------------------------------------------- |
94 | 91 | ||
95 | 'removeButton': function() { | 92 | 'removeButton': function() { |
96 | return this._removeButton; | 93 | return this._removeButton; |
97 | }, | 94 | }, |
98 | 95 | ||
99 | 'setRemoveButton': function(aValue) { | 96 | 'setRemoveButton': function(aValue) { |
100 | this._removeButton = aValue; | 97 | this._removeButton = aValue; |
101 | }, | 98 | }, |
102 | 99 | ||
103 | //------------------------------------------------------------------------- | 100 | //------------------------------------------------------------------------- |
104 | /* | 101 | /* |
105 | 'titleElement': function() { | 102 | 'titleElement': function() { |
106 | return this._titleElement; | 103 | return this._titleElement; |
107 | }, | 104 | }, |
108 | 105 | ||
109 | 'setTitleElement': function(aValue) { | 106 | 'setTitleElement': function(aValue) { |
110 | this._titleElement = aValue; | 107 | this._titleElement = aValue; |
111 | }, | 108 | }, |
112 | */ | 109 | */ |
113 | //------------------------------------------------------------------------- | 110 | //------------------------------------------------------------------------- |
114 | 111 | ||
115 | 'structureElement': function() { | 112 | 'structureElement': function() { |
116 | return this._structureElement; | 113 | return this._structureElement; |
117 | }, | 114 | }, |
118 | 115 | ||
119 | 'setStructureElement': function(aValue) { | 116 | 'setStructureElement': function(aValue) { |
120 | this._structureElement = aValue; | 117 | this._structureElement = aValue; |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js index e70229b..d210100 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent = function(anElement, args) { |
37 | //MochiKit.Logging.logDebug(">>> new DirectLoginValueComponent"); | 34 | //MochiKit.Logging.logDebug(">>> new DirectLoginValueComponent"); |
38 | args = args || {}; | 35 | args = args || {}; |
39 | 36 | ||
40 | Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent.superclass.constructor.call(this, anElement, args); | 37 | Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent.superclass.constructor.call(this, anElement, args); |
41 | 38 | ||
42 | this._directLoginInputValue = args.directLoginInputValue || null; | 39 | this._directLoginInputValue = args.directLoginInputValue || null; |
43 | this._value = this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()]; | 40 | this._value = this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()]; |
44 | 41 | ||
45 | this.render(); | 42 | this.render(); |
46 | //MochiKit.Logging.logDebug("<<< new DirectLoginValueComponent - record: " + this.record()); | 43 | //MochiKit.Logging.logDebug("<<< new DirectLoginValueComponent - record: " + this.record()); |
47 | 44 | ||
48 | return this; | 45 | return this; |
49 | } | 46 | } |
50 | 47 | ||
51 | //============================================================================= | 48 | //============================================================================= |
52 | 49 | ||
53 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 50 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
54 | 51 | ||
55 | 'toString': function() { | 52 | 'toString': function() { |
56 | return "Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent component - " + this.directLoginInputValue().name(); | 53 | return "Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent component - " + this.directLoginInputValue().name(); |
57 | }, | 54 | }, |
58 | 55 | ||
59 | //------------------------------------------------------------------------- | 56 | //------------------------------------------------------------------------- |
60 | 57 | ||
61 | 'directLoginInputValue': function() { | 58 | 'directLoginInputValue': function() { |
62 | return this._directLoginInputValue; | 59 | return this._directLoginInputValue; |
63 | }, | 60 | }, |
64 | 61 | ||
65 | //------------------------------------------------------------------------- | 62 | //------------------------------------------------------------------------- |
66 | 63 | ||
67 | 'render': function() { | 64 | 'render': function() { |
68 | //MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.render"); | 65 | //MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.render"); |
69 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataLabelTD', children:[ | 66 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataLabelTD', children:[ |
70 | {tag:'span', html:this.directLoginInputValue().name()} | 67 | {tag:'span', html:this.directLoginInputValue().name()} |
71 | ]}); | 68 | ]}); |
72 | //MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 1"); | 69 | //MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 1"); |
73 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataValueTD', children:[ | 70 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataValueTD', children:[ |
74 | {tag:'span', id:this.getId('inputElement')} | 71 | {tag:'span', id:this.getId('inputElement')} |
75 | ]}); | 72 | ]}); |
76 | //MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 2"); | 73 | //MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 2"); |
77 | this.update(); | 74 | this.update(); |
78 | //MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.render"); | 75 | //MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.render"); |
79 | }, | 76 | }, |
80 | 77 | ||
81 | //------------------------------------------------------------------------- | 78 | //------------------------------------------------------------------------- |
82 | 79 | ||
83 | 'inputElementConfiguration': function() { | 80 | 'inputElementConfiguration': function() { |
84 | var result; | 81 | var result; |
85 | var currentValue; | 82 | var currentValue; |
86 | 83 | ||
87 | //MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.inputElementConfiguration - " + this.directLoginInputValue().name()); | 84 | //MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.inputElementConfiguration - " + this.directLoginInputValue().name()); |
88 | result = []; | 85 | result = []; |
89 | currentValue = this.value(); | 86 | currentValue = this.value(); |
90 | 87 | ||
91 | switch (this.directLoginInputValue().type()) { | 88 | switch (this.directLoginInputValue().type()) { |
92 | case 'checkbox': | 89 | case 'checkbox': |
93 | var checkbox; | 90 | var checkbox; |
94 | //{"type":"checkbox", "name":"rememberUsernameChk", "value":"checkbox"} | 91 | //{"type":"checkbox", "name":"rememberUsernameChk", "value":"checkbox"} |
95 | checkbox = {tag:'input', id:this.getId('checkbox'), type:'checkbox'} | 92 | checkbox = {tag:'input', id:this.getId('checkbox'), type:'checkbox'} |
96 | if (currentValue == true) { | 93 | if (currentValue == true) { |
97 | checkbox.checked = true; | 94 | checkbox.checked = true; |
98 | } | 95 | } |
99 | result.push(checkbox); | 96 | result.push(checkbox); |
100 | break; | 97 | break; |
101 | 98 | ||
102 | case 'select': | 99 | case 'select': |
103 | var input; | 100 | var input; |
104 | //{"type":"select", "name":"DOMAIN", "options":[{"selected":true, "label":"@tin.it", "value":"tin.it"}, {"selected":false, "label":"@virgilio.it", "value":"virgilio.it"}]} | 101 | //{"type":"select", "name":"DOMAIN", "options":[{"selected":true, "label":"@tin.it", "value":"tin.it"}, {"selected":false, "label":"@virgilio.it", "value":"virgilio.it"}]} |
105 | input = {tag:'select', id:this.getId('select'), name:this.directLoginInputValue().name(), children:[]}; | 102 | input = {tag:'select', id:this.getId('select'), name:this.directLoginInputValue().name(), children:[]}; |
106 | input.children.push({tag:'option', value:null, html:"---"}); | 103 | input.children.push({tag:'option', value:null, html:"---"}); |
107 | MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) { | 104 | MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) { |
108 | var option; | 105 | var option; |
109 | 106 | ||
110 | //TODO: remove the value: field and replace it with element.dom.value = <some value> | 107 | //TODO: remove the value: field and replace it with element.dom.value = <some value> |
111 | option = {tag:'option', value:anOption['value'], html:anOption['label']} | 108 | option = {tag:'option', value:anOption['value'], html:anOption['label']} |
112 | if (currentValue == anOption['value']) { | 109 | if (currentValue == anOption['value']) { |
113 | option.selected = true; | 110 | option.selected = true; |
114 | } | 111 | } |
115 | input.children.push(option); | 112 | input.children.push(option); |
116 | }) | 113 | }) |
117 | result.push(input); | 114 | result.push(input); |
118 | break; | 115 | break; |
119 | 116 | ||
120 | case 'radio': | 117 | case 'radio': |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js index 3292a95..1396bd8 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.DirectLoginsComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.DirectLoginsComponent = function(anElement, args) { |
37 | //MochiKit.Logging.logDebug(">>> new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); | 34 | //MochiKit.Logging.logDebug(">>> new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); |
38 | args = args || {}; | 35 | args = args || {}; |
39 | 36 | ||
40 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 0"); | 37 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 0"); |
41 | Clipperz.PM.Components.RecordDetail.DirectLoginsComponent.superclass.constructor.call(this, anElement, args); | 38 | Clipperz.PM.Components.RecordDetail.DirectLoginsComponent.superclass.constructor.call(this, anElement, args); |
42 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 1"); | 39 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 1"); |
43 | 40 | ||
44 | this._addDirectLoginButton = null; | 41 | this._addDirectLoginButton = null; |
45 | 42 | ||
46 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 2"); | 43 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 2"); |
47 | this.mainComponent().addEditComponent(this); | 44 | this.mainComponent().addEditComponent(this); |
48 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 3"); | 45 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 3"); |
49 | this.render(); | 46 | this.render(); |
50 | //MochiKit.Logging.logDebug("<<< new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); | 47 | //MochiKit.Logging.logDebug("<<< new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); |
51 | 48 | ||
52 | return this; | 49 | return this; |
53 | } | 50 | } |
54 | 51 | ||
55 | //============================================================================= | 52 | //============================================================================= |
56 | 53 | ||
57 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginsComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 54 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginsComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
58 | 55 | ||
59 | 'toString': function() { | 56 | 'toString': function() { |
60 | return "Clipperz.PM.Components.RecordDetail.DirectLoginsComponent component"; | 57 | return "Clipperz.PM.Components.RecordDetail.DirectLoginsComponent component"; |
61 | }, | 58 | }, |
62 | 59 | ||
63 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
64 | 61 | ||
65 | 'addDirectLoginButton': function() { | 62 | 'addDirectLoginButton': function() { |
66 | return this._addDirectLoginButton; | 63 | return this._addDirectLoginButton; |
67 | }, | 64 | }, |
68 | 65 | ||
69 | 'setAddDirectLoginButton': function(aValue) { | 66 | 'setAddDirectLoginButton': function(aValue) { |
70 | this._addDirectLoginButton = aValue; | 67 | this._addDirectLoginButton = aValue; |
71 | }, | 68 | }, |
72 | 69 | ||
73 | //------------------------------------------------------------------------- | 70 | //------------------------------------------------------------------------- |
74 | 71 | ||
75 | 'render': function() { | 72 | 'render': function() { |
76 | this.element().update(""); | 73 | this.element().update(""); |
77 | 74 | ||
78 | Clipperz.YUI.DomHelper.append(this.element().dom, | 75 | Clipperz.YUI.DomHelper.append(this.element().dom, |
79 | {tag:'div', cls:'directLoginsRecordBox', children:[ | 76 | {tag:'div', cls:'directLoginsRecordBox', children:[ |
80 | {tag:'h3', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockTitle']}, | 77 | {tag:'h3', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockTitle']}, |
81 | {tag:'ul', id:this.getId('directLogins')}, | 78 | {tag:'ul', id:this.getId('directLogins')}, |
82 | 79 | ||
83 | {tag:'div', cls:'addDirectLoginBox', id:this.getId('addDirectLogin'), children:[ | 80 | {tag:'div', cls:'addDirectLoginBox', id:this.getId('addDirectLogin'), children:[ |
84 | {tag:'div', cls:'addDirectLoginBoxContent', children:[ | 81 | {tag:'div', cls:'addDirectLoginBoxContent', children:[ |
85 | {tag:'div', cls:'bookmarkletConfiguration', children:[ | 82 | {tag:'div', cls:'bookmarkletConfiguration', children:[ |
86 | // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']}, | 83 | // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']}, |
87 | {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']}, | 84 | {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']}, |
88 | {tag:'textarea', id:this.getId('addDirectLoginTextarea')} | 85 | {tag:'textarea', id:this.getId('addDirectLoginTextarea')} |
89 | ]}, | 86 | ]}, |
90 | {tag:'div', id:this.getId('addDirectLoginButton')} | 87 | {tag:'div', id:this.getId('addDirectLoginButton')} |
91 | ]} | 88 | ]} |
92 | ]} | 89 | ]} |
93 | ]} | 90 | ]} |
94 | ); | 91 | ); |
95 | 92 | ||
96 | if (MochiKit.Base.keys(this.record().directLogins()).length == 0) { | 93 | if (MochiKit.Base.keys(this.record().directLogins()).length == 0) { |
97 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 3"); | 94 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 3"); |
98 | Clipperz.YUI.DomHelper.append(this.getElement('directLogins'), | 95 | Clipperz.YUI.DomHelper.append(this.getElement('directLogins'), |
99 | {tag:'li', children:[ | 96 | {tag:'li', children:[ |
100 | // {tag:'span', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredLabel']} | 97 | // {tag:'span', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredLabel']} |
101 | {tag:'div', cls:'recordDetailNoDirectLoginDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription']} | 98 | {tag:'div', cls:'recordDetailNoDirectLoginDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription']} |
102 | ]} | 99 | ]} |
103 | ); | 100 | ); |
104 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 4"); | 101 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 4"); |
105 | } else { | 102 | } else { |
106 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 5"); | 103 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 5"); |
107 | for (directLoginReference in this.record().directLogins()) { | 104 | for (directLoginReference in this.record().directLogins()) { |
108 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 6"); | 105 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 6"); |
109 | this.addDirectLogin(this.record().directLogins()[directLoginReference]); | 106 | this.addDirectLogin(this.record().directLogins()[directLoginReference]); |
110 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 7"); | 107 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 7"); |
111 | } | 108 | } |
112 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 8"); | 109 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 8"); |
113 | } | 110 | } |
114 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 9"); | 111 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 9"); |
115 | 112 | ||
116 | this.setAddDirectLoginButton(new YAHOO.ext.Button(this.getDom('addDirectLoginButton'), { | 113 | this.setAddDirectLoginButton(new YAHOO.ext.Button(this.getDom('addDirectLoginButton'), { |
117 | text:Clipperz.PM.Strings['recordDetailAddNewDirectLoginButtonLabel'], | 114 | text:Clipperz.PM.Strings['recordDetailAddNewDirectLoginButtonLabel'], |
118 | handler:this.addNewDirectLogin, | 115 | handler:this.addNewDirectLogin, |
119 | scope:this | 116 | scope:this |
120 | })); | 117 | })); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js index 9e1d56a..b79c365 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js | |||
@@ -1,117 +1,114 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.FieldButtonComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.FieldButtonComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.RecordDetail.FieldButtonComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.RecordDetail.FieldButtonComponent.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._button = null; | 38 | this._button = null; |
42 | 39 | ||
43 | this.render(); | 40 | this.render(); |
44 | 41 | ||
45 | return this; | 42 | return this; |
46 | } | 43 | } |
47 | 44 | ||
48 | //============================================================================= | 45 | //============================================================================= |
49 | 46 | ||
50 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldButtonComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { | 47 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldButtonComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { |
51 | 48 | ||
52 | 'toString': function() { | 49 | 'toString': function() { |
53 | return "Clipperz.PM.Components.RecordDetail.FieldButtonComponent"; | 50 | return "Clipperz.PM.Components.RecordDetail.FieldButtonComponent"; |
54 | }, | 51 | }, |
55 | 52 | ||
56 | //------------------------------------------------------------------------- | 53 | //------------------------------------------------------------------------- |
57 | 54 | ||
58 | 'buttonText': function() { | 55 | 'buttonText': function() { |
59 | varresult; | 56 | varresult; |
60 | 57 | ||
61 | if (this.recordField() == null) { | 58 | if (this.recordField() == null) { |
62 | //TODO: this is never used. It is just an obsolete legacy chunk of code | 59 | //TODO: this is never used. It is just an obsolete legacy chunk of code |
63 | result = Clipperz.PM.Strings['recordDetailAddFieldButtonLabel']; | 60 | result = Clipperz.PM.Strings['recordDetailAddFieldButtonLabel']; |
64 | } else { | 61 | } else { |
65 | result = Clipperz.PM.Strings['recordDetailRemoveFieldButtonLabel']; | 62 | result = Clipperz.PM.Strings['recordDetailRemoveFieldButtonLabel']; |
66 | } | 63 | } |
67 | 64 | ||
68 | return result; | 65 | return result; |
69 | }, | 66 | }, |
70 | 67 | ||
71 | //------------------------------------------------------------------------- | 68 | //------------------------------------------------------------------------- |
72 | 69 | ||
73 | 'button': function() { | 70 | 'button': function() { |
74 | return this._button; | 71 | return this._button; |
75 | }, | 72 | }, |
76 | 73 | ||
77 | 'setButton': function(aValue) { | 74 | 'setButton': function(aValue) { |
78 | this._button = aValue; | 75 | this._button = aValue; |
79 | }, | 76 | }, |
80 | 77 | ||
81 | //------------------------------------------------------------------------- | 78 | //------------------------------------------------------------------------- |
82 | 79 | ||
83 | 'render': function() { | 80 | 'render': function() { |
84 | this.element().update(""); | 81 | this.element().update(""); |
85 | 82 | ||
86 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('button')}) | 83 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('button')}) |
87 | this.setButton(new YAHOO.ext.Button(this.getDom('button'), {text:this.buttonText(), handler:this.handleButtonClick, scope:this})); | 84 | this.setButton(new YAHOO.ext.Button(this.getDom('button'), {text:this.buttonText(), handler:this.handleButtonClick, scope:this})); |
88 | 85 | ||
89 | this.update(); | 86 | this.update(); |
90 | }, | 87 | }, |
91 | 88 | ||
92 | //------------------------------------------------------------------------- | 89 | //------------------------------------------------------------------------- |
93 | 90 | ||
94 | 'handleButtonClick': function() { | 91 | 'handleButtonClick': function() { |
95 | if (this.recordField() == null) { | 92 | if (this.recordField() == null) { |
96 | this.mainComponent().addNewField(); | 93 | this.mainComponent().addNewField(); |
97 | } else { | 94 | } else { |
98 | this.mainComponent().removeField(this.fieldComponent()); | 95 | this.mainComponent().removeField(this.fieldComponent()); |
99 | } | 96 | } |
100 | }, | 97 | }, |
101 | 98 | ||
102 | //------------------------------------------------------------------------- | 99 | //------------------------------------------------------------------------- |
103 | 100 | ||
104 | 'updateEditMode': function() { | 101 | 'updateEditMode': function() { |
105 | this.button().show(); | 102 | this.button().show(); |
106 | }, | 103 | }, |
107 | 104 | ||
108 | //------------------------------------------------------------------------- | 105 | //------------------------------------------------------------------------- |
109 | 106 | ||
110 | 'updateViewMode': function() { | 107 | 'updateViewMode': function() { |
111 | this.button().hide(); | 108 | this.button().hide(); |
112 | }, | 109 | }, |
113 | 110 | ||
114 | //------------------------------------------------------------------------- | 111 | //------------------------------------------------------------------------- |
115 | __syntaxFix__: "syntax fix" | 112 | __syntaxFix__: "syntax fix" |
116 | }); | 113 | }); |
117 | 114 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js index c2d947e..978a54e 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.FieldComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.FieldComponent = function(anElement, args) { |
37 | //MochiKit.Logging.logDebug(">>> new FieldComponent"); | 34 | //MochiKit.Logging.logDebug(">>> new FieldComponent"); |
38 | args = args || {}; | 35 | args = args || {}; |
39 | 36 | ||
40 | Clipperz.PM.Components.RecordDetail.FieldComponent.superclass.constructor.call(this, anElement, args); | 37 | Clipperz.PM.Components.RecordDetail.FieldComponent.superclass.constructor.call(this, anElement, args); |
41 | 38 | ||
42 | this._element = anElement; | 39 | this._element = anElement; |
43 | this._recordField = args.recordField || null; | 40 | this._recordField = args.recordField || null; |
44 | 41 | ||
45 | this._buttonComponent = null; | 42 | this._buttonComponent = null; |
46 | this._labelComponent = null; | 43 | this._labelComponent = null; |
47 | this._dragHandler = null; | 44 | this._dragHandler = null; |
48 | this._valueComponent = null; | 45 | this._valueComponent = null; |
49 | this._typeComponent = null; | 46 | this._typeComponent = null; |
50 | 47 | ||
51 | this.mainComponent().addEditComponent(this); | 48 | this.mainComponent().addEditComponent(this); |
52 | 49 | ||
53 | this.render(); | 50 | this.render(); |
54 | 51 | ||
55 | return this; | 52 | return this; |
56 | } | 53 | } |
57 | 54 | ||
58 | //============================================================================= | 55 | //============================================================================= |
59 | 56 | ||
60 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 57 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
61 | 58 | ||
62 | 'toString': function() { | 59 | 'toString': function() { |
63 | return "Clipperz.PM.Components.RecordDetail.FieldComponent component"; | 60 | return "Clipperz.PM.Components.RecordDetail.FieldComponent component"; |
64 | }, | 61 | }, |
65 | 62 | ||
66 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
67 | 64 | ||
68 | 'recordField': function() { | 65 | 'recordField': function() { |
69 | return this._recordField; | 66 | return this._recordField; |
70 | }, | 67 | }, |
71 | 68 | ||
72 | //------------------------------------------------------------------------- | 69 | //------------------------------------------------------------------------- |
73 | 70 | ||
74 | 'buttonComponent': function() { | 71 | 'buttonComponent': function() { |
75 | return this._buttonComponent; | 72 | return this._buttonComponent; |
76 | }, | 73 | }, |
77 | 74 | ||
78 | 'setButtonComponent': function(aValue) { | 75 | 'setButtonComponent': function(aValue) { |
79 | this._buttonComponent = aValue; | 76 | this._buttonComponent = aValue; |
80 | }, | 77 | }, |
81 | 78 | ||
82 | //------------------------------------------------------------------------- | 79 | //------------------------------------------------------------------------- |
83 | 80 | ||
84 | 'labelComponent': function() { | 81 | 'labelComponent': function() { |
85 | return this._labelComponent; | 82 | return this._labelComponent; |
86 | }, | 83 | }, |
87 | 84 | ||
88 | 'setLabelComponent': function(aValue) { | 85 | 'setLabelComponent': function(aValue) { |
89 | this._labelComponent = aValue; | 86 | this._labelComponent = aValue; |
90 | }, | 87 | }, |
91 | 88 | ||
92 | //------------------------------------------------------------------------- | 89 | //------------------------------------------------------------------------- |
93 | 90 | ||
94 | 'dragHandler': function() { | 91 | 'dragHandler': function() { |
95 | return this._dragHandler; | 92 | return this._dragHandler; |
96 | }, | 93 | }, |
97 | 94 | ||
98 | 'setDragHandler': function(aValue) { | 95 | 'setDragHandler': function(aValue) { |
99 | this._dragHandler = aValue; | 96 | this._dragHandler = aValue; |
100 | }, | 97 | }, |
101 | 98 | ||
102 | //------------------------------------------------------------------------- | 99 | //------------------------------------------------------------------------- |
103 | 100 | ||
104 | 'valueComponent': function() { | 101 | 'valueComponent': function() { |
105 | return this._valueComponent; | 102 | return this._valueComponent; |
106 | }, | 103 | }, |
107 | 104 | ||
108 | 'setValueComponent': function(aValue) { | 105 | 'setValueComponent': function(aValue) { |
109 | this._valueComponent = aValue; | 106 | this._valueComponent = aValue; |
110 | }, | 107 | }, |
111 | 108 | ||
112 | //------------------------------------------------------------------------- | 109 | //------------------------------------------------------------------------- |
113 | 110 | ||
114 | 'typeComponent': function() { | 111 | 'typeComponent': function() { |
115 | return this._typeComponent; | 112 | return this._typeComponent; |
116 | }, | 113 | }, |
117 | 114 | ||
118 | 'setTypeComponent': function(aValue) { | 115 | 'setTypeComponent': function(aValue) { |
119 | this._typeComponent = aValue; | 116 | this._typeComponent = aValue; |
120 | }, | 117 | }, |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js index 13a08fc..f7c5e21 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js | |||
@@ -1,59 +1,56 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.FieldDragHandler = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.FieldDragHandler = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.RecordDetail.FieldDragHandler.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.RecordDetail.FieldDragHandler.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._element = anElement; | 38 | this._element = anElement; |
42 | 39 | ||
43 | this.render(); | 40 | this.render(); |
44 | 41 | ||
45 | return this; | 42 | return this; |
46 | } | 43 | } |
47 | 44 | ||
48 | //============================================================================= | 45 | //============================================================================= |
49 | 46 | ||
50 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldDragHandler, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { | 47 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldDragHandler, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { |
51 | 48 | ||
52 | 'toString': function() { | 49 | 'toString': function() { |
53 | return "Clipperz.PM.Components.RecordDetail.FieldDragHandler component"; | 50 | return "Clipperz.PM.Components.RecordDetail.FieldDragHandler component"; |
54 | }, | 51 | }, |
55 | 52 | ||
56 | //------------------------------------------------------------------------- | 53 | //------------------------------------------------------------------------- |
57 | __syntaxFix__: "syntax fix" | 54 | __syntaxFix__: "syntax fix" |
58 | }); | 55 | }); |
59 | 56 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js index 3bbcd1d..c58a7e2 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.FieldLabelComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.FieldLabelComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.RecordDetail.FieldLabelComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.RecordDetail.FieldLabelComponent.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._inputElement = null; | 38 | this._inputElement = null; |
42 | 39 | ||
43 | this.render(); | 40 | this.render(); |
44 | 41 | ||
45 | return this; | 42 | return this; |
46 | } | 43 | } |
47 | 44 | ||
48 | //============================================================================= | 45 | //============================================================================= |
49 | 46 | ||
50 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldLabelComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { | 47 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldLabelComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { |
51 | 48 | ||
52 | 'toString': function() { | 49 | 'toString': function() { |
53 | return "Clipperz.PM.Components.RecordDetail.FieldLabelComponent component"; | 50 | return "Clipperz.PM.Components.RecordDetail.FieldLabelComponent component"; |
54 | }, | 51 | }, |
55 | 52 | ||
56 | //------------------------------------------------------------------------- | 53 | //------------------------------------------------------------------------- |
57 | 54 | ||
58 | 'value': function() { | 55 | 'value': function() { |
59 | return this.recordField().label(); | 56 | return this.recordField().label(); |
60 | }, | 57 | }, |
61 | 58 | ||
62 | //------------------------------------------------------------------------- | 59 | //------------------------------------------------------------------------- |
63 | 60 | ||
64 | 'inputElement': function() { | 61 | 'inputElement': function() { |
65 | return this._inputElement; | 62 | return this._inputElement; |
66 | }, | 63 | }, |
67 | 64 | ||
68 | 'setInputElement': function(aValue) { | 65 | 'setInputElement': function(aValue) { |
69 | this._inputElement = aValue; | 66 | this._inputElement = aValue; |
70 | }, | 67 | }, |
71 | 68 | ||
72 | //------------------------------------------------------------------------- | 69 | //------------------------------------------------------------------------- |
73 | 70 | ||
74 | 'render': function() { | 71 | 'render': function() { |
75 | varnewTextFormField; | 72 | varnewTextFormField; |
76 | this.element().update(""); | 73 | this.element().update(""); |
77 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'Clipperz_recordFieldLabel', id:this.getId('label')}); | 74 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'Clipperz_recordFieldLabel', id:this.getId('label')}); |
78 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'font-size:8pt;', html:this.recordField().key()}); | 75 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'font-size:8pt;', html:this.recordField().key()}); |
79 | 76 | ||
80 | // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()})); | 77 | // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()})); |
81 | newTextFormField = 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()}); |
82 | // newTextFormField.inputElement().setStyle({border:'3px solid cyan;'}); | 79 | // newTextFormField.inputElement().setStyle({border:'3px solid cyan;'}); |
83 | newTextFormField.on('change', this.notifyChanges, this, true) | 80 | newTextFormField.on('change', this.notifyChanges, this, true) |
84 | // this.inputElement().on('change', function() {alert("CHANGE");}); | 81 | // this.inputElement().on('change', function() {alert("CHANGE");}); |
85 | // this.inputElement().getElement('editComponent_input').on('change', function() {alert("CHANGE");}) | 82 | // this.inputElement().getElement('editComponent_input').on('change', function() {alert("CHANGE");}) |
86 | // this.inputElement().on('blur', this.notifyChanges, this, true); | 83 | // this.inputElement().on('blur', this.notifyChanges, this, true); |
87 | 84 | ||
88 | this.setInputElement(newTextFormField); | 85 | this.setInputElement(newTextFormField); |
89 | this.update(); | 86 | this.update(); |
90 | }, | 87 | }, |
91 | 88 | ||
92 | 'notifyChanges': function() { | 89 | 'notifyChanges': function() { |
93 | //MochiKit.Logging.logDebug(">>> FieldLabelComponent.notifyChanges - " + this); | 90 | //MochiKit.Logging.logDebug(">>> FieldLabelComponent.notifyChanges - " + this); |
94 | this.synchronizeComponentValues(); | 91 | this.synchronizeComponentValues(); |
95 | Clipperz.NotificationCenter.notify(this.recordField().recordVersion().record(), 'updatedFieldLabel'); | 92 | Clipperz.NotificationCenter.notify(this.recordField().recordVersion().record(), 'updatedFieldLabel'); |
96 | //MochiKit.Logging.logDebug("<<< FieldLabelComponent.notifyChanges"); | 93 | //MochiKit.Logging.logDebug("<<< FieldLabelComponent.notifyChanges"); |
97 | }, | 94 | }, |
98 | 95 | ||
99 | //------------------------------------------------------------------------- | 96 | //------------------------------------------------------------------------- |
100 | 97 | ||
101 | 'update': function() { | 98 | 'update': function() { |
102 | //MochiKit.Logging.logDebug(">>> FieldLabelComponent.update"); | 99 | //MochiKit.Logging.logDebug(">>> FieldLabelComponent.update"); |
103 | this.inputElement().update({editMode:this.editMode(), value:this.value()}); | 100 | this.inputElement().update({editMode:this.editMode(), value:this.value()}); |
104 | //MochiKit.Logging.logDebug("<<< FieldLabelComponent.update"); | 101 | //MochiKit.Logging.logDebug("<<< FieldLabelComponent.update"); |
105 | }, | 102 | }, |
106 | 103 | ||
107 | //------------------------------------------------------------------------- | 104 | //------------------------------------------------------------------------- |
108 | /* | 105 | /* |
109 | 'updateViewMode': function() { | 106 | 'updateViewMode': function() { |
110 | varwidth; | 107 | varwidth; |
111 | varelement; | 108 | varelement; |
112 | 109 | ||
113 | this.element().update(""); | 110 | this.element().update(""); |
114 | width = this.element().getWidth(); | 111 | width = this.element().getWidth(); |
115 | element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.value()}, true); | 112 | element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.value()}, true); |
116 | element.setWidth(width-1); | 113 | element.setWidth(width-1); |
117 | }, | 114 | }, |
118 | 115 | ||
119 | //------------------------------------------------------------------------- | 116 | //------------------------------------------------------------------------- |
120 | 117 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js index 3bdd093..489258a 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.FieldTypeComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.FieldTypeComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.RecordDetail.FieldTypeComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.RecordDetail.FieldTypeComponent.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._inputElement = null; | 38 | this._inputElement = null; |
42 | 39 | ||
43 | this.render(); | 40 | this.render(); |
44 | 41 | ||
45 | return this; | 42 | return this; |
46 | } | 43 | } |
47 | 44 | ||
48 | //============================================================================= | 45 | //============================================================================= |
49 | 46 | ||
50 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldTypeComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { | 47 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldTypeComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { |
51 | 48 | ||
52 | 'toString': function() { | 49 | 'toString': function() { |
53 | return "Clipperz.PM.Components.RecordDetail.FieldTypeComponent component"; | 50 | return "Clipperz.PM.Components.RecordDetail.FieldTypeComponent component"; |
54 | }, | 51 | }, |
55 | 52 | ||
56 | //------------------------------------------------------------------------- | 53 | //------------------------------------------------------------------------- |
57 | 54 | ||
58 | 'inputElement': function() { | 55 | 'inputElement': function() { |
59 | return this._inputElement; | 56 | return this._inputElement; |
60 | }, | 57 | }, |
61 | 58 | ||
62 | 'setInputElement': function(aValue) { | 59 | 'setInputElement': function(aValue) { |
63 | this._inputElement = aValue; | 60 | this._inputElement = aValue; |
64 | }, | 61 | }, |
65 | 62 | ||
66 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
67 | 64 | ||
68 | 'value': function() { | 65 | 'value': function() { |
69 | return this.recordField().type(); | 66 | return this.recordField().type(); |
70 | }, | 67 | }, |
71 | 68 | ||
72 | 'canChangeType': function() { | 69 | 'canChangeType': function() { |
73 | var value; | 70 | var value; |
74 | var result; | 71 | var result; |
75 | 72 | ||
76 | value = this.value(); | 73 | value = this.value(); |
77 | result = ((value == 'TXT') || (value == 'PWD') || (value == 'URL') || (value == 'DATE') || (value == 'ADDR')); | 74 | result = ((value == 'TXT') || (value == 'PWD') || (value == 'URL') || (value == 'DATE') || (value == 'ADDR')); |
78 | 75 | ||
79 | return result | 76 | return result |
80 | }, | 77 | }, |
81 | 78 | ||
82 | //------------------------------------------------------------------------- | 79 | //------------------------------------------------------------------------- |
83 | 80 | ||
84 | 'updateViewMode': function() { | 81 | 'updateViewMode': function() { |
85 | this.element().update(""); | 82 | this.element().update(""); |
86 | if (this.canChangeType()) { | 83 | if (this.canChangeType()) { |
87 | varwidth; | 84 | varwidth; |
88 | var element; | 85 | var element; |
89 | 86 | ||
90 | width = this.element().getWidth(true); | 87 | width = this.element().getWidth(true); |
91 | element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.recordField().typeShortDescription()}, true); | 88 | element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.recordField().typeShortDescription()}, true); |
92 | element.setWidth(width-1); | 89 | element.setWidth(width-1); |
93 | } | 90 | } |
94 | }, | 91 | }, |
95 | 92 | ||
96 | //------------------------------------------------------------------------- | 93 | //------------------------------------------------------------------------- |
97 | 94 | ||
98 | 'updateEditMode': function() { | 95 | 'updateEditMode': function() { |
99 | this.element().update(""); | 96 | this.element().update(""); |
100 | 97 | ||
101 | if (this.canChangeType()) { | 98 | if (this.canChangeType()) { |
102 | varwidth; | 99 | varwidth; |
103 | 100 | ||
104 | width = this.element().getWidth(true); | 101 | width = this.element().getWidth(true); |
105 | this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'select', children:[ | 102 | this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'select', children:[ |
106 | {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, | 103 | {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, |
107 | {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, | 104 | {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, |
108 | {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, | 105 | {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, |
109 | {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, | 106 | {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, |
110 | {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} | 107 | {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} |
111 | 108 | ||
112 | // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['CHECK']['shortDescription']}, | 109 | // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['CHECK']['shortDescription']}, |
113 | // {tag:'option', value:'RADIO', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['RADIO']['shortDescription']}, | 110 | // {tag:'option', value:'RADIO', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['RADIO']['shortDescription']}, |
114 | // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['SELECT']['shortDescription']} | 111 | // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['SELECT']['shortDescription']} |
115 | // {tag:'option', value:'NOTE', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['NOTE']['shortDescription']} | 112 | // {tag:'option', value:'NOTE', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['NOTE']['shortDescription']} |
116 | ]}, true)); | 113 | ]}, true)); |
117 | this.inputElement().setWidth(width-1); | 114 | this.inputElement().setWidth(width-1); |
118 | this.inputElement().addHandler('change', true, this.onChange, this, true); | 115 | this.inputElement().addHandler('change', true, this.onChange, this, true); |
119 | // this.selectCorrectOption(); | 116 | // this.selectCorrectOption(); |
120 | Clipperz.DOM.selectOptionMatchingValue(this.inputElement().dom, this.value()); | 117 | Clipperz.DOM.selectOptionMatchingValue(this.inputElement().dom, this.value()); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js index a30992a..8621397 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.FieldValueComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.FieldValueComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.RecordDetail.FieldValueComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.RecordDetail.FieldValueComponent.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._inputElement = null; | 38 | this._inputElement = null; |
42 | this._scrambledStatus = 'SCRAMBLED'; //'UNSCRAMBLED' | 39 | this._scrambledStatus = 'SCRAMBLED'; //'UNSCRAMBLED' |
43 | 40 | ||
44 | this.render(); | 41 | this.render(); |
45 | 42 | ||
46 | return this; | 43 | return this; |
47 | } | 44 | } |
48 | 45 | ||
49 | //============================================================================= | 46 | //============================================================================= |
50 | 47 | ||
51 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { | 48 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { |
52 | 49 | ||
53 | 'toString': function() { | 50 | 'toString': function() { |
54 | return "Clipperz.PM.Components.RecordDetail.FieldValueComponent component"; | 51 | return "Clipperz.PM.Components.RecordDetail.FieldValueComponent component"; |
55 | }, | 52 | }, |
56 | 53 | ||
57 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
58 | 55 | ||
59 | 'value': function() { | 56 | 'value': function() { |
60 | return this.recordField().value(); | 57 | return this.recordField().value(); |
61 | }, | 58 | }, |
62 | 59 | ||
63 | 'setValue': function(aValue) { | 60 | 'setValue': function(aValue) { |
64 | this.recordField().setValue(aValue); | 61 | this.recordField().setValue(aValue); |
65 | }, | 62 | }, |
66 | 63 | ||
67 | //------------------------------------------------------------------------- | 64 | //------------------------------------------------------------------------- |
68 | 65 | ||
69 | 'inputElement': function() { | 66 | 'inputElement': function() { |
70 | return this._inputElement; | 67 | return this._inputElement; |
71 | }, | 68 | }, |
72 | 69 | ||
73 | 'setInputElement': function(aValue) { | 70 | 'setInputElement': function(aValue) { |
74 | this._inputElement = aValue; | 71 | this._inputElement = aValue; |
75 | }, | 72 | }, |
76 | 73 | ||
77 | //------------------------------------------------------------------------- | 74 | //------------------------------------------------------------------------- |
78 | 75 | ||
79 | 'scrambledStatus': function() { | 76 | 'scrambledStatus': function() { |
80 | return this._scrambledStatus; | 77 | return this._scrambledStatus; |
81 | }, | 78 | }, |
82 | 79 | ||
83 | 'setScrambledStatus': function(aValue) { | 80 | 'setScrambledStatus': function(aValue) { |
84 | this._scrambledStatus = aValue; | 81 | this._scrambledStatus = aValue; |
85 | }, | 82 | }, |
86 | 83 | ||
87 | //------------------------------------------------------------------------- | 84 | //------------------------------------------------------------------------- |
88 | 85 | ||
89 | 'handleTypeChange': function() { | 86 | 'handleTypeChange': function() { |
90 | //MochiKit.Logging.logDebug(">>> handling type change - " + this.recordField().type()); | 87 | //MochiKit.Logging.logDebug(">>> handling type change - " + this.recordField().type()); |
91 | this.synchronizeComponentValues(); | 88 | this.synchronizeComponentValues(); |
92 | this.update(); | 89 | this.update(); |
93 | }, | 90 | }, |
94 | 91 | ||
95 | //------------------------------------------------------------------------- | 92 | //------------------------------------------------------------------------- |
96 | 93 | ||
97 | 'addrUrl': function() { | 94 | 'addrUrl': function() { |
98 | var result; | 95 | var result; |
99 | 96 | ||
100 | result = "http://maps.google.com/maps?q=" + this.value().split(' ').join('+'); | 97 | result = "http://maps.google.com/maps?q=" + this.value().split(' ').join('+'); |
101 | 98 | ||
102 | return result; | 99 | return result; |
103 | }, | 100 | }, |
104 | 101 | ||
105 | //------------------------------------------------------------------------- | 102 | //------------------------------------------------------------------------- |
106 | 103 | ||
107 | 'updateViewMode': function() { | 104 | 'updateViewMode': function() { |
108 | var scarmbledStatus; | 105 | var scarmbledStatus; |
109 | 106 | ||
110 | scrambledStatus = this.scrambledStatus() || 'SCRAMBLED'; | 107 | scrambledStatus = this.scrambledStatus() || 'SCRAMBLED'; |
111 | 108 | ||
112 | this.element().update(""); | 109 | this.element().update(""); |
113 | if (this.recordField().hidden() == false) { | 110 | if (this.recordField().hidden() == false) { |
114 | switch(this.recordField().type()) { | 111 | switch(this.recordField().type()) { |
115 | case 'TXT': | 112 | case 'TXT': |
116 | case 'PWD': | 113 | case 'PWD': |
117 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()}); | 114 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()}); |
118 | break; | 115 | break; |
119 | case 'URL': | 116 | case 'URL': |
120 | varurlLocation; | 117 | varurlLocation; |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js index 7aaca3e..46f456b 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.HeaderComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.HeaderComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.RecordDetail.HeaderComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.RecordDetail.HeaderComponent.superclass.constructor.call(this, anElement, args); |
40 | this.mainComponent().addEditComponent(this); | 37 | this.mainComponent().addEditComponent(this); |
41 | 38 | ||
42 | this._saveButton = null; | 39 | this._saveButton = null; |
43 | 40 | ||
44 | this.render(); | 41 | this.render(); |
45 | 42 | ||
46 | return this; | 43 | return this; |
47 | } | 44 | } |
48 | 45 | ||
49 | //============================================================================= | 46 | //============================================================================= |
50 | 47 | ||
51 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.HeaderComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 48 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.HeaderComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
52 | 49 | ||
53 | 'toString': function() { | 50 | 'toString': function() { |
54 | return "Clipperz.PM.Components.RecordDetail.HeaderComponent component"; | 51 | return "Clipperz.PM.Components.RecordDetail.HeaderComponent component"; |
55 | }, | 52 | }, |
56 | 53 | ||
57 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
58 | 55 | ||
59 | 'render': function() { | 56 | 'render': function() { |
60 | var editButton; | 57 | var editButton; |
61 | 58 | ||
62 | //MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.appendTo"); | 59 | //MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.appendTo"); |
63 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'recordDetailButtonsBox', children:[ | 60 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'recordDetailButtonsBox', children:[ |
64 | {tag:'div', id:this.getId('editButtonBox'), children:[ | 61 | {tag:'div', id:this.getId('editButtonBox'), children:[ |
65 | {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ | 62 | {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ |
66 | {tag:'tbody', children:[ | 63 | {tag:'tbody', children:[ |
67 | {tag:'tr', children:[ | 64 | {tag:'tr', children:[ |
68 | {tag:'td', align:'center', children:[ | 65 | {tag:'td', align:'center', children:[ |
69 | {tag:'div', id:this.getId('editButton')} | 66 | {tag:'div', id:this.getId('editButton')} |
70 | ]} | 67 | ]} |
71 | ]} | 68 | ]} |
72 | ]} | 69 | ]} |
73 | ]} | 70 | ]} |
74 | ]}, | 71 | ]}, |
75 | {tag:'div', id:this.getId('saveCancelButtonBox'), children:[ | 72 | {tag:'div', id:this.getId('saveCancelButtonBox'), children:[ |
76 | {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ | 73 | {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ |
77 | {tag:'tbody', children:[ | 74 | {tag:'tbody', children:[ |
78 | {tag:'tr', children:[ | 75 | {tag:'tr', children:[ |
79 | {tag:'td', width:'49%', align:'right', children:[ | 76 | {tag:'td', width:'49%', align:'right', children:[ |
80 | {tag:'div', id:this.getId('saveButton')} | 77 | {tag:'div', id:this.getId('saveButton')} |
81 | ]}, | 78 | ]}, |
82 | {tag:'td', html:' '}, | 79 | {tag:'td', html:' '}, |
83 | {tag:'td', width:'49%', align:'left', children:[ | 80 | {tag:'td', width:'49%', align:'left', children:[ |
84 | {tag:'div', id:this.getId('cancelButton')} | 81 | {tag:'div', id:this.getId('cancelButton')} |
85 | ]} | 82 | ]} |
86 | ]} | 83 | ]} |
87 | ]} | 84 | ]} |
88 | ]} | 85 | ]} |
89 | ]} | 86 | ]} |
90 | ]}); | 87 | ]}); |
91 | 88 | ||
92 | this.getElement('editButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 89 | this.getElement('editButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
93 | this.getElement('saveCancelButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 90 | this.getElement('saveCancelButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
94 | 91 | ||
95 | editButton = new YAHOO.ext.Button(this.getDom('editButton'), {text:Clipperz.PM.Strings['recordDetailEditButtonLabel'], handler:this.editButtonHandler, scope:this}); | 92 | editButton = new YAHOO.ext.Button(this.getDom('editButton'), {text:Clipperz.PM.Strings['recordDetailEditButtonLabel'], handler:this.editButtonHandler, scope:this}); |
96 | this.setSaveButton(new YAHOO.ext.Button(this.getDom('saveButton'), {text:Clipperz.PM.Strings['recordDetailSaveButtonLabel'], handler:this.saveButtonHandler, scope:this})); | 93 | this.setSaveButton(new YAHOO.ext.Button(this.getDom('saveButton'), {text:Clipperz.PM.Strings['recordDetailSaveButtonLabel'], handler:this.saveButtonHandler, scope:this})); |
97 | new YAHOO.ext.Button(this.getDom('cancelButton'), {text:Clipperz.PM.Strings['recordDetailCancelButtonLabel'], handler:this.cancelButtonHandler, scope:this}); | 94 | new YAHOO.ext.Button(this.getDom('cancelButton'), {text:Clipperz.PM.Strings['recordDetailCancelButtonLabel'], handler:this.cancelButtonHandler, scope:this}); |
98 | 95 | ||
99 | if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { | 96 | if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { |
100 | editButton.disable(); | 97 | editButton.disable(); |
101 | } | 98 | } |
102 | 99 | ||
103 | this.update(); | 100 | this.update(); |
104 | //MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.appendTo"); | 101 | //MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.appendTo"); |
105 | }, | 102 | }, |
106 | 103 | ||
107 | //------------------------------------------------------------------------- | 104 | //------------------------------------------------------------------------- |
108 | 105 | ||
109 | 'updateViewMode': function() { | 106 | 'updateViewMode': function() { |
110 | //MochiKit.Logging.logDebug(">>> HeaderComponent.updateViewMode"); | 107 | //MochiKit.Logging.logDebug(">>> HeaderComponent.updateViewMode"); |
111 | this.getElement('editButtonBox').show(); | 108 | this.getElement('editButtonBox').show(); |
112 | this.getElement('saveCancelButtonBox').hide(); | 109 | this.getElement('saveCancelButtonBox').hide(); |
113 | //MochiKit.Logging.logDebug("<<< HeaderComponent.updateViewMode"); | 110 | //MochiKit.Logging.logDebug("<<< HeaderComponent.updateViewMode"); |
114 | }, | 111 | }, |
115 | 112 | ||
116 | //------------------------------------------------------------------------- | 113 | //------------------------------------------------------------------------- |
117 | 114 | ||
118 | 'updateEditMode': function() { | 115 | 'updateEditMode': function() { |
119 | this.getElement('editButtonBox').hide(); | 116 | this.getElement('editButtonBox').hide(); |
120 | this.getElement('saveCancelButtonBox').show(); | 117 | this.getElement('saveCancelButtonBox').show(); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js index 53bf9c5..d6a03d7 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.MainComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.MainComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.RecordDetail.MainComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.RecordDetail.MainComponent.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | //this._element = args.element; | 38 | //this._element = args.element; |
42 | this._user = args.user; | 39 | this._user = args.user; |
43 | this._editMode = args.editMode || 'VIEW'; //[ 'VIEW' | 'EDIT' ] | 40 | this._editMode = args.editMode || 'VIEW'; //[ 'VIEW' | 'EDIT' ] |
44 | this._mainPanel = args.mainPanel; | 41 | this._mainPanel = args.mainPanel; |
45 | 42 | ||
46 | this._record = null; | 43 | this._record = null; |
47 | this._editComponents = []; | 44 | this._editComponents = []; |
48 | this._addFieldButton = null; | 45 | this._addFieldButton = null; |
49 | 46 | ||
50 | this._enableSaveButton = true; | 47 | this._enableSaveButton = true; |
51 | this._shouldShowLoginInfo = (Clipperz.PM.Proxy.defaultProxy.isReadOnly() ? false : true); | 48 | this._shouldShowLoginInfo = (Clipperz.PM.Proxy.defaultProxy.isReadOnly() ? false : true); |
52 | 49 | ||
53 | //this._mainLayoutManager = null; | 50 | //this._mainLayoutManager = null; |
54 | //this._layoutRegion = null; | 51 | //this._layoutRegion = null; |
55 | 52 | ||
56 | Clipperz.NotificationCenter.register(null, 'loadingRecordData', this, 'render'); | 53 | Clipperz.NotificationCenter.register(null, 'loadingRecordData', this, 'render'); |
57 | Clipperz.NotificationCenter.register(null, 'decryptingRecordData', this, 'render'); | 54 | Clipperz.NotificationCenter.register(null, 'decryptingRecordData', this, 'render'); |
58 | Clipperz.NotificationCenter.register(null, 'loadingRecordVersionData', this, 'render'); | 55 | Clipperz.NotificationCenter.register(null, 'loadingRecordVersionData', this, 'render'); |
59 | Clipperz.NotificationCenter.register(null, 'decryptingRecordVersionData', this, 'render'); | 56 | Clipperz.NotificationCenter.register(null, 'decryptingRecordVersionData', this, 'render'); |
60 | Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); | 57 | Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); |
61 | Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'render'); | 58 | Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'render'); |
62 | 59 | ||
63 | this.render(); | 60 | this.render(); |
64 | 61 | ||
65 | return this; | 62 | return this; |
66 | } | 63 | } |
67 | 64 | ||
68 | //============================================================================= | 65 | //============================================================================= |
69 | 66 | ||
70 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.MainComponent, Clipperz.PM.Components.BaseComponent, { | 67 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.MainComponent, Clipperz.PM.Components.BaseComponent, { |
71 | 68 | ||
72 | 'toString': function() { | 69 | 'toString': function() { |
73 | return "Clipperz.PM.Components.RecordDetail.MainComponent component"; | 70 | return "Clipperz.PM.Components.RecordDetail.MainComponent component"; |
74 | }, | 71 | }, |
75 | 72 | ||
76 | //------------------------------------------------------------------------- | 73 | //------------------------------------------------------------------------- |
77 | 74 | ||
78 | 'editMode': function() { | 75 | 'editMode': function() { |
79 | return this._editMode; | 76 | return this._editMode; |
80 | }, | 77 | }, |
81 | 78 | ||
82 | 'setEditMode': function(aValue, aButtonElement, shouldSkipComponentSynchronization) { | 79 | 'setEditMode': function(aValue, aButtonElement, shouldSkipComponentSynchronization) { |
83 | //MochiKit.Logging.logDebug(">>> MainComponent.setEditingMode"); | 80 | //MochiKit.Logging.logDebug(">>> MainComponent.setEditingMode"); |
84 | this.scrollToTop(); | 81 | this.scrollToTop(); |
85 | 82 | ||
86 | if (aValue == 'VIEW') { | 83 | if (aValue == 'VIEW') { |
87 | if (shouldSkipComponentSynchronization == true) { | 84 | if (shouldSkipComponentSynchronization == true) { |
88 | this.exitModalView(); | 85 | this.exitModalView(); |
89 | } else { | 86 | } else { |
90 | this.synchronizeComponentValues(); | 87 | this.synchronizeComponentValues(); |
91 | if (this.record().hasPendingChanges()) { | 88 | if (this.record().hasPendingChanges()) { |
92 | if (this.record().isBrandNew()) { | 89 | if (this.record().isBrandNew()) { |
93 | this.record().removeEmptyFields(); | 90 | this.record().removeEmptyFields(); |
94 | } | 91 | } |
95 | this.saveCurrentRecordChanges(aButtonElement); | 92 | this.saveCurrentRecordChanges(aButtonElement); |
96 | } else { | 93 | } else { |
97 | if (this.record().isBrandNew()) { | 94 | if (this.record().isBrandNew()) { |
98 | this.record().user().removeRecord(this.record()); | 95 | this.record().user().removeRecord(this.record()); |
99 | } | 96 | } |
100 | this.exitModalView(); | 97 | this.exitModalView(); |
101 | } | 98 | } |
102 | } | 99 | } |
103 | } else if (aValue == 'EDIT') { | 100 | } else if (aValue == 'EDIT') { |
104 | this.enterModalView(); | 101 | this.enterModalView(); |
105 | } else { | 102 | } else { |
106 | //???? | 103 | //???? |
107 | } | 104 | } |
108 | 105 | ||
109 | this._editMode = aValue; | 106 | this._editMode = aValue; |
110 | this.render(); | 107 | this.render(); |
111 | }, | 108 | }, |
112 | 109 | ||
113 | //------------------------------------------------------------------------- | 110 | //------------------------------------------------------------------------- |
114 | 111 | ||
115 | 'user': function() { | 112 | 'user': function() { |
116 | return this._user; | 113 | return this._user; |
117 | }, | 114 | }, |
118 | 115 | ||
119 | //------------------------------------------------------------------------- | 116 | //------------------------------------------------------------------------- |
120 | 117 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js index 6f454fc..2066543 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | 33 | ||
37 | 34 | ||
38 | Clipperz.PM.Components.RecordDetail.NotesComponent = function(anElement, args) { | 35 | Clipperz.PM.Components.RecordDetail.NotesComponent = function(anElement, args) { |
39 | //MochiKit.Logging.logDebug(">>> new NotesComponent"); | 36 | //MochiKit.Logging.logDebug(">>> new NotesComponent"); |
40 | args = args || {}; | 37 | args = args || {}; |
41 | 38 | ||
42 | Clipperz.PM.Components.RecordDetail.NotesComponent.superclass.constructor.call(this, anElement, args); | 39 | Clipperz.PM.Components.RecordDetail.NotesComponent.superclass.constructor.call(this, anElement, args); |
43 | 40 | ||
44 | this.mainComponent().addEditComponent(this); | 41 | this.mainComponent().addEditComponent(this); |
45 | 42 | ||
46 | this._staticOffset = null; | 43 | this._staticOffset = null; |
47 | this._componentHeight = 50; | 44 | this._componentHeight = 50; |
48 | this._mouseMoveIdentifier = null; | 45 | this._mouseMoveIdentifier = null; |
49 | this._mouseUpIdentifier = null; | 46 | this._mouseUpIdentifier = null; |
50 | 47 | ||
51 | this.element().setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 48 | this.element().setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
52 | 49 | ||
53 | this.render(); | 50 | this.render(); |
54 | //MochiKit.Logging.logDebug("<<< new NotesComponent"); | 51 | //MochiKit.Logging.logDebug("<<< new NotesComponent"); |
55 | 52 | ||
56 | return this; | 53 | return this; |
57 | } | 54 | } |
58 | 55 | ||
59 | //============================================================================= | 56 | //============================================================================= |
60 | 57 | ||
61 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.NotesComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 58 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.NotesComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
62 | 59 | ||
63 | 'toString': function() { | 60 | 'toString': function() { |
64 | return "Clipperz.PM.Components.RecordDetail.NotesComponent component"; | 61 | return "Clipperz.PM.Components.RecordDetail.NotesComponent component"; |
65 | }, | 62 | }, |
66 | 63 | ||
67 | //------------------------------------------------------------------------- | 64 | //------------------------------------------------------------------------- |
68 | 65 | ||
69 | 'value': function() { | 66 | 'value': function() { |
70 | return this.record().notes(); | 67 | return this.record().notes(); |
71 | }, | 68 | }, |
72 | 69 | ||
73 | 'setValue': function(aValue) { | 70 | 'setValue': function(aValue) { |
74 | this.record().setNotes(aValue); | 71 | this.record().setNotes(aValue); |
75 | }, | 72 | }, |
76 | 73 | ||
77 | //------------------------------------------------------------------------- | 74 | //------------------------------------------------------------------------- |
78 | 75 | ||
79 | 'render': function() { | 76 | 'render': function() { |
80 | //MochiKit.Logging.logDebug(">>> NotesComponent.render"); | 77 | //MochiKit.Logging.logDebug(">>> NotesComponent.render"); |
81 | /* | 78 | /* |
82 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:'5', children:[ | 79 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:'5', children:[ |
83 | {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}, | 80 | {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}, |
84 | {tag:'div', cls:'noteFieldContent', id:this.getId('notes')} | 81 | {tag:'div', cls:'noteFieldContent', id:this.getId('notes')} |
85 | ]}); | 82 | ]}); |
86 | */ | 83 | */ |
87 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}); | 84 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}); |
88 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'noteFieldContent', id:this.getId('notes'), children:[ | 85 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'noteFieldContent', id:this.getId('notes'), children:[ |
89 | {tag:'div', id:this.getId('resizableDiv'), cls:'resizable-textarea', children:[ | 86 | {tag:'div', id:this.getId('resizableDiv'), cls:'resizable-textarea', children:[ |
90 | {tag:'div', id:this.getId('contentView'), cls:'viewMode', html:""}, | 87 | {tag:'div', id:this.getId('contentView'), cls:'viewMode', html:""}, |
91 | {tag:'div', id:this.getId('contentEdit'), children:[ | 88 | {tag:'div', id:this.getId('contentEdit'), children:[ |
92 | {tag:'span', children:[ | 89 | {tag:'span', children:[ |
93 | {tag:'textarea', id:this.getId('textarea'), html:""} | 90 | {tag:'textarea', id:this.getId('textarea'), html:""} |
94 | ]} | 91 | ]} |
95 | ]}, | 92 | ]}, |
96 | {tag:'div', id:this.getId('grippie'), cls:'grippie'} | 93 | {tag:'div', id:this.getId('grippie'), cls:'grippie'} |
97 | ]} | 94 | ]} |
98 | ]}); | 95 | ]}); |
99 | 96 | ||
100 | this.getElement('contentView').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 97 | this.getElement('contentView').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
101 | this.getElement('contentEdit').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 98 | this.getElement('contentEdit').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
102 | 99 | ||
103 | MochiKit.Signal.connect(this.getId('grippie'), 'onmousedown', this, 'startResize'); | 100 | MochiKit.Signal.connect(this.getId('grippie'), 'onmousedown', this, 'startResize'); |
104 | 101 | ||
105 | this.update(); | 102 | this.update(); |
106 | //MochiKit.Logging.logDebug("<<< NotesComponent.render"); | 103 | //MochiKit.Logging.logDebug("<<< NotesComponent.render"); |
107 | }, | 104 | }, |
108 | 105 | ||
109 | //------------------------------------------------------------------------- | 106 | //------------------------------------------------------------------------- |
110 | 107 | ||
111 | 'updateViewMode': function() { | 108 | 'updateViewMode': function() { |
112 | //MochiKit.Logging.logDebug(">>> NotesComponent.updateViewMode"); | 109 | //MochiKit.Logging.logDebug(">>> NotesComponent.updateViewMode"); |
113 | // this.getElement('notes').update(this.value().replace(/\n/g, '<br>')); | 110 | // this.getElement('notes').update(this.value().replace(/\n/g, '<br>')); |
114 | 111 | ||
115 | this.getElement('contentView').update(Clipperz.Base.sanitizeString(this.value()).replace(/\n/g, '<br>')); | 112 | this.getElement('contentView').update(Clipperz.Base.sanitizeString(this.value()).replace(/\n/g, '<br>')); |
116 | 113 | ||
117 | if (this.isNoteEmpty()) { | 114 | if (this.isNoteEmpty()) { |
118 | this.element().hide(); | 115 | this.element().hide(); |
119 | } else { | 116 | } else { |
120 | this.getElement('contentView').show(); | 117 | this.getElement('contentView').show(); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js index 52e718c..29fe972 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.TitleComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.TitleComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.RecordDetail.TitleComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.RecordDetail.TitleComponent.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | //this._inputElement = null; | 38 | //this._inputElement = null; |
42 | 39 | ||
43 | this.mainComponent().addEditComponent(this); | 40 | this.mainComponent().addEditComponent(this); |
44 | 41 | ||
45 | this.render(); | 42 | this.render(); |
46 | 43 | ||
47 | return this; | 44 | return this; |
48 | } | 45 | } |
49 | 46 | ||
50 | //============================================================================= | 47 | //============================================================================= |
51 | 48 | ||
52 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.TitleComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 49 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.TitleComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
53 | 50 | ||
54 | 'toString': function() { | 51 | 'toString': function() { |
55 | return "Clipperz.PM.Components.RecordDetail.TitleComponent component"; | 52 | return "Clipperz.PM.Components.RecordDetail.TitleComponent component"; |
56 | }, | 53 | }, |
57 | 54 | ||
58 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
59 | 56 | ||
60 | 'value': function() { | 57 | 'value': function() { |
61 | return this.record().label(); | 58 | return this.record().label(); |
62 | }, | 59 | }, |
63 | 60 | ||
64 | 'setValue': function(aValue) { | 61 | 'setValue': function(aValue) { |
65 | this.record().setLabel(aValue); | 62 | this.record().setLabel(aValue); |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | /* | 66 | /* |
70 | 'inputElement': function() { | 67 | 'inputElement': function() { |
71 | return this._inputElement; | 68 | return this._inputElement; |
72 | }, | 69 | }, |
73 | 70 | ||
74 | 'setInputElement': function(aValue) { | 71 | 'setInputElement': function(aValue) { |
75 | this._inputElement = aValue; | 72 | this._inputElement = aValue; |
76 | }, | 73 | }, |
77 | */ | 74 | */ |
78 | //------------------------------------------------------------------------- | 75 | //------------------------------------------------------------------------- |
79 | 76 | ||
80 | 'render': function() { | 77 | 'render': function() { |
81 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:' '}); | 78 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:' '}); |
82 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:"3", html:' ', children:[ | 79 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:"3", html:' ', children:[ |
83 | // {tag:'div', /*style:'border: 1px solid green;',*/ id:this.getId('title')} | 80 | // {tag:'div', /*style:'border: 1px solid green;',*/ id:this.getId('title')} |
84 | // ]}); | 81 | // ]}); |
85 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:' '}); | 82 | // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:' '}); |
86 | // | 83 | // |
87 | // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), {editMode:this.editMode(), value:this.value()})); | 84 | // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), {editMode:this.editMode(), value:this.value()})); |
88 | 85 | ||
89 | this.update(); | 86 | this.update(); |
90 | }, | 87 | }, |
91 | 88 | ||
92 | //------------------------------------------------------------------------- | 89 | //------------------------------------------------------------------------- |
93 | /* | 90 | /* |
94 | 'update': function() { | 91 | 'update': function() { |
95 | this.inputElement().update({value:this.value(), editMode:this.editMode()}); | 92 | this.inputElement().update({value:this.value(), editMode:this.editMode()}); |
96 | }, | 93 | }, |
97 | */ | 94 | */ |
98 | //------------------------------------------------------------------------- | 95 | //------------------------------------------------------------------------- |
99 | 96 | ||
100 | 'updateViewMode': function() { | 97 | 'updateViewMode': function() { |
101 | this.element().update(""); | 98 | this.element().update(""); |
102 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'h2', html:this.value()}); | 99 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'h2', html:this.value()}); |
103 | }, | 100 | }, |
104 | 101 | ||
105 | //------------------------------------------------------------------------- | 102 | //------------------------------------------------------------------------- |
106 | 103 | ||
107 | 'updateEditMode': function() { | 104 | 'updateEditMode': function() { |
108 | //MochiKit.Logging.logDebug(">>> TitleComponent.updateEditMode"); | 105 | //MochiKit.Logging.logDebug(">>> TitleComponent.updateEditMode"); |
109 | // this.getElement('title').update(""); | 106 | // this.getElement('title').update(""); |
110 | // Clipperz.YUI.DomHelper.append(this.getDom('title'), {tag:'div', id:this.getId('title_input')}); | 107 | // Clipperz.YUI.DomHelper.append(this.getDom('title'), {tag:'div', id:this.getId('title_input')}); |
111 | // this.setInputElement(Clipperz.YUI.DomHelper.append(this.getDom('title_input'), {tag:'input', type:'text', value:this.value()}, true)); | 108 | // this.setInputElement(Clipperz.YUI.DomHelper.append(this.getDom('title_input'), {tag:'input', type:'text', value:this.value()}, true)); |
112 | 109 | ||
113 | this.element().update(""); | 110 | this.element().update(""); |
114 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', id:this.getId('titleField'), type:'text', value:"this.value()"}); | 111 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', id:this.getId('titleField'), type:'text', value:"this.value()"}); |
115 | this.getElement('titleField').dom.value = this.value(); | 112 | this.getElement('titleField').dom.value = this.value(); |
116 | 113 | ||
117 | //MochiKit.Logging.logDebug("<<< TitleComponent.updateEditMode"); | 114 | //MochiKit.Logging.logDebug("<<< TitleComponent.updateEditMode"); |
118 | }, | 115 | }, |
119 | 116 | ||
120 | //------------------------------------------------------------------------- | 117 | //------------------------------------------------------------------------- |
diff --git a/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js b/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js index c872462..b300ba6 100644 --- a/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js +++ b/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.TabPanel) == 'undefined') { Clipperz.PM.Components.TabPanel = {}; } | 29 | if (typeof(Clipperz.PM.Components.TabPanel) == 'undefined') { Clipperz.PM.Components.TabPanel = {}; } |
33 | 30 | ||
34 | Clipperz.PM.Components.TabPanel.TabPanelController = function(args) { | 31 | Clipperz.PM.Components.TabPanel.TabPanelController = function(args) { |
35 | args = args || {}; | 32 | args = args || {}; |
36 | 33 | ||
37 | Clipperz.PM.Components.TabPanel.TabPanelController.superclass.constructor.call(this); | 34 | Clipperz.PM.Components.TabPanel.TabPanelController.superclass.constructor.call(this); |
38 | 35 | ||
39 | this._name = args.name || 'undefined'; | 36 | this._name = args.name || 'undefined'; |
40 | this._config = args.config; | 37 | this._config = args.config; |
41 | this._selectedTab = args.selectedTab || ((MochiKit.Base.keys(args.config).length > 0) ? MochiKit.Base.keys(args.config)[0] : null); | 38 | this._selectedTab = args.selectedTab || ((MochiKit.Base.keys(args.config).length > 0) ? MochiKit.Base.keys(args.config)[0] : null); |
42 | 39 | ||
43 | this._tabs = {}; | 40 | this._tabs = {}; |
44 | this._panels = {}; | 41 | this._panels = {}; |
45 | 42 | ||
46 | Clipperz.NotificationCenter.register(null, 'selectTab', this, 'handleSelectTabNotification'); | 43 | Clipperz.NotificationCenter.register(null, 'selectTab', this, 'handleSelectTabNotification'); |
47 | return this; | 44 | return this; |
48 | } | 45 | } |
49 | 46 | ||
50 | //============================================================================= | 47 | //============================================================================= |
51 | 48 | ||
52 | YAHOO.extendX(Clipperz.PM.Components.TabPanel.TabPanelController, YAHOO.ext.util.Observable, { | 49 | YAHOO.extendX(Clipperz.PM.Components.TabPanel.TabPanelController, YAHOO.ext.util.Observable, { |
53 | 50 | ||
54 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
55 | 52 | ||
56 | 'name': function() { | 53 | 'name': function() { |
57 | return this._name; | 54 | return this._name; |
58 | }, | 55 | }, |
59 | 56 | ||
60 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
61 | 58 | ||
62 | 'tabs': function() { | 59 | 'tabs': function() { |
63 | return this._tabs; | 60 | return this._tabs; |
64 | }, | 61 | }, |
65 | 62 | ||
66 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
67 | 64 | ||
68 | 'panels': function() { | 65 | 'panels': function() { |
69 | return this._panels; | 66 | return this._panels; |
70 | }, | 67 | }, |
71 | 68 | ||
72 | //------------------------------------------------------------------------- | 69 | //------------------------------------------------------------------------- |
73 | 70 | ||
74 | 'config': function() { | 71 | 'config': function() { |
75 | return this._config; | 72 | return this._config; |
76 | }, | 73 | }, |
77 | 74 | ||
78 | //------------------------------------------------------------------------- | 75 | //------------------------------------------------------------------------- |
79 | 76 | ||
80 | 'selectedTab': function() { | 77 | 'selectedTab': function() { |
81 | return this._selectedTab; | 78 | return this._selectedTab; |
82 | }, | 79 | }, |
83 | 80 | ||
84 | 'setSelectedTab': function(aValue) { | 81 | 'setSelectedTab': function(aValue) { |
85 | this._selectedTab = aValue; | 82 | this._selectedTab = aValue; |
86 | }, | 83 | }, |
87 | 84 | ||
88 | //------------------------------------------------------------------------- | 85 | //------------------------------------------------------------------------- |
89 | 86 | ||
90 | 'setUp': function() { | 87 | 'setUp': function() { |
91 | vartabId; | 88 | vartabId; |
92 | 89 | ||
93 | //MochiKit.Logging.logDebug(">>> TabPanelController.setUp - config: " + Clipperz.Base.serializeJSON(this.config())); | 90 | //MochiKit.Logging.logDebug(">>> TabPanelController.setUp - config: " + Clipperz.Base.serializeJSON(this.config())); |
94 | for (tabId in this.config()) { | 91 | for (tabId in this.config()) { |
95 | vartabElement; | 92 | vartabElement; |
96 | varpanelElement; | 93 | varpanelElement; |
97 | 94 | ||
98 | //MochiKit.Logging.logDebug("--- TabPanelController.setUp - tabId: " + tabId); | 95 | //MochiKit.Logging.logDebug("--- TabPanelController.setUp - tabId: " + tabId); |
99 | //MochiKit.Logging.logDebug("--- TabPanelController.setUp - panelId: " + this.config()[tabId]); | 96 | //MochiKit.Logging.logDebug("--- TabPanelController.setUp - panelId: " + this.config()[tabId]); |
100 | tabElement = YAHOO.ext.Element.get(tabId); | 97 | tabElement = YAHOO.ext.Element.get(tabId); |
101 | tabElement.addClassOnOver("hover"); | 98 | tabElement.addClassOnOver("hover"); |
102 | MochiKit.Signal.connect(tabId, 'onclick', this, 'selectTabHandler'); | 99 | MochiKit.Signal.connect(tabId, 'onclick', this, 'selectTabHandler'); |
103 | 100 | ||
104 | panelElement = YAHOO.ext.Element.get(this.config()[tabId]); | 101 | panelElement = YAHOO.ext.Element.get(this.config()[tabId]); |
105 | 102 | ||
106 | this._tabs[tabId] = tabElement; | 103 | this._tabs[tabId] = tabElement; |
107 | this._panels[tabId] = panelElement; | 104 | this._panels[tabId] = panelElement; |
108 | 105 | ||
109 | if (tabId == this.selectedTab()) { | 106 | if (tabId == this.selectedTab()) { |
110 | tabElement.addClass('selectedTab'); | 107 | tabElement.addClass('selectedTab'); |
111 | panelElement.addClass('selectedPanel'); | 108 | panelElement.addClass('selectedPanel'); |
112 | } else { | 109 | } else { |
113 | panelElement.addClass('hiddenPanel'); | 110 | panelElement.addClass('hiddenPanel'); |
114 | } | 111 | } |
115 | } | 112 | } |
116 | //MochiKit.Logging.logDebug("<<< TabPanelController.setUp"); | 113 | //MochiKit.Logging.logDebug("<<< TabPanelController.setUp"); |
117 | }, | 114 | }, |
118 | 115 | ||
119 | //------------------------------------------------------------------------- | 116 | //------------------------------------------------------------------------- |
120 | 117 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/TextFormField.js b/frontend/beta/js/Clipperz/PM/Components/TextFormField.js index cb4f06a..c6f0349 100644 --- a/frontend/beta/js/Clipperz/PM/Components/TextFormField.js +++ b/frontend/beta/js/Clipperz/PM/Components/TextFormField.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | 29 | ||
33 | Clipperz.PM.Components.TextFormField = function(anElement, args) { | 30 | Clipperz.PM.Components.TextFormField = function(anElement, args) { |
34 | args = args || {}; | 31 | args = args || {}; |
35 | 32 | ||
36 | //MochiKit.Logging.logDebug(">>> new TextFormField"); | 33 | //MochiKit.Logging.logDebug(">>> new TextFormField"); |
37 | Clipperz.PM.Components.TextFormField.superclass.constructor.call(this, args); | 34 | Clipperz.PM.Components.TextFormField.superclass.constructor.call(this, args); |
38 | 35 | ||
39 | this._element = anElement; | 36 | this._element = anElement; |
40 | this._editMode = args.editMode || 'VIEW'; | 37 | this._editMode = args.editMode || 'VIEW'; |
41 | this._value = args.value || ""; | 38 | this._value = args.value || ""; |
42 | this._inputElement = null; | 39 | this._inputElement = null; |
43 | this._wrapper = null; | 40 | this._wrapper = null; |
44 | this._multiline = args.multiline || false; | 41 | this._multiline = args.multiline || false; |
45 | 42 | ||
46 | //this.multiline = args.multiline || true; | 43 | //this.multiline = args.multiline || true; |
47 | //this.editing = true; | 44 | //this.editing = true; |
48 | //this.completeOnBlur = true; | 45 | //this.completeOnBlur = true; |
49 | //this.autoSizeTask = new YAHOO.ext.util.DelayedTask(this.autoSize, this); | 46 | //this.autoSizeTask = new YAHOO.ext.util.DelayedTask(this.autoSize, this); |
50 | //this.textSizeEl = Clipperz.YUI.DomHelper.append(document.body, { | 47 | //this.textSizeEl = Clipperz.YUI.DomHelper.append(document.body, { |
51 | // tag: 'div', | 48 | // tag: 'div', |
52 | // cls: 'yinline-editor-sizer ' + (this.cls || '') | 49 | // cls: 'yinline-editor-sizer ' + (this.cls || '') |
53 | //}); | 50 | //}); |
54 | 51 | ||
55 | this.render(); | 52 | this.render(); |
56 | //MochiKit.Logging.logDebug("<<< new TextFormField"); | 53 | //MochiKit.Logging.logDebug("<<< new TextFormField"); |
57 | 54 | ||
58 | return this; | 55 | return this; |
59 | }; | 56 | }; |
60 | 57 | ||
61 | YAHOO.extendX(Clipperz.PM.Components.TextFormField, Clipperz.PM.Components.BaseComponent, { | 58 | YAHOO.extendX(Clipperz.PM.Components.TextFormField, Clipperz.PM.Components.BaseComponent, { |
62 | 59 | ||
63 | 'toString': function() { | 60 | 'toString': function() { |
64 | return "Clipperz.PM.Components.TextFormField"; | 61 | return "Clipperz.PM.Components.TextFormField"; |
65 | }, | 62 | }, |
66 | 63 | ||
67 | //----------------------------------------------------- | 64 | //----------------------------------------------------- |
68 | 65 | ||
69 | 'value': function() { | 66 | 'value': function() { |
70 | if (this.inputElement() != null) { | 67 | if (this.inputElement() != null) { |
71 | this._value = this.inputElement().dom.value; | 68 | this._value = this.inputElement().dom.value; |
72 | } | 69 | } |
73 | 70 | ||
74 | return this._value; | 71 | return this._value; |
75 | // return this.inlineEditor().getValue(); | 72 | // return this.inlineEditor().getValue(); |
76 | }, | 73 | }, |
77 | 74 | ||
78 | 'setValue': function(aValue) { | 75 | 'setValue': function(aValue) { |
79 | this._value = aValue; | 76 | this._value = aValue; |
80 | // this.getElement('viewComponent_Content').update(aValue); | 77 | // this.getElement('viewComponent_Content').update(aValue); |
81 | // this.inlineEditor().setValue(aValue); | 78 | // this.inlineEditor().setValue(aValue); |
82 | }, | 79 | }, |
83 | 80 | ||
84 | //----------------------------------------------------- | 81 | //----------------------------------------------------- |
85 | 82 | ||
86 | 'multiline': function() { | 83 | 'multiline': function() { |
87 | return this._multiline; | 84 | return this._multiline; |
88 | }, | 85 | }, |
89 | 86 | ||
90 | //----------------------------------------------------- | 87 | //----------------------------------------------------- |
91 | 88 | ||
92 | 'editMode': function() { | 89 | 'editMode': function() { |
93 | return this._editMode; | 90 | return this._editMode; |
94 | }, | 91 | }, |
95 | 92 | ||
96 | 'setEditMode': function(aValue) { | 93 | 'setEditMode': function(aValue) { |
97 | this._editMode = aValue; | 94 | this._editMode = aValue; |
98 | }, | 95 | }, |
99 | 96 | ||
100 | //----------------------------------------------------- | 97 | //----------------------------------------------------- |
101 | 98 | ||
102 | 'inputElement': function() { | 99 | 'inputElement': function() { |
103 | return this._inputElement; | 100 | return this._inputElement; |
104 | }, | 101 | }, |
105 | 102 | ||
106 | 'setInputElement': function(aValue) { | 103 | 'setInputElement': function(aValue) { |
107 | this._inputElement = aValue; | 104 | this._inputElement = aValue; |
108 | }, | 105 | }, |
109 | 106 | ||
110 | //----------------------------------------------------- | 107 | //----------------------------------------------------- |
111 | 108 | ||
112 | 'on': function(anEventName, anHandler, aScope, shouldOverride) { | 109 | 'on': function(anEventName, anHandler, aScope, shouldOverride) { |
113 | //MochiKit.Logging.logDebug(">>> TextFormField.on - inputElement: " + this.inputElement()); | 110 | //MochiKit.Logging.logDebug(">>> TextFormField.on - inputElement: " + this.inputElement()); |
114 | return this.inputElement().on(anEventName, anHandler, aScope, shouldOverride); | 111 | return this.inputElement().on(anEventName, anHandler, aScope, shouldOverride); |
115 | //MochiKit.Logging.logDebug("<<< TextFormField.on - inputElement: " + this.inputElement()); | 112 | //MochiKit.Logging.logDebug("<<< TextFormField.on - inputElement: " + this.inputElement()); |
116 | }, | 113 | }, |
117 | 114 | ||
118 | //----------------------------------------------------- | 115 | //----------------------------------------------------- |
119 | 116 | ||
120 | 'wrapper': function() { | 117 | 'wrapper': function() { |