Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web') (more/less context) (ignore whitespace changes)
44 files changed, 264 insertions, 396 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js index 4378b19..ee6d7a3 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/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 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.AccountPanel = function(args) { | 28 | Clipperz.PM.UI.Web.Components.AccountPanel = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.AccountPanel.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.AccountPanel.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | //this._initiallySelectedTab = args.selected || 'ACCOUNT'; | 33 | //this._initiallySelectedTab = args.selected || 'ACCOUNT'; |
37 | this._initiallySelectedTab = args.selected || 'PASSPHRASE'; | 34 | this._initiallySelectedTab = args.selected || 'PASSPHRASE'; |
38 | this._tabPanelControllerConfiguration = { | 35 | this._tabPanelControllerConfiguration = { |
39 | // 'ACCOUNT': { | 36 | // 'ACCOUNT': { |
40 | // tab:'accountTab', | 37 | // tab:'accountTab', |
41 | // panel:'accountPanel' | 38 | // panel:'accountPanel' |
42 | // }, | 39 | // }, |
43 | 'PASSPHRASE': { | 40 | 'PASSPHRASE': { |
44 | tab:'passphraseTab', | 41 | tab:'passphraseTab', |
45 | panel:'passphrasePanel' | 42 | panel:'passphrasePanel' |
46 | }, | 43 | }, |
47 | 'PREFERENCES': { | 44 | 'PREFERENCES': { |
48 | tab:'preferencesTab', | 45 | tab:'preferencesTab', |
49 | panel:'preferencesPanel' | 46 | panel:'preferencesPanel' |
50 | }, | 47 | }, |
51 | 'LOGIN_HISTORY': { | 48 | 'LOGIN_HISTORY': { |
52 | tab:'loginHistoryTab', | 49 | tab:'loginHistoryTab', |
53 | panel:'loginHistoryPanel' | 50 | panel:'loginHistoryPanel' |
54 | } | 51 | } |
55 | }; | 52 | }; |
56 | 53 | ||
57 | return this; | 54 | return this; |
58 | } | 55 | } |
59 | 56 | ||
60 | //============================================================================= | 57 | //============================================================================= |
61 | 58 | ||
62 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.AccountPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { | 59 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.AccountPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { |
63 | 60 | ||
64 | //------------------------------------------------------------------------- | 61 | //------------------------------------------------------------------------- |
65 | 62 | ||
66 | 'toString': function () { | 63 | 'toString': function () { |
67 | return "Clipperz.PM.UI.Web.Components.AccountPanel component"; | 64 | return "Clipperz.PM.UI.Web.Components.AccountPanel component"; |
68 | }, | 65 | }, |
69 | 66 | ||
70 | //------------------------------------------------------------------------- | 67 | //------------------------------------------------------------------------- |
71 | 68 | ||
72 | 'renderSelf': function(/*aContainer, aPosition*/) { | 69 | 'renderSelf': function(/*aContainer, aPosition*/) { |
73 | //Clipperz.log("AccountPanel.renderSelf element", this.element()); | 70 | //Clipperz.log("AccountPanel.renderSelf element", this.element()); |
74 | this.append(this.element(), [ | 71 | this.append(this.element(), [ |
75 | {tag:'div', cls:'header', children:[ | 72 | {tag:'div', cls:'header', children:[ |
76 | {tag:'div', cls:'subPanelTabs', children:[ | 73 | {tag:'div', cls:'subPanelTabs', children:[ |
77 | {tag:'ul', children:[ | 74 | {tag:'ul', children:[ |
78 | // {tag:'li', id:this.getId('accountTab'), children:[{tag:'a', href:'#', html:'Account'}], cls:'first'}, | 75 | // {tag:'li', id:this.getId('accountTab'), children:[{tag:'a', href:'#', html:'Account'}], cls:'first'}, |
79 | {tag:'li', id:this.getId('passphraseTab'), children:[{tag:'a', href:'#', html:'Passphrase'}], cls:'first'}, | 76 | {tag:'li', id:this.getId('passphraseTab'), children:[{tag:'a', href:'#', html:'Passphrase'}], cls:'first'}, |
80 | {tag:'li', id:this.getId('preferencesTab'), children:[{tag:'a', href:'#', html:'Preferences'}]}, | 77 | {tag:'li', id:this.getId('preferencesTab'), children:[{tag:'a', href:'#', html:'Preferences'}]}, |
81 | {tag:'li', id:this.getId('loginHistoryTab'),children:[{tag:'a', href:'#', html:'Login history'}]} | 78 | {tag:'li', id:this.getId('loginHistoryTab'),children:[{tag:'a', href:'#', html:'Login history'}]} |
82 | ]} | 79 | ]} |
83 | ]} | 80 | ]} |
84 | ]}, | 81 | ]}, |
85 | {tag:'div', cls:'body', children:[ | 82 | {tag:'div', cls:'body', children:[ |
86 | {tag:'div', cls:'accountPanel', children:[ | 83 | {tag:'div', cls:'accountPanel', children:[ |
87 | {tag:'div', cls:'subPanelContent', children:[ | 84 | {tag:'div', cls:'subPanelContent', children:[ |
88 | {tag:'ul', children:[ | 85 | {tag:'ul', children:[ |
89 | // {tag:'li', id:this.getId('accountPanel'),children:[ | 86 | // {tag:'li', id:this.getId('accountPanel'),children:[ |
90 | // {tag:'h3', html:"-- Account --"} | 87 | // {tag:'h3', html:"-- Account --"} |
91 | // ]}, | 88 | // ]}, |
92 | {tag:'li', id:this.getId('passphrasePanel'),children:[ | 89 | {tag:'li', id:this.getId('passphrasePanel'),children:[ |
93 | {tag:'h3', cls:'changePassphrase', html:"Change passphrase"}, | 90 | {tag:'h3', cls:'changePassphrase', html:"Change passphrase"}, |
94 | {tag:'form', id:this.getId('changePassphrase'), cls:'changePassphrase', children:[ | 91 | {tag:'form', id:this.getId('changePassphrase'), cls:'changePassphrase', children:[ |
95 | {tag:'div', cls:'currentCredentials', children:[ | 92 | {tag:'div', cls:'currentCredentials', children:[ |
96 | {tag:'div', cls:'field username', children:[ | 93 | {tag:'div', cls:'field username', children:[ |
97 | {tag:'label', html:"username", 'for':this.getId('currentUsername')}, | 94 | {tag:'label', html:"username", 'for':this.getId('currentUsername')}, |
98 | {tag:'input', id:this.getId('currentUsername')} | 95 | {tag:'input', id:this.getId('currentUsername')} |
99 | ]}, | 96 | ]}, |
100 | {tag:'div', cls:'field passphrase', children:[ | 97 | {tag:'div', cls:'field passphrase', children:[ |
101 | {tag:'label', html:"passphrase", 'for':this.getId('currentPassphrase')}, | 98 | {tag:'label', html:"passphrase", 'for':this.getId('currentPassphrase')}, |
102 | {tag:'input', id:this.getId('currentPassphrase')} | 99 | {tag:'input', id:this.getId('currentPassphrase')} |
103 | ]} | 100 | ]} |
104 | ]}, | 101 | ]}, |
105 | {tag:'div', cls:'newPassphrase', children:[ | 102 | {tag:'div', cls:'newPassphrase', children:[ |
106 | {tag:'div', cls:'field', children:[ | 103 | {tag:'div', cls:'field', children:[ |
107 | {tag:'label', html:"new passphrase", 'for':this.getId('newPassphrase')}, | 104 | {tag:'label', html:"new passphrase", 'for':this.getId('newPassphrase')}, |
108 | {tag:'input', id:this.getId('newPassphrase')} | 105 | {tag:'input', id:this.getId('newPassphrase')} |
109 | ]}, | 106 | ]}, |
110 | {tag:'div', cls:'field', children:[ | 107 | {tag:'div', cls:'field', children:[ |
111 | {tag:'label', html:"re-new passphrase", 'for':this.getId('reNewPassphrase')}, | 108 | {tag:'label', html:"re-new passphrase", 'for':this.getId('reNewPassphrase')}, |
112 | {tag:'input', id:this.getId('reNewPassphrase')} | 109 | {tag:'input', id:this.getId('reNewPassphrase')} |
113 | ]} | 110 | ]} |
114 | ]}, | 111 | ]}, |
115 | {tag:'div', cls:'confirm', children:[ | 112 | {tag:'div', cls:'confirm', children:[ |
116 | {tag:'input', type:'checkbox', id:this.getId('confirm')}, | 113 | {tag:'input', type:'checkbox', id:this.getId('confirm')}, |
117 | {tag:'label', html:"I understand that Clipperz will not be able to recover a lost passphrase", 'for':this.getId('confirm')} | 114 | {tag:'label', html:"I understand that Clipperz will not be able to recover a lost passphrase", 'for':this.getId('confirm')} |
118 | ]} | 115 | ]} |
119 | ]}, | 116 | ]}, |
120 | {tag:'div', cls:'clear'}, | 117 | {tag:'div', cls:'clear'}, |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AppPage.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AppPage.js index 67247df..3b3c8b4 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AppPage.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AppPage.js | |||
@@ -1,78 +1,75 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.AppPage = function(args) { | 28 | Clipperz.PM.UI.Web.Components.AppPage = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | Clipperz.PM.UI.Web.Components.AppPage.superclass.constructor.call(this, args); | 30 | Clipperz.PM.UI.Web.Components.AppPage.superclass.constructor.call(this, args); |
34 | 31 | ||
35 | this._element = args.element || null; | 32 | this._element = args.element || null; |
36 | 33 | ||
37 | this._slots = { | 34 | this._slots = { |
38 | 'cardGrid' : this.getId('cardGrid'), | 35 | 'cardGrid' : this.getId('cardGrid'), |
39 | // 'directLoginGrid' : this.getId('directLoginGrid'), | 36 | // 'directLoginGrid' : this.getId('directLoginGrid'), |
40 | 'accountPanel': this.getId('accountPanel'), | 37 | 'accountPanel': this.getId('accountPanel'), |
41 | 'dataPanel': this.getId('dataPanel'), | 38 | 'dataPanel': this.getId('dataPanel'), |
42 | 'toolsPanel': this.getId('toolsPanel'), | 39 | 'toolsPanel': this.getId('toolsPanel'), |
43 | 'userInfoBox': this.getId('userInfoBox'), | 40 | 'userInfoBox': this.getId('userInfoBox'), |
44 | 'tabSidePanel': this.getId('tabSidePanel') | 41 | 'tabSidePanel': this.getId('tabSidePanel') |
45 | }; | 42 | }; |
46 | 43 | ||
47 | return this; | 44 | return this; |
48 | } | 45 | } |
49 | 46 | ||
50 | //============================================================================= | 47 | //============================================================================= |
51 | 48 | ||
52 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.AppPage, Clipperz.PM.UI.Common.Components.BaseComponent, { | 49 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.AppPage, Clipperz.PM.UI.Common.Components.BaseComponent, { |
53 | 50 | ||
54 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
55 | 52 | ||
56 | 'toString': function () { | 53 | 'toString': function () { |
57 | return "Clipperz.PM.UI.Web.Components.AppPage component"; | 54 | return "Clipperz.PM.UI.Web.Components.AppPage component"; |
58 | }, | 55 | }, |
59 | 56 | ||
60 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
61 | 58 | ||
62 | 'renderSelf': function(/*aContainer, aPosition*/) { | 59 | 'renderSelf': function(/*aContainer, aPosition*/) { |
63 | this.append(this.element(), {tag:'div', id:this.getId('userInfoBox'), cls:'userInfoBox'}); | 60 | this.append(this.element(), {tag:'div', id:this.getId('userInfoBox'), cls:'userInfoBox'}); |
64 | this.append(this.element(), {tag:'div', id:this.getId('sidePanels'), cls:'sidePanels'}); | 61 | this.append(this.element(), {tag:'div', id:this.getId('sidePanels'), cls:'sidePanels'}); |
65 | this.append(this.getId('sidePanels'),{tag:'div', id:this.getId('tabSidePanel'), cls:'tabSidePanel', children:[]}); | 62 | this.append(this.getId('sidePanels'),{tag:'div', id:this.getId('tabSidePanel'), cls:'tabSidePanel', children:[]}); |
66 | 63 | ||
67 | this.append(this.element(), {tag:'div', id:this.getId('mainPanels'), cls:'mainPanels'}); | 64 | this.append(this.element(), {tag:'div', id:this.getId('mainPanels'), cls:'mainPanels'}); |
68 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('cardGrid'), cls:'gridComponent cardGrid'}); | 65 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('cardGrid'), cls:'gridComponent cardGrid'}); |
69 | // this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('directLoginGrid'), cls:'gridComponent directLoginGrid'}); | 66 | // this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('directLoginGrid'), cls:'gridComponent directLoginGrid'}); |
70 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('accountPanel'), cls:'otherPanel'}); | 67 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('accountPanel'), cls:'otherPanel'}); |
71 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('dataPanel'), cls:'otherPanel'}); | 68 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('dataPanel'), cls:'otherPanel'}); |
72 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('toolsPanel'), cls:'otherPanel'}); | 69 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('toolsPanel'), cls:'otherPanel'}); |
73 | }, | 70 | }, |
74 | 71 | ||
75 | //------------------------------------------------------------------------- | 72 | //------------------------------------------------------------------------- |
76 | 73 | ||
77 | __syntaxFix__: "syntax fix" | 74 | __syntaxFix__: "syntax fix" |
78 | }); | 75 | }); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/BookmarkletComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/BookmarkletComponent.js index 42a6052..1835ca9 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/BookmarkletComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/BookmarkletComponent.js | |||
@@ -1,109 +1,106 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.BookmarkletComponent = function(args) { | 28 | Clipperz.PM.UI.Web.Components.BookmarkletComponent = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.BookmarkletComponent.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.BookmarkletComponent.superclass.constructor.apply(this, arguments); |
35 | MochiKit.Signal.connect(Clipperz.PM.Strings.Languages, 'switchLanguage', this, 'updateBookmarkletURLs'); | 32 | MochiKit.Signal.connect(Clipperz.PM.Strings.Languages, 'switchLanguage', this, 'updateBookmarkletURLs'); |
36 | 33 | ||
37 | return this; | 34 | return this; |
38 | } | 35 | } |
39 | 36 | ||
40 | //============================================================================= | 37 | //============================================================================= |
41 | 38 | ||
42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.BookmarkletComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.BookmarkletComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
43 | 40 | ||
44 | //------------------------------------------------------------------------- | 41 | //------------------------------------------------------------------------- |
45 | 42 | ||
46 | 'toString': function () { | 43 | 'toString': function () { |
47 | return "Clipperz.PM.UI.Web.Components.BookmarkletComponent component"; | 44 | return "Clipperz.PM.UI.Web.Components.BookmarkletComponent component"; |
48 | }, | 45 | }, |
49 | 46 | ||
50 | //------------------------------------------------------------------------- | 47 | //------------------------------------------------------------------------- |
51 | 48 | ||
52 | 'renderSelf': function() { | 49 | 'renderSelf': function() { |
53 | // var bookmarkletUrl; | 50 | // var bookmarkletUrl; |
54 | // | 51 | // |
55 | // if (Clipperz_IEisBroken == true) { | 52 | // if (Clipperz_IEisBroken == true) { |
56 | // bookmarkletUrl = bookmarklet_ie; | 53 | // bookmarkletUrl = bookmarklet_ie; |
57 | // } else { | 54 | // } else { |
58 | /// bookmarkletUrl = bookmarklet; | 55 | /// bookmarkletUrl = bookmarklet; |
59 | // bookmarkletUrl = Clipperz.PM.Strings['bookmarklet']; | 56 | // bookmarkletUrl = Clipperz.PM.Strings['bookmarklet']; |
60 | // } | 57 | // } |
61 | 58 | ||
62 | this.append(this.element(), {tag:'div', cls:'bookmarklet', children: [ | 59 | this.append(this.element(), {tag:'div', cls:'bookmarklet', children: [ |
63 | {tag:'div', id:this.getId('linkBlock'), cls:'bookmarklet_link', children:[ | 60 | {tag:'div', id:this.getId('linkBlock'), cls:'bookmarklet_link', children:[ |
64 | // {tag:'a', id:this.getId('link'), href:bookmarkletUrl, children:[ | 61 | // {tag:'a', id:this.getId('link'), href:bookmarkletUrl, children:[ |
65 | {tag:'a', id:this.getId('link'), href:'#', children:[ | 62 | {tag:'a', id:this.getId('link'), href:'#', children:[ |
66 | {tag:'div', cls:'icon'}, | 63 | {tag:'div', cls:'icon'}, |
67 | {tag:'div', cls:'text', children:[ | 64 | {tag:'div', cls:'text', children:[ |
68 | {tag:'span', html:"add to Clipperz"} | 65 | {tag:'span', html:"add to Clipperz"} |
69 | ]} | 66 | ]} |
70 | ]} | 67 | ]} |
71 | ]} | 68 | ]} |
72 | ]}); | 69 | ]}); |
73 | 70 | ||
74 | new Clipperz.PM.UI.Common.Components.Tooltip({ | 71 | new Clipperz.PM.UI.Common.Components.Tooltip({ |
75 | element:this.getElement('linkBlock'), | 72 | element:this.getElement('linkBlock'), |
76 | text: "Drag and drop the \"add to Clipperz\" link above to the bookmark bar.", | 73 | text: "Drag and drop the \"add to Clipperz\" link above to the bookmark bar.", |
77 | position:'BELOW' | 74 | position:'BELOW' |
78 | }); | 75 | }); |
79 | 76 | ||
80 | MochiKit.Signal.connect(this.getId('link'), 'onclick', this, 'handleOnclick'); | 77 | MochiKit.Signal.connect(this.getId('link'), 'onclick', this, 'handleOnclick'); |
81 | this.updateBookmarkletURLs(); | 78 | this.updateBookmarkletURLs(); |
82 | }, | 79 | }, |
83 | 80 | ||
84 | //------------------------------------------------------------------------- | 81 | //------------------------------------------------------------------------- |
85 | 82 | ||
86 | 'handleOnclick': function (anEvent) { | 83 | 'handleOnclick': function (anEvent) { |
87 | anEvent.preventDefault(); | 84 | anEvent.preventDefault(); |
88 | 85 | ||
89 | Clipperz.log("BOOKMARKLET CLICK"); | 86 | Clipperz.log("BOOKMARKLET CLICK"); |
90 | }, | 87 | }, |
91 | 88 | ||
92 | //------------------------------------------------------------------------- | 89 | //------------------------------------------------------------------------- |
93 | 90 | ||
94 | 'updateBookmarkletURLs': function () { | 91 | 'updateBookmarkletURLs': function () { |
95 | var bookmarkletUrl; | 92 | var bookmarkletUrl; |
96 | 93 | ||
97 | if (Clipperz_IEisBroken == true) { | 94 | if (Clipperz_IEisBroken == true) { |
98 | bookmarkletUrl = bookmarklet_ie; | 95 | bookmarkletUrl = bookmarklet_ie; |
99 | } else { | 96 | } else { |
100 | // bookmarkletUrl = bookmarklet; | 97 | // bookmarkletUrl = bookmarklet; |
101 | bookmarkletUrl = Clipperz.PM.Strings.getValue('bookmarklet'); | 98 | bookmarkletUrl = Clipperz.PM.Strings.getValue('bookmarklet'); |
102 | } | 99 | } |
103 | 100 | ||
104 | this.getElement('link').href = bookmarkletUrl; | 101 | this.getElement('link').href = bookmarkletUrl; |
105 | }, | 102 | }, |
106 | 103 | ||
107 | //------------------------------------------------------------------------- | 104 | //------------------------------------------------------------------------- |
108 | __syntaxFix__: "syntax fix" | 105 | __syntaxFix__: "syntax fix" |
109 | }); | 106 | }); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js index e3238ca..af33d85 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.CardDialogComponent = function(args) { | 28 | Clipperz.PM.UI.Web.Components.CardDialogComponent = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.CardDialogComponent.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.CardDialogComponent.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._tabPanelController = null; | 33 | this._tabPanelController = null; |
37 | 34 | ||
38 | this._tabPanelControllerConfiguration = { | 35 | this._tabPanelControllerConfiguration = { |
39 | 'DETAILS': { | 36 | 'DETAILS': { |
40 | tab:'detailTab', | 37 | tab:'detailTab', |
41 | panel:'detailTabpanel' | 38 | panel:'detailTabpanel' |
42 | }, | 39 | }, |
43 | 'DIRECT_LOGINS': { | 40 | 'DIRECT_LOGINS': { |
44 | tab:'directLoginTab', | 41 | tab:'directLoginTab', |
45 | panel:'directLoginTabpanel' | 42 | panel:'directLoginTabpanel' |
46 | }, | 43 | }, |
47 | 'SHARING': { | 44 | 'SHARING': { |
48 | tab:'sharingTab', | 45 | tab:'sharingTab', |
49 | panel:'sharingTabpanel' | 46 | panel:'sharingTabpanel' |
50 | } | 47 | } |
51 | }; | 48 | }; |
52 | 49 | ||
53 | this._tooltips = null; | 50 | this._tooltips = null; |
54 | 51 | ||
55 | this._isSavingEnabled = false; | 52 | this._isSavingEnabled = false; |
56 | this._hintMode = 'OFF'; //'ON' | 53 | this._hintMode = 'OFF'; //'ON' |
57 | 54 | ||
58 | this._fieldComponents = {}; | 55 | this._fieldComponents = {}; |
59 | this._directLoginComponents = {}; | 56 | this._directLoginComponents = {}; |
60 | 57 | ||
61 | this._displayMode = 'fixed'; //'scrollable'; | 58 | this._displayMode = 'fixed'; //'scrollable'; |
62 | 59 | ||
63 | return this; | 60 | return this; |
64 | } | 61 | } |
65 | 62 | ||
66 | //============================================================================= | 63 | //============================================================================= |
67 | 64 | ||
68 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 65 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
69 | 66 | ||
70 | //------------------------------------------------------------------------- | 67 | //------------------------------------------------------------------------- |
71 | 68 | ||
72 | 'toString': function () { | 69 | 'toString': function () { |
73 | return "Clipperz.PM.UI.Web.Components.CardDialogComponent component"; | 70 | return "Clipperz.PM.UI.Web.Components.CardDialogComponent component"; |
74 | }, | 71 | }, |
75 | 72 | ||
76 | //------------------------------------------------------------------------- | 73 | //------------------------------------------------------------------------- |
77 | 74 | ||
78 | 'tabPanelController': function () { | 75 | 'tabPanelController': function () { |
79 | if (this._tabPanelController == null) { | 76 | if (this._tabPanelController == null) { |
80 | this._tabPanelController = new Clipperz.PM.UI.Common.Controllers.TabPanelController({ | 77 | this._tabPanelController = new Clipperz.PM.UI.Common.Controllers.TabPanelController({ |
81 | component:this, | 78 | component:this, |
82 | configuration:this._tabPanelControllerConfiguration | 79 | configuration:this._tabPanelControllerConfiguration |
83 | }); | 80 | }); |
84 | 81 | ||
85 | MochiKit.Signal.connect(this._tabPanelController, 'tabSelected', this, 'handleTabSelected') | 82 | MochiKit.Signal.connect(this._tabPanelController, 'tabSelected', this, 'handleTabSelected') |
86 | } | 83 | } |
87 | 84 | ||
88 | return this._tabPanelController; | 85 | return this._tabPanelController; |
89 | }, | 86 | }, |
90 | 87 | ||
91 | //------------------------------------------------------------------------- | 88 | //------------------------------------------------------------------------- |
92 | 89 | ||
93 | 'renderSelf': function() { | 90 | 'renderSelf': function() { |
94 | this.append(this.element(), {tag:'div', cls:'CardDialog mainDialog loading', id:this.getId('panel'), children: [ | 91 | this.append(this.element(), {tag:'div', cls:'CardDialog mainDialog loading', id:this.getId('panel'), children: [ |
95 | {tag:'form', id:this.getId('form'), children:[ | 92 | {tag:'form', id:this.getId('form'), children:[ |
96 | // {tag:'input', type:'text', id:this.getId('hidden'), cls:'hidden'}, | 93 | // {tag:'input', type:'text', id:this.getId('hidden'), cls:'hidden'}, |
97 | {tag:'div', cls:'header', children:[ | 94 | {tag:'div', cls:'header', children:[ |
98 | {tag:'div', cls:'title', children:[ | 95 | {tag:'div', cls:'title', children:[ |
99 | {tag:'input', type:'text', id:this.getId('title')} | 96 | {tag:'input', type:'text', id:this.getId('title')} |
100 | ]} | 97 | ]} |
101 | ]}, | 98 | ]}, |
102 | {tag:'div', id:this.getId('body'), cls:'body', children:[ | 99 | {tag:'div', id:this.getId('body'), cls:'body', children:[ |
103 | {tag:'div', cls:'tabs', children:[ | 100 | {tag:'div', cls:'tabs', children:[ |
104 | {tag:'ul', cls:'tabs', children:[ | 101 | {tag:'ul', cls:'tabs', children:[ |
105 | {tag:'li', id:this.getId('detailTab'), children:[{tag:'span', html:"details"}]}, | 102 | {tag:'li', id:this.getId('detailTab'), children:[{tag:'span', html:"details"}]}, |
106 | {tag:'li', id:this.getId('directLoginTab'), children:[ | 103 | {tag:'li', id:this.getId('directLoginTab'), children:[ |
107 | {tag:'span', html:"direct logins"}//, | 104 | {tag:'span', html:"direct logins"}//, |
108 | // {tag:'div', id:this.getId('addDirectLoginButton'), cls:'addDirectLoginButton', children:[ | 105 | // {tag:'div', id:this.getId('addDirectLoginButton'), cls:'addDirectLoginButton', children:[ |
109 | // {tag:'span', html:"+"} | 106 | // {tag:'span', html:"+"} |
110 | // ]} | 107 | // ]} |
111 | ]}, | 108 | ]}, |
112 | {tag:'li', id:this.getId('sharingTab'), children:[{tag:'span', html:"sharing"}]} | 109 | {tag:'li', id:this.getId('sharingTab'), children:[{tag:'span', html:"sharing"}]} |
113 | ]} | 110 | ]} |
114 | ]}, | 111 | ]}, |
115 | {tag:'div', cls:'tabPanels', children:[ | 112 | {tag:'div', cls:'tabPanels', children:[ |
116 | {tag:'ul', cls:'tabPanels', children:[ | 113 | {tag:'ul', cls:'tabPanels', children:[ |
117 | {tag:'li', id:this.getId('detailTabpanel'), cls:'tabPanel', children:[ | 114 | {tag:'li', id:this.getId('detailTabpanel'), cls:'tabPanel', children:[ |
118 | {tag:'div', id:this.getId('recordFields'), children:[ | 115 | {tag:'div', id:this.getId('recordFields'), children:[ |
119 | {tag:'table', cls:'fields', cellpadding:'0', id:this.getId('fieldTable'), cellspacing:'0', children:[ | 116 | {tag:'table', cls:'fields', cellpadding:'0', id:this.getId('fieldTable'), cellspacing:'0', children:[ |
120 | {tag:'thead', children:[ | 117 | {tag:'thead', children:[ |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordDirectLoginComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordDirectLoginComponent.js index 126c5b1..2e61f5f 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordDirectLoginComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordDirectLoginComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent = function(args) { | 28 | Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._reference = args.reference|| Clipperz.Base.exception.raise('MandatoryParameter'); | 33 | this._reference = args.reference|| Clipperz.Base.exception.raise('MandatoryParameter'); |
37 | this._faviconComponent = null; | 34 | this._faviconComponent = null; |
38 | 35 | ||
39 | return this; | 36 | return this; |
40 | } | 37 | } |
41 | 38 | ||
42 | //============================================================================= | 39 | //============================================================================= |
43 | 40 | ||
44 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 41 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
45 | 42 | ||
46 | //------------------------------------------------------------------------- | 43 | //------------------------------------------------------------------------- |
47 | 44 | ||
48 | 'toString': function () { | 45 | 'toString': function () { |
49 | return "Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent component"; | 46 | return "Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent component"; |
50 | }, | 47 | }, |
51 | 48 | ||
52 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
53 | 50 | ||
54 | 'reference': function () { | 51 | 'reference': function () { |
55 | return this._reference; | 52 | return this._reference; |
56 | }, | 53 | }, |
57 | 54 | ||
58 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
59 | 56 | ||
60 | 'renderSelf': function() { | 57 | 'renderSelf': function() { |
61 | //console.log(">>> CardDialogRecordDirectLoginComponent.renderSelf"); | 58 | //console.log(">>> CardDialogRecordDirectLoginComponent.renderSelf"); |
62 | this.append(this.element(), [ | 59 | this.append(this.element(), [ |
63 | {tag:'div', cls:'cardDialogRecordDirectLoginComponent_favicon', children:[ | 60 | {tag:'div', cls:'cardDialogRecordDirectLoginComponent_favicon', children:[ |
64 | {tag:'img', cls:'favicon', id:this.getId('favicon')} | 61 | {tag:'img', cls:'favicon', id:this.getId('favicon')} |
65 | ]}, | 62 | ]}, |
66 | {tag:'div', cls:'cardDialogRecordDirectLoginComponent_label', children:[ | 63 | {tag:'div', cls:'cardDialogRecordDirectLoginComponent_label', children:[ |
67 | {tag:'input', id:this.getId('label'), type:'text'} | 64 | {tag:'input', id:this.getId('label'), type:'text'} |
68 | ]}, | 65 | ]}, |
69 | {tag:'div', cls:'open', children:[ | 66 | {tag:'div', cls:'open', children:[ |
70 | {tag:'span', children:[ | 67 | {tag:'span', children:[ |
71 | {tag:'a', href:'open', id:this.getId('open'), html:' '} | 68 | {tag:'a', href:'open', id:this.getId('open'), html:' '} |
72 | ]} | 69 | ]} |
73 | ]}, | 70 | ]}, |
74 | {tag:'div', cls:'edit', children:[ | 71 | {tag:'div', cls:'edit', children:[ |
75 | {tag:'span', children:[ | 72 | {tag:'span', children:[ |
76 | {tag:'a', href:'edit', id:this.getId('edit'), html:"edit"} | 73 | {tag:'a', href:'edit', id:this.getId('edit'), html:"edit"} |
77 | ]} | 74 | ]} |
78 | ]}, | 75 | ]}, |
79 | {tag:'div', cls:'delete', children:[ | 76 | {tag:'div', cls:'delete', children:[ |
80 | {tag:'span', children:[ | 77 | {tag:'span', children:[ |
81 | {tag:'a', href:'delete', id:this.getId('delete'), html:"delete"} | 78 | {tag:'a', href:'delete', id:this.getId('delete'), html:"delete"} |
82 | ]} | 79 | ]} |
83 | ]} | 80 | ]} |
84 | /* | 81 | /* |
85 | {tag:'td', cls:'fieldState'}, | 82 | {tag:'td', cls:'fieldState'}, |
86 | {tag:'td', cls:'fieldLabel', children:[ | 83 | {tag:'td', cls:'fieldLabel', children:[ |
87 | {tag:'input', cls:'label', id:this.getId('label')} | 84 | {tag:'input', cls:'label', id:this.getId('label')} |
88 | ]}, | 85 | ]}, |
89 | {tag:'td', cls:'fieldLock', children:[ | 86 | {tag:'td', cls:'fieldLock', children:[ |
90 | {tag:'div', cls:'unlocked', id:this.getId('isHidden')} | 87 | {tag:'div', cls:'unlocked', id:this.getId('isHidden')} |
91 | ]}, | 88 | ]}, |
92 | {tag:'td', cls:'fieldValue', children:[ | 89 | {tag:'td', cls:'fieldValue', children:[ |
93 | {tag:'div', cls:'unlocked', id:this.getId('valueWrapper'), children:[ | 90 | {tag:'div', cls:'unlocked', id:this.getId('valueWrapper'), children:[ |
94 | {tag:'input', type:'text', cls:'value', id:this.getId('value')} | 91 | {tag:'input', type:'text', cls:'value', id:this.getId('value')} |
95 | ]} | 92 | ]} |
96 | ]}, | 93 | ]}, |
97 | {tag:'td', cls:'fieldAddDelete', children:[ | 94 | {tag:'td', cls:'fieldAddDelete', children:[ |
98 | {tag:'div', cls:'delete', children:[ | 95 | {tag:'div', cls:'delete', children:[ |
99 | {tag:'span', children:[ | 96 | {tag:'span', children:[ |
100 | {tag:'a', href:'#', id:this.getId('delete'), html:"delete"} | 97 | {tag:'a', href:'#', id:this.getId('delete'), html:"delete"} |
101 | ]} | 98 | ]} |
102 | ]} | 99 | ]} |
103 | ]} | 100 | ]} |
104 | */ | 101 | */ |
105 | ]); | 102 | ]); |
106 | 103 | ||
107 | MochiKit.Signal.connect(this.getId('label'), 'onkeyup',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); | 104 | MochiKit.Signal.connect(this.getId('label'), 'onkeyup',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); |
108 | MochiKit.Signal.connect(this.getId('open'), 'onclick',this, 'openDirectLogin'); | 105 | MochiKit.Signal.connect(this.getId('open'), 'onclick',this, 'openDirectLogin'); |
109 | MochiKit.Signal.connect(this.getId('edit'), 'onclick',this, 'editDirectLogin'); | 106 | MochiKit.Signal.connect(this.getId('edit'), 'onclick',this, 'editDirectLogin'); |
110 | MochiKit.Signal.connect(this.getId('delete'), 'onclick',this, 'deleteDirectLogin'); | 107 | MochiKit.Signal.connect(this.getId('delete'), 'onclick',this, 'deleteDirectLogin'); |
111 | }, | 108 | }, |
112 | 109 | ||
113 | //------------------------------------------------------------------------- | 110 | //------------------------------------------------------------------------- |
114 | 111 | ||
115 | 'shouldShowElementWhileRendering': function () { | 112 | 'shouldShowElementWhileRendering': function () { |
116 | return false; | 113 | return false; |
117 | }, | 114 | }, |
118 | 115 | ||
119 | //------------------------------------------------------------------------- | 116 | //------------------------------------------------------------------------- |
120 | 117 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js index c1a7c13..b58062c 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent = function(args) { | 28 | Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._reference = args.reference|| Clipperz.Base.exception.raise('MandatoryParameter'); | 33 | this._reference = args.reference|| Clipperz.Base.exception.raise('MandatoryParameter'); |
37 | this._actionType = null; | 34 | this._actionType = null; |
38 | 35 | ||
39 | return this; | 36 | return this; |
40 | } | 37 | } |
41 | 38 | ||
42 | //============================================================================= | 39 | //============================================================================= |
43 | 40 | ||
44 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 41 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
45 | 42 | ||
46 | //------------------------------------------------------------------------- | 43 | //------------------------------------------------------------------------- |
47 | 44 | ||
48 | 'toString': function () { | 45 | 'toString': function () { |
49 | return "Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent component"; | 46 | return "Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent component"; |
50 | }, | 47 | }, |
51 | 48 | ||
52 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
53 | 50 | ||
54 | 'renderSelf': function() { | 51 | 'renderSelf': function() { |
55 | this.append(this.element(), [ | 52 | this.append(this.element(), [ |
56 | {tag:'td', cls:'fieldState'}, | 53 | {tag:'td', cls:'fieldState'}, |
57 | {tag:'td', cls:'fieldLabel', children:[ | 54 | {tag:'td', cls:'fieldLabel', children:[ |
58 | {tag:'input', cls:'label', id:this.getId('label')} | 55 | {tag:'input', cls:'label', id:this.getId('label')} |
59 | ]}, | 56 | ]}, |
60 | {tag:'td', cls:'fieldLock', children:[ | 57 | {tag:'td', cls:'fieldLock', children:[ |
61 | {tag:'div', cls:'unlocked', id:this.getId('isHidden')} | 58 | {tag:'div', cls:'unlocked', id:this.getId('isHidden')} |
62 | ]}, | 59 | ]}, |
63 | {tag:'td', cls:'fieldValue', children:[ | 60 | {tag:'td', cls:'fieldValue', children:[ |
64 | {tag:'div', cls:'unlocked', id:this.getId('valueWrapper'), children:[ | 61 | {tag:'div', cls:'unlocked', id:this.getId('valueWrapper'), children:[ |
65 | {tag:'input', type:'text', cls:'value', id:this.getId('value')} | 62 | {tag:'input', type:'text', cls:'value', id:this.getId('value')} |
66 | ]} | 63 | ]} |
67 | ]}, | 64 | ]}, |
68 | {tag:'td', cls:'fieldAction', children:[ | 65 | {tag:'td', cls:'fieldAction', children:[ |
69 | {tag:'a', href:'#', id:this.getId('actionLink'), html:' '} | 66 | {tag:'a', href:'#', id:this.getId('actionLink'), html:' '} |
70 | ]}, | 67 | ]}, |
71 | {tag:'td', cls:'fieldAddDelete', children:[ | 68 | {tag:'td', cls:'fieldAddDelete', children:[ |
72 | {tag:'div', cls:'delete', children:[ | 69 | {tag:'div', cls:'delete', children:[ |
73 | {tag:'span', children:[ | 70 | {tag:'span', children:[ |
74 | {tag:'a', href:'#', id:this.getId('delete'), html:"delete"} | 71 | {tag:'a', href:'#', id:this.getId('delete'), html:"delete"} |
75 | ]} | 72 | ]} |
76 | ]} | 73 | ]} |
77 | ]} | 74 | ]} |
78 | ]); | 75 | ]); |
79 | 76 | ||
80 | MochiKit.Signal.connect(this.getId('label'), 'onkeyup',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); | 77 | MochiKit.Signal.connect(this.getId('label'), 'onkeyup',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); |
81 | MochiKit.Signal.connect(this.getId('isHidden'), 'onclick',this, 'toggleIsHidden'); | 78 | MochiKit.Signal.connect(this.getId('isHidden'), 'onclick',this, 'toggleIsHidden'); |
82 | MochiKit.Signal.connect(this.getId('value'), 'onkeyup',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); | 79 | MochiKit.Signal.connect(this.getId('value'), 'onkeyup',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); |
83 | MochiKit.Signal.connect(this.getId('actionLink'), 'onclick',this, 'handleActionLink'); | 80 | MochiKit.Signal.connect(this.getId('actionLink'), 'onclick',this, 'handleActionLink'); |
84 | MochiKit.Signal.connect(this.getId('delete'), 'onclick',this, 'deleteField'); | 81 | MochiKit.Signal.connect(this.getId('delete'), 'onclick',this, 'deleteField'); |
85 | // MochiKit.Signal.connect(this.getId('delete'), 'onclick',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'deleteField', this.reference())); | 82 | // MochiKit.Signal.connect(this.getId('delete'), 'onclick',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'deleteField', this.reference())); |
86 | }, | 83 | }, |
87 | 84 | ||
88 | //------------------------------------------------------------------------- | 85 | //------------------------------------------------------------------------- |
89 | 86 | ||
90 | 'shouldShowElementWhileRendering': function () { | 87 | 'shouldShowElementWhileRendering': function () { |
91 | return false; | 88 | return false; |
92 | }, | 89 | }, |
93 | 90 | ||
94 | //========================================================================= | 91 | //========================================================================= |
95 | 92 | ||
96 | 'reference': function () { | 93 | 'reference': function () { |
97 | return this._reference; | 94 | return this._reference; |
98 | }, | 95 | }, |
99 | 96 | ||
100 | //========================================================================= | 97 | //========================================================================= |
101 | 98 | ||
102 | 'label': function () { | 99 | 'label': function () { |
103 | return this.getElement('label').value; | 100 | return this.getElement('label').value; |
104 | }, | 101 | }, |
105 | 102 | ||
106 | 'setLabel': function (aValue) { | 103 | 'setLabel': function (aValue) { |
107 | // this.getElement('label').value = Clipperz.Base.sanitizeString(aValue); | 104 | // this.getElement('label').value = Clipperz.Base.sanitizeString(aValue); |
108 | this.getElement('label').value = aValue; | 105 | this.getElement('label').value = aValue; |
109 | }, | 106 | }, |
110 | 107 | ||
111 | //========================================================================= | 108 | //========================================================================= |
112 | 109 | ||
113 | 'value': function () { | 110 | 'value': function () { |
114 | return this.getElement('value').value; | 111 | return this.getElement('value').value; |
115 | }, | 112 | }, |
116 | 113 | ||
117 | 'setValue': function (aValue) { | 114 | 'setValue': function (aValue) { |
118 | // this.getElement('value').value = Clipperz.Base.sanitizeString(aValue); | 115 | // this.getElement('value').value = Clipperz.Base.sanitizeString(aValue); |
119 | this.getElement('value').value = aValue; | 116 | this.getElement('value').value = aValue; |
120 | }, | 117 | }, |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ColumnManager.js index bfc7e61..391c379 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ColumnManager.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | //############################################################################# | 28 | //############################################################################# |
32 | 29 | ||
33 | Clipperz.PM.UI.Web.Components.ColumnManager = function(args) { | 30 | Clipperz.PM.UI.Web.Components.ColumnManager = function(args) { |
34 | args = args || {}; | 31 | args = args || {}; |
35 | Clipperz.PM.UI.Web.Components.ColumnManager.superclass.constructor.call(this, args); | 32 | Clipperz.PM.UI.Web.Components.ColumnManager.superclass.constructor.call(this, args); |
36 | 33 | ||
37 | this._name = args.name || Clipperz.Base.exception.raise('MandatoryParameter'); | 34 | this._name = args.name || Clipperz.Base.exception.raise('MandatoryParameter'); |
38 | this._selector = args.selector|| Clipperz.Base.exception.raise('MandatoryParameter');; | 35 | this._selector = args.selector|| Clipperz.Base.exception.raise('MandatoryParameter');; |
39 | this._label = args.label || null; | 36 | this._label = args.label || null; |
40 | this._isSortable = args.sortable|| false; | 37 | this._isSortable = args.sortable|| false; |
41 | this._comparator = args.comparator|| null; | 38 | this._comparator = args.comparator|| null; |
42 | this._sorted = args.sorted || 'UNSORTED'; //'ASCENDING' | 'DESCENDING' | 'UNSORTED' | 39 | this._sorted = args.sorted || 'UNSORTED'; //'ASCENDING' | 'DESCENDING' | 'UNSORTED' |
43 | this._cssClass = args.cssClass|| ''; | 40 | this._cssClass = args.cssClass|| ''; |
44 | 41 | ||
45 | this._signalIdentifiers = []; | 42 | this._signalIdentifiers = []; |
46 | 43 | ||
47 | return this; | 44 | return this; |
48 | } | 45 | } |
49 | 46 | ||
50 | //============================================================================= | 47 | //============================================================================= |
51 | 48 | ||
52 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ColumnManager, Clipperz.PM.UI.Common.Components.BaseComponent, { | 49 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ColumnManager, Clipperz.PM.UI.Common.Components.BaseComponent, { |
53 | 50 | ||
54 | 'toString': function () { | 51 | 'toString': function () { |
55 | return "Clipperz.PM.UI.Web.Components.ColumnManager - " + this._name; | 52 | return "Clipperz.PM.UI.Web.Components.ColumnManager - " + this._name; |
56 | }, | 53 | }, |
57 | 54 | ||
58 | 'name': function () { | 55 | 'name': function () { |
59 | return this._name; | 56 | return this._name; |
60 | }, | 57 | }, |
61 | 58 | ||
62 | 'label': function () { | 59 | 'label': function () { |
63 | return this._label; | 60 | return this._label; |
64 | }, | 61 | }, |
65 | 62 | ||
66 | 'selector': function () { | 63 | 'selector': function () { |
67 | return this._selector; | 64 | return this._selector; |
68 | }, | 65 | }, |
69 | 66 | ||
70 | 'comparator': function() { | 67 | 'comparator': function() { |
71 | return this._comparator; | 68 | return this._comparator; |
72 | }, | 69 | }, |
73 | 70 | ||
74 | 'cssClass': function() { | 71 | 'cssClass': function() { |
75 | return this._cssClass; | 72 | return this._cssClass; |
76 | }, | 73 | }, |
77 | 74 | ||
78 | //------------------------------------------------------------------------- | 75 | //------------------------------------------------------------------------- |
79 | 76 | ||
80 | 'isSortable': function () { | 77 | 'isSortable': function () { |
81 | return this._isSortable; | 78 | return this._isSortable; |
82 | }, | 79 | }, |
83 | 80 | ||
84 | //------------------------------------------------------------------------- | 81 | //------------------------------------------------------------------------- |
85 | 82 | ||
86 | 'sorted': function () { | 83 | 'sorted': function () { |
87 | return this._sorted; | 84 | return this._sorted; |
88 | }, | 85 | }, |
89 | 86 | ||
90 | 'isSorted': function () { | 87 | 'isSorted': function () { |
91 | return (this.sorted() != 'UNSORTED'); | 88 | return (this.sorted() != 'UNSORTED'); |
92 | }, | 89 | }, |
93 | 90 | ||
94 | 'setSorted': function(aValue) { | 91 | 'setSorted': function(aValue) { |
95 | this._sorted = aValue; | 92 | this._sorted = aValue; |
96 | this.updateSortIcon(); | 93 | this.updateSortIcon(); |
97 | }, | 94 | }, |
98 | 95 | ||
99 | //------------------------------------------------------------------------- | 96 | //------------------------------------------------------------------------- |
100 | 97 | ||
101 | 'signalIdentifiers': function () { | 98 | 'signalIdentifiers': function () { |
102 | return this._signalIdentifiers; | 99 | return this._signalIdentifiers; |
103 | }, | 100 | }, |
104 | 101 | ||
105 | 'resetSignalIdentifiers': function () { | 102 | 'resetSignalIdentifiers': function () { |
106 | this._signalIdentifiers = []; | 103 | this._signalIdentifiers = []; |
107 | }, | 104 | }, |
108 | 105 | ||
109 | //------------------------------------------------------------------------- | 106 | //------------------------------------------------------------------------- |
110 | 107 | ||
111 | 'disconnectRowsSignals': function () { | 108 | 'disconnectRowsSignals': function () { |
112 | MochiKit.Base.map(MochiKit.Signal.disconnect, this.signalIdentifiers()); | 109 | MochiKit.Base.map(MochiKit.Signal.disconnect, this.signalIdentifiers()); |
113 | this.resetSignalIdentifiers(); | 110 | this.resetSignalIdentifiers(); |
114 | }, | 111 | }, |
115 | 112 | ||
116 | 'connectEvent': function () { | 113 | 'connectEvent': function () { |
117 | var ident; | 114 | var ident; |
118 | 115 | ||
119 | ident = MochiKit.Signal.connect.apply(null, arguments); | 116 | ident = MochiKit.Signal.connect.apply(null, arguments); |
120 | this.signalIdentifiers().push(ident); | 117 | this.signalIdentifiers().push(ident); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CreateNewCardSplashComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CreateNewCardSplashComponent.js index 61d6ead..d3aa175 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CreateNewCardSplashComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CreateNewCardSplashComponent.js | |||
@@ -1,71 +1,68 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent = function(args) { | 28 | Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | return this; | 33 | return this; |
37 | } | 34 | } |
38 | 35 | ||
39 | //============================================================================= | 36 | //============================================================================= |
40 | 37 | ||
41 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 38 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
42 | 39 | ||
43 | //------------------------------------------------------------------------- | 40 | //------------------------------------------------------------------------- |
44 | 41 | ||
45 | 'toString': function () { | 42 | 'toString': function () { |
46 | return "Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent component"; | 43 | return "Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent component"; |
47 | }, | 44 | }, |
48 | 45 | ||
49 | //------------------------------------------------------------------------- | 46 | //------------------------------------------------------------------------- |
50 | 47 | ||
51 | 'renderSelf': function() { | 48 | 'renderSelf': function() { |
52 | this.append(this.element(), [ | 49 | this.append(this.element(), [ |
53 | {tag:'div', cls:'createNewCardSplash', id:this.getId('button'), children:[ | 50 | {tag:'div', cls:'createNewCardSplash', id:this.getId('button'), children:[ |
54 | {tag:'span', html:"Create New Card"} | 51 | {tag:'span', html:"Create New Card"} |
55 | ]} | 52 | ]} |
56 | ]); | 53 | ]); |
57 | 54 | ||
58 | MochiKit.Signal.connect(this.getElement('button'), 'onclick', this, 'handleClick'); | 55 | MochiKit.Signal.connect(this.getElement('button'), 'onclick', this, 'handleClick'); |
59 | }, | 56 | }, |
60 | 57 | ||
61 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
62 | 59 | ||
63 | 'handleClick': function (anEvent) { | 60 | 'handleClick': function (anEvent) { |
64 | anEvent.preventDefault(); | 61 | anEvent.preventDefault(); |
65 | MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'addCard', this.element()); | 62 | MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'addCard', this.element()); |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | 66 | ||
70 | __syntaxFix__: "syntax fix" | 67 | __syntaxFix__: "syntax fix" |
71 | }); | 68 | }); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js index 91d99e3..d2f1045 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js | |||
@@ -1,111 +1,108 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.DataPanel = function(args) { | 28 | Clipperz.PM.UI.Web.Components.DataPanel = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.DataPanel.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.DataPanel.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._initiallySelectedTab = args.selected || 'OFFLINE_COPY'; | 33 | this._initiallySelectedTab = args.selected || 'OFFLINE_COPY'; |
37 | this._tabPanelControllerConfiguration = { | 34 | this._tabPanelControllerConfiguration = { |
38 | 'OFFLINE_COPY': { | 35 | 'OFFLINE_COPY': { |
39 | tab:'offlineCopyTab', | 36 | tab:'offlineCopyTab', |
40 | panel:'offlineCopyPanel' | 37 | panel:'offlineCopyPanel' |
41 | }, | 38 | }, |
42 | 'SHARING': { | 39 | 'SHARING': { |
43 | tab:'sharingTab', | 40 | tab:'sharingTab', |
44 | panel:'sharingPanel' | 41 | panel:'sharingPanel' |
45 | }, | 42 | }, |
46 | 'IMPORT': { | 43 | 'IMPORT': { |
47 | tab:'importTab', | 44 | tab:'importTab', |
48 | panel:'importPanel' | 45 | panel:'importPanel' |
49 | }, | 46 | }, |
50 | 'EXPORT': { | 47 | 'EXPORT': { |
51 | tab:'exportTab', | 48 | tab:'exportTab', |
52 | panel:'exportPanel' | 49 | panel:'exportPanel' |
53 | } | 50 | } |
54 | }; | 51 | }; |
55 | 52 | ||
56 | return this; | 53 | return this; |
57 | } | 54 | } |
58 | 55 | ||
59 | //============================================================================= | 56 | //============================================================================= |
60 | 57 | ||
61 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { | 58 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { |
62 | 59 | ||
63 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
64 | 61 | ||
65 | 'toString': function () { | 62 | 'toString': function () { |
66 | return "Clipperz.PM.UI.Web.Components.DataPanel component"; | 63 | return "Clipperz.PM.UI.Web.Components.DataPanel component"; |
67 | }, | 64 | }, |
68 | 65 | ||
69 | //------------------------------------------------------------------------- | 66 | //------------------------------------------------------------------------- |
70 | 67 | ||
71 | 'renderSelf': function(/*aContainer, aPosition*/) { | 68 | 'renderSelf': function(/*aContainer, aPosition*/) { |
72 | this.append(this.element(), [ | 69 | this.append(this.element(), [ |
73 | {tag:'div', cls:'header', children:[ | 70 | {tag:'div', cls:'header', children:[ |
74 | {tag:'div', cls:'subPanelTabs', children:[ | 71 | {tag:'div', cls:'subPanelTabs', children:[ |
75 | {tag:'ul', children:[ | 72 | {tag:'ul', children:[ |
76 | {tag:'li', id:this.getId('offlineCopyTab'),children:[{tag:'a', href:'#', html:'Offline copy'}], cls:'first'}, | 73 | {tag:'li', id:this.getId('offlineCopyTab'),children:[{tag:'a', href:'#', html:'Offline copy'}], cls:'first'}, |
77 | {tag:'li', id:this.getId('sharingTab'), children:[{tag:'a', href:'#', html:'Sharing'}]}, | 74 | {tag:'li', id:this.getId('sharingTab'), children:[{tag:'a', href:'#', html:'Sharing'}]}, |
78 | {tag:'li', id:this.getId('importTab'), children:[{tag:'a', href:'#', html:'Import'}]}, | 75 | {tag:'li', id:this.getId('importTab'), children:[{tag:'a', href:'#', html:'Import'}]}, |
79 | {tag:'li', id:this.getId('exportTab'), children:[{tag:'a', href:'#', html:'Export'}]} | 76 | {tag:'li', id:this.getId('exportTab'), children:[{tag:'a', href:'#', html:'Export'}]} |
80 | ]} | 77 | ]} |
81 | ]} | 78 | ]} |
82 | ]}, | 79 | ]}, |
83 | {tag:'div', cls:'body', children:[ | 80 | {tag:'div', cls:'body', children:[ |
84 | {tag:'div', cls:'accountPanel', children:[ | 81 | {tag:'div', cls:'accountPanel', children:[ |
85 | {tag:'div', cls:'subPanelContent', children:[ | 82 | {tag:'div', cls:'subPanelContent', children:[ |
86 | {tag:'ul', children:[ | 83 | {tag:'ul', children:[ |
87 | {tag:'li', id:this.getId('offlineCopyPanel'),children:[ | 84 | {tag:'li', id:this.getId('offlineCopyPanel'),children:[ |
88 | {tag:'h3', html:"Offline copy"} | 85 | {tag:'h3', html:"Offline copy"} |
89 | ]}, | 86 | ]}, |
90 | {tag:'li', id:this.getId('sharingPanel'),children:[ | 87 | {tag:'li', id:this.getId('sharingPanel'),children:[ |
91 | {tag:'h3', html:"Sharing"} | 88 | {tag:'h3', html:"Sharing"} |
92 | ]}, | 89 | ]}, |
93 | {tag:'li', id:this.getId('importPanel'), children:[ | 90 | {tag:'li', id:this.getId('importPanel'), children:[ |
94 | {tag:'h3', html:"Import"} | 91 | {tag:'h3', html:"Import"} |
95 | ]}, | 92 | ]}, |
96 | {tag:'li', id:this.getId('exportPanel'), children:[ | 93 | {tag:'li', id:this.getId('exportPanel'), children:[ |
97 | {tag:'h3', html:"Export"} | 94 | {tag:'h3', html:"Export"} |
98 | ]} | 95 | ]} |
99 | ]} | 96 | ]} |
100 | ]} | 97 | ]} |
101 | ]} | 98 | ]} |
102 | ]}, | 99 | ]}, |
103 | {tag:'div', cls:'footer'} | 100 | {tag:'div', cls:'footer'} |
104 | ]); | 101 | ]); |
105 | 102 | ||
106 | this.tabPanelController().setup({selected:this.initiallySelectedTab()}); | 103 | this.tabPanelController().setup({selected:this.initiallySelectedTab()}); |
107 | }, | 104 | }, |
108 | 105 | ||
109 | //------------------------------------------------------------------------- | 106 | //------------------------------------------------------------------------- |
110 | __syntaxFix__: "syntax fix" | 107 | __syntaxFix__: "syntax fix" |
111 | }); | 108 | }); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DateColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DateColumnManager.js index 3f8aa88..ea55ba4 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DateColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DateColumnManager.js | |||
@@ -1,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | //############################################################################# | 28 | //############################################################################# |
32 | 29 | ||
33 | Clipperz.PM.UI.Web.Components.DateColumnManager = function(args) { | 30 | Clipperz.PM.UI.Web.Components.DateColumnManager = function(args) { |
34 | args = args || {}; | 31 | args = args || {}; |
35 | Clipperz.PM.UI.Web.Components.DateColumnManager.superclass.constructor.call(this, args); | 32 | Clipperz.PM.UI.Web.Components.DateColumnManager.superclass.constructor.call(this, args); |
36 | 33 | ||
37 | this._format = args.format|| Clipperz.Base.exception.raise('MandatoryParameter'); | 34 | this._format = args.format|| Clipperz.Base.exception.raise('MandatoryParameter'); |
38 | 35 | ||
39 | return this; | 36 | return this; |
40 | } | 37 | } |
41 | 38 | ||
42 | //============================================================================= | 39 | //============================================================================= |
43 | 40 | ||
44 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DateColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { | 41 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DateColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { |
45 | 42 | ||
46 | 'toString': function () { | 43 | 'toString': function () { |
47 | return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; | 44 | return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; |
48 | }, | 45 | }, |
49 | 46 | ||
50 | //------------------------------------------------------------------------- | 47 | //------------------------------------------------------------------------- |
51 | 48 | ||
52 | 'format': function () { | 49 | 'format': function () { |
53 | return this._format; | 50 | return this._format; |
54 | }, | 51 | }, |
55 | 52 | ||
56 | //------------------------------------------------------------------------- | 53 | //------------------------------------------------------------------------- |
57 | 54 | ||
58 | 'renderCell': function(aRowElement, anObject) { | 55 | 'renderCell': function(aRowElement, anObject) { |
59 | Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ | 56 | Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ |
60 | { | 57 | { |
61 | tag:'span', | 58 | tag:'span', |
62 | title:Clipperz.PM.Date.formatDateWithTemplate(anObject[this.name()], "D, d M Y H:i:s"), | 59 | title:Clipperz.PM.Date.formatDateWithTemplate(anObject[this.name()], "D, d M Y H:i:s"), |
63 | html:Clipperz.PM.Date.formatDateWithTemplate(anObject[this.name()], this.format()) | 60 | html:Clipperz.PM.Date.formatDateWithTemplate(anObject[this.name()], this.format()) |
64 | } | 61 | } |
65 | ]}); | 62 | ]}); |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //----------------------------------------------------- | 65 | //----------------------------------------------------- |
69 | 66 | ||
70 | '__syntax_fix__' : 'syntax fix' | 67 | '__syntax_fix__' : 'syntax fix' |
71 | }); | 68 | }); |
72 | 69 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DeleteObjectColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DeleteObjectColumnManager.js index ee60f2f..fe59494 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DeleteObjectColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DeleteObjectColumnManager.js | |||
@@ -1,70 +1,67 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | //############################################################################# | 28 | //############################################################################# |
32 | 29 | ||
33 | Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager = function(args) { | 30 | Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager = function(args) { |
34 | args = args || {}; | 31 | args = args || {}; |
35 | Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager.superclass.constructor.call(this, args); | 32 | Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager.superclass.constructor.call(this, args); |
36 | 33 | ||
37 | return this; | 34 | return this; |
38 | } | 35 | } |
39 | 36 | ||
40 | //============================================================================= | 37 | //============================================================================= |
41 | 38 | ||
42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager, Clipperz.PM.UI.Web.Components.LinkColumnManager, { | 39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager, Clipperz.PM.UI.Web.Components.LinkColumnManager, { |
43 | 40 | ||
44 | 'toString': function () { | 41 | 'toString': function () { |
45 | return "Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager component"; | 42 | return "Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager component"; |
46 | }, | 43 | }, |
47 | 44 | ||
48 | //------------------------------------------------------------------------- | 45 | //------------------------------------------------------------------------- |
49 | 46 | ||
50 | 'renderCell': function(aRowElement, anObject) { | 47 | 'renderCell': function(aRowElement, anObject) { |
51 | var tdElement; | 48 | var tdElement; |
52 | var linkElement; | 49 | var linkElement; |
53 | 50 | ||
54 | tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ | 51 | tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ |
55 | {tag:'div', cls:'delete', children:[ | 52 | {tag:'div', cls:'delete', children:[ |
56 | {tag:'span', children:[ | 53 | {tag:'span', children:[ |
57 | {tag:'a', href:'delete', html:"delete"} | 54 | {tag:'a', href:'delete', html:"delete"} |
58 | ]} | 55 | ]} |
59 | ]} | 56 | ]} |
60 | ]}); | 57 | ]}); |
61 | 58 | ||
62 | linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); | 59 | linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); |
63 | // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); | 60 | // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); |
64 | this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); | 61 | this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); |
65 | }, | 62 | }, |
66 | 63 | ||
67 | //----------------------------------------------------- | 64 | //----------------------------------------------------- |
68 | '__syntax_fix__' : 'syntax fix' | 65 | '__syntax_fix__' : 'syntax fix' |
69 | }); | 66 | }); |
70 | 67 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginColumnManager.js index 4bf9020..a1f0f9f 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginColumnManager.js | |||
@@ -1,90 +1,87 @@ | |||
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 | /* | 26 | /* |
30 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 27 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
31 | 28 | ||
32 | //############################################################################# | 29 | //############################################################################# |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.DirectLoginColumnManager = function(args) { | 31 | Clipperz.PM.UI.Web.Components.DirectLoginColumnManager = function(args) { |
35 | args = args || {}; | 32 | args = args || {}; |
36 | Clipperz.PM.UI.Web.Components.DirectLoginColumnManager.superclass.constructor.call(this, args); | 33 | Clipperz.PM.UI.Web.Components.DirectLoginColumnManager.superclass.constructor.call(this, args); |
37 | 34 | ||
38 | this._actionMethod = args.actionMethod || null; | 35 | this._actionMethod = args.actionMethod || null; |
39 | 36 | ||
40 | return this; | 37 | return this; |
41 | } | 38 | } |
42 | 39 | ||
43 | //============================================================================= | 40 | //============================================================================= |
44 | 41 | ||
45 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { | 42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { |
46 | 43 | ||
47 | 'toString': function () { | 44 | 'toString': function () { |
48 | return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; | 45 | return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; |
49 | }, | 46 | }, |
50 | 47 | ||
51 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
52 | 49 | ||
53 | 'actionMethod': function () { | 50 | 'actionMethod': function () { |
54 | return this._actionMethod; | 51 | return this._actionMethod; |
55 | }, | 52 | }, |
56 | 53 | ||
57 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
58 | 55 | ||
59 | 'renderCell': function(aRowElement, anObject) { | 56 | 'renderCell': function(aRowElement, anObject) { |
60 | vartdElement; | 57 | vartdElement; |
61 | varlinkElement; | 58 | varlinkElement; |
62 | 59 | ||
63 | tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ | 60 | tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ |
64 | {tag:'div', cls:'directLogin_directLogin', children:[ | 61 | {tag:'div', cls:'directLogin_directLogin', children:[ |
65 | {tag:'div', cls:'directLogin_directLogin_body', children:[ | 62 | {tag:'div', cls:'directLogin_directLogin_body', children:[ |
66 | {tag:'a', href:'#', html:anObject[this.name()]} | 63 | {tag:'a', href:'#', html:anObject[this.name()]} |
67 | ]} | 64 | ]} |
68 | ]} | 65 | ]} |
69 | ]}); | 66 | ]}); |
70 | 67 | ||
71 | linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); | 68 | linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); |
72 | // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); | 69 | // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); |
73 | this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); | 70 | this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); |
74 | }, | 71 | }, |
75 | 72 | ||
76 | //----------------------------------------------------- | 73 | //----------------------------------------------------- |
77 | 74 | ||
78 | 'handleLinkClick': function (anObject, anEvent) { | 75 | 'handleLinkClick': function (anObject, anEvent) { |
79 | anEvent.preventDefault(); | 76 | anEvent.preventDefault(); |
80 | 77 | ||
81 | if (this.actionMethod() != null) { | 78 | if (this.actionMethod() != null) { |
82 | this.actionMethod()(anObject, anEvent); | 79 | this.actionMethod()(anObject, anEvent); |
83 | } | 80 | } |
84 | }, | 81 | }, |
85 | 82 | ||
86 | //----------------------------------------------------- | 83 | //----------------------------------------------------- |
87 | '__syntax_fix__' : 'syntax fix' | 84 | '__syntax_fix__' : 'syntax fix' |
88 | }); | 85 | }); |
89 | 86 | ||
90 | */ \ No newline at end of file | 87 | */ \ No newline at end of file |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingBindingComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingBindingComponent.js index 9a9c0b2..1a76b0c 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingBindingComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingBindingComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent = function(args) { | 28 | Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._formFieldName = args.formFieldName|| Clipperz.Base.exception.raise('MandatoryParameter'); | 33 | this._formFieldName = args.formFieldName|| Clipperz.Base.exception.raise('MandatoryParameter'); |
37 | this._fields = args.fields || Clipperz.Base.exception.raise('MandatoryParameter'); | 34 | this._fields = args.fields || Clipperz.Base.exception.raise('MandatoryParameter'); |
38 | this._initiallySelectedFieldKey = args.selectedFieldKey|| null; | 35 | this._initiallySelectedFieldKey = args.selectedFieldKey|| null; |
39 | 36 | ||
40 | return this; | 37 | return this; |
41 | } | 38 | } |
42 | 39 | ||
43 | //============================================================================= | 40 | //============================================================================= |
44 | 41 | ||
45 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
46 | 43 | ||
47 | //------------------------------------------------------------------------- | 44 | //------------------------------------------------------------------------- |
48 | 45 | ||
49 | 'toString': function () { | 46 | 'toString': function () { |
50 | return "Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent component"; | 47 | return "Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent component"; |
51 | }, | 48 | }, |
52 | 49 | ||
53 | //------------------------------------------------------------------------- | 50 | //------------------------------------------------------------------------- |
54 | 51 | ||
55 | 'formFieldName': function () { | 52 | 'formFieldName': function () { |
56 | return this._formFieldName; | 53 | return this._formFieldName; |
57 | }, | 54 | }, |
58 | 55 | ||
59 | //------------------------------------------------------------------------- | 56 | //------------------------------------------------------------------------- |
60 | 57 | ||
61 | 'fields': function () { | 58 | 'fields': function () { |
62 | return this._fields; | 59 | return this._fields; |
63 | }, | 60 | }, |
64 | 61 | ||
65 | //------------------------------------------------------------------------- | 62 | //------------------------------------------------------------------------- |
66 | 63 | ||
67 | 'selectedValue': function () { | 64 | 'selectedValue': function () { |
68 | var result; | 65 | var result; |
69 | 66 | ||
70 | result = this.getElement('select').value; | 67 | result = this.getElement('select').value; |
71 | 68 | ||
72 | if (result == '---') { | 69 | if (result == '---') { |
73 | result = null; | 70 | result = null; |
74 | } | 71 | } |
75 | 72 | ||
76 | return result; | 73 | return result; |
77 | }, | 74 | }, |
78 | 75 | ||
79 | 'initiallySelectedFieldKey': function () { | 76 | 'initiallySelectedFieldKey': function () { |
80 | return this._initiallySelectedFieldKey; | 77 | return this._initiallySelectedFieldKey; |
81 | }, | 78 | }, |
82 | 79 | ||
83 | //========================================================================= | 80 | //========================================================================= |
84 | 81 | ||
85 | 'renderSelf': function() { | 82 | 'renderSelf': function() { |
86 | var initiallySelectedOptions; | 83 | var initiallySelectedOptions; |
87 | 84 | ||
88 | this.append(this.element(), {tag:'div', id:this.getId('div'), cls:'binding', children:[ | 85 | this.append(this.element(), {tag:'div', id:this.getId('div'), cls:'binding', children:[ |
89 | {tag:'span', cls:'formFieldName', html:this.formFieldName()}, | 86 | {tag:'span', cls:'formFieldName', html:this.formFieldName()}, |
90 | {tag:'span', cls:'fieldLock', id:this.getId('isHidden'), children:[ | 87 | {tag:'span', cls:'fieldLock', id:this.getId('isHidden'), children:[ |
91 | {tag:'a', href:'#', id:this.getId('showHide'), html:' '} | 88 | {tag:'a', href:'#', id:this.getId('showHide'), html:' '} |
92 | ]}, | 89 | ]}, |
93 | {tag:'input', id:this.getId('input'), cls:'formFieldExampleValue', disabled:true, value:''}, | 90 | {tag:'input', id:this.getId('input'), cls:'formFieldExampleValue', disabled:true, value:''}, |
94 | {tag:'select', name:this.formFieldName(), id:this.getId('select'), cls:'formFieldMatchinCardField', children: | 91 | {tag:'select', name:this.formFieldName(), id:this.getId('select'), cls:'formFieldMatchinCardField', children: |
95 | MochiKit.Base.flattenArguments( | 92 | MochiKit.Base.flattenArguments( |
96 | {tag:'option', value:'---', html:"---"}, | 93 | {tag:'option', value:'---', html:"---"}, |
97 | MochiKit.Base.map( | 94 | MochiKit.Base.map( |
98 | MochiKit.Base.bind(function (aField) { return {tag:'option', value:aField['reference'], html:aField['label']}; }, this), | 95 | MochiKit.Base.bind(function (aField) { return {tag:'option', value:aField['reference'], html:aField['label']}; }, this), |
99 | this.fields() | 96 | this.fields() |
100 | ) | 97 | ) |
101 | ) | 98 | ) |
102 | } | 99 | } |
103 | ]}); | 100 | ]}); |
104 | 101 | ||
105 | MochiKit.Signal.connect(this.getElement('select'), 'onchange', this, 'handleSelectChange'); | 102 | MochiKit.Signal.connect(this.getElement('select'), 'onchange', this, 'handleSelectChange'); |
106 | MochiKit.Signal.connect(this.getElement('showHide'), 'onclick', this, 'handleShowHide'); | 103 | MochiKit.Signal.connect(this.getElement('showHide'), 'onclick', this, 'handleShowHide'); |
107 | 104 | ||
108 | if (! MochiKit.Base.isUndefinedOrNull(this.initiallySelectedFieldKey())) { | 105 | if (! MochiKit.Base.isUndefinedOrNull(this.initiallySelectedFieldKey())) { |
109 | initiallySelectedOptions = MochiKit.Selector.findChildElements(this.element(), ['option[value=' + this.initiallySelectedFieldKey() + ']']); | 106 | initiallySelectedOptions = MochiKit.Selector.findChildElements(this.element(), ['option[value=' + this.initiallySelectedFieldKey() + ']']); |
110 | if (initiallySelectedOptions.length == 1) { | 107 | if (initiallySelectedOptions.length == 1) { |
111 | MochiKit.DOM.updateNodeAttributes(initiallySelectedOptions[0], {selected:true}); | 108 | MochiKit.DOM.updateNodeAttributes(initiallySelectedOptions[0], {selected:true}); |
112 | this.handleSelectChange(); | 109 | this.handleSelectChange(); |
113 | } | 110 | } |
114 | } | 111 | } |
115 | }, | 112 | }, |
116 | 113 | ||
117 | //------------------------------------------------------------------------- | 114 | //------------------------------------------------------------------------- |
118 | 115 | ||
119 | 'setFieldValue': function (aValue) { | 116 | 'setFieldValue': function (aValue) { |
120 | this.getElement('input').value = aValue; | 117 | this.getElement('input').value = aValue; |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingComponent.js index d254c29..5114b1d 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent = function(args) { | 28 | Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._tabPanelController = null; | 33 | this._tabPanelController = null; |
37 | 34 | ||
38 | this._initiallySelectedTab = args.selected || 'TYPE'; | 35 | this._initiallySelectedTab = args.selected || 'TYPE'; |
39 | this._tabPanelControllerConfiguration = { | 36 | this._tabPanelControllerConfiguration = { |
40 | 'LABEL': { | 37 | 'LABEL': { |
41 | tab:'labelTab', | 38 | tab:'labelTab', |
42 | panel:'labelTabpanel' | 39 | panel:'labelTabpanel' |
43 | }, | 40 | }, |
44 | 'TYPE': { | 41 | 'TYPE': { |
45 | tab:'typeTab', | 42 | tab:'typeTab', |
46 | panel:'typeTabpanel' | 43 | panel:'typeTabpanel' |
47 | }, | 44 | }, |
48 | 'CONFIGURATION': { | 45 | 'CONFIGURATION': { |
49 | tab:'configurationTab', | 46 | tab:'configurationTab', |
50 | panel:'configurationTabpanel' | 47 | panel:'configurationTabpanel' |
51 | }, | 48 | }, |
52 | 'BINDINGS': { | 49 | 'BINDINGS': { |
53 | tab:'bindingsTab', | 50 | tab:'bindingsTab', |
54 | panel:'bindingsTabpanel' | 51 | panel:'bindingsTabpanel' |
55 | }, | 52 | }, |
56 | 'FAVICON': { | 53 | 'FAVICON': { |
57 | tab:'faviconTab', | 54 | tab:'faviconTab', |
58 | panel:'faviconTabpanel' | 55 | panel:'faviconTabpanel' |
59 | }, | 56 | }, |
60 | 'DONE': { | 57 | 'DONE': { |
61 | tab:'doneTab', | 58 | tab:'doneTab', |
62 | panel:'doneTabpanel' | 59 | panel:'doneTabpanel' |
63 | } | 60 | } |
64 | }; | 61 | }; |
65 | 62 | ||
66 | this._directLoginReference = null; | 63 | this._directLoginReference = null; |
67 | 64 | ||
68 | this._directLoginFavicon = null; | 65 | this._directLoginFavicon = null; |
69 | 66 | ||
70 | this._updateFaviconCounter = 0; | 67 | this._updateFaviconCounter = 0; |
71 | this._faviconComponent = null; | 68 | this._faviconComponent = null; |
72 | 69 | ||
73 | this._bindingComponents= []; | 70 | this._bindingComponents= []; |
74 | this._formValueComponents = []; | 71 | this._formValueComponents = []; |
75 | 72 | ||
76 | return this; | 73 | return this; |
77 | } | 74 | } |
78 | 75 | ||
79 | //============================================================================= | 76 | //============================================================================= |
80 | 77 | ||
81 | //Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 78 | //Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
82 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent, Clipperz.PM.UI.Common.Components.TabPanelComponent, { | 79 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent, Clipperz.PM.UI.Common.Components.TabPanelComponent, { |
83 | 80 | ||
84 | //------------------------------------------------------------------------- | 81 | //------------------------------------------------------------------------- |
85 | 82 | ||
86 | 'toString': function () { | 83 | 'toString': function () { |
87 | return "Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent component"; | 84 | return "Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent component"; |
88 | }, | 85 | }, |
89 | 86 | ||
90 | //========================================================================= | 87 | //========================================================================= |
91 | 88 | ||
92 | 'directLoginReference': function () { | 89 | 'directLoginReference': function () { |
93 | return this._directLoginReference; | 90 | return this._directLoginReference; |
94 | }, | 91 | }, |
95 | 92 | ||
96 | //------------------------------------------------------------------------- | 93 | //------------------------------------------------------------------------- |
97 | 94 | ||
98 | 'setDirectLoginReference': function (aDirectLoginReference) { | 95 | 'setDirectLoginReference': function (aDirectLoginReference) { |
99 | this._directLoginReference = aDirectLoginReference; | 96 | this._directLoginReference = aDirectLoginReference; |
100 | 97 | ||
101 | return this._directLoginReference; | 98 | return this._directLoginReference; |
102 | }, | 99 | }, |
103 | 100 | ||
104 | //========================================================================= | 101 | //========================================================================= |
105 | 102 | ||
106 | 'label': function () { | 103 | 'label': function () { |
107 | return this.getElement('label').value | 104 | return this.getElement('label').value |
108 | }, | 105 | }, |
109 | 106 | ||
110 | 'setLabel': function (aValue) { | 107 | 'setLabel': function (aValue) { |
111 | //console.log("##> LABEL: " + aValue); | 108 | //console.log("##> LABEL: " + aValue); |
112 | this.getElement('label').value = (aValue ? aValue : ''); | 109 | this.getElement('label').value = (aValue ? aValue : ''); |
113 | }, | 110 | }, |
114 | 111 | ||
115 | //------------------------------------------------------------------------- | 112 | //------------------------------------------------------------------------- |
116 | 113 | ||
117 | 'favicon': function () { | 114 | 'favicon': function () { |
118 | return this.getElement('faviconURL').value; | 115 | return this.getElement('faviconURL').value; |
119 | }, | 116 | }, |
120 | 117 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingFormValueComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingFormValueComponent.js index b91eb98..fa57233 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingFormValueComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingFormValueComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent = function(args) { | 28 | Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._formFieldName = args.formFieldName|| Clipperz.Base.exception.raise('MandatoryParameter'); | 33 | this._formFieldName = args.formFieldName|| Clipperz.Base.exception.raise('MandatoryParameter'); |
37 | this._fieldOptions = args.fieldOptions || Clipperz.Base.exception.raise('MandatoryParameter'); | 34 | this._fieldOptions = args.fieldOptions || Clipperz.Base.exception.raise('MandatoryParameter'); |
38 | this._initialValue = args.initialValue || null; | 35 | this._initialValue = args.initialValue || null; |
39 | 36 | ||
40 | return this; | 37 | return this; |
41 | } | 38 | } |
42 | 39 | ||
43 | //============================================================================= | 40 | //============================================================================= |
44 | 41 | ||
45 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
46 | 43 | ||
47 | //------------------------------------------------------------------------- | 44 | //------------------------------------------------------------------------- |
48 | 45 | ||
49 | 'toString': function () { | 46 | 'toString': function () { |
50 | return "Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent component"; | 47 | return "Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent component"; |
51 | }, | 48 | }, |
52 | 49 | ||
53 | //------------------------------------------------------------------------- | 50 | //------------------------------------------------------------------------- |
54 | 51 | ||
55 | 'formFieldName': function () { | 52 | 'formFieldName': function () { |
56 | return this._formFieldName; | 53 | return this._formFieldName; |
57 | }, | 54 | }, |
58 | 55 | ||
59 | //------------------------------------------------------------------------- | 56 | //------------------------------------------------------------------------- |
60 | 57 | ||
61 | 'fieldOptions': function () { | 58 | 'fieldOptions': function () { |
62 | return this._fieldOptions; | 59 | return this._fieldOptions; |
63 | }, | 60 | }, |
64 | 61 | ||
65 | 'fieldType': function () { | 62 | 'fieldType': function () { |
66 | return this.fieldOptions()['type']; | 63 | return this.fieldOptions()['type']; |
67 | }, | 64 | }, |
68 | 65 | ||
69 | 'optionValues': function () { | 66 | 'optionValues': function () { |
70 | return MochiKit.Base.map(function (anOptionValue) { | 67 | return MochiKit.Base.map(function (anOptionValue) { |
71 | return { | 68 | return { |
72 | 'label': anOptionValue['label'] || anOptionValue['value'], | 69 | 'label': anOptionValue['label'] || anOptionValue['value'], |
73 | 'value': anOptionValue['value'] | 70 | 'value': anOptionValue['value'] |
74 | } | 71 | } |
75 | }, this.fieldOptions()['options']); | 72 | }, this.fieldOptions()['options']); |
76 | }, | 73 | }, |
77 | 74 | ||
78 | //------------------------------------------------------------------------- | 75 | //------------------------------------------------------------------------- |
79 | 76 | ||
80 | 'selectedValue': function () { | 77 | 'selectedValue': function () { |
81 | var result; | 78 | var result; |
82 | 79 | ||
83 | result = this.getElement('select').value; | 80 | result = this.getElement('select').value; |
84 | 81 | ||
85 | if (result == '---') { | 82 | if (result == '---') { |
86 | result = null; | 83 | result = null; |
87 | } | 84 | } |
88 | 85 | ||
89 | return result; | 86 | return result; |
90 | }, | 87 | }, |
91 | 88 | ||
92 | 'initialValue': function () { | 89 | 'initialValue': function () { |
93 | return this._initialValue; | 90 | return this._initialValue; |
94 | }, | 91 | }, |
95 | 92 | ||
96 | //========================================================================= | 93 | //========================================================================= |
97 | 94 | ||
98 | 'renderSelf': function() { | 95 | 'renderSelf': function() { |
99 | //console.log(">>> DirectLoginEditingFormValueComponent.renderSelf"); | 96 | //console.log(">>> DirectLoginEditingFormValueComponent.renderSelf"); |
100 | //console.log("FIELD OPTIONS", this.fieldOptions()); | 97 | //console.log("FIELD OPTIONS", this.fieldOptions()); |
101 | //console.log("OPTION VALUES", this.optionValues()); | 98 | //console.log("OPTION VALUES", this.optionValues()); |
102 | this.append(this.element(), {tag:'div', id:this.getId('div'), cls:'formValue', children:[ | 99 | this.append(this.element(), {tag:'div', id:this.getId('div'), cls:'formValue', children:[ |
103 | {tag:'span', cls:'formFieldName', html:this.formFieldName()}, | 100 | {tag:'span', cls:'formFieldName', html:this.formFieldName()}, |
104 | {tag:'div', id:this.getId('values')} | 101 | {tag:'div', id:this.getId('values')} |
105 | ]}); | 102 | ]}); |
106 | 103 | ||
107 | if ((this.fieldType() == 'radio') || (this.fieldType() == 'select')) { | 104 | if ((this.fieldType() == 'radio') || (this.fieldType() == 'select')) { |
108 | this.append(this.getElement('values'), | 105 | this.append(this.getElement('values'), |
109 | {tag:'select', name:this.formFieldName(), id:this.getId('select'), cls:'formFieldMatchinCardField', children: | 106 | {tag:'select', name:this.formFieldName(), id:this.getId('select'), cls:'formFieldMatchinCardField', children: |
110 | MochiKit.Base.flattenArguments( | 107 | MochiKit.Base.flattenArguments( |
111 | // {tag:'option', value:'---', html:"---"}, | 108 | // {tag:'option', value:'---', html:"---"}, |
112 | MochiKit.Base.map( | 109 | MochiKit.Base.map( |
113 | MochiKit.Base.bind(function (aValue) { return {tag:'option', value:aValue['value'], html:aValue['label']}; }, this), | 110 | MochiKit.Base.bind(function (aValue) { return {tag:'option', value:aValue['value'], html:aValue['label']}; }, this), |
114 | this.optionValues() | 111 | this.optionValues() |
115 | ) | 112 | ) |
116 | ) | 113 | ) |
117 | } | 114 | } |
118 | ); | 115 | ); |
119 | 116 | ||
120 | MochiKit.Signal.connect(this.getElement('select'), 'onchange', this, 'handleSelectChange'); | 117 | MochiKit.Signal.connect(this.getElement('select'), 'onchange', this, 'handleSelectChange'); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginsColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginsColumnManager.js index 1f49575..d8dc941 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginsColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginsColumnManager.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | //############################################################################# | 28 | //############################################################################# |
32 | 29 | ||
33 | Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager = function(args) { | 30 | Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager = function(args) { |
34 | args = args || {}; | 31 | args = args || {}; |
35 | Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager.superclass.constructor.call(this, args); | 32 | Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager.superclass.constructor.call(this, args); |
36 | 33 | ||
37 | this._enterLeaveCounter = 0; | 34 | this._enterLeaveCounter = 0; |
38 | this._selectedRowObject = null; | 35 | this._selectedRowObject = null; |
39 | 36 | ||
40 | return this; | 37 | return this; |
41 | } | 38 | } |
42 | 39 | ||
43 | //============================================================================= | 40 | //============================================================================= |
44 | 41 | ||
45 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { | 42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { |
46 | 43 | ||
47 | 'toString': function () { | 44 | 'toString': function () { |
48 | return "Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager component"; | 45 | return "Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager component"; |
49 | }, | 46 | }, |
50 | 47 | ||
51 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
52 | 49 | ||
53 | 'renderHeader': function(aTRElement) { | 50 | 'renderHeader': function(aTRElement) { |
54 | Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager.superclass.renderHeader.call(this, aTRElement); | 51 | Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager.superclass.renderHeader.call(this, aTRElement); |
55 | 52 | ||
56 | Clipperz.DOM.Helper.append(MochiKit.DOM.currentDocument().body, {tag:'div', cls:'DirectLoginListPopup', id:this.getId('DirectLoginListPopup'), children:[ | 53 | Clipperz.DOM.Helper.append(MochiKit.DOM.currentDocument().body, {tag:'div', cls:'DirectLoginListPopup', id:this.getId('DirectLoginListPopup'), children:[ |
57 | {tag:'div', cls:'DirectLoginListPopup_body', children:[ | 54 | {tag:'div', cls:'DirectLoginListPopup_body', children:[ |
58 | {tag:'ul', id:this.getId('DirectLoginListPopup_list'), children:[ | 55 | {tag:'ul', id:this.getId('DirectLoginListPopup_list'), children:[ |
59 | // {tag:'li', children:[ | 56 | // {tag:'li', children:[ |
60 | // {tag:'img', cls:'favicon', src:'http://www.microsoft.com/favicon.ico'}, | 57 | // {tag:'img', cls:'favicon', src:'http://www.microsoft.com/favicon.ico'}, |
61 | // {tag:'a', href:'#', html:"Google Mail"} | 58 | // {tag:'a', href:'#', html:"Google Mail"} |
62 | // ]}, | 59 | // ]}, |
63 | // ... | 60 | // ... |
64 | ]} | 61 | ]} |
65 | ]}, | 62 | ]}, |
66 | {tag:'div', cls:'DirectLoginListPopup_footer'} | 63 | {tag:'div', cls:'DirectLoginListPopup_footer'} |
67 | ]}); | 64 | ]}); |
68 | 65 | ||
69 | MochiKit.Style.hideElement(this.getId('DirectLoginListPopup')); | 66 | MochiKit.Style.hideElement(this.getId('DirectLoginListPopup')); |
70 | 67 | ||
71 | //BEWARE: use MochiKit.Signal.connect instead of this.connectEvent, as the HEADER is NOT redrawn after each refresh | 68 | //BEWARE: use MochiKit.Signal.connect instead of this.connectEvent, as the HEADER is NOT redrawn after each refresh |
72 | MochiKit.Signal.connect(this.getId('DirectLoginListPopup'), 'onmouseenter', this, 'handleDirectLoginListPopupEnter'); | 69 | MochiKit.Signal.connect(this.getId('DirectLoginListPopup'), 'onmouseenter', this, 'handleDirectLoginListPopupEnter'); |
73 | MochiKit.Signal.connect(this.getId('DirectLoginListPopup'), 'onmouseleave', this, 'handleDirectLoginListPopupLeave'); | 70 | MochiKit.Signal.connect(this.getId('DirectLoginListPopup'), 'onmouseleave', this, 'handleDirectLoginListPopupLeave'); |
74 | }, | 71 | }, |
75 | 72 | ||
76 | //------------------------------------------------------------------------- | 73 | //------------------------------------------------------------------------- |
77 | 74 | ||
78 | 'renderCell': function(aRowElement, anObject) { | 75 | 'renderCell': function(aRowElement, anObject) { |
79 | var i,c; | 76 | var i,c; |
80 | var directLoginsInfo; | 77 | var directLoginsInfo; |
81 | 78 | ||
82 | directLoginsInfo = anObject[this.name()]; | 79 | directLoginsInfo = anObject[this.name()]; |
83 | 80 | ||
84 | TDElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:'card_directLogins'}); | 81 | TDElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:'card_directLogins'}); |
85 | 82 | ||
86 | c = Math.min(2, directLoginsInfo.length); | 83 | c = Math.min(2, directLoginsInfo.length); |
87 | for (i=0; i<c; i++) { | 84 | for (i=0; i<c; i++) { |
88 | var elementID; | 85 | var elementID; |
89 | 86 | ||
90 | elementID = 'directLogin_' + directLoginsInfo[i]['_reference']; | 87 | elementID = 'directLogin_' + directLoginsInfo[i]['_reference']; |
91 | 88 | ||
92 | Clipperz.DOM.Helper.append(TDElement, {tag:'div', cls:'card_directLogin', children:[ | 89 | Clipperz.DOM.Helper.append(TDElement, {tag:'div', cls:'card_directLogin', children:[ |
93 | {tag:'div', cls:'card_directLogin_body', children:[ | 90 | {tag:'div', cls:'card_directLogin_body', children:[ |
94 | {tag:'a', href:'#', id:elementID, html:directLoginsInfo[i]['label']} | 91 | {tag:'a', href:'#', id:elementID, html:directLoginsInfo[i]['label']} |
95 | ]} | 92 | ]} |
96 | ]}); | 93 | ]}); |
97 | // MochiKit.Signal.connect(elementID, 'onclick', MochiKit.Base.method(this, 'handleDirectLoginClick', directLoginsInfo[i]['_rowObject'])); | 94 | // MochiKit.Signal.connect(elementID, 'onclick', MochiKit.Base.method(this, 'handleDirectLoginClick', directLoginsInfo[i]['_rowObject'])); |
98 | this.connectEvent(elementID, 'onclick', MochiKit.Base.method(this, 'handleDirectLoginClick', directLoginsInfo[i]['_rowObject'])); | 95 | this.connectEvent(elementID, 'onclick', MochiKit.Base.method(this, 'handleDirectLoginClick', directLoginsInfo[i]['_rowObject'])); |
99 | } | 96 | } |
100 | 97 | ||
101 | if (directLoginsInfo.length > 2) { | 98 | if (directLoginsInfo.length > 2) { |
102 | var ellipsesElement; | 99 | var ellipsesElement; |
103 | 100 | ||
104 | ellipsesElement = Clipperz.DOM.Helper.append(TDElement, {tag:'div', cls:'card_directLogin_ellipses', children:[ | 101 | ellipsesElement = Clipperz.DOM.Helper.append(TDElement, {tag:'div', cls:'card_directLogin_ellipses', children:[ |
105 | {tag:'div', cls:'card_directLogin_ellipses_body', children:[ | 102 | {tag:'div', cls:'card_directLogin_ellipses_body', children:[ |
106 | {tag:'span', html:'…'} | 103 | {tag:'span', html:'…'} |
107 | ]} | 104 | ]} |
108 | ]}); | 105 | ]}); |
109 | 106 | ||
110 | /// MochiKit.Signal.connect(ellipsesElement, 'onmouseenter', MochiKit.Base.method(this, 'handleEllipsesEnter', anObject)); | 107 | /// MochiKit.Signal.connect(ellipsesElement, 'onmouseenter', MochiKit.Base.method(this, 'handleEllipsesEnter', anObject)); |
111 | /// MochiKit.Signal.connect(ellipsesElement, 'onmouseleave', MochiKit.Base.method(this, 'handleEllipsesLeave')); | 108 | /// MochiKit.Signal.connect(ellipsesElement, 'onmouseleave', MochiKit.Base.method(this, 'handleEllipsesLeave')); |
112 | // MochiKit.Signal.connect(TDElement, 'onmouseleave', MochiKit.Base.method(this, 'handleTDLeave')); | 109 | // MochiKit.Signal.connect(TDElement, 'onmouseleave', MochiKit.Base.method(this, 'handleTDLeave')); |
113 | this.connectEvent(TDElement, 'onmouseleave', MochiKit.Base.method(this, 'handleTDLeave')); | 110 | this.connectEvent(TDElement, 'onmouseleave', MochiKit.Base.method(this, 'handleTDLeave')); |
114 | } | 111 | } |
115 | // MochiKit.Signal.connect(TDElement, 'onmouseenter', MochiKit.Base.method(this, 'handleTDEnter', anObject)); | 112 | // MochiKit.Signal.connect(TDElement, 'onmouseenter', MochiKit.Base.method(this, 'handleTDEnter', anObject)); |
116 | this.connectEvent(TDElement, 'onmouseenter', MochiKit.Base.method(this, 'handleTDEnter', anObject)); | 113 | this.connectEvent(TDElement, 'onmouseenter', MochiKit.Base.method(this, 'handleTDEnter', anObject)); |
117 | 114 | ||
118 | }, | 115 | }, |
119 | 116 | ||
120 | //========================================================================= | 117 | //========================================================================= |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/FaviconColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/FaviconColumnManager.js index 19d1635..6297002 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/FaviconColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/FaviconColumnManager.js | |||
@@ -1,89 +1,86 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | //############################################################################# | 28 | //############################################################################# |
32 | 29 | ||
33 | Clipperz.PM.UI.Web.Components.FaviconColumnManager = function(args) { | 30 | Clipperz.PM.UI.Web.Components.FaviconColumnManager = function(args) { |
34 | args = args || {}; | 31 | args = args || {}; |
35 | Clipperz.PM.UI.Web.Components.FaviconColumnManager.superclass.constructor.call(this, args); | 32 | Clipperz.PM.UI.Web.Components.FaviconColumnManager.superclass.constructor.call(this, args); |
36 | 33 | ||
37 | return this; | 34 | return this; |
38 | } | 35 | } |
39 | 36 | ||
40 | //============================================================================= | 37 | //============================================================================= |
41 | 38 | ||
42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.FaviconColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { | 39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.FaviconColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { |
43 | 40 | ||
44 | 'toString': function () { | 41 | 'toString': function () { |
45 | return "Clipperz.PM.UI.Web.Components.FaviconColumnManager component"; | 42 | return "Clipperz.PM.UI.Web.Components.FaviconColumnManager component"; |
46 | }, | 43 | }, |
47 | 44 | ||
48 | //------------------------------------------------------------------------- | 45 | //------------------------------------------------------------------------- |
49 | 46 | ||
50 | 'renderCell': function(aRowElement, anObject) { | 47 | 'renderCell': function(aRowElement, anObject) { |
51 | varfaviconImageElement; | 48 | varfaviconImageElement; |
52 | var faviconUrl; | 49 | var faviconUrl; |
53 | 50 | ||
54 | faviconImageElement = this.getId('favicon'); | 51 | faviconImageElement = this.getId('favicon'); |
55 | faviconUrl = anObject[this.name()]; | 52 | faviconUrl = anObject[this.name()]; |
56 | 53 | ||
57 | if (faviconUrl == null) { | 54 | if (faviconUrl == null) { |
58 | faviconUrl = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); | 55 | faviconUrl = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); |
59 | } | 56 | } |
60 | 57 | ||
61 | Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ | 58 | Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ |
62 | {tag:'img', id:faviconImageElement, src:faviconUrl} | 59 | {tag:'img', id:faviconImageElement, src:faviconUrl} |
63 | ]}); | 60 | ]}); |
64 | 61 | ||
65 | MochiKit.Signal.connect(faviconImageElement, 'onload', this, 'handleLoadedFaviconImage'); | 62 | MochiKit.Signal.connect(faviconImageElement, 'onload', this, 'handleLoadedFaviconImage'); |
66 | MochiKit.Signal.connect(faviconImageElement, 'onerror', this, 'handleMissingFaviconImage'); | 63 | MochiKit.Signal.connect(faviconImageElement, 'onerror', this, 'handleMissingFaviconImage'); |
67 | MochiKit.Signal.connect(faviconImageElement, 'onabort', this, 'handleMissingFaviconImage'); | 64 | MochiKit.Signal.connect(faviconImageElement, 'onabort', this, 'handleMissingFaviconImage'); |
68 | }, | 65 | }, |
69 | 66 | ||
70 | //----------------------------------------------------- | 67 | //----------------------------------------------------- |
71 | 68 | ||
72 | 'handleLoadedFaviconImage': function(anEvent) { | 69 | 'handleLoadedFaviconImage': function(anEvent) { |
73 | MochiKit.Signal.disconnectAllTo(anEvent.src()); | 70 | MochiKit.Signal.disconnectAllTo(anEvent.src()); |
74 | if (anEvent.src().complete == false) { | 71 | if (anEvent.src().complete == false) { |
75 | anEvent.src().src = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); | 72 | anEvent.src().src = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); |
76 | } | 73 | } |
77 | }, | 74 | }, |
78 | 75 | ||
79 | //----------------------------------------------------- | 76 | //----------------------------------------------------- |
80 | 77 | ||
81 | 'handleMissingFaviconImage': function(anEvent) { | 78 | 'handleMissingFaviconImage': function(anEvent) { |
82 | MochiKit.Signal.disconnectAllTo(anEvent.src()); | 79 | MochiKit.Signal.disconnectAllTo(anEvent.src()); |
83 | anEvent.src().src = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); | 80 | anEvent.src().src = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); |
84 | }, | 81 | }, |
85 | 82 | ||
86 | //----------------------------------------------------- | 83 | //----------------------------------------------------- |
87 | '__syntax_fix__' : 'syntax fix' | 84 | '__syntax_fix__' : 'syntax fix' |
88 | }); | 85 | }); |
89 | 86 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/GridComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/GridComponent.js index 8b3e6c9..51d55f4 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/GridComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/GridComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.GridComponent = function(args) { | 28 | Clipperz.PM.UI.Web.Components.GridComponent = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.GridComponent.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.GridComponent.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._columnsManagers = args.columnsManagers; | 33 | this._columnsManagers = args.columnsManagers; |
37 | 34 | ||
38 | this._rowsObjects = []; | 35 | this._rowsObjects = []; |
39 | this._noRowsGridComponent = null; | 36 | this._noRowsGridComponent = null; |
40 | 37 | ||
41 | this._slots = { | 38 | this._slots = { |
42 | 'headerSlot':this.getId('headerSlot') | 39 | 'headerSlot':this.getId('headerSlot') |
43 | }; | 40 | }; |
44 | 41 | ||
45 | return this; | 42 | return this; |
46 | } | 43 | } |
47 | 44 | ||
48 | //============================================================================= | 45 | //============================================================================= |
49 | 46 | ||
50 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.GridComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 47 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.GridComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
51 | 48 | ||
52 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
53 | 50 | ||
54 | 'toString': function () { | 51 | 'toString': function () { |
55 | return "Clipperz.PM.UI.Web.Components.GridComponent component"; | 52 | return "Clipperz.PM.UI.Web.Components.GridComponent component"; |
56 | }, | 53 | }, |
57 | 54 | ||
58 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
59 | 56 | ||
60 | 'rows': function () { | 57 | 'rows': function () { |
61 | throw Clipperz.Base.exception.AbstractMethod; | 58 | throw Clipperz.Base.exception.AbstractMethod; |
62 | // return this._rows; | 59 | // return this._rows; |
63 | }, | 60 | }, |
64 | 61 | ||
65 | //------------------------------------------------------------------------- | 62 | //------------------------------------------------------------------------- |
66 | 63 | ||
67 | 'columnsManagers': function () { | 64 | 'columnsManagers': function () { |
68 | return this._columnsManagers; | 65 | return this._columnsManagers; |
69 | }, | 66 | }, |
70 | 67 | ||
71 | //------------------------------------------------------------------------- | 68 | //------------------------------------------------------------------------- |
72 | 69 | ||
73 | 'renderSelf': function(/*aContainer, aPosition*/) { | 70 | 'renderSelf': function(/*aContainer, aPosition*/) { |
74 | this.append(this.element(), [ | 71 | this.append(this.element(), [ |
75 | {tag:'div', cls:'header', children:[ | 72 | {tag:'div', cls:'header', children:[ |
76 | {tag:'form', id:this.getId('searchForm'), cls:'search', children:[ | 73 | {tag:'form', id:this.getId('searchForm'), cls:'search', children:[ |
77 | {tag:'div', cls:'search', children:[ | 74 | {tag:'div', cls:'search', children:[ |
78 | {tag:'input', type:'text', id:this.getId('search'), cls:'search', placeholder:"search", name:'textToSearch'/*, value:"clipperz"*/} | 75 | {tag:'input', type:'text', id:this.getId('search'), cls:'search', placeholder:"search", name:'textToSearch'/*, value:"clipperz"*/} |
79 | ]}, | 76 | ]}, |
80 | {tag:'div', cls:'clearSearchButton', id:this.getId('clearSearch')}, | 77 | {tag:'div', cls:'clearSearchButton', id:this.getId('clearSearch')}, |
81 | // {tag:'input', type:'button', cls:'searchButton', name:'searchButton', value:"search"}, | 78 | // {tag:'input', type:'button', cls:'searchButton', name:'searchButton', value:"search"}, |
82 | {tag:'div', cls:'headerSlot', id:this.getId('headerSlot')} | 79 | {tag:'div', cls:'headerSlot', id:this.getId('headerSlot')} |
83 | ]} | 80 | ]} |
84 | ]}, | 81 | ]}, |
85 | {tag:'div', cls:'body', children:[ | 82 | {tag:'div', cls:'body', children:[ |
86 | {tag:'div', cls:'rows', id:this.getId('rows'), children:[ | 83 | {tag:'div', cls:'rows', id:this.getId('rows'), children:[ |
87 | {tag:'table', cellpadding:'0', cellspacing:'0', cls:'rows', children:[ | 84 | {tag:'table', cellpadding:'0', cellspacing:'0', cls:'rows', children:[ |
88 | {tag:'thead', children:[ | 85 | {tag:'thead', children:[ |
89 | {tag:'tr', id:this.getId('thead_tr'), children:[]} | 86 | {tag:'tr', id:this.getId('thead_tr'), children:[]} |
90 | ]}, | 87 | ]}, |
91 | {tag:'tbody', id:this.getId('gridRows'), children:[]} | 88 | {tag:'tbody', id:this.getId('gridRows'), children:[]} |
92 | ]} | 89 | ]} |
93 | ]}, | 90 | ]}, |
94 | {tag:'div', cls:'noRowsBlock', id:this.getId('noRowsBlock'), children:[]} | 91 | {tag:'div', cls:'noRowsBlock', id:this.getId('noRowsBlock'), children:[]} |
95 | ]}, | 92 | ]}, |
96 | {tag:'div', cls:'footer'} | 93 | {tag:'div', cls:'footer'} |
97 | ]); | 94 | ]); |
98 | 95 | ||
99 | this.renderHeader(); | 96 | this.renderHeader(); |
100 | MochiKit.Signal.connect(this.getId('clearSearch'), 'onclick', this, 'clearSearchHandler'); | 97 | MochiKit.Signal.connect(this.getId('clearSearch'), 'onclick', this, 'clearSearchHandler'); |
101 | }, | 98 | }, |
102 | 99 | ||
103 | //------------------------------------------------------------------------- | 100 | //------------------------------------------------------------------------- |
104 | 101 | ||
105 | 'renderHeader': function () { | 102 | 'renderHeader': function () { |
106 | var headerElement; | 103 | var headerElement; |
107 | 104 | ||
108 | headerElement = this.getElement('thead_tr'); | 105 | headerElement = this.getElement('thead_tr'); |
109 | headerElement.innerHTML = ""; | 106 | headerElement.innerHTML = ""; |
110 | 107 | ||
111 | MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) { | 108 | MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) { |
112 | aColumnManager.renderHeader(headerElement); | 109 | aColumnManager.renderHeader(headerElement); |
113 | }); | 110 | }); |
114 | }, | 111 | }, |
115 | 112 | ||
116 | //------------------------------------------------------------------------- | 113 | //------------------------------------------------------------------------- |
117 | 114 | ||
118 | 'update': function (someObjects) { | 115 | 'update': function (someObjects) { |
119 | this._rowsObjects = someObjects | 116 | this._rowsObjects = someObjects |
120 | this.refresh(); | 117 | this.refresh(); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ImageColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ImageColumnManager.js index 07b8dcc..3e03fcf 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ImageColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ImageColumnManager.js | |||
@@ -1,68 +1,65 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | //############################################################################# | 28 | //############################################################################# |
32 | 29 | ||
33 | Clipperz.PM.UI.Web.Components.ImageColumnManager = function(args) { | 30 | Clipperz.PM.UI.Web.Components.ImageColumnManager = function(args) { |
34 | args = args || {}; | 31 | args = args || {}; |
35 | Clipperz.PM.UI.Web.Components.ImageColumnManager.superclass.constructor.call(this, args); | 32 | Clipperz.PM.UI.Web.Components.ImageColumnManager.superclass.constructor.call(this, args); |
36 | 33 | ||
37 | return this; | 34 | return this; |
38 | } | 35 | } |
39 | 36 | ||
40 | //============================================================================= | 37 | //============================================================================= |
41 | 38 | ||
42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ImageColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { | 39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ImageColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { |
43 | 40 | ||
44 | 'toString': function () { | 41 | 'toString': function () { |
45 | return "Clipperz.PM.UI.Web.Components.ImageColumnManager component"; | 42 | return "Clipperz.PM.UI.Web.Components.ImageColumnManager component"; |
46 | }, | 43 | }, |
47 | 44 | ||
48 | //------------------------------------------------------------------------- | 45 | //------------------------------------------------------------------------- |
49 | 46 | ||
50 | 'renderCell': function(aRowElement, anObject) { | 47 | 'renderCell': function(aRowElement, anObject) { |
51 | Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ | 48 | Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ |
52 | {tag:'img', src:anObject[this.name()]} | 49 | {tag:'img', src:anObject[this.name()]} |
53 | ]}); | 50 | ]}); |
54 | 51 | ||
55 | // return Clipperz.Async.callbacks("ImageColumnManager.renderCell", [ | 52 | // return Clipperz.Async.callbacks("ImageColumnManager.renderCell", [ |
56 | // this.selector(), | 53 | // this.selector(), |
57 | // MochiKit.Base.bind(function (aValue) { | 54 | // MochiKit.Base.bind(function (aValue) { |
58 | // Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ | 55 | // Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ |
59 | // {tag:'img', src:aValue} | 56 | // {tag:'img', src:aValue} |
60 | // ]}); | 57 | // ]}); |
61 | // }, this) | 58 | // }, this) |
62 | // ], {trace:false}, anObject); | 59 | // ], {trace:false}, anObject); |
63 | }, | 60 | }, |
64 | 61 | ||
65 | //----------------------------------------------------- | 62 | //----------------------------------------------------- |
66 | '__syntax_fix__' : 'syntax fix' | 63 | '__syntax_fix__' : 'syntax fix' |
67 | }); | 64 | }); |
68 | 65 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LinkColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LinkColumnManager.js index e833190..f3f9cd5 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LinkColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LinkColumnManager.js | |||
@@ -1,92 +1,89 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | //############################################################################# | 28 | //############################################################################# |
32 | 29 | ||
33 | Clipperz.PM.UI.Web.Components.LinkColumnManager = function(args) { | 30 | Clipperz.PM.UI.Web.Components.LinkColumnManager = function(args) { |
34 | args = args || {}; | 31 | args = args || {}; |
35 | Clipperz.PM.UI.Web.Components.LinkColumnManager.superclass.constructor.call(this, args); | 32 | Clipperz.PM.UI.Web.Components.LinkColumnManager.superclass.constructor.call(this, args); |
36 | 33 | ||
37 | this._actionMethod = args.actionMethod || null; | 34 | this._actionMethod = args.actionMethod || null; |
38 | 35 | ||
39 | return this; | 36 | return this; |
40 | } | 37 | } |
41 | 38 | ||
42 | //============================================================================= | 39 | //============================================================================= |
43 | 40 | ||
44 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LinkColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { | 41 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LinkColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { |
45 | 42 | ||
46 | 'toString': function () { | 43 | 'toString': function () { |
47 | return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; | 44 | return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; |
48 | }, | 45 | }, |
49 | 46 | ||
50 | //------------------------------------------------------------------------- | 47 | //------------------------------------------------------------------------- |
51 | 48 | ||
52 | 'actionMethod': function () { | 49 | 'actionMethod': function () { |
53 | return this._actionMethod; | 50 | return this._actionMethod; |
54 | }, | 51 | }, |
55 | 52 | ||
56 | //------------------------------------------------------------------------- | 53 | //------------------------------------------------------------------------- |
57 | 54 | ||
58 | 'renderCell': function(aRowElement, anObject) { | 55 | 'renderCell': function(aRowElement, anObject) { |
59 | vartdElement; | 56 | vartdElement; |
60 | varlinkElement; | 57 | varlinkElement; |
61 | 58 | ||
62 | tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ | 59 | tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ |
63 | {tag:'span', children:[ | 60 | {tag:'span', children:[ |
64 | {tag:'a', href:'#', html:anObject[this.name()]} | 61 | {tag:'a', href:'#', html:anObject[this.name()]} |
65 | ]} | 62 | ]} |
66 | ]}); | 63 | ]}); |
67 | 64 | ||
68 | linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); | 65 | linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); |
69 | // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); | 66 | // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); |
70 | this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); | 67 | this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); |
71 | }, | 68 | }, |
72 | 69 | ||
73 | //----------------------------------------------------- | 70 | //----------------------------------------------------- |
74 | 71 | ||
75 | 'handleLinkClick': function (anObject, anEvent) { | 72 | 'handleLinkClick': function (anObject, anEvent) { |
76 | anEvent.preventDefault(); | 73 | anEvent.preventDefault(); |
77 | 74 | ||
78 | if (this.actionMethod() != null) { | 75 | if (this.actionMethod() != null) { |
79 | var deferredResult; | 76 | var deferredResult; |
80 | 77 | ||
81 | deferredResult = new Clipperz.Async.Deferred("LinkColumnManager.handleLinkClick", {trace:false}); | 78 | deferredResult = new Clipperz.Async.Deferred("LinkColumnManager.handleLinkClick", {trace:false}); |
82 | // deferredResult.addCallbackPass(MochiKit.Signal.signal, this, 'selectRow', anObject); | 79 | // deferredResult.addCallbackPass(MochiKit.Signal.signal, this, 'selectRow', anObject); |
83 | deferredResult.addCallback(this.actionMethod(), anObject, anEvent); | 80 | deferredResult.addCallback(this.actionMethod(), anObject, anEvent); |
84 | // deferredResult.addBothPass(MochiKit.Signal.signal, this, 'unselectRow', anObject); | 81 | // deferredResult.addBothPass(MochiKit.Signal.signal, this, 'unselectRow', anObject); |
85 | deferredResult.callback(); | 82 | deferredResult.callback(); |
86 | } | 83 | } |
87 | }, | 84 | }, |
88 | 85 | ||
89 | //----------------------------------------------------- | 86 | //----------------------------------------------------- |
90 | '__syntax_fix__' : 'syntax fix' | 87 | '__syntax_fix__' : 'syntax fix' |
91 | }); | 88 | }); |
92 | 89 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js index de20853..389d876 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/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 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.LoginForm = function(args) { | 28 | Clipperz.PM.UI.Web.Components.LoginForm = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | this._autocomplete = args.autocomplete || 'off'; | 31 | this._autocomplete = args.autocomplete || 'off'; |
35 | 32 | ||
36 | Clipperz.PM.UI.Web.Components.LoginForm.superclass.constructor.apply(this, arguments); | 33 | Clipperz.PM.UI.Web.Components.LoginForm.superclass.constructor.apply(this, arguments); |
37 | 34 | ||
38 | this._slots = { | 35 | this._slots = { |
39 | 'passphraseEntropy':this.getId('passphraseEntropy') | 36 | 'passphraseEntropy':this.getId('passphraseEntropy') |
40 | }; | 37 | }; |
41 | 38 | ||
42 | return this; | 39 | return this; |
43 | } | 40 | } |
44 | 41 | ||
45 | //============================================================================= | 42 | //============================================================================= |
46 | 43 | ||
47 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginForm, Clipperz.PM.UI.Common.Components.BaseComponent, { | 44 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginForm, Clipperz.PM.UI.Common.Components.BaseComponent, { |
48 | 45 | ||
49 | //------------------------------------------------------------------------- | 46 | //------------------------------------------------------------------------- |
50 | 47 | ||
51 | 'toString': function () { | 48 | 'toString': function () { |
52 | return "Clipperz.PM.UI.Web.Components.LoginForm component"; | 49 | return "Clipperz.PM.UI.Web.Components.LoginForm component"; |
53 | }, | 50 | }, |
54 | 51 | ||
55 | 'autocomplete': function () { | 52 | 'autocomplete': function () { |
56 | return this._autocomplete; | 53 | return this._autocomplete; |
57 | }, | 54 | }, |
58 | 55 | ||
59 | //------------------------------------------------------------------------- | 56 | //------------------------------------------------------------------------- |
60 | 57 | ||
61 | 'renderSelf': function() { | 58 | 'renderSelf': function() { |
62 | this.append(this.element(), {tag:'div', id:'loginBox', children:[ | 59 | this.append(this.element(), {tag:'div', id:'loginBox', children:[ |
63 | {tag:'div', cls:'header'}, | 60 | {tag:'div', cls:'header'}, |
64 | {tag:'div', cls:'body', id:this.getId('body'), children:[ | 61 | {tag:'div', cls:'body', id:this.getId('body'), children:[ |
65 | {tag:'div', id:this.getId('loginForm'), children:[ | 62 | {tag:'div', id:this.getId('loginForm'), children:[ |
66 | {tag:'div', children:[ | 63 | {tag:'div', children:[ |
67 | {tag:'h4', html:'Login'}, | 64 | {tag:'h4', html:'Login'}, |
68 | // {tag:'form', cls:'loginForm', autocomplete:this.autocomplete(), children:[ | 65 | // {tag:'form', cls:'loginForm', autocomplete:this.autocomplete(), children:[ |
69 | {tag:'form', id:this.getId('form'), cls:'loginForm', children:[ | 66 | {tag:'form', id:this.getId('form'), cls:'loginForm', children:[ |
70 | {tag:'label', html:'username', 'for':this.getId('usernameField')}, | 67 | {tag:'label', html:'username', 'for':this.getId('usernameField')}, |
71 | {tag:'input', id:this.getId('usernameField'), type:'text', cls:'username'/*, value:'joe'*/}, | 68 | {tag:'input', id:this.getId('usernameField'), type:'text', cls:'username'/*, value:'joe'*/}, |
72 | {tag:'ul', id:this.getId('passwordOptions'), children:[ | 69 | {tag:'ul', id:this.getId('passwordOptions'), children:[ |
73 | {tag:'li', id:this.getId('passphraseOption'), children:[ | 70 | {tag:'li', id:this.getId('passphraseOption'), children:[ |
74 | {tag:'label', html:'passphrase / OTP', 'for':this.getId('passphraseField')}, | 71 | {tag:'label', html:'passphrase / OTP', 'for':this.getId('passphraseField')}, |
75 | {tag:'input', id:this.getId('passphraseField'), type:'password', cls:'password'/*, value:'clipperz'*/} | 72 | {tag:'input', id:this.getId('passphraseField'), type:'password', cls:'password'/*, value:'clipperz'*/} |
76 | ]} //, | 73 | ]} //, |
77 | /* | 74 | /* |
78 | {tag:'li', id:this.getId('otpOption'), children:[ | 75 | {tag:'li', id:this.getId('otpOption'), children:[ |
79 | {tag:'label', html:'one-time password', 'for':this.getId('otpField_1')}, | 76 | {tag:'label', html:'one-time password', 'for':this.getId('otpField_1')}, |
80 | {tag:'input', id:this.getId('otpField_1'), type:'text', cls:'otp', value:'abcd-efgh'}, | 77 | {tag:'input', id:this.getId('otpField_1'), type:'text', cls:'otp', value:'abcd-efgh'}, |
81 | {tag:'input', id:this.getId('otpField_2'), type:'text', cls:'otp', value:'abcd-efgh'}, | 78 | {tag:'input', id:this.getId('otpField_2'), type:'text', cls:'otp', value:'abcd-efgh'}, |
82 | {tag:'input', id:this.getId('otpField_3'), type:'text', cls:'otp', value:'abcd-efgh'}, | 79 | {tag:'input', id:this.getId('otpField_3'), type:'text', cls:'otp', value:'abcd-efgh'}, |
83 | {tag:'input', id:this.getId('otpField_4'), type:'text', cls:'otp', value:'abcd-efgh'} | 80 | {tag:'input', id:this.getId('otpField_4'), type:'text', cls:'otp', value:'abcd-efgh'} |
84 | ]} | 81 | ]} |
85 | */ | 82 | */ |
86 | ]}, | 83 | ]}, |
87 | // {tag:'input', id:this.getId('otpCheckbox'), type:'checkbox', cls:'checkbox'}, | 84 | // {tag:'input', id:this.getId('otpCheckbox'), type:'checkbox', cls:'checkbox'}, |
88 | // {tag:'label', html:'use a one-time passphrase', 'for':this.getId('otpCheckbox'), cls:'checkbox'}, | 85 | // {tag:'label', html:'use a one-time passphrase', 'for':this.getId('otpCheckbox'), cls:'checkbox'}, |
89 | 86 | ||
90 | {tag:'div', cls:'translations', children:[ | 87 | {tag:'div', cls:'translations', children:[ |
91 | {tag:'h4', html:'choose your language'}, | 88 | {tag:'h4', html:'choose your language'}, |
92 | {tag:'ul', children:[ | 89 | {tag:'ul', children:[ |
93 | {tag:'li', cls:'selected', html:'english'}, | 90 | {tag:'li', cls:'selected', html:'english'}, |
94 | {tag:'li', html:'italiano'}, | 91 | {tag:'li', html:'italiano'}, |
95 | {tag:'li', html:'dutch'}, | 92 | {tag:'li', html:'dutch'}, |
96 | {tag:'li', html:'french'}, | 93 | {tag:'li', html:'french'}, |
97 | {tag:'li', html:'spanish'}, | 94 | {tag:'li', html:'spanish'}, |
98 | {tag:'li', html:'chinese'}, | 95 | {tag:'li', html:'chinese'}, |
99 | {tag:'li', html:'japanese'}, | 96 | {tag:'li', html:'japanese'}, |
100 | {tag:'li', html:'portugal'}, | 97 | {tag:'li', html:'portugal'}, |
101 | {tag:'li', html:'arabic'} | 98 | {tag:'li', html:'arabic'} |
102 | ]} | 99 | ]} |
103 | ]}, | 100 | ]}, |
104 | 101 | ||
105 | {tag:'input', id:this.getId('submitButton'), type:'submit', value:'login', cls:'submit'} | 102 | {tag:'input', id:this.getId('submitButton'), type:'submit', value:'login', cls:'submit'} |
106 | ]} | 103 | ]} |
107 | ]} | 104 | ]} |
108 | ]} | 105 | ]} |
109 | ]}, | 106 | ]}, |
110 | {tag:'div', cls:'footer'} | 107 | {tag:'div', cls:'footer'} |
111 | ]}); | 108 | ]}); |
112 | 109 | ||
113 | if (this.autocomplete() == 'off') { | 110 | if (this.autocomplete() == 'off') { |
114 | MochiKit.DOM.updateNodeAttributes(this.getElement('form'), {autocomplete:'off'}); | 111 | MochiKit.DOM.updateNodeAttributes(this.getElement('form'), {autocomplete:'off'}); |
115 | } | 112 | } |
116 | 113 | ||
117 | // Clipperz.Style.setBackgroundGradient(this.getElement('body'), {from:"#ff9955", to:"#ff6622"}) | 114 | // Clipperz.Style.setBackgroundGradient(this.getElement('body'), {from:"#ff9955", to:"#ff6622"}) |
118 | 115 | ||
119 | // this.setEntropyDisplay(new Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay(this.getElement('passphraseField'))); | 116 | // this.setEntropyDisplay(new Clipperz.PM.UI.Common.Components.PasswordEntropyDisplay(this.getElement('passphraseField'))); |
120 | 117 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js index 49c030d..2894af8 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.LoginPage = function(args) { | 28 | Clipperz.PM.UI.Web.Components.LoginPage = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.LoginPage.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.LoginPage.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._slots = { | 33 | this._slots = { |
37 | 'loginForm':this.getId('loginBoxSlot') | 34 | 'loginForm':this.getId('loginBoxSlot') |
38 | }; | 35 | }; |
39 | 36 | ||
40 | return this; | 37 | return this; |
41 | } | 38 | } |
42 | 39 | ||
43 | //============================================================================= | 40 | //============================================================================= |
44 | 41 | ||
45 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginPage, Clipperz.PM.UI.Common.Components.BaseComponent, { | 42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginPage, Clipperz.PM.UI.Common.Components.BaseComponent, { |
46 | 43 | ||
47 | //------------------------------------------------------------------------- | 44 | //------------------------------------------------------------------------- |
48 | 45 | ||
49 | 'toString': function () { | 46 | 'toString': function () { |
50 | return "Clipperz.PM.UI.Web.Components.LoginPage component"; | 47 | return "Clipperz.PM.UI.Web.Components.LoginPage component"; |
51 | }, | 48 | }, |
52 | 49 | ||
53 | //------------------------------------------------------------------------- | 50 | //------------------------------------------------------------------------- |
54 | 51 | ||
55 | 'renderSelf': function(/*aContainer, aPosition*/) { | 52 | 'renderSelf': function(/*aContainer, aPosition*/) { |
56 | this.append(this.element(), [ | 53 | this.append(this.element(), [ |
57 | {tag:'div', id:this.getId('loginBoxSlot')}, | 54 | {tag:'div', id:this.getId('loginBoxSlot')}, |
58 | {tag:'div', id:'main', children:[ | 55 | {tag:'div', id:'main', children:[ |
59 | {tag:'div', id:'featurePoints', children:[ | 56 | {tag:'div', id:'featurePoints', children:[ |
60 | {tag:'table', children:[ | 57 | {tag:'table', children:[ |
61 | {tag:'tr', children:[ | 58 | {tag:'tr', children:[ |
62 | {tag:'td', children:[ | 59 | {tag:'td', children:[ |
63 | {tag:'div', cls:'block', children:[ | 60 | {tag:'div', cls:'block', children:[ |
64 | {tag:'h3', html:'Clipperz is:'}, | 61 | {tag:'h3', html:'Clipperz is:'}, |
65 | {tag:'ul', children:[ | 62 | {tag:'ul', children:[ |
66 | {tag:'li', html:'a secure and simple password manager'}, | 63 | {tag:'li', html:'a secure and simple password manager'}, |
67 | {tag:'li', html:'an effective single sign-on solution'}, | 64 | {tag:'li', html:'an effective single sign-on solution'}, |
68 | {tag:'li', html:'a digital vault for your personal data'} | 65 | {tag:'li', html:'a digital vault for your personal data'} |
69 | ]} | 66 | ]} |
70 | ]}, | 67 | ]}, |
71 | {tag:'div', cls:'block', children:[ | 68 | {tag:'div', cls:'block', children:[ |
72 | {tag:'h3', html:'Clipperz benefits:'}, | 69 | {tag:'h3', html:'Clipperz benefits:'}, |
73 | {tag:'ul', children:[ | 70 | {tag:'ul', children:[ |
74 | {tag:'li', html:'free and completely anonymous'}, | 71 | {tag:'li', html:'free and completely anonymous'}, |
75 | {tag:'li', html:'access it any time from any computer'}, | 72 | {tag:'li', html:'access it any time from any computer'}, |
76 | {tag:'li', html:'no software to download and nothing to install'}, | 73 | {tag:'li', html:'no software to download and nothing to install'}, |
77 | {tag:'li', html:'avoid keeping secrets on your PC or on paper'} | 74 | {tag:'li', html:'avoid keeping secrets on your PC or on paper'} |
78 | ]} | 75 | ]} |
79 | ]} | 76 | ]} |
80 | ]}, {tag:'td', children:[ | 77 | ]}, {tag:'td', children:[ |
81 | {tag:'div', cls:'block', children:[ | 78 | {tag:'div', cls:'block', children:[ |
82 | {tag:'h3', html:'Clipperz security:'}, | 79 | {tag:'h3', html:'Clipperz security:'}, |
83 | {tag:'ul', children:[ | 80 | {tag:'ul', children:[ |
84 | {tag:'li', html:'your secretes are locally encrypted by your browser before being uploaded to Clipperz'}, | 81 | {tag:'li', html:'your secretes are locally encrypted by your browser before being uploaded to Clipperz'}, |
85 | {tag:'li', html:'the encryption key is a passphrase known only to you'}, | 82 | {tag:'li', html:'the encryption key is a passphrase known only to you'}, |
86 | {tag:'li', html:'Clipperz hosts your sensitive data in an encrypted form and could never access the data in its plain form'}, | 83 | {tag:'li', html:'Clipperz hosts your sensitive data in an encrypted form and could never access the data in its plain form'}, |
87 | {tag:'li', html:'Clipperz is built upon standard encryption schemes, nothing fancies of homemade'}, | 84 | {tag:'li', html:'Clipperz is built upon standard encryption schemes, nothing fancies of homemade'}, |
88 | {tag:'li', html:'you can review the source code anytime you like, but you need to know nothing about cryptography to be an happy user!'} | 85 | {tag:'li', html:'you can review the source code anytime you like, but you need to know nothing about cryptography to be an happy user!'} |
89 | ]} | 86 | ]} |
90 | ]} | 87 | ]} |
91 | ]} | 88 | ]} |
92 | ]} | 89 | ]} |
93 | ]} | 90 | ]} |
94 | ]}, | 91 | ]}, |
95 | {tag:'div', cls:'activeFeatures', children:[ | 92 | {tag:'div', cls:'activeFeatures', children:[ |
96 | {tag:'div', id:this.getId('registerButton'), cls:'createAccountLink', children:[ | 93 | {tag:'div', id:this.getId('registerButton'), cls:'createAccountLink', children:[ |
97 | {tag:'canvas', id:this.getId('registerButtonIcon')}, | 94 | {tag:'canvas', id:this.getId('registerButtonIcon')}, |
98 | {tag:'a', href:'#', id:this.getId('createAccountLink'), cls:'createAccountLink', children:[ | 95 | {tag:'a', href:'#', id:this.getId('createAccountLink'), cls:'createAccountLink', children:[ |
99 | {tag:'span', cls:'payoff', html:"Free sign up!"}, | 96 | {tag:'span', cls:'payoff', html:"Free sign up!"}, |
100 | {tag:'span', cls:'link', html:"Create account >>"} | 97 | {tag:'span', cls:'link', html:"Create account >>"} |
101 | ]} | 98 | ]} |
102 | ]}, | 99 | ]}, |
103 | {tag:'div', cls:'keepTogether', children:[ | 100 | {tag:'div', cls:'keepTogether', children:[ |
104 | {tag:'div', id:this.getId('screenshotLink'), cls:'screenshotLink', children:[ | 101 | {tag:'div', id:this.getId('screenshotLink'), cls:'screenshotLink', children:[ |
105 | {tag:'canvas', id:this.getId('lookIcon')}, | 102 | {tag:'canvas', id:this.getId('lookIcon')}, |
106 | {tag:'a', href:'#', cls:'screenshotLink', children:[ | 103 | {tag:'a', href:'#', cls:'screenshotLink', children:[ |
107 | {tag:'span', cls:'payoff', html:"Look Clipperz!"}, | 104 | {tag:'span', cls:'payoff', html:"Look Clipperz!"}, |
108 | {tag:'span', cls:'link', html:"screenshot tour >>"} | 105 | {tag:'span', cls:'link', html:"screenshot tour >>"} |
109 | ]} | 106 | ]} |
110 | ]}, | 107 | ]}, |
111 | {tag:'div', id:this.getId('offlineLink'), cls:'offlineLink', children:[ | 108 | {tag:'div', id:this.getId('offlineLink'), cls:'offlineLink', children:[ |
112 | {tag:'canvas', id:this.getId('downloadIcon')}, | 109 | {tag:'canvas', id:this.getId('downloadIcon')}, |
113 | {tag:'a', href:'#', cls:'offlineLink', children:[ | 110 | {tag:'a', href:'#', cls:'offlineLink', children:[ |
114 | {tag:'span', cls:'payoff', html:"Download!"}, | 111 | {tag:'span', cls:'payoff', html:"Download!"}, |
115 | {tag:'span', cls:'link', html:"Offline version >>"} | 112 | {tag:'span', cls:'link', html:"Offline version >>"} |
116 | ]} | 113 | ]} |
117 | ]} | 114 | ]} |
118 | ]} | 115 | ]} |
119 | ]} | 116 | ]} |
120 | ]} | 117 | ]} |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js index 03c7b9e..5d082b5 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.LoginProgress = function(args) { | 28 | Clipperz.PM.UI.Web.Components.LoginProgress = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.LoginProgress.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.LoginProgress.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._deferred = null; | 33 | this._deferred = null; |
37 | 34 | ||
38 | return this; | 35 | return this; |
39 | } | 36 | } |
40 | 37 | ||
41 | //============================================================================= | 38 | //============================================================================= |
42 | 39 | ||
43 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI.Common.Components.BaseComponent, { | 40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI.Common.Components.BaseComponent, { |
44 | 41 | ||
45 | //------------------------------------------------------------------------- | 42 | //------------------------------------------------------------------------- |
46 | 43 | ||
47 | 'toString': function () { | 44 | 'toString': function () { |
48 | return "Clipperz.PM.UI.Web.Components.LoginProgress component"; | 45 | return "Clipperz.PM.UI.Web.Components.LoginProgress component"; |
49 | }, | 46 | }, |
50 | 47 | ||
51 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
52 | 49 | ||
53 | 'deferred': function() { | 50 | 'deferred': function() { |
54 | return this._deferred; | 51 | return this._deferred; |
55 | }, | 52 | }, |
56 | 53 | ||
57 | 'setDeferred': function(aValue) { | 54 | 'setDeferred': function(aValue) { |
58 | this._deferred = aValue; | 55 | this._deferred = aValue; |
59 | }, | 56 | }, |
60 | 57 | ||
61 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
62 | 59 | ||
63 | 'renderSelf': function() { | 60 | 'renderSelf': function() { |
64 | // var loginProgressElement; | 61 | // var loginProgressElement; |
65 | // | 62 | // |
66 | // loginProgressElement = MochiKit.DOM.getElement('loginProgress'); | 63 | // loginProgressElement = MochiKit.DOM.getElement('loginProgress'); |
67 | // | 64 | // |
68 | // if (loginProgressElement == null) { | 65 | // if (loginProgressElement == null) { |
69 | // loginProgressElement = this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress'}, true); | 66 | // loginProgressElement = this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress'}, true); |
70 | // } | 67 | // } |
71 | 68 | ||
72 | //console.log(">> LoginProgress.renderSelf", this.element()); | 69 | //console.log(">> LoginProgress.renderSelf", this.element()); |
73 | this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress', children: [ | 70 | this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress', children: [ |
74 | // this.append(loginProgressElement, [ | 71 | // this.append(loginProgressElement, [ |
75 | {tag:'div', cls:'header', children:[ | 72 | {tag:'div', cls:'header', children:[ |
76 | {tag:'h3', id:this.getId('title'), html:"login progress"} | 73 | {tag:'h3', id:this.getId('title'), html:"login progress"} |
77 | ]}, | 74 | ]}, |
78 | {tag:'div', cls:'body', children:[ | 75 | {tag:'div', cls:'body', children:[ |
79 | {tag:'div', id:this.getId('progressBar')}, | 76 | {tag:'div', id:this.getId('progressBar')}, |
80 | {tag:'div', id:this.getId('errorBox'), cls:'errorBox', children:[ | 77 | {tag:'div', id:this.getId('errorBox'), cls:'errorBox', children:[ |
81 | // {tag:'div',cls:'img ALERT', children:[{tag:'div'}]}, | 78 | // {tag:'div',cls:'img ALERT', children:[{tag:'div'}]}, |
82 | {tag:'div',cls:'img ALERT', children:[{tag:'canvas', id:this.getId('canvas')}]}, | 79 | {tag:'div',cls:'img ALERT', children:[{tag:'canvas', id:this.getId('canvas')}]}, |
83 | {tag:'p', html:"Login failed"} | 80 | {tag:'p', html:"Login failed"} |
84 | ]} | 81 | ]} |
85 | ]}, | 82 | ]}, |
86 | {tag:'div', cls:'footer', children:[ | 83 | {tag:'div', cls:'footer', children:[ |
87 | {tag:'div', cls:'buttonArea', id:this.getId('buttonArea'), children:[ | 84 | {tag:'div', cls:'buttonArea', id:this.getId('buttonArea'), children:[ |
88 | {tag:'div', cls:'button', id:this.getId('button'), children:[ | 85 | {tag:'div', cls:'button', id:this.getId('button'), children:[ |
89 | {tag:'a', href:'#', id:this.getId('buttonLink'), html:"cancel"} | 86 | {tag:'a', href:'#', id:this.getId('buttonLink'), html:"cancel"} |
90 | ]} | 87 | ]} |
91 | ]} | 88 | ]} |
92 | ]} | 89 | ]} |
93 | ]}); | 90 | ]}); |
94 | // ]); | 91 | // ]); |
95 | 92 | ||
96 | Clipperz.PM.UI.Canvas.marks['!'](this.getElement('canvas'), "#ffffff"); | 93 | Clipperz.PM.UI.Canvas.marks['!'](this.getElement('canvas'), "#ffffff"); |
97 | 94 | ||
98 | this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':this.getElement('progressBar')})); | 95 | this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':this.getElement('progressBar')})); |
99 | MochiKit.Style.hideElement(this.getElement('errorBox')); | 96 | MochiKit.Style.hideElement(this.getElement('errorBox')); |
100 | 97 | ||
101 | MochiKit.Signal.connect(this.getId('buttonLink'), 'onclick', this, 'cancelEventHandler'); | 98 | MochiKit.Signal.connect(this.getId('buttonLink'), 'onclick', this, 'cancelEventHandler'); |
102 | }, | 99 | }, |
103 | 100 | ||
104 | //------------------------------------------------------------------------- | 101 | //------------------------------------------------------------------------- |
105 | 102 | ||
106 | 'displayElement': function() { | 103 | 'displayElement': function() { |
107 | return MochiKit.DOM.getElement('loginProgress'); | 104 | return MochiKit.DOM.getElement('loginProgress'); |
108 | }, | 105 | }, |
109 | 106 | ||
110 | //------------------------------------------------------------------------- | 107 | //------------------------------------------------------------------------- |
111 | 108 | ||
112 | 'cancelEventHandler': function(anEvent) { | 109 | 'cancelEventHandler': function(anEvent) { |
113 | anEvent.preventDefault(); | 110 | anEvent.preventDefault(); |
114 | 111 | ||
115 | MochiKit.Signal.signal(this, 'cancelEvent'); | 112 | MochiKit.Signal.signal(this, 'cancelEvent'); |
116 | }, | 113 | }, |
117 | 114 | ||
118 | //------------------------------------------------------------------------- | 115 | //------------------------------------------------------------------------- |
119 | 116 | ||
120 | 'disableCancel': function() { | 117 | 'disableCancel': function() { |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js index b40d1f3..feb16ad 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.NewUserCreationComponent = function(args) { | 28 | Clipperz.PM.UI.Web.Components.NewUserCreationComponent = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.NewUserCreationComponent.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.NewUserCreationComponent.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._tabPanelController = null; | 33 | this._tabPanelController = null; |
37 | 34 | ||
38 | this._initiallySelectedTab = args.selected || 'CREDENTIALS'; | 35 | this._initiallySelectedTab = args.selected || 'CREDENTIALS'; |
39 | this._tabPanelControllerConfiguration = { | 36 | this._tabPanelControllerConfiguration = { |
40 | 'CREDENTIALS': { | 37 | 'CREDENTIALS': { |
41 | tab:'credentialsTab', | 38 | tab:'credentialsTab', |
42 | panel:'credentialsTabpanel' | 39 | panel:'credentialsTabpanel' |
43 | }, | 40 | }, |
44 | 'CHECK_CREDENTIALS': { | 41 | 'CHECK_CREDENTIALS': { |
45 | tab:'checkCredentialsTab', | 42 | tab:'checkCredentialsTab', |
46 | panel:'checkCredentialsTabpanel' | 43 | panel:'checkCredentialsTabpanel' |
47 | }, | 44 | }, |
48 | 'TERMS_OF_SERVICE': { | 45 | 'TERMS_OF_SERVICE': { |
49 | tab:'termsOfServiceTab', | 46 | tab:'termsOfServiceTab', |
50 | panel:'termsOfServiceTabpanel' | 47 | panel:'termsOfServiceTabpanel' |
51 | }, | 48 | }, |
52 | 'CREATE_USER': { | 49 | 'CREATE_USER': { |
53 | tab:'createUserTab', | 50 | tab:'createUserTab', |
54 | panel:'createUserTabpanel' | 51 | panel:'createUserTabpanel' |
55 | }//, | 52 | }//, |
56 | /* | 53 | /* |
57 | 'LOGIN': { | 54 | 'LOGIN': { |
58 | tab:'loginTab', | 55 | tab:'loginTab', |
59 | panel:'loginTabpanel' | 56 | panel:'loginTabpanel' |
60 | } | 57 | } |
61 | */ | 58 | */ |
62 | }; | 59 | }; |
63 | 60 | ||
64 | return this; | 61 | return this; |
65 | } | 62 | } |
66 | 63 | ||
67 | //============================================================================= | 64 | //============================================================================= |
68 | 65 | ||
69 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.NewUserCreationComponent, Clipperz.PM.UI.Common.Components.TabPanelComponent, { | 66 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.NewUserCreationComponent, Clipperz.PM.UI.Common.Components.TabPanelComponent, { |
70 | 67 | ||
71 | //------------------------------------------------------------------------- | 68 | //------------------------------------------------------------------------- |
72 | 69 | ||
73 | 'toString': function () { | 70 | 'toString': function () { |
74 | return "Clipperz.PM.UI.Web.Components.NewUserCreationComponent component"; | 71 | return "Clipperz.PM.UI.Web.Components.NewUserCreationComponent component"; |
75 | }, | 72 | }, |
76 | 73 | ||
77 | //========================================================================= | 74 | //========================================================================= |
78 | 75 | ||
79 | 'disableAllPanels': function () { | 76 | 'disableAllPanels': function () { |
80 | this.tabPanelController().selectTab(null); | 77 | this.tabPanelController().selectTab(null); |
81 | }, | 78 | }, |
82 | 79 | ||
83 | //------------------------------------------------------------------------- | 80 | //------------------------------------------------------------------------- |
84 | 81 | ||
85 | 'enableCredentialsPanel': function () { | 82 | 'enableCredentialsPanel': function () { |
86 | this.tabPanelController().selectTab('CREDENTIALS'); | 83 | this.tabPanelController().selectTab('CREDENTIALS'); |
87 | }, | 84 | }, |
88 | 85 | ||
89 | 'enableCheckCredentialsPanel': function () { | 86 | 'enableCheckCredentialsPanel': function () { |
90 | this.tabPanelController().selectTab('CHECK_CREDENTIALS'); | 87 | this.tabPanelController().selectTab('CHECK_CREDENTIALS'); |
91 | }, | 88 | }, |
92 | 89 | ||
93 | 'enableTermsOfServicePanel': function () { | 90 | 'enableTermsOfServicePanel': function () { |
94 | this.tabPanelController().selectTab('TERMS_OF_SERVICE'); | 91 | this.tabPanelController().selectTab('TERMS_OF_SERVICE'); |
95 | }, | 92 | }, |
96 | 93 | ||
97 | 'enableCreateUserPanel': function () { | 94 | 'enableCreateUserPanel': function () { |
98 | this.tabPanelController().selectTab('CREATE_USER'); | 95 | this.tabPanelController().selectTab('CREATE_USER'); |
99 | }, | 96 | }, |
100 | 97 | ||
101 | //'enableLoginPanel': function () { | 98 | //'enableLoginPanel': function () { |
102 | // this.tabPanelController().selectTab('LOGIN'); | 99 | // this.tabPanelController().selectTab('LOGIN'); |
103 | //}, | 100 | //}, |
104 | 101 | ||
105 | //========================================================================= | 102 | //========================================================================= |
106 | 103 | ||
107 | 'shouldShowElementWhileRendering': function() { | 104 | 'shouldShowElementWhileRendering': function() { |
108 | return false; | 105 | return false; |
109 | }, | 106 | }, |
110 | 107 | ||
111 | //========================================================================= | 108 | //========================================================================= |
112 | 109 | ||
113 | 'tabPanelController': function () { | 110 | 'tabPanelController': function () { |
114 | if (this._tabPanelController == null) { | 111 | if (this._tabPanelController == null) { |
115 | this._tabPanelController = new Clipperz.PM.UI.Common.Controllers.TabPanelController({ | 112 | this._tabPanelController = new Clipperz.PM.UI.Common.Controllers.TabPanelController({ |
116 | component:this, | 113 | component:this, |
117 | configuration:this._tabPanelControllerConfiguration | 114 | configuration:this._tabPanelControllerConfiguration |
118 | }); | 115 | }); |
119 | 116 | ||
120 | MochiKit.Signal.connect(this._tabPanelController, 'tabSelected', this, 'handleTabSelected') | 117 | MochiKit.Signal.connect(this._tabPanelController, 'tabSelected', this, 'handleTabSelected') |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/Page.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/Page.js index bed6675..3cc5a37 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/Page.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/Page.js | |||
@@ -1,71 +1,68 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.Page = function(args) { | 28 | Clipperz.PM.UI.Web.Components.Page = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.Page.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.Page.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._slots = { | 33 | this._slots = { |
37 | 'header':'pageHeader', | 34 | 'header':'pageHeader', |
38 | 'body': 'pageBody', | 35 | 'body': 'pageBody', |
39 | 'footer':'pageFooter' | 36 | 'footer':'pageFooter' |
40 | }; | 37 | }; |
41 | 38 | ||
42 | return this; | 39 | return this; |
43 | } | 40 | } |
44 | 41 | ||
45 | //============================================================================= | 42 | //============================================================================= |
46 | 43 | ||
47 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.Page, Clipperz.PM.UI.Common.Components.BaseComponent, { | 44 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.Page, Clipperz.PM.UI.Common.Components.BaseComponent, { |
48 | 45 | ||
49 | //------------------------------------------------------------------------- | 46 | //------------------------------------------------------------------------- |
50 | 47 | ||
51 | 'toString': function () { | 48 | 'toString': function () { |
52 | return "Clipperz.PM.UI.Web.Components.Page component"; | 49 | return "Clipperz.PM.UI.Web.Components.Page component"; |
53 | }, | 50 | }, |
54 | 51 | ||
55 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
56 | 53 | ||
57 | 'renderSelf': function(/*aContainer, aPosition*/) { | 54 | 'renderSelf': function(/*aContainer, aPosition*/) { |
58 | this.append(this.element(), [ | 55 | this.append(this.element(), [ |
59 | {tag:'div', id:'pageHeaderAndBody', cls:'pageHeaderAndBody', children:[ | 56 | {tag:'div', id:'pageHeaderAndBody', cls:'pageHeaderAndBody', children:[ |
60 | {tag:'div', id:'pageHeader', cls:'pageHeader'}, | 57 | {tag:'div', id:'pageHeader', cls:'pageHeader'}, |
61 | {tag:'div', id:'pageBody', cls:'pageBody'} | 58 | {tag:'div', id:'pageBody', cls:'pageBody'} |
62 | ]}, | 59 | ]}, |
63 | {tag:'div', id:'pageFooter', cls:'pageFooter'} | 60 | {tag:'div', id:'pageFooter', cls:'pageFooter'} |
64 | ]); | 61 | ]); |
65 | 62 | ||
66 | }, | 63 | }, |
67 | 64 | ||
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | 66 | ||
70 | __syntaxFix__: "syntax fix" | 67 | __syntaxFix__: "syntax fix" |
71 | }); | 68 | }); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageFooter.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageFooter.js index 11135d8..5e8cd7f 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageFooter.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageFooter.js | |||
@@ -1,71 +1,68 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.PageFooter = function(args) { | 28 | Clipperz.PM.UI.Web.Components.PageFooter = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.PageFooter.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.PageFooter.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | return this; | 33 | return this; |
37 | } | 34 | } |
38 | 35 | ||
39 | //============================================================================= | 36 | //============================================================================= |
40 | 37 | ||
41 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PageFooter, Clipperz.PM.UI.Common.Components.BaseComponent, { | 38 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PageFooter, Clipperz.PM.UI.Common.Components.BaseComponent, { |
42 | 39 | ||
43 | //------------------------------------------------------------------------- | 40 | //------------------------------------------------------------------------- |
44 | 41 | ||
45 | 'toString': function () { | 42 | 'toString': function () { |
46 | return "Clipperz.PM.UI.Web.Components.PageFooter component"; | 43 | return "Clipperz.PM.UI.Web.Components.PageFooter component"; |
47 | }, | 44 | }, |
48 | 45 | ||
49 | //------------------------------------------------------------------------- | 46 | //------------------------------------------------------------------------- |
50 | 47 | ||
51 | 'renderSelf': function(/*aContainer, aPosition*/) { | 48 | 'renderSelf': function(/*aContainer, aPosition*/) { |
52 | this.append(this.element(), [ | 49 | this.append(this.element(), [ |
53 | {tag:'div', cls:'footerWrapper', children:[ | 50 | {tag:'div', cls:'footerWrapper', children:[ |
54 | {tag:'div', cls:'footerContent', children:[ | 51 | {tag:'div', cls:'footerContent', children:[ |
55 | // {tag:'div', cls:'footerStarIcon'}, | 52 | // {tag:'div', cls:'footerStarIcon'}, |
56 | {tag:'canvas', id:this.getId('footerStarIcon'), cls:'footerStarIcon'}, | 53 | {tag:'canvas', id:this.getId('footerStarIcon'), cls:'footerStarIcon'}, |
57 | {tag:'span', cls:'copyright', html:'Copyright © 2009 Clipperz Srl'}, | 54 | {tag:'span', cls:'copyright', html:'Copyright © 2009 Clipperz Srl'}, |
58 | {tag:'a', href:'http://www.clipperz.com/terms_of_service',target:'_blank', html:'terms of service'}, | 55 | {tag:'a', href:'http://www.clipperz.com/terms_of_service',target:'_blank', html:'terms of service'}, |
59 | {tag:'a', href:'http://www.clipperz.com/privacy_policy',target:'_blank', html:'privacy policy'}, | 56 | {tag:'a', href:'http://www.clipperz.com/privacy_policy',target:'_blank', html:'privacy policy'}, |
60 | {tag:'span', cls:'applicationVersion', html:'application version: [1992]'} | 57 | {tag:'span', cls:'applicationVersion', html:'application version: [1992]'} |
61 | ]} | 58 | ]} |
62 | ]} | 59 | ]} |
63 | ]); | 60 | ]); |
64 | 61 | ||
65 | Clipperz.PM.UI.Canvas.star.normal(this.getElement('footerStarIcon'), "#7e7e7e"); | 62 | Clipperz.PM.UI.Canvas.star.normal(this.getElement('footerStarIcon'), "#7e7e7e"); |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | 66 | ||
70 | __syntaxFix__: "syntax fix" | 67 | __syntaxFix__: "syntax fix" |
71 | }); | 68 | }); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js index 3924434..bce8395 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.PageHeader = function(args) { | 28 | Clipperz.PM.UI.Web.Components.PageHeader = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.PageHeader.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.PageHeader.superclass.constructor.apply(this, arguments); |
35 | this._newsIsOpen = args.newsIsOpen || false; | 32 | this._newsIsOpen = args.newsIsOpen || false; |
36 | this._animationDuration = args.animationDuration || 0.5; | 33 | this._animationDuration = args.animationDuration || 0.5; |
37 | 34 | ||
38 | this._offset = 82; | 35 | this._offset = 82; |
39 | 36 | ||
40 | return this; | 37 | return this; |
41 | } | 38 | } |
42 | 39 | ||
43 | //============================================================================= | 40 | //============================================================================= |
44 | 41 | ||
45 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PageHeader, Clipperz.PM.UI.Common.Components.BaseComponent, { | 42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PageHeader, Clipperz.PM.UI.Common.Components.BaseComponent, { |
46 | 43 | ||
47 | //------------------------------------------------------------------------- | 44 | //------------------------------------------------------------------------- |
48 | 45 | ||
49 | 'toString': function () { | 46 | 'toString': function () { |
50 | return "Clipperz.PM.UI.Web.Components.PageHeader component"; | 47 | return "Clipperz.PM.UI.Web.Components.PageHeader component"; |
51 | }, | 48 | }, |
52 | 49 | ||
53 | //------------------------------------------------------------------------- | 50 | //------------------------------------------------------------------------- |
54 | 51 | ||
55 | 'iframeURL': function () { | 52 | 'iframeURL': function () { |
56 | // return './rss_view.html'; | 53 | // return './rss_view.html'; |
57 | return 'http://www.clipperz.com/files/clipperz.com/appTips/index.html'; | 54 | return 'http://www.clipperz.com/files/clipperz.com/appTips/index.html'; |
58 | }, | 55 | }, |
59 | 56 | ||
60 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
61 | 58 | ||
62 | 'renderSelf': function(/*aContainer, aPosition*/) { | 59 | 'renderSelf': function(/*aContainer, aPosition*/) { |
63 | this.append(this.element(), [ | 60 | this.append(this.element(), [ |
64 | {tag:'div', id:'miscLinks', children:[ | 61 | {tag:'div', id:'miscLinks', children:[ |
65 | {tag:'ul', children:[ | 62 | {tag:'ul', children:[ |
66 | {tag:'li', children:[{tag:'a', id:'donateHeaderLink', stringID:'pageHeader.donation', href:'http://www.clipperz.com/donations', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.donation')}]}, | 63 | {tag:'li', children:[{tag:'a', id:'donateHeaderLink', stringID:'pageHeader.donation', href:'http://www.clipperz.com/donations', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.donation')}]}, |
67 | {tag:'li', children:[{tag:'a', id:'forumHeaderLink', stringID:'pageHeader.forum', href:'http://www.clipperz.com/forum', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.forum')}]}, | 64 | {tag:'li', children:[{tag:'a', id:'forumHeaderLink', stringID:'pageHeader.forum', href:'http://www.clipperz.com/forum', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.forum')}]}, |
68 | {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', stringID:'pageHeader.credits', href:'http://www.clipperz.com/credits', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.credits')}]}, | 65 | {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', stringID:'pageHeader.credits', href:'http://www.clipperz.com/credits', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.credits')}]}, |
69 | {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', stringID:'pageHeader.feedback', href:'http://www.clipperz.com/contact', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.feedback')}]}, | 66 | {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', stringID:'pageHeader.feedback', href:'http://www.clipperz.com/contact', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.feedback')}]}, |
70 | {tag:'li', children:[{tag:'a', id:'helpHeaderLink', stringID:'pageHeader.help', href:'http://www.clipperz.com/support/user_guide',target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.help')}]} | 67 | {tag:'li', children:[{tag:'a', id:'helpHeaderLink', stringID:'pageHeader.help', href:'http://www.clipperz.com/support/user_guide',target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.help')}]} |
71 | ]} | 68 | ]} |
72 | ]}, | 69 | ]}, |
73 | {tag:'div', id:'logoFrame', children:[ | 70 | {tag:'div', id:'logoFrame', children:[ |
74 | {tag:'a', href:'http://www.clipperz.com', target:'_blank', children:[{tag:'div', id:'logo'}]}, | 71 | {tag:'a', href:'http://www.clipperz.com', target:'_blank', children:[{tag:'div', id:'logo'}]}, |
75 | {tag:'h5', cls:'clipperzPayoff', html:'keep it to yourself!'} | 72 | {tag:'h5', cls:'clipperzPayoff', html:'keep it to yourself!'} |
76 | ]}, | 73 | ]}, |
77 | {tag:'div', id:'news', cls:'hidden', children:[ | 74 | {tag:'div', id:'news', cls:'hidden', children:[ |
78 | // {tag:'div', cls:'close', children:[ | 75 | // {tag:'div', cls:'close', children:[ |
79 | // {tag:'a', href:'#', id:this.getId('closeTips'), html:'x'} | 76 | // {tag:'a', href:'#', id:this.getId('closeTips'), html:'x'} |
80 | // ]}, | 77 | // ]}, |
81 | {tag:'div', id:'newsframe', children:[ | 78 | {tag:'div', id:'newsframe', children:[ |
82 | {tag:'iframe', id:this.getId('iframe'), src:this.iframeURL()} | 79 | {tag:'iframe', id:this.getId('iframe'), src:this.iframeURL()} |
83 | ]}, | 80 | ]}, |
84 | {tag:'div', id:this.getId('newsGrip'), cls:'grip', children:[]} | 81 | {tag:'div', id:this.getId('newsGrip'), cls:'grip', children:[]} |
85 | ]}, | 82 | ]}, |
86 | {tag:'div', id:'featureTabs', children:[ | 83 | {tag:'div', id:'featureTabs', children:[ |
87 | {tag:'table', children:[{tag:'tr', children:[ | 84 | {tag:'table', children:[{tag:'tr', children:[ |
88 | {tag:'td', children:[{tag:'div', id:'feature_store', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('storeIcon')}, {tag:'span', html:"Store and manage your password and online credentials"}]}]}, | 85 | {tag:'td', children:[{tag:'div', id:'feature_store', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('storeIcon')}, {tag:'span', html:"Store and manage your password and online credentials"}]}]}, |
89 | {tag:'td', children:[{tag:'div', id:'feature_protect', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('protectIcon')}, {tag:'span', html:"Protect all your sensitive data"}]}]}, | 86 | {tag:'td', children:[{tag:'div', id:'feature_protect', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('protectIcon')}, {tag:'span', html:"Protect all your sensitive data"}]}]}, |
90 | {tag:'td', children:[{tag:'div', id:'feature_directLogin', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('directLoginIcon')},{tag:'span', html:"Login to your web services without entering any username or password"}]}]}, | 87 | {tag:'td', children:[{tag:'div', id:'feature_directLogin', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('directLoginIcon')},{tag:'span', html:"Login to your web services without entering any username or password"}]}]}, |
91 | {tag:'td', children:[{tag:'div', id:'feature_share', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('shareIcon')}, {tag:'span', html:"Share secret with family members and associates"}]}]} | 88 | {tag:'td', children:[{tag:'div', id:'feature_share', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('shareIcon')}, {tag:'span', html:"Share secret with family members and associates"}]}]} |
92 | ]}]} | 89 | ]}]} |
93 | ]} | 90 | ]} |
94 | ]); | 91 | ]); |
95 | 92 | ||
96 | Clipperz.PM.UI.Canvas.features.store(this.getElement('storeIcon'), "#ffffff"); | 93 | Clipperz.PM.UI.Canvas.features.store(this.getElement('storeIcon'), "#ffffff"); |
97 | Clipperz.PM.UI.Canvas.features.protect(this.getElement('protectIcon'), "#ffffff"); | 94 | Clipperz.PM.UI.Canvas.features.protect(this.getElement('protectIcon'), "#ffffff"); |
98 | Clipperz.PM.UI.Canvas.features.directLogin(this.getElement('directLoginIcon'), "#ffffff"); | 95 | Clipperz.PM.UI.Canvas.features.directLogin(this.getElement('directLoginIcon'), "#ffffff"); |
99 | Clipperz.PM.UI.Canvas.features.share(this.getElement('shareIcon'), "#ffffff", "#ffffff", "#ff0000"); | 96 | Clipperz.PM.UI.Canvas.features.share(this.getElement('shareIcon'), "#ffffff", "#ffffff", "#ff0000"); |
100 | 97 | ||
101 | MochiKit.Signal.connect(this.getElement('newsGrip'), 'onclick', this, 'toggleTips'); | 98 | MochiKit.Signal.connect(this.getElement('newsGrip'), 'onclick', this, 'toggleTips'); |
102 | MochiKit.Signal.connect(this.getElement('iframe'), 'onload', this, 'handleIframeDidLoad'); | 99 | MochiKit.Signal.connect(this.getElement('iframe'), 'onload', this, 'handleIframeDidLoad'); |
103 | }, | 100 | }, |
104 | 101 | ||
105 | //------------------------------------------------------------------------- | 102 | //------------------------------------------------------------------------- |
106 | 103 | ||
107 | 'switchToLoggedMode': function() { | 104 | 'switchToLoggedMode': function() { |
108 | // MochiKit.Style.addElementClass(this.element(), 'logged'); | 105 | // MochiKit.Style.addElementClass(this.element(), 'logged'); |
109 | MochiKit.Style.hideElement('featureTabs'); | 106 | MochiKit.Style.hideElement('featureTabs'); |
110 | }, | 107 | }, |
111 | 108 | ||
112 | //------------------------------------------------------------------------- | 109 | //------------------------------------------------------------------------- |
113 | 110 | ||
114 | 'animationDuration': function () { | 111 | 'animationDuration': function () { |
115 | return this._animationDuration; | 112 | return this._animationDuration; |
116 | }, | 113 | }, |
117 | 114 | ||
118 | 'offset': function () { | 115 | 'offset': function () { |
119 | return this._offset; | 116 | return this._offset; |
120 | }, | 117 | }, |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js index 79c8d4f..987e51e 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.PasswordTooltip = function(args) { | 28 | Clipperz.PM.UI.Web.Components.PasswordTooltip = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.PasswordTooltip.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.PasswordTooltip.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._referenceElement = args.referenceElement|| Clipperz.Base.exception.raise('MandatoryParameter'); | 33 | this._referenceElement = args.referenceElement|| Clipperz.Base.exception.raise('MandatoryParameter'); |
37 | this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); | 34 | this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); |
38 | 35 | ||
39 | this._boxDimensions = null; | 36 | this._boxDimensions = null; |
40 | this._isVisible = false; | 37 | this._isVisible = false; |
41 | 38 | ||
42 | this.renderSelf(); | 39 | this.renderSelf(); |
43 | 40 | ||
44 | return this; | 41 | return this; |
45 | } | 42 | } |
46 | 43 | ||
47 | //============================================================================= | 44 | //============================================================================= |
48 | 45 | ||
49 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PasswordTooltip, Clipperz.PM.UI.Common.Components.BaseComponent, { | 46 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PasswordTooltip, Clipperz.PM.UI.Common.Components.BaseComponent, { |
50 | 47 | ||
51 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
52 | 49 | ||
53 | 'toString': function () { | 50 | 'toString': function () { |
54 | return "Clipperz.PM.UI.Web.Components.PasswordTooltip component"; | 51 | return "Clipperz.PM.UI.Web.Components.PasswordTooltip component"; |
55 | }, | 52 | }, |
56 | 53 | ||
57 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
58 | 55 | ||
59 | 'referenceElement': function () { | 56 | 'referenceElement': function () { |
60 | return this._referenceElement; | 57 | return this._referenceElement; |
61 | }, | 58 | }, |
62 | 59 | ||
63 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
64 | 61 | ||
65 | 'text': function () { | 62 | 'text': function () { |
66 | return this._text; | 63 | return this._text; |
67 | }, | 64 | }, |
68 | 65 | ||
69 | 'setText': function (aValue) { | 66 | 'setText': function (aValue) { |
70 | this._text = aValue; | 67 | this._text = aValue; |
71 | }, | 68 | }, |
72 | 69 | ||
73 | //------------------------------------------------------------------------- | 70 | //------------------------------------------------------------------------- |
74 | 71 | ||
75 | 'isVisible': function () { | 72 | 'isVisible': function () { |
76 | return this._isVisible; | 73 | return this._isVisible; |
77 | }, | 74 | }, |
78 | 75 | ||
79 | 'setIsVisible': function (aValue) { | 76 | 'setIsVisible': function (aValue) { |
80 | this._isVisible = aValue; | 77 | this._isVisible = aValue; |
81 | }, | 78 | }, |
82 | 79 | ||
83 | //------------------------------------------------------------------------- | 80 | //------------------------------------------------------------------------- |
84 | 81 | ||
85 | 'renderSelf': function() { | 82 | 'renderSelf': function() { |
86 | this.append(MochiKit.DOM.getElement('Clipperz_PM_UI_Common_Components_Tooltip_wrapperNode'), {tag:'div', id:this.getId('tooltip'), cls:'passwordTooltip', children:[ | 83 | this.append(MochiKit.DOM.getElement('Clipperz_PM_UI_Common_Components_Tooltip_wrapperNode'), {tag:'div', id:this.getId('tooltip'), cls:'passwordTooltip', children:[ |
87 | {tag:'div', id:this.getId('body'), cls:'passwordTooltip_body', children:[ | 84 | {tag:'div', id:this.getId('body'), cls:'passwordTooltip_body', children:[ |
88 | {tag:'div', cls:'passwordTooltip_text', children:[ | 85 | {tag:'div', cls:'passwordTooltip_text', children:[ |
89 | {tag:'span', html:this.text()} | 86 | {tag:'span', html:this.text()} |
90 | ]}, | 87 | ]}, |
91 | {tag:'div', id:this.getId('footer'), cls:'passwordTooltip_footer'} | 88 | {tag:'div', id:this.getId('footer'), cls:'passwordTooltip_footer'} |
92 | ]}, | 89 | ]}, |
93 | {tag:'div', id:this.getId('arrow'), cls:'passwordTooltip_arrow'} | 90 | {tag:'div', id:this.getId('arrow'), cls:'passwordTooltip_arrow'} |
94 | ]}); | 91 | ]}); |
95 | 92 | ||
96 | this._boxDimensions = MochiKit.Style.getElementDimensions(this.getId('body')); | 93 | this._boxDimensions = MochiKit.Style.getElementDimensions(this.getId('body')); |
97 | // this._boxDimensions.h += MochiKit.Style.getElementDimensions(this.getId('footer')).h; | 94 | // this._boxDimensions.h += MochiKit.Style.getElementDimensions(this.getId('footer')).h; |
98 | 95 | ||
99 | MochiKit.Style.hideElement(this.displayElement()); | 96 | MochiKit.Style.hideElement(this.displayElement()); |
100 | MochiKit.Signal.connect(this.element(), 'onmouseenter', this, 'show'); | 97 | MochiKit.Signal.connect(this.element(), 'onmouseenter', this, 'show'); |
101 | MochiKit.Signal.connect(this.element(), 'onmouseleave', this, 'hide'); | 98 | MochiKit.Signal.connect(this.element(), 'onmouseleave', this, 'hide'); |
102 | }, | 99 | }, |
103 | 100 | ||
104 | //----------------------------------------------------- | 101 | //----------------------------------------------------- |
105 | 102 | ||
106 | 'displayElement': function() { | 103 | 'displayElement': function() { |
107 | return this.getElement('tooltip'); | 104 | return this.getElement('tooltip'); |
108 | }, | 105 | }, |
109 | 106 | ||
110 | //------------------------------------------------------------------------- | 107 | //------------------------------------------------------------------------- |
111 | 108 | ||
112 | 'boxDimensions': function () { | 109 | 'boxDimensions': function () { |
113 | return this._boxDimensions; | 110 | return this._boxDimensions; |
114 | }, | 111 | }, |
115 | 112 | ||
116 | //------------------------------------------------------------------------- | 113 | //------------------------------------------------------------------------- |
117 | 114 | ||
118 | 'show': function () { | 115 | 'show': function () { |
119 | var elementSizeAndPosition; | 116 | var elementSizeAndPosition; |
120 | var arrowPosition; | 117 | var arrowPosition; |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js index ab8a38c..69c1ede 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.RulerComponent = function(args) { | 28 | Clipperz.PM.UI.Web.Components.RulerComponent = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | Clipperz.PM.UI.Web.Components.RulerComponent.superclass.constructor.apply(this, arguments); | 30 | Clipperz.PM.UI.Web.Components.RulerComponent.superclass.constructor.apply(this, arguments); |
34 | 31 | ||
35 | this._translationContext = args.translationContext|| Clipperz.Base.exception.raise('MandatoryParameter'); | 32 | this._translationContext = args.translationContext|| Clipperz.Base.exception.raise('MandatoryParameter'); |
36 | // this._steps = args.steps || Clipperz.Base.exception.raise('MandatoryParameter'); | 33 | // this._steps = args.steps || Clipperz.Base.exception.raise('MandatoryParameter'); |
37 | this._steps = args.steps; | 34 | this._steps = args.steps; |
38 | 35 | ||
39 | this._currentStep = -1; | 36 | this._currentStep = -1; |
40 | 37 | ||
41 | return this; | 38 | return this; |
42 | } | 39 | } |
43 | 40 | ||
44 | //============================================================================= | 41 | //============================================================================= |
45 | 42 | ||
46 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.RulerComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 43 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.RulerComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
47 | 44 | ||
48 | //------------------------------------------------------------------------- | 45 | //------------------------------------------------------------------------- |
49 | 46 | ||
50 | 'toString': function () { | 47 | 'toString': function () { |
51 | return "Clipperz.PM.UI.Web.Components.RulerComponent component"; | 48 | return "Clipperz.PM.UI.Web.Components.RulerComponent component"; |
52 | }, | 49 | }, |
53 | 50 | ||
54 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
55 | 52 | ||
56 | 'resetStatus': function (args) { | 53 | 'resetStatus': function (args) { |
57 | args = args || {}; | 54 | args = args || {}; |
58 | 55 | ||
59 | if (this.currentStep() != 0) { | 56 | if (this.currentStep() != 0) { |
60 | var shouldAnimateTransition; | 57 | var shouldAnimateTransition; |
61 | 58 | ||
62 | shouldAnimateTransition = args.animateTransition || false; | 59 | shouldAnimateTransition = args.animateTransition || false; |
63 | 60 | ||
64 | if (shouldAnimateTransition) { | 61 | if (shouldAnimateTransition) { |
65 | this.moveToFirstStep(MochiKit.Base.method(this, 'cursorMoved')); | 62 | this.moveToFirstStep(MochiKit.Base.method(this, 'cursorMoved')); |
66 | } else { | 63 | } else { |
67 | this._currentStep = 0; | 64 | this._currentStep = 0; |
68 | this.cursorMoved(); | 65 | this.cursorMoved(); |
69 | } | 66 | } |
70 | } | 67 | } |
71 | }, | 68 | }, |
72 | 69 | ||
73 | //------------------------------------------------------------------------- | 70 | //------------------------------------------------------------------------- |
74 | 71 | ||
75 | 'translationContext': function () { | 72 | 'translationContext': function () { |
76 | return this._translationContext; | 73 | return this._translationContext; |
77 | }, | 74 | }, |
78 | 75 | ||
79 | 'steps': function () { | 76 | 'steps': function () { |
80 | return this._steps; | 77 | return this._steps; |
81 | }, | 78 | }, |
82 | 79 | ||
83 | 'setSteps': function (aValue) { | 80 | 'setSteps': function (aValue) { |
84 | this._steps = aValue; | 81 | this._steps = aValue; |
85 | this.renderStepsComponents(); | 82 | this.renderStepsComponents(); |
86 | this.resetStatus(); | 83 | this.resetStatus(); |
87 | }, | 84 | }, |
88 | 85 | ||
89 | 'translatedStepDescription': function (aStep) { | 86 | 'translatedStepDescription': function (aStep) { |
90 | return Clipperz.PM.Strings.getValue(this.translationContext() + '.' + aStep + '.' + 'name'); | 87 | return Clipperz.PM.Strings.getValue(this.translationContext() + '.' + aStep + '.' + 'name'); |
91 | }, | 88 | }, |
92 | 89 | ||
93 | //------------------------------------------------------------------------- | 90 | //------------------------------------------------------------------------- |
94 | 91 | ||
95 | 'renderSelf': function(/*aContainer, aPosition*/) { | 92 | 'renderSelf': function(/*aContainer, aPosition*/) { |
96 | this.setElement(this.append(MochiKit.DOM.currentDocument().body, [ | 93 | this.setElement(this.append(MochiKit.DOM.currentDocument().body, [ |
97 | {tag:'div', id:this.getId('rulerWrapper'), cls:'rulerWrapper fixed', children:[ | 94 | {tag:'div', id:this.getId('rulerWrapper'), cls:'rulerWrapper fixed', children:[ |
98 | {tag:'div', cls:'ruler', children:[ | 95 | {tag:'div', cls:'ruler', children:[ |
99 | {tag:'a', href:'#', id:this.getId('exit'), cls:'exit', html:' '}, | 96 | {tag:'a', href:'#', id:this.getId('exit'), cls:'exit', html:' '}, |
100 | {tag:'a', href:'#', id:this.getId('smallPreviousButton'),cls:'smallButton previous', html:' '}, | 97 | {tag:'a', href:'#', id:this.getId('smallPreviousButton'),cls:'smallButton previous', html:' '}, |
101 | {tag:'a', href:'#', id:this.getId('smallNextButton'), cls:'smallButton next', html:' '}, | 98 | {tag:'a', href:'#', id:this.getId('smallNextButton'), cls:'smallButton next', html:' '}, |
102 | {tag:'div', cls:'marker', id:this.getId('marker'), children:[ | 99 | {tag:'div', cls:'marker', id:this.getId('marker'), children:[ |
103 | {tag:'div', cls:'previous', id:this.getId('previousButton')}, | 100 | {tag:'div', cls:'previous', id:this.getId('previousButton')}, |
104 | {tag:'div', cls:'markerBody'}, | 101 | {tag:'div', cls:'markerBody'}, |
105 | {tag:'div', cls:'next', id:this.getId('nextButton')} | 102 | {tag:'div', cls:'next', id:this.getId('nextButton')} |
106 | ]}, | 103 | ]}, |
107 | {tag:'div', cls:'steps', id:this.getId('stepsFrame')}, | 104 | {tag:'div', cls:'steps', id:this.getId('stepsFrame')}, |
108 | // {tag:'div', cls:'steps' + ' ' + 'steps_' + this.steps().length, children:[ | 105 | // {tag:'div', cls:'steps' + ' ' + 'steps_' + this.steps().length, children:[ |
109 | // {tag:'ul', id:this.getId('steps'), children:MochiKit.Base.map(MochiKit.Base.bind(function (aStep) { return {tag:'li', children:[{tag:'span', html:this.translatedStepDescription(aStep)}]}}, this), this.steps())} | 106 | // {tag:'ul', id:this.getId('steps'), children:MochiKit.Base.map(MochiKit.Base.bind(function (aStep) { return {tag:'li', children:[{tag:'span', html:this.translatedStepDescription(aStep)}]}}, this), this.steps())} |
110 | // ]}, | 107 | // ]}, |
111 | {tag:'div', cls:'dots', id:this.getId('dotsFrame')} | 108 | {tag:'div', cls:'dots', id:this.getId('dotsFrame')} |
112 | // {tag:'div', cls:'dots' + ' ' + 'steps_' + this.steps().length, children:[ | 109 | // {tag:'div', cls:'dots' + ' ' + 'steps_' + this.steps().length, children:[ |
113 | // {tag:'ul', id:this.getId('dots'), children:MochiKit.Base.map(function (aStep) { return {tag:'li', children:[{tag:'span', html:'*'}]}}, this.steps())} | 110 | // {tag:'ul', id:this.getId('dots'), children:MochiKit.Base.map(function (aStep) { return {tag:'li', children:[{tag:'span', html:'*'}]}}, this.steps())} |
114 | // ]} | 111 | // ]} |
115 | ]} | 112 | ]} |
116 | ]} | 113 | ]} |
117 | ])); | 114 | ])); |
118 | //console.log("ELEMENT", this.element()); | 115 | //console.log("ELEMENT", this.element()); |
119 | 116 | ||
120 | MochiKit.Signal.connect(this.getElement('exit'), 'onclick', this, 'handleExit'); | 117 | MochiKit.Signal.connect(this.getElement('exit'), 'onclick', this, 'handleExit'); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js index 39a1ccb..666afe9 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.TabSidePanel = function(args) { | 28 | Clipperz.PM.UI.Web.Components.TabSidePanel = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | Clipperz.PM.UI.Web.Components.TabSidePanel.superclass.constructor.call(this, args); | 30 | Clipperz.PM.UI.Web.Components.TabSidePanel.superclass.constructor.call(this, args); |
34 | 31 | ||
35 | this._element = args.element || null; | 32 | this._element = args.element || null; |
36 | 33 | ||
37 | this._slots = { | 34 | this._slots = { |
38 | }; | 35 | }; |
39 | 36 | ||
40 | return this; | 37 | return this; |
41 | } | 38 | } |
42 | 39 | ||
43 | //============================================================================= | 40 | //============================================================================= |
44 | 41 | ||
45 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.TabSidePanel, Clipperz.PM.UI.Common.Components.BaseComponent, { | 42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.TabSidePanel, Clipperz.PM.UI.Common.Components.BaseComponent, { |
46 | 43 | ||
47 | //------------------------------------------------------------------------- | 44 | //------------------------------------------------------------------------- |
48 | 45 | ||
49 | 'toString': function () { | 46 | 'toString': function () { |
50 | return "Clipperz.PM.UI.Web.Components.TabSidePanel component"; | 47 | return "Clipperz.PM.UI.Web.Components.TabSidePanel component"; |
51 | }, | 48 | }, |
52 | 49 | ||
53 | //------------------------------------------------------------------------- | 50 | //------------------------------------------------------------------------- |
54 | 51 | ||
55 | 'deselectAllTabs': function() { | 52 | 'deselectAllTabs': function() { |
56 | var tabListItems; | 53 | var tabListItems; |
57 | 54 | ||
58 | tabListItems = [ | 55 | tabListItems = [ |
59 | 'cardsLI', | 56 | 'cardsLI', |
60 | // 'directLoginLI', | 57 | // 'directLoginLI', |
61 | 'accountLI', | 58 | 'accountLI', |
62 | 'dataLI', | 59 | 'dataLI', |
63 | 'toolsLI' | 60 | 'toolsLI' |
64 | ]; | 61 | ]; |
65 | 62 | ||
66 | //Clipperz.log("=== TabSidePanel.tabSelected anEvent.src().id", anEvent.src().id); | 63 | //Clipperz.log("=== TabSidePanel.tabSelected anEvent.src().id", anEvent.src().id); |
67 | for (var i in tabListItems) { | 64 | for (var i in tabListItems) { |
68 | //Clipperz.log("=== TabSidePanel.tabSelected aTabListItem", tabListItems[i]); | 65 | //Clipperz.log("=== TabSidePanel.tabSelected aTabListItem", tabListItems[i]); |
69 | MochiKit.DOM.removeElementClass(this.getId(tabListItems[i]), 'selected'); | 66 | MochiKit.DOM.removeElementClass(this.getId(tabListItems[i]), 'selected'); |
70 | } | 67 | } |
71 | }, | 68 | }, |
72 | 69 | ||
73 | 'selectTab': function(aTabName) { | 70 | 'selectTab': function(aTabName) { |
74 | this.deselectAllTabs(); | 71 | this.deselectAllTabs(); |
75 | MochiKit.DOM.addElementClass(this.getId(this.listItemIdForTabNamed(aTabName)), 'selected'); | 72 | MochiKit.DOM.addElementClass(this.getId(this.listItemIdForTabNamed(aTabName)), 'selected'); |
76 | MochiKit.Signal.signal(this, 'tabSelected', aTabName); | 73 | MochiKit.Signal.signal(this, 'tabSelected', aTabName); |
77 | }, | 74 | }, |
78 | 75 | ||
79 | 'tabNameForAnchorId': function(anId) { | 76 | 'tabNameForAnchorId': function(anId) { |
80 | var result; | 77 | var result; |
81 | 78 | ||
82 | switch(anId) { | 79 | switch(anId) { |
83 | case 'cards_tabSidePanel': | 80 | case 'cards_tabSidePanel': |
84 | result = 'cards'; | 81 | result = 'cards'; |
85 | break; | 82 | break; |
86 | // case 'directLogins_tabSidePanel': | 83 | // case 'directLogins_tabSidePanel': |
87 | // result = 'directLogins'; | 84 | // result = 'directLogins'; |
88 | // break; | 85 | // break; |
89 | case 'account_tabSidePanel': | 86 | case 'account_tabSidePanel': |
90 | result = 'account'; | 87 | result = 'account'; |
91 | break; | 88 | break; |
92 | case 'data_tabSidePanel': | 89 | case 'data_tabSidePanel': |
93 | result = 'data'; | 90 | result = 'data'; |
94 | break; | 91 | break; |
95 | case 'tools_tabSidePanel': | 92 | case 'tools_tabSidePanel': |
96 | result = 'tools'; | 93 | result = 'tools'; |
97 | break; | 94 | break; |
98 | } | 95 | } |
99 | 96 | ||
100 | return result; | 97 | return result; |
101 | }, | 98 | }, |
102 | 99 | ||
103 | 'listItemIdForTabNamed': function(aTabName) { | 100 | 'listItemIdForTabNamed': function(aTabName) { |
104 | var result; | 101 | var result; |
105 | 102 | ||
106 | switch (aTabName) { | 103 | switch (aTabName) { |
107 | case 'cards': | 104 | case 'cards': |
108 | result = 'cardsLI'; | 105 | result = 'cardsLI'; |
109 | break; | 106 | break; |
110 | // case 'directLogins': | 107 | // case 'directLogins': |
111 | // result = 'directLoginLI'; | 108 | // result = 'directLoginLI'; |
112 | // break; | 109 | // break; |
113 | case 'account': | 110 | case 'account': |
114 | result = 'accountLI'; | 111 | result = 'accountLI'; |
115 | break; | 112 | break; |
116 | case 'data': | 113 | case 'data': |
117 | result = 'dataLI'; | 114 | result = 'dataLI'; |
118 | break; | 115 | break; |
119 | case 'tools': | 116 | case 'tools': |
120 | result = 'toolsLI'; | 117 | result = 'toolsLI'; |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TextColumnManager.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TextColumnManager.js index 97e81b4..3dc9ce9 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TextColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TextColumnManager.js | |||
@@ -1,53 +1,50 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | //############################################################################# | 28 | //############################################################################# |
32 | 29 | ||
33 | Clipperz.PM.UI.Web.Components.TextColumnManager = function(args) { | 30 | Clipperz.PM.UI.Web.Components.TextColumnManager = function(args) { |
34 | args = args || {}; | 31 | args = args || {}; |
35 | Clipperz.PM.UI.Web.Components.TextColumnManager.superclass.constructor.call(this, args); | 32 | Clipperz.PM.UI.Web.Components.TextColumnManager.superclass.constructor.call(this, args); |
36 | 33 | ||
37 | return this; | 34 | return this; |
38 | } | 35 | } |
39 | 36 | ||
40 | //============================================================================= | 37 | //============================================================================= |
41 | 38 | ||
42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.TextColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { | 39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.TextColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { |
43 | 40 | ||
44 | 'toString': function () { | 41 | 'toString': function () { |
45 | return "Clipperz.PM.UI.Web.Components.TextColumnManager component"; | 42 | return "Clipperz.PM.UI.Web.Components.TextColumnManager component"; |
46 | }, | 43 | }, |
47 | 44 | ||
48 | //----------------------------------------------------- | 45 | //----------------------------------------------------- |
49 | 46 | ||
50 | '__syntax_fix__' : 'syntax fix' | 47 | '__syntax_fix__' : 'syntax fix' |
51 | 48 | ||
52 | }); | 49 | }); |
53 | 50 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js index 179c495..3ee6189 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js | |||
@@ -1,113 +1,110 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.ToolsPanel = function(args) { | 28 | Clipperz.PM.UI.Web.Components.ToolsPanel = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.ToolsPanel.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.ToolsPanel.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._initiallySelectedTab = args.selected || 'PASSWORD_GENERATOR'; | 33 | this._initiallySelectedTab = args.selected || 'PASSWORD_GENERATOR'; |
37 | this._tabPanelControllerConfiguration = { | 34 | this._tabPanelControllerConfiguration = { |
38 | 'PASSWORD_GENERATOR': { | 35 | 'PASSWORD_GENERATOR': { |
39 | tab:'passwordGeneratorTab', | 36 | tab:'passwordGeneratorTab', |
40 | panel:'passwordGeneratorPanel' | 37 | panel:'passwordGeneratorPanel' |
41 | }, | 38 | }, |
42 | 'BOOKMARKLET': { | 39 | 'BOOKMARKLET': { |
43 | tab:'bookmarkletTab', | 40 | tab:'bookmarkletTab', |
44 | panel:'bookmarkletPanel' | 41 | panel:'bookmarkletPanel' |
45 | }, | 42 | }, |
46 | 'COMPACT_EDITION': { | 43 | 'COMPACT_EDITION': { |
47 | tab:'compactEditionTab', | 44 | tab:'compactEditionTab', |
48 | panel:'compactEditionPanel' | 45 | panel:'compactEditionPanel' |
49 | }, | 46 | }, |
50 | 'HTTP_AUTH': { | 47 | 'HTTP_AUTH': { |
51 | tab:'httpAuthTab', | 48 | tab:'httpAuthTab', |
52 | panel:'httpAuthPanel' | 49 | panel:'httpAuthPanel' |
53 | } | 50 | } |
54 | }; | 51 | }; |
55 | 52 | ||
56 | return this; | 53 | return this; |
57 | } | 54 | } |
58 | 55 | ||
59 | //============================================================================= | 56 | //============================================================================= |
60 | 57 | ||
61 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ToolsPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { | 58 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ToolsPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { |
62 | 59 | ||
63 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
64 | 61 | ||
65 | 'toString': function () { | 62 | 'toString': function () { |
66 | return "Clipperz.PM.UI.Web.Components.ToolsPanel component"; | 63 | return "Clipperz.PM.UI.Web.Components.ToolsPanel component"; |
67 | }, | 64 | }, |
68 | 65 | ||
69 | //------------------------------------------------------------------------- | 66 | //------------------------------------------------------------------------- |
70 | 67 | ||
71 | 'renderSelf': function(/*aContainer, aPosition*/) { | 68 | 'renderSelf': function(/*aContainer, aPosition*/) { |
72 | this.append(this.element(), [ | 69 | this.append(this.element(), [ |
73 | {tag:'div', cls:'header', children:[ | 70 | {tag:'div', cls:'header', children:[ |
74 | {tag:'div', cls:'subPanelTabs', children:[ | 71 | {tag:'div', cls:'subPanelTabs', children:[ |
75 | {tag:'ul', children:[ | 72 | {tag:'ul', children:[ |
76 | {tag:'li', id:this.getId('passwordGeneratorTab'),children:[{tag:'a', href:'#', html:'Password generator'}], cls:'first'}, | 73 | {tag:'li', id:this.getId('passwordGeneratorTab'),children:[{tag:'a', href:'#', html:'Password generator'}], cls:'first'}, |
77 | {tag:'li', id:this.getId('bookmarkletTab'), children:[{tag:'a', href:'#', html:'Bookmarklet'}]}, | 74 | {tag:'li', id:this.getId('bookmarkletTab'), children:[{tag:'a', href:'#', html:'Bookmarklet'}]}, |
78 | {tag:'li', id:this.getId('compactEditionTab'), children:[{tag:'a', href:'#', html:'Compact edition'}]}, | 75 | {tag:'li', id:this.getId('compactEditionTab'), children:[{tag:'a', href:'#', html:'Compact edition'}]}, |
79 | {tag:'li', id:this.getId('httpAuthTab'), children:[{tag:'a', href:'#', html:'HTTP Auth'}]} | 76 | {tag:'li', id:this.getId('httpAuthTab'), children:[{tag:'a', href:'#', html:'HTTP Auth'}]} |
80 | ]} | 77 | ]} |
81 | ]} | 78 | ]} |
82 | ]}, | 79 | ]}, |
83 | {tag:'div', cls:'body', children:[ | 80 | {tag:'div', cls:'body', children:[ |
84 | {tag:'div', cls:'accountPanel', children:[ | 81 | {tag:'div', cls:'accountPanel', children:[ |
85 | {tag:'div', cls:'subPanelContent', children:[ | 82 | {tag:'div', cls:'subPanelContent', children:[ |
86 | {tag:'ul', children:[ | 83 | {tag:'ul', children:[ |
87 | {tag:'li', id:this.getId('passwordGeneratorPanel'),children:[ | 84 | {tag:'li', id:this.getId('passwordGeneratorPanel'),children:[ |
88 | {tag:'h3', html:"Password generator"} | 85 | {tag:'h3', html:"Password generator"} |
89 | ]}, | 86 | ]}, |
90 | {tag:'li', id:this.getId('bookmarkletPanel'),children:[ | 87 | {tag:'li', id:this.getId('bookmarkletPanel'),children:[ |
91 | {tag:'h3', html:"Bookmarklet"} | 88 | {tag:'h3', html:"Bookmarklet"} |
92 | ]}, | 89 | ]}, |
93 | {tag:'li', id:this.getId('compactEditionPanel'), children:[ | 90 | {tag:'li', id:this.getId('compactEditionPanel'), children:[ |
94 | {tag:'h3', html:"Compact edition"} | 91 | {tag:'h3', html:"Compact edition"} |
95 | ]}, | 92 | ]}, |
96 | {tag:'li', id:this.getId('httpAuthPanel'), children:[ | 93 | {tag:'li', id:this.getId('httpAuthPanel'), children:[ |
97 | {tag:'h3', html:"HTTP Auth"} | 94 | {tag:'h3', html:"HTTP Auth"} |
98 | ]} | 95 | ]} |
99 | ]} | 96 | ]} |
100 | ]} | 97 | ]} |
101 | ]} | 98 | ]} |
102 | ]}, | 99 | ]}, |
103 | {tag:'div', cls:'footer'} | 100 | {tag:'div', cls:'footer'} |
104 | ]); | 101 | ]); |
105 | 102 | ||
106 | this.tabPanelController().setup({selected:this.initiallySelectedTab()}); | 103 | this.tabPanelController().setup({selected:this.initiallySelectedTab()}); |
107 | }, | 104 | }, |
108 | 105 | ||
109 | //------------------------------------------------------------------------- | 106 | //------------------------------------------------------------------------- |
110 | 107 | ||
111 | 108 | ||
112 | __syntaxFix__: "syntax fix" | 109 | __syntaxFix__: "syntax fix" |
113 | }); | 110 | }); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UnlockPasswordComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UnlockPasswordComponent.js index 5b9d522..21ccf2a 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UnlockPasswordComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UnlockPasswordComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.UnlockPasswordComponent = function(args) { | 28 | Clipperz.PM.UI.Web.Components.UnlockPasswordComponent = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._openFromElement = args.openFromElement || null; | 33 | this._openFromElement = args.openFromElement || null; |
37 | this._onOkCloseToElement = args.onOkCloseToElement || null; | 34 | this._onOkCloseToElement = args.onOkCloseToElement || null; |
38 | this._onCancelCloseToElement = args.onCancelCloseToElement|| null; | 35 | this._onCancelCloseToElement = args.onCancelCloseToElement|| null; |
39 | 36 | ||
40 | this._progressBarComponent = null; | 37 | this._progressBarComponent = null; |
41 | 38 | ||
42 | return this; | 39 | return this; |
43 | } | 40 | } |
44 | 41 | ||
45 | //============================================================================= | 42 | //============================================================================= |
46 | 43 | ||
47 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.UnlockPasswordComponent, Clipperz.PM.UI.Common.Components.SimpleMessagePanel, { | 44 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.UnlockPasswordComponent, Clipperz.PM.UI.Common.Components.SimpleMessagePanel, { |
48 | 45 | ||
49 | //------------------------------------------------------------------------- | 46 | //------------------------------------------------------------------------- |
50 | 47 | ||
51 | 'toString': function () { | 48 | 'toString': function () { |
52 | return "Clipperz.PM.UI.Web.Components.UnlockPasswordComponent component"; | 49 | return "Clipperz.PM.UI.Web.Components.UnlockPasswordComponent component"; |
53 | }, | 50 | }, |
54 | 51 | ||
55 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
56 | 53 | ||
57 | 'getPassphrase': function () { | 54 | 'getPassphrase': function () { |
58 | /* var deferredResult; | 55 | /* var deferredResult; |
59 | 56 | ||
60 | if (this.passphrase() == null) { | 57 | if (this.passphrase() == null) { |
61 | this.deferredShowModal({'openFromElement': this.openFromElement()}); | 58 | this.deferredShowModal({'openFromElement': this.openFromElement()}); |
62 | deferredResult = this.deferred(); | 59 | deferredResult = this.deferred(); |
63 | } else { | 60 | } else { |
64 | deferredResult = MochiKit.Async.succeed(this.passphrase()); | 61 | deferredResult = MochiKit.Async.succeed(this.passphrase()); |
65 | } | 62 | } |
66 | 63 | ||
67 | return deferredResult; | 64 | return deferredResult; |
68 | */ | 65 | */ |
69 | 66 | ||
70 | this.deferredShowModal({'openFromElement': this.openFromElement()}); | 67 | this.deferredShowModal({'openFromElement': this.openFromElement()}); |
71 | 68 | ||
72 | return this.deferred(); | 69 | return this.deferred(); |
73 | }, | 70 | }, |
74 | 71 | ||
75 | //------------------------------------------------------------------------- | 72 | //------------------------------------------------------------------------- |
76 | 73 | ||
77 | 'deferredShowModal': function (someParameters) { | 74 | 'deferredShowModal': function (someParameters) { |
78 | return Clipperz.Async.callbacks("UnlockPasswordComponent.deferredShowModal", [ | 75 | return Clipperz.Async.callbacks("UnlockPasswordComponent.deferredShowModal", [ |
79 | MochiKit.Base.bind(Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.deferredShowModal, this, someParameters), | 76 | MochiKit.Base.bind(Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.deferredShowModal, this, someParameters), |
80 | MochiKit.Base.method(this, 'getElement', 'passphrase'), | 77 | MochiKit.Base.method(this, 'getElement', 'passphrase'), |
81 | MochiKit.Base.methodcaller('focus') | 78 | MochiKit.Base.methodcaller('focus') |
82 | ], {trace:false}) | 79 | ], {trace:false}) |
83 | }, | 80 | }, |
84 | 81 | ||
85 | //------------------------------------------------------------------------- | 82 | //------------------------------------------------------------------------- |
86 | 83 | ||
87 | 'openFromElement': function () { | 84 | 'openFromElement': function () { |
88 | return this._openFromElement; | 85 | return this._openFromElement; |
89 | }, | 86 | }, |
90 | 87 | ||
91 | 'onOkCloseToElement': function () { | 88 | 'onOkCloseToElement': function () { |
92 | return this._onOkCloseToElement; | 89 | return this._onOkCloseToElement; |
93 | }, | 90 | }, |
94 | 91 | ||
95 | 'onCancelCloseToElement': function () { | 92 | 'onCancelCloseToElement': function () { |
96 | return this._onCancelCloseToElement; | 93 | return this._onCancelCloseToElement; |
97 | }, | 94 | }, |
98 | 95 | ||
99 | //------------------------------------------------------------------------- | 96 | //------------------------------------------------------------------------- |
100 | 97 | ||
101 | 'renderSelf': function() { | 98 | 'renderSelf': function() { |
102 | Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.renderSelf.apply(this, arguments); | 99 | Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.renderSelf.apply(this, arguments); |
103 | 100 | ||
104 | this.append(this.getElement('container'), {tag:'div', cls:'passphrase', children: [ | 101 | this.append(this.getElement('container'), {tag:'div', cls:'passphrase', children: [ |
105 | // {tag:'form', id:this.getId('passphraseForm'), children:[ | 102 | // {tag:'form', id:this.getId('passphraseForm'), children:[ |
106 | {tag:'input', id:this.getId('passphrase'), type:'password', name:'passphrase', value:''} | 103 | {tag:'input', id:this.getId('passphrase'), type:'password', name:'passphrase', value:''} |
107 | // ]} | 104 | // ]} |
108 | ]}); | 105 | ]}); |
109 | 106 | ||
110 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userSuccessfullyLoggedIn', this, 'userSuccessfullyLoggedInHandler'); | 107 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userSuccessfullyLoggedIn', this, 'userSuccessfullyLoggedInHandler'); |
111 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userLoginFailed', this, 'userLoginFailedHandler'); | 108 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userLoginFailed', this, 'userLoginFailedHandler'); |
112 | 109 | ||
113 | 110 | ||
114 | // MochiKit.Async.callLater(0.1, MochiKit.Base.method(this.getElement('passphrase'), 'focus')); | 111 | // MochiKit.Async.callLater(0.1, MochiKit.Base.method(this.getElement('passphrase'), 'focus')); |
115 | // this.getElement('passphrase').select(); | 112 | // this.getElement('passphrase').select(); |
116 | }, | 113 | }, |
117 | 114 | ||
118 | //------------------------------------------------------------------------- | 115 | //------------------------------------------------------------------------- |
119 | 116 | ||
120 | 'showProgressBar': function () { | 117 | 'showProgressBar': function () { |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js index f26118e..d699dc6 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.UserInfoBox = function(args) { | 28 | Clipperz.PM.UI.Web.Components.UserInfoBox = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.UserInfoBox.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.UserInfoBox.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._slots = {}; | 33 | this._slots = {}; |
37 | this._isLocked = false; | 34 | this._isLocked = false; |
38 | this._lockTooltip = null; | 35 | this._lockTooltip = null; |
39 | 36 | ||
40 | return this; | 37 | return this; |
41 | } | 38 | } |
42 | 39 | ||
43 | //============================================================================= | 40 | //============================================================================= |
44 | 41 | ||
45 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.UserInfoBox, Clipperz.PM.UI.Common.Components.BaseComponent, { | 42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.UserInfoBox, Clipperz.PM.UI.Common.Components.BaseComponent, { |
46 | 43 | ||
47 | //------------------------------------------------------------------------- | 44 | //------------------------------------------------------------------------- |
48 | 45 | ||
49 | 'toString': function () { | 46 | 'toString': function () { |
50 | return "Clipperz.PM.UI.Web.Components.UserInfoBox component"; | 47 | return "Clipperz.PM.UI.Web.Components.UserInfoBox component"; |
51 | }, | 48 | }, |
52 | 49 | ||
53 | //------------------------------------------------------------------------- | 50 | //------------------------------------------------------------------------- |
54 | 51 | ||
55 | 'handleLogout': function(anEvent) { | 52 | 'handleLogout': function(anEvent) { |
56 | //Clipperz.log(">>> UserInfoBox.handleLogout"); | 53 | //Clipperz.log(">>> UserInfoBox.handleLogout"); |
57 | anEvent.preventDefault(); | 54 | anEvent.preventDefault(); |
58 | MochiKit.Signal.signal(this, 'logout'); | 55 | MochiKit.Signal.signal(this, 'logout'); |
59 | //Clipperz.log("<<< UserInfoBox.handleLogout"); | 56 | //Clipperz.log("<<< UserInfoBox.handleLogout"); |
60 | }, | 57 | }, |
61 | 58 | ||
62 | //------------------------------------------------------------------------- | 59 | //------------------------------------------------------------------------- |
63 | 60 | ||
64 | 'lockTooltip': function () { | 61 | 'lockTooltip': function () { |
65 | return this._lockTooltip; | 62 | return this._lockTooltip; |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | 66 | ||
70 | 'isLocked': function () { | 67 | 'isLocked': function () { |
71 | return this._isLocked; | 68 | return this._isLocked; |
72 | }, | 69 | }, |
73 | 70 | ||
74 | 'setIsLocked': function (aValue) { | 71 | 'setIsLocked': function (aValue) { |
75 | this._isLocked = aValue; | 72 | this._isLocked = aValue; |
76 | }, | 73 | }, |
77 | 74 | ||
78 | 'toggleLock': function(anEvent) { | 75 | 'toggleLock': function(anEvent) { |
79 | var deferredResult; | 76 | var deferredResult; |
80 | var shouldLock; | 77 | var shouldLock; |
81 | 78 | ||
82 | //console.log(">>> UserInfoBox.toggleLock [locked: " + this.isLocked() + "]"); | 79 | //console.log(">>> UserInfoBox.toggleLock [locked: " + this.isLocked() + "]"); |
83 | anEvent.preventDefault(); | 80 | anEvent.preventDefault(); |
84 | this.lockTooltip().hide(); | 81 | this.lockTooltip().hide(); |
85 | 82 | ||
86 | shouldLock = (this.isLocked() == false); | 83 | shouldLock = (this.isLocked() == false); |
87 | 84 | ||
88 | if (shouldLock) { | 85 | if (shouldLock) { |
89 | var maskElement; | 86 | var maskElement; |
90 | 87 | ||
91 | this.setIsLocked(true); | 88 | this.setIsLocked(true); |
92 | maskElement = this.getId('modalDialogMask'); | 89 | maskElement = this.getId('modalDialogMask'); |
93 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.toggleLock [lock]", [ | 90 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.toggleLock [lock]", [ |
94 | MochiKit.Base.partial(MochiKit.DOM.addElementClass, this.element(), 'locked'), | 91 | MochiKit.Base.partial(MochiKit.DOM.addElementClass, this.element(), 'locked'), |
95 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.appear, maskElement, {from:0.0, to:0.75, duration:0.5}), | 92 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.appear, maskElement, {from:0.0, to:0.75, duration:0.5}), |
96 | MochiKit.Base.method(Clipperz.PM.RunTime.mainController, 'setPassphraseDelegate', MochiKit.Base.method(this, 'askForPassphrase')), | 93 | MochiKit.Base.method(Clipperz.PM.RunTime.mainController, 'setPassphraseDelegate', MochiKit.Base.method(this, 'askForPassphrase')), |
97 | MochiKit.Base.partial(MochiKit.Signal.signal, this, 'lock') | 94 | MochiKit.Base.partial(MochiKit.Signal.signal, this, 'lock') |
98 | ], {trace:false}); | 95 | ], {trace:false}); |
99 | } else { | 96 | } else { |
100 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.toggleLock [unlock]", [ | 97 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.toggleLock [unlock]", [ |
101 | MochiKit.Base.partial(MochiKit.Signal.signal, this, 'unlock') | 98 | MochiKit.Base.partial(MochiKit.Signal.signal, this, 'unlock') |
102 | ], {trace:false}); | 99 | ], {trace:false}); |
103 | } | 100 | } |
104 | //console.log("<<< UserInfoBox.toggleLock"); | 101 | //console.log("<<< UserInfoBox.toggleLock"); |
105 | 102 | ||
106 | return deferredResult; | 103 | return deferredResult; |
107 | }, | 104 | }, |
108 | 105 | ||
109 | //------------------------------------------------------------------------- | 106 | //------------------------------------------------------------------------- |
110 | 107 | ||
111 | 'unlock': function () { | 108 | 'unlock': function () { |
112 | var deferredResult; | 109 | var deferredResult; |
113 | var maskElement; | 110 | var maskElement; |
114 | 111 | ||
115 | this.setIsLocked(false); | 112 | this.setIsLocked(false); |
116 | maskElement = this.getId('modalDialogMask'); | 113 | maskElement = this.getId('modalDialogMask'); |
117 | 114 | ||
118 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.unlock", [ | 115 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.unlock", [ |
119 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.fade, maskElement, {from:0.75, to:0.0, duration:0.5}), | 116 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.fade, maskElement, {from:0.75, to:0.0, duration:0.5}), |
120 | // Clipperz.Visual.deferredAnimation(MochiKit.Visual.fade, maskElement, {from:0.75, to:0.0, duration:0.5}), | 117 | // Clipperz.Visual.deferredAnimation(MochiKit.Visual.fade, maskElement, {from:0.75, to:0.0, duration:0.5}), |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js index 05563bf..9a0e744 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Controllers.AppController = function(args) { | 28 | Clipperz.PM.UI.Web.Controllers.AppController = function(args) { |
32 | 29 | ||
33 | this._user = null; | 30 | this._user = null; |
34 | this._tabSlotNames = { | 31 | this._tabSlotNames = { |
35 | //tabName: slotName | 32 | //tabName: slotName |
36 | 'cards': 'cardGrid', | 33 | 'cards': 'cardGrid', |
37 | // 'directLogins':'directLoginGrid', | 34 | // 'directLogins':'directLoginGrid', |
38 | 'account': 'accountPanel', | 35 | 'account': 'accountPanel', |
39 | 'data': 'dataPanel', | 36 | 'data': 'dataPanel', |
40 | 'tools': 'toolsPanel' | 37 | 'tools': 'toolsPanel' |
41 | }; | 38 | }; |
42 | 39 | ||
43 | //controllers | 40 | //controllers |
44 | this._cardsController= null; | 41 | this._cardsController= null; |
45 | //this._directLoginsController = null; | 42 | //this._directLoginsController = null; |
46 | this._filterController = null; //new Clipperz.PM.UI.Web.Controllers.FilterController(); | 43 | this._filterController = null; //new Clipperz.PM.UI.Web.Controllers.FilterController(); |
47 | 44 | ||
48 | //components | 45 | //components |
49 | this._appPage = null; | 46 | this._appPage = null; |
50 | this._userInfoBox = null; | 47 | this._userInfoBox = null; |
51 | this._tabSidePanel = null; | 48 | this._tabSidePanel = null; |
52 | 49 | ||
53 | // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'editCard', this, 'handleEditCard'); | 50 | // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'editCard', this, 'handleEditCard'); |
54 | // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'deleteCard',this, 'handleDeleteCard'); | 51 | // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'deleteCard',this, 'handleDeleteCard'); |
55 | 52 | ||
56 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userDataSuccessfullySaved',this, 'userDataSuccessfullySavedHandler'); | 53 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userDataSuccessfullySaved',this, 'userDataSuccessfullySavedHandler'); |
57 | 54 | ||
58 | return this; | 55 | return this; |
59 | } | 56 | } |
60 | 57 | ||
61 | MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.AppController.prototype, { | 58 | MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.AppController.prototype, { |
62 | 59 | ||
63 | 'toString': function() { | 60 | 'toString': function() { |
64 | return "Clipperz.PM.UI.Web.Controllers.AppController"; | 61 | return "Clipperz.PM.UI.Web.Controllers.AppController"; |
65 | }, | 62 | }, |
66 | 63 | ||
67 | //----------------------------------------------------------------------------- | 64 | //----------------------------------------------------------------------------- |
68 | 65 | ||
69 | 'setUser': function(anUser) { | 66 | 'setUser': function(anUser) { |
70 | this._user = anUser; | 67 | this._user = anUser; |
71 | }, | 68 | }, |
72 | 69 | ||
73 | 'user': function() { | 70 | 'user': function() { |
74 | return this._user; | 71 | return this._user; |
75 | }, | 72 | }, |
76 | 73 | ||
77 | //----------------------------------------------------------------------------- | 74 | //----------------------------------------------------------------------------- |
78 | /* | 75 | /* |
79 | 'tabSlotNames': function() { | 76 | 'tabSlotNames': function() { |
80 | return this._tabSlotNames; | 77 | return this._tabSlotNames; |
81 | }, | 78 | }, |
82 | */ | 79 | */ |
83 | 'slotNameForTab': function(aTabName) { | 80 | 'slotNameForTab': function(aTabName) { |
84 | return this._tabSlotNames[aTabName]; | 81 | return this._tabSlotNames[aTabName]; |
85 | }, | 82 | }, |
86 | 83 | ||
87 | 'hideAllAppPageTabSlots': function() { | 84 | 'hideAllAppPageTabSlots': function() { |
88 | var aTabName; | 85 | var aTabName; |
89 | 86 | ||
90 | for (aTabName in this._tabSlotNames) { | 87 | for (aTabName in this._tabSlotNames) { |
91 | this.appPage().hideSlot(this.slotNameForTab(aTabName)); | 88 | this.appPage().hideSlot(this.slotNameForTab(aTabName)); |
92 | } | 89 | } |
93 | }, | 90 | }, |
94 | 91 | ||
95 | //----------------------------------------------------------------------------- | 92 | //----------------------------------------------------------------------------- |
96 | 93 | ||
97 | 'appPage': function() { | 94 | 'appPage': function() { |
98 | if (this._appPage == null) { | 95 | if (this._appPage == null) { |
99 | this._appPage = new Clipperz.PM.UI.Web.Components.AppPage(); | 96 | this._appPage = new Clipperz.PM.UI.Web.Components.AppPage(); |
100 | } | 97 | } |
101 | 98 | ||
102 | return this._appPage; | 99 | return this._appPage; |
103 | }, | 100 | }, |
104 | 101 | ||
105 | //----------------------------------------------------------------------------- | 102 | //----------------------------------------------------------------------------- |
106 | 103 | ||
107 | 'tabSidePanel': function() { | 104 | 'tabSidePanel': function() { |
108 | if (this._tabSidePanel == null) { | 105 | if (this._tabSidePanel == null) { |
109 | this._tabSidePanel = new Clipperz.PM.UI.Web.Components.TabSidePanel(); | 106 | this._tabSidePanel = new Clipperz.PM.UI.Web.Components.TabSidePanel(); |
110 | } | 107 | } |
111 | 108 | ||
112 | return this._tabSidePanel; | 109 | return this._tabSidePanel; |
113 | }, | 110 | }, |
114 | 111 | ||
115 | //----------------------------------------------------------------------------- | 112 | //----------------------------------------------------------------------------- |
116 | 113 | ||
117 | 'userInfoBox': function() { | 114 | 'userInfoBox': function() { |
118 | if (this._userInfoBox == null) { | 115 | if (this._userInfoBox == null) { |
119 | this._userInfoBox = new Clipperz.PM.UI.Web.Components.UserInfoBox(); | 116 | this._userInfoBox = new Clipperz.PM.UI.Web.Components.UserInfoBox(); |
120 | 117 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js index 2340aeb..effde31 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Controllers.CardDialogController = function(args) { | 28 | Clipperz.PM.UI.Web.Controllers.CardDialogController = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Controllers.CardDialogController.superclass.constructor.call(this, args); | 31 | Clipperz.PM.UI.Web.Controllers.CardDialogController.superclass.constructor.call(this, args); |
35 | 32 | ||
36 | this._record = args.record || Clipperz.Base.exception.raise('MandatoryParameter'); | 33 | this._record = args.record || Clipperz.Base.exception.raise('MandatoryParameter'); |
37 | this._delegate = args.delegate || Clipperz.Base.exception.raise('MandatoryParameter'); | 34 | this._delegate = args.delegate || Clipperz.Base.exception.raise('MandatoryParameter'); |
38 | 35 | ||
39 | this._referenceElement = null; | 36 | this._referenceElement = null; |
40 | this._cardDialogComponent = null; | 37 | this._cardDialogComponent = null; |
41 | 38 | ||
42 | this._fieldsReferences = {}; | 39 | this._fieldsReferences = {}; |
43 | this._directLoginReferences = {}; | 40 | this._directLoginReferences = {}; |
44 | 41 | ||
45 | this._directLoginWizardController = null; | 42 | this._directLoginWizardController = null; |
46 | this._directLoginEditingComponent = null; | 43 | this._directLoginEditingComponent = null; |
47 | this._isDirectLoginEditingComponentVisible = false; | 44 | this._isDirectLoginEditingComponentVisible = false; |
48 | 45 | ||
49 | return this; | 46 | return this; |
50 | }; | 47 | }; |
51 | 48 | ||
52 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.CardDialogController, Object, { | 49 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.CardDialogController, Object, { |
53 | 50 | ||
54 | 'toString': function() { | 51 | 'toString': function() { |
55 | return "Clipperz.PM.UI.Web.Controllers.CardDialogController"; | 52 | return "Clipperz.PM.UI.Web.Controllers.CardDialogController"; |
56 | }, | 53 | }, |
57 | 54 | ||
58 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
59 | 56 | ||
60 | 'record': function () { | 57 | 'record': function () { |
61 | return this._record; | 58 | return this._record; |
62 | }, | 59 | }, |
63 | 60 | ||
64 | 'delegate': function () { | 61 | 'delegate': function () { |
65 | return this._delegate; | 62 | return this._delegate; |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | 66 | ||
70 | 'fieldsReferences': function () { | 67 | 'fieldsReferences': function () { |
71 | return this._fieldsReferences; | 68 | return this._fieldsReferences; |
72 | }, | 69 | }, |
73 | 70 | ||
74 | 'directLoginReferences': function () { | 71 | 'directLoginReferences': function () { |
75 | return this._directLoginReferences; | 72 | return this._directLoginReferences; |
76 | }, | 73 | }, |
77 | 74 | ||
78 | //------------------------------------------------------------------------- | 75 | //------------------------------------------------------------------------- |
79 | 76 | ||
80 | 'referenceElement': function () { | 77 | 'referenceElement': function () { |
81 | return this._referenceElement; | 78 | return this._referenceElement; |
82 | }, | 79 | }, |
83 | 80 | ||
84 | 'setReferenceElement': function (anElement) { | 81 | 'setReferenceElement': function (anElement) { |
85 | this._referenceElement = anElement; | 82 | this._referenceElement = anElement; |
86 | }, | 83 | }, |
87 | 84 | ||
88 | //------------------------------------------------------------------------- | 85 | //------------------------------------------------------------------------- |
89 | 86 | ||
90 | 'cardDialogComponent': function () { | 87 | 'cardDialogComponent': function () { |
91 | if (this._cardDialogComponent == null) { | 88 | if (this._cardDialogComponent == null) { |
92 | this._cardDialogComponent = new Clipperz.PM.UI.Web.Components.CardDialogComponent(); | 89 | this._cardDialogComponent = new Clipperz.PM.UI.Web.Components.CardDialogComponent(); |
93 | 90 | ||
94 | MochiKit.Signal.connect(this._cardDialogComponent, 'cancel', this, 'handleCancel'); | 91 | MochiKit.Signal.connect(this._cardDialogComponent, 'cancel', this, 'handleCancel'); |
95 | MochiKit.Signal.connect(this._cardDialogComponent, 'save', this, 'handleSave'); | 92 | MochiKit.Signal.connect(this._cardDialogComponent, 'save', this, 'handleSave'); |
96 | 93 | ||
97 | MochiKit.Signal.connect(this._cardDialogComponent, 'addField', this, 'handleAddField'); | 94 | MochiKit.Signal.connect(this._cardDialogComponent, 'addField', this, 'handleAddField'); |
98 | MochiKit.Signal.connect(this._cardDialogComponent, 'changedValue',this, 'handleChangedValue'); | 95 | MochiKit.Signal.connect(this._cardDialogComponent, 'changedValue',this, 'handleChangedValue'); |
99 | 96 | ||
100 | MochiKit.Signal.connect(this._cardDialogComponent, 'addDirectLogin',this, 'handleAddDirectLogin'); | 97 | MochiKit.Signal.connect(this._cardDialogComponent, 'addDirectLogin',this, 'handleAddDirectLogin'); |
101 | MochiKit.Signal.connect(this._cardDialogComponent, 'keyPressed',this, 'handleCardDialogComponentKeyPressed'); | 98 | MochiKit.Signal.connect(this._cardDialogComponent, 'keyPressed',this, 'handleCardDialogComponentKeyPressed'); |
102 | } | 99 | } |
103 | 100 | ||
104 | return this._cardDialogComponent; | 101 | return this._cardDialogComponent; |
105 | }, | 102 | }, |
106 | 103 | ||
107 | //========================================================================= | 104 | //========================================================================= |
108 | 105 | ||
109 | 'directLoginWizardController': function () { | 106 | 'directLoginWizardController': function () { |
110 | if (this._directLoginWizardController == null) { | 107 | if (this._directLoginWizardController == null) { |
111 | this._directLoginWizardController = new Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController({ | 108 | this._directLoginWizardController = new Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController({ |
112 | 'cardLabel': this.cardDialogComponent().title(), | 109 | 'cardLabel': this.cardDialogComponent().title(), |
113 | 'directLoginEditingComponent': this.directLoginEditingComponent() | 110 | 'directLoginEditingComponent': this.directLoginEditingComponent() |
114 | }) | 111 | }) |
115 | 112 | ||
116 | MochiKit.Signal.connect(this._directLoginWizardController, 'exit',this, 'handleHideDirectLoginEditingComponent'); | 113 | MochiKit.Signal.connect(this._directLoginWizardController, 'exit',this, 'handleHideDirectLoginEditingComponent'); |
117 | MochiKit.Signal.connect(this._directLoginWizardController, 'done',this, 'handleCompleteDirectLoginEditingComponent'); | 114 | MochiKit.Signal.connect(this._directLoginWizardController, 'done',this, 'handleCompleteDirectLoginEditingComponent'); |
118 | } | 115 | } |
119 | 116 | ||
120 | return this._directLoginWizardController; | 117 | return this._directLoginWizardController; |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js index b1a34b2..f58f0b8 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Controllers.CardsController = function() { | 28 | Clipperz.PM.UI.Web.Controllers.CardsController = function() { |
32 | Clipperz.PM.UI.Web.Controllers.CardsController.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Controllers.CardsController.superclass.constructor.apply(this, arguments); |
33 | 30 | ||
34 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'cardDialogComponentClosed', this, 'handleHideCard'); | 31 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'cardDialogComponentClosed', this, 'handleHideCard'); |
35 | 32 | ||
36 | return this; | 33 | return this; |
37 | } | 34 | } |
38 | 35 | ||
39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.CardsController, Clipperz.PM.UI.Web.Controllers.GridController, { | 36 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.CardsController, Clipperz.PM.UI.Web.Controllers.GridController, { |
40 | 37 | ||
41 | 'toString': function() { | 38 | 'toString': function() { |
42 | return "Clipperz.PM.UI.Web.Controllers.CardsController"; | 39 | return "Clipperz.PM.UI.Web.Controllers.CardsController"; |
43 | }, | 40 | }, |
44 | 41 | ||
45 | 'createGrid': function () { | 42 | 'createGrid': function () { |
46 | var grid; | 43 | var grid; |
47 | 44 | ||
48 | grid = new Clipperz.PM.UI.Web.Components.GridComponent({columnsManagers: [ | 45 | grid = new Clipperz.PM.UI.Web.Components.GridComponent({columnsManagers: [ |
49 | new Clipperz.PM.UI.Web.Components.FaviconColumnManager({ | 46 | new Clipperz.PM.UI.Web.Components.FaviconColumnManager({ |
50 | 'name': 'Cards.favicon', | 47 | 'name': 'Cards.favicon', |
51 | 'selector': MochiKit.Base.methodcaller('favicon'), | 48 | 'selector': MochiKit.Base.methodcaller('favicon'), |
52 | 'cssClass': 'favicon' | 49 | 'cssClass': 'favicon' |
53 | }), | 50 | }), |
54 | new Clipperz.PM.UI.Web.Components.LinkColumnManager({ | 51 | new Clipperz.PM.UI.Web.Components.LinkColumnManager({ |
55 | 'name': 'Cards.title', | 52 | 'name': 'Cards.title', |
56 | 'selector': MochiKit.Base.methodcaller('label'), | 53 | 'selector': MochiKit.Base.methodcaller('label'), |
57 | 'label': 'title', | 54 | 'label': 'title', |
58 | 'cssClass': 'title', | 55 | 'cssClass': 'title', |
59 | 'comparator': Clipperz.Base.caseInsensitiveCompare, | 56 | 'comparator': Clipperz.Base.caseInsensitiveCompare, |
60 | 'sortable': true, | 57 | 'sortable': true, |
61 | 'sorted': 'ASCENDING', | 58 | 'sorted': 'ASCENDING', |
62 | // 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'editCard', {objectData:anObject, element:anEvent.src()})} | 59 | // 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'editCard', {objectData:anObject, element:anEvent.src()})} |
63 | 'actionMethod': MochiKit.Base.method(this, 'handleShowCard') | 60 | 'actionMethod': MochiKit.Base.method(this, 'handleShowCard') |
64 | }), | 61 | }), |
65 | new Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager({ | 62 | new Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager({ |
66 | 'name': 'Cards.directLogins', | 63 | 'name': 'Cards.directLogins', |
67 | 'selector': MochiKit.Base.methodcaller('directLoginReferences'), | 64 | 'selector': MochiKit.Base.methodcaller('directLoginReferences'), |
68 | 'label': 'direct logins', | 65 | 'label': 'direct logins', |
69 | 'cssClass': 'directLogin' | 66 | 'cssClass': 'directLogin' |
70 | }), | 67 | }), |
71 | new Clipperz.PM.UI.Web.Components.DateColumnManager({ | 68 | new Clipperz.PM.UI.Web.Components.DateColumnManager({ |
72 | 'name': 'Cards.latestUpdate', | 69 | 'name': 'Cards.latestUpdate', |
73 | 'selector': MochiKit.Base.methodcaller('updateDate'), | 70 | 'selector': MochiKit.Base.methodcaller('updateDate'), |
74 | 'label': 'latest update', | 71 | 'label': 'latest update', |
75 | 'cssClass': 'latestUpdate', | 72 | 'cssClass': 'latestUpdate', |
76 | 'format': 'd-m-Y', | 73 | 'format': 'd-m-Y', |
77 | 'comparator': MochiKit.Base.compare, | 74 | 'comparator': MochiKit.Base.compare, |
78 | 'sortable': true, | 75 | 'sortable': true, |
79 | 'sorted': 'UNSORTED' | 76 | 'sorted': 'UNSORTED' |
80 | }), | 77 | }), |
81 | new Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager({ | 78 | new Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager({ |
82 | 'name': 'Cards.delete', | 79 | 'name': 'Cards.delete', |
83 | 'selector': MochiKit.Base.noop, | 80 | 'selector': MochiKit.Base.noop, |
84 | 'cssClass': 'delete', | 81 | 'cssClass': 'delete', |
85 | // 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'deleteCard', {objectData:anObject, element:anEvent.src()})} | 82 | // 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'deleteCard', {objectData:anObject, element:anEvent.src()})} |
86 | 'actionMethod': MochiKit.Base.method(this, 'handleDeleteCard') | 83 | 'actionMethod': MochiKit.Base.method(this, 'handleDeleteCard') |
87 | }) | 84 | }) |
88 | ]}); | 85 | ]}); |
89 | 86 | ||
90 | grid.setComponentForSlotNamed(new Clipperz.PM.UI.Web.Components.BookmarkletComponent(), 'headerSlot'); | 87 | grid.setComponentForSlotNamed(new Clipperz.PM.UI.Web.Components.BookmarkletComponent(), 'headerSlot'); |
91 | 88 | ||
92 | return grid; | 89 | return grid; |
93 | }, | 90 | }, |
94 | 91 | ||
95 | //----------------------------------------------------------------------------- | 92 | //----------------------------------------------------------------------------- |
96 | 93 | ||
97 | 'getRows': function () { | 94 | 'getRows': function () { |
98 | //TODO relying on user() in GridController, bad code smell :| | 95 | //TODO relying on user() in GridController, bad code smell :| |
99 | return this.user().getRecords(); | 96 | return this.user().getRecords(); |
100 | }, | 97 | }, |
101 | 98 | ||
102 | //============================================================================= | 99 | //============================================================================= |
103 | 100 | ||
104 | 'displayEmptyContent': function () { | 101 | 'displayEmptyContent': function () { |
105 | varemptyGridComponent; | 102 | varemptyGridComponent; |
106 | 103 | ||
107 | emptyGridComponent = new Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent(); | 104 | emptyGridComponent = new Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent(); |
108 | 105 | ||
109 | return Clipperz.Async.callbacks("CardsController.displayEmptyContent", [ | 106 | return Clipperz.Async.callbacks("CardsController.displayEmptyContent", [ |
110 | MochiKit.Base.method(this.grid(), 'setNoRowsGridComponent', emptyGridComponent), | 107 | MochiKit.Base.method(this.grid(), 'setNoRowsGridComponent', emptyGridComponent), |
111 | MochiKit.Base.bind(Clipperz.PM.UI.Web.Controllers.CardsController.superclass.displayEmptyContent, this) | 108 | MochiKit.Base.bind(Clipperz.PM.UI.Web.Controllers.CardsController.superclass.displayEmptyContent, this) |
112 | ], {trace:false}); | 109 | ], {trace:false}); |
113 | }, | 110 | }, |
114 | 111 | ||
115 | 'displaySelectedRows': function (aFilter) { | 112 | 'displaySelectedRows': function (aFilter) { |
116 | this.columnManagerWithName('Cards.directLogins').hideDirectLoginListPopup(); | 113 | this.columnManagerWithName('Cards.directLogins').hideDirectLoginListPopup(); |
117 | 114 | ||
118 | return Clipperz.PM.UI.Web.Controllers.CardsController.superclass.displaySelectedRows.apply(this, arguments); | 115 | return Clipperz.PM.UI.Web.Controllers.CardsController.superclass.displaySelectedRows.apply(this, arguments); |
119 | }, | 116 | }, |
120 | 117 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js index 38fdc08..c025a51 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController = function(args) { | 28 | Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController = function(args) { |
32 | this._directLoginEditingComponent = args.directLoginEditingComponent|| Clipperz.Base.exception.raise('MandatoryParameter'); | 29 | this._directLoginEditingComponent = args.directLoginEditingComponent|| Clipperz.Base.exception.raise('MandatoryParameter'); |
33 | this._cardLabel = args.cardLabel || Clipperz.Base.exception.raise('MandatoryParameter'); | 30 | this._cardLabel = args.cardLabel || Clipperz.Base.exception.raise('MandatoryParameter'); |
34 | 31 | ||
35 | MochiKit.Signal.connect(this._directLoginEditingComponent, 'changedValue',this, 'handleChangedValue'); | 32 | MochiKit.Signal.connect(this._directLoginEditingComponent, 'changedValue',this, 'handleChangedValue'); |
36 | MochiKit.Signal.connect(this._directLoginEditingComponent, 'moveForward',this, 'handleMoveForward'); | 33 | MochiKit.Signal.connect(this._directLoginEditingComponent, 'moveForward',this, 'handleMoveForward'); |
37 | MochiKit.Signal.connect(this._directLoginEditingComponent, 'keyPressed',this, 'handleDirectLoginEditingComponentKeyPressed'); | 34 | MochiKit.Signal.connect(this._directLoginEditingComponent, 'keyPressed',this, 'handleDirectLoginEditingComponentKeyPressed'); |
38 | 35 | ||
39 | this._directLogin = null; | 36 | this._directLogin = null; |
40 | this._directLoginHasJustBeenAdded = false; | 37 | this._directLoginHasJustBeenAdded = false; |
41 | 38 | ||
42 | this._rulerComponent = null; | 39 | this._rulerComponent = null; |
43 | 40 | ||
44 | this._steps = null; | 41 | this._steps = null; |
45 | this._currentStepIndex = 0; | 42 | this._currentStepIndex = 0; |
46 | this._isNextEnabled = false; | 43 | this._isNextEnabled = false; |
47 | 44 | ||
48 | this._recordFields = null; | 45 | this._recordFields = null; |
49 | this._originalBindings = null; | 46 | this._originalBindings = null; |
50 | 47 | ||
51 | this._bindingComponents = []; | 48 | this._bindingComponents = []; |
52 | this._formValueComponents = []; | 49 | this._formValueComponents = []; |
53 | 50 | ||
54 | return this; | 51 | return this; |
55 | } | 52 | } |
56 | 53 | ||
57 | MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController.prototype, { | 54 | MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController.prototype, { |
58 | 55 | ||
59 | 'toString': function() { | 56 | 'toString': function() { |
60 | return "Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController"; | 57 | return "Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController"; |
61 | }, | 58 | }, |
62 | 59 | ||
63 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
64 | 61 | ||
65 | 'directLogin': function () { | 62 | 'directLogin': function () { |
66 | return this._directLogin; | 63 | return this._directLogin; |
67 | }, | 64 | }, |
68 | 65 | ||
69 | //------------------------------------------------------------------------- | 66 | //------------------------------------------------------------------------- |
70 | 67 | ||
71 | 'directLoginHasJustBeenAdded': function () { | 68 | 'directLoginHasJustBeenAdded': function () { |
72 | return this._directLoginHasJustBeenAdded; | 69 | return this._directLoginHasJustBeenAdded; |
73 | }, | 70 | }, |
74 | 71 | ||
75 | 'setDirectLoginHasJustBeenAdded': function (aValue) { | 72 | 'setDirectLoginHasJustBeenAdded': function (aValue) { |
76 | this._directLoginHasJustBeenAdded = aValue; | 73 | this._directLoginHasJustBeenAdded = aValue; |
77 | }, | 74 | }, |
78 | 75 | ||
79 | //------------------------------------------------------------------------- | 76 | //------------------------------------------------------------------------- |
80 | 77 | ||
81 | 'directLoginEditingComponent': function () { | 78 | 'directLoginEditingComponent': function () { |
82 | return this._directLoginEditingComponent; | 79 | return this._directLoginEditingComponent; |
83 | }, | 80 | }, |
84 | 81 | ||
85 | //============================================================================= | 82 | //============================================================================= |
86 | 83 | ||
87 | 'cardLabel': function () { | 84 | 'cardLabel': function () { |
88 | return this._cardLabel; | 85 | return this._cardLabel; |
89 | }, | 86 | }, |
90 | 87 | ||
91 | //============================================================================= | 88 | //============================================================================= |
92 | 89 | ||
93 | 'resetCurrentStepIndex': function () { | 90 | 'resetCurrentStepIndex': function () { |
94 | this._currentStepIndex = 0; | 91 | this._currentStepIndex = 0; |
95 | this.rulerComponent().resetStatus(); | 92 | this.rulerComponent().resetStatus(); |
96 | }, | 93 | }, |
97 | 94 | ||
98 | //----------------------------------------------------------------------------- | 95 | //----------------------------------------------------------------------------- |
99 | 96 | ||
100 | 'enableNext': function (aValue) { | 97 | 'enableNext': function (aValue) { |
101 | this.rulerComponent().enableNext(aValue); | 98 | this.rulerComponent().enableNext(aValue); |
102 | this._isNextEnabled = aValue; | 99 | this._isNextEnabled = aValue; |
103 | }, | 100 | }, |
104 | 101 | ||
105 | 'isNextEnabled': function () { | 102 | 'isNextEnabled': function () { |
106 | return this._isNextEnabled; | 103 | return this._isNextEnabled; |
107 | }, | 104 | }, |
108 | 105 | ||
109 | //----------------------------------------------------------------------------- | 106 | //----------------------------------------------------------------------------- |
110 | 107 | ||
111 | 'enablePrevious': function (aValue) { | 108 | 'enablePrevious': function (aValue) { |
112 | this.rulerComponent().enablePrevious(aValue); | 109 | this.rulerComponent().enablePrevious(aValue); |
113 | }, | 110 | }, |
114 | 111 | ||
115 | //============================================================================= | 112 | //============================================================================= |
116 | 113 | ||
117 | 'bindingComponents': function () { | 114 | 'bindingComponents': function () { |
118 | return this._bindingComponents; | 115 | return this._bindingComponents; |
119 | }, | 116 | }, |
120 | 117 | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.js index 28401a2..6ca3be4 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.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 | /* | 26 | /* |
30 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); | 27 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); |
31 | 28 | ||
32 | Clipperz.PM.UI.Web.Controllers.DirectLoginsController = function() { | 29 | Clipperz.PM.UI.Web.Controllers.DirectLoginsController = function() { |
33 | Clipperz.PM.UI.Web.Controllers.DirectLoginsController.superclass.constructor.apply(this, arguments); | 30 | Clipperz.PM.UI.Web.Controllers.DirectLoginsController.superclass.constructor.apply(this, arguments); |
34 | 31 | ||
35 | return this; | 32 | return this; |
36 | }; | 33 | }; |
37 | 34 | ||
38 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.DirectLoginsController, Clipperz.PM.UI.Web.Controllers.GridController, { | 35 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.DirectLoginsController, Clipperz.PM.UI.Web.Controllers.GridController, { |
39 | 36 | ||
40 | 'createGrid': function () { | 37 | 'createGrid': function () { |
41 | return new Clipperz.PM.UI.Web.Components.GridComponent({columnsManagers: [ | 38 | return new Clipperz.PM.UI.Web.Components.GridComponent({columnsManagers: [ |
42 | new Clipperz.PM.UI.Web.Components.FaviconColumnManager({ | 39 | new Clipperz.PM.UI.Web.Components.FaviconColumnManager({ |
43 | 'name': 'DirectLogins.favicon', | 40 | 'name': 'DirectLogins.favicon', |
44 | 'selector': MochiKit.Base.methodcaller('favicon'), | 41 | 'selector': MochiKit.Base.methodcaller('favicon'), |
45 | 'cssClass': 'favicon' | 42 | 'cssClass': 'favicon' |
46 | }), | 43 | }), |
47 | // new Clipperz.PM.UI.Web.Components.LinkColumnManager({ | 44 | // new Clipperz.PM.UI.Web.Components.LinkColumnManager({ |
48 | new Clipperz.PM.UI.Web.Components.DirectLoginColumnManager({ | 45 | new Clipperz.PM.UI.Web.Components.DirectLoginColumnManager({ |
49 | 'name': 'DirectLogins.title', | 46 | 'name': 'DirectLogins.title', |
50 | 'selector': MochiKit.Base.methodcaller('label'), | 47 | 'selector': MochiKit.Base.methodcaller('label'), |
51 | 'label': 'title', | 48 | 'label': 'title', |
52 | 'cssClass': 'title', | 49 | 'cssClass': 'title', |
53 | 'comparator': Clipperz.Base.caseInsensitiveCompare, | 50 | 'comparator': Clipperz.Base.caseInsensitiveCompare, |
54 | 'sortable': true, | 51 | 'sortable': true, |
55 | 'sorted': 'ASCENDING', | 52 | 'sorted': 'ASCENDING', |
56 | 'actionMethod': MochiKit.Base.methodcaller('runDirectLogin') | 53 | 'actionMethod': MochiKit.Base.methodcaller('runDirectLogin') |
57 | }), | 54 | }), |
58 | // new Clipperz.PM.UI.Web.Components.TextColumnManager({ //should be StrengthColumnManager | 55 | // new Clipperz.PM.UI.Web.Components.TextColumnManager({ //should be StrengthColumnManager |
59 | // 'label':'strength', | 56 | // 'label':'strength', |
60 | // 'cssClass':'title', | 57 | // 'cssClass':'title', |
61 | // 'selector': MochiKit.Base.methodcaller('label') //should be 'strength' or a strenght evaluation function | 58 | // 'selector': MochiKit.Base.methodcaller('label') //should be 'strength' or a strenght evaluation function |
62 | // }), | 59 | // }), |
63 | new Clipperz.PM.UI.Web.Components.LinkColumnManager({ | 60 | new Clipperz.PM.UI.Web.Components.LinkColumnManager({ |
64 | 'name': 'DirectLogins.cardTitle', | 61 | 'name': 'DirectLogins.cardTitle', |
65 | 'selector': MochiKit.Base.compose(MochiKit.Base.methodcaller('label'), MochiKit.Base.methodcaller('record')), | 62 | 'selector': MochiKit.Base.compose(MochiKit.Base.methodcaller('label'), MochiKit.Base.methodcaller('record')), |
66 | 'label': 'card', | 63 | 'label': 'card', |
67 | 'cssClass': 'cardTitle', | 64 | 'cssClass': 'cardTitle', |
68 | 'comparator': Clipperz.Base.caseInsensitiveCompare, | 65 | 'comparator': Clipperz.Base.caseInsensitiveCompare, |
69 | 'sortable': true, | 66 | 'sortable': true, |
70 | 'sorted': 'UNSORTED', | 67 | 'sorted': 'UNSORTED', |
71 | 'actionMethod': MochiKit.Base.method(this, 'handleShowCard') | 68 | 'actionMethod': MochiKit.Base.method(this, 'handleShowCard') |
72 | }), | 69 | }), |
73 | // new Clipperz.PM.UI.Web.Components.TextColumnManager({ //should be StrengthColumnManager | 70 | // new Clipperz.PM.UI.Web.Components.TextColumnManager({ //should be StrengthColumnManager |
74 | // 'label':'last access', | 71 | // 'label':'last access', |
75 | // 'cssClass':'title', | 72 | // 'cssClass':'title', |
76 | // 'selector': MochiKit.Base.methodcaller('label') | 73 | // 'selector': MochiKit.Base.methodcaller('label') |
77 | // // 'sortable': true, | 74 | // // 'sortable': true, |
78 | // // 'sorted': 'UNSORTED' | 75 | // // 'sorted': 'UNSORTED' |
79 | // }), | 76 | // }), |
80 | // new Clipperz.PM.UI.Web.Components.TextColumnManager({ | 77 | // new Clipperz.PM.UI.Web.Components.TextColumnManager({ |
81 | // 'label':'commands', | 78 | // 'label':'commands', |
82 | // 'cssClass':'title', | 79 | // 'cssClass':'title', |
83 | // 'selector': MochiKit.Base.methodcaller('label'), //should be a function for commands display | 80 | // 'selector': MochiKit.Base.methodcaller('label'), //should be a function for commands display |
84 | // }), | 81 | // }), |
85 | new Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager({ | 82 | new Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager({ |
86 | 'name': 'DirectLogins.delete', | 83 | 'name': 'DirectLogins.delete', |
87 | 'selector': MochiKit.Base.noop, | 84 | 'selector': MochiKit.Base.noop, |
88 | 'cssClass': 'delete', | 85 | 'cssClass': 'delete', |
89 | // 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'deleteDirectLogin', {objectData:anObject, element:anEvent.src()})} | 86 | // 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'deleteDirectLogin', {objectData:anObject, element:anEvent.src()})} |
90 | 'actionMethod': MochiKit.Base.method(this, 'handleDeleteDirectLogin') | 87 | 'actionMethod': MochiKit.Base.method(this, 'handleDeleteDirectLogin') |
91 | }) | 88 | }) |
92 | ]}); | 89 | ]}); |
93 | 90 | ||
94 | }, | 91 | }, |
95 | 92 | ||
96 | //----------------------------------------------------------------------------- | 93 | //----------------------------------------------------------------------------- |
97 | 94 | ||
98 | 'getRows': function () { | 95 | 'getRows': function () { |
99 | //TODO: relying on user() in GridController, bad code smell :| | 96 | //TODO: relying on user() in GridController, bad code smell :| |
100 | return this.user().getDirectLogins(); | 97 | return this.user().getDirectLogins(); |
101 | }, | 98 | }, |
102 | 99 | ||
103 | //----------------------------------------------------------------------------- | 100 | //----------------------------------------------------------------------------- |
104 | 101 | ||
105 | 'handleShowCard': function (anObject, anEvent) { | 102 | 'handleShowCard': function (anObject, anEvent) { |
106 | var cardDialogController; | 103 | var cardDialogController; |
107 | 104 | ||
108 | cardDialogController = new Clipperz.PM.UI.Web.Controllers.CardDialogController({record:anObject.record()}) | 105 | cardDialogController = new Clipperz.PM.UI.Web.Controllers.CardDialogController({record:anObject.record()}) |
109 | cardDialogController.run(anEvent.src()); | 106 | cardDialogController.run(anEvent.src()); |
110 | }, | 107 | }, |
111 | 108 | ||
112 | //----------------------------------------------------------------------------- | 109 | //----------------------------------------------------------------------------- |
113 | 110 | ||
114 | 'handleDeleteDirectLogin': function (anObject, anEvent) { | 111 | 'handleDeleteDirectLogin': function (anObject, anEvent) { |
115 | var deferredResult; | 112 | var deferredResult; |
116 | var confirmationDialog; | 113 | var confirmationDialog; |
117 | 114 | ||
118 | confirmationDialog = new Clipperz.PM.UI.Common.Components.SimpleMessagePanel({ | 115 | confirmationDialog = new Clipperz.PM.UI.Common.Components.SimpleMessagePanel({ |
119 | title:"Delete DirectLogin", | 116 | title:"Delete DirectLogin", |
120 | text:"Do you want to delete …", | 117 | text:"Do you want to delete …", |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js index 13e02bc..bfc093a 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Controllers.FilterController = function(args) { | 28 | Clipperz.PM.UI.Web.Controllers.FilterController = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Controllers.FilterController.superclass.constructor.call(this, args); | 31 | Clipperz.PM.UI.Web.Controllers.FilterController.superclass.constructor.call(this, args); |
35 | 32 | ||
36 | this._filterElements = []; | 33 | this._filterElements = []; |
37 | this._filter = ""; | 34 | this._filter = ""; |
38 | 35 | ||
39 | this._pendingSearchClicks = 0; | 36 | this._pendingSearchClicks = 0; |
40 | 37 | ||
41 | return this; | 38 | return this; |
42 | }; | 39 | }; |
43 | 40 | ||
44 | 41 | ||
45 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.FilterController, Object, { | 42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.FilterController, Object, { |
46 | 43 | ||
47 | //----------------------------------------------------------------------------- | 44 | //----------------------------------------------------------------------------- |
48 | 45 | ||
49 | 'getFilter': function () { | 46 | 'getFilter': function () { |
50 | return this._filter; | 47 | return this._filter; |
51 | }, | 48 | }, |
52 | 49 | ||
53 | '_setFilter': function (aFilterElement, aFilter) { | 50 | '_setFilter': function (aFilterElement, aFilter) { |
54 | if (aFilter != this._filter) { | 51 | if (aFilter != this._filter) { |
55 | this._filter = aFilter; | 52 | this._filter = aFilter; |
56 | MochiKit.Signal.signal(this, 'filterUpdated', aFilter); | 53 | MochiKit.Signal.signal(this, 'filterUpdated', aFilter); |
57 | this.updateFilterElements(aFilterElement, aFilter); | 54 | this.updateFilterElements(aFilterElement, aFilter); |
58 | } | 55 | } |
59 | }, | 56 | }, |
60 | 57 | ||
61 | 'setFilter': function (aFilter) { | 58 | 'setFilter': function (aFilter) { |
62 | this._setFilter(null, aFilter); | 59 | this._setFilter(null, aFilter); |
63 | }, | 60 | }, |
64 | 61 | ||
65 | //----------------------------------------------------------------------------- | 62 | //----------------------------------------------------------------------------- |
66 | 63 | ||
67 | 'filterElements': function () { | 64 | 'filterElements': function () { |
68 | return this._filterElements; | 65 | return this._filterElements; |
69 | }, | 66 | }, |
70 | 67 | ||
71 | 'registerFilterElement': function (aFilterElement) { | 68 | 'registerFilterElement': function (aFilterElement) { |
72 | //Clipperz.log("=== FilterController.registerFilterElement", aFilterElement); | 69 | //Clipperz.log("=== FilterController.registerFilterElement", aFilterElement); |
73 | this._filterElements.push(aFilterElement); | 70 | this._filterElements.push(aFilterElement); |
74 | MochiKit.Signal.connect(aFilterElement, 'onkeydown', this, 'searchClickHandler'); | 71 | MochiKit.Signal.connect(aFilterElement, 'onkeydown', this, 'searchClickHandler'); |
75 | MochiKit.Signal.connect(aFilterElement, 'onfocus', this, 'searchClickHandler'); | 72 | MochiKit.Signal.connect(aFilterElement, 'onfocus', this, 'searchClickHandler'); |
76 | }, | 73 | }, |
77 | 74 | ||
78 | 'removeFilterElement': function (aFilterElement) { | 75 | 'removeFilterElement': function (aFilterElement) { |
79 | var i; | 76 | var i; |
80 | var filterElements; | 77 | var filterElements; |
81 | for (i=0; i < filterElements; i++) { | 78 | for (i=0; i < filterElements; i++) { |
82 | if (filterElements[i] == aFilterElement); | 79 | if (filterElements[i] == aFilterElement); |
83 | filterElements.splice(i, 1); | 80 | filterElements.splice(i, 1); |
84 | // TODO unregister/disconnect filterElement ??MochiKit.Signal.disconnect(this.grid().filterElement(), 'updateFilter', this.filterController(), 'handleUpdateFilter'); | 81 | // TODO unregister/disconnect filterElement ??MochiKit.Signal.disconnect(this.grid().filterElement(), 'updateFilter', this.filterController(), 'handleUpdateFilter'); |
85 | } | 82 | } |
86 | }, | 83 | }, |
87 | 84 | ||
88 | 'updateFilterElements': function (aSourceElement, aFilterString) { | 85 | 'updateFilterElements': function (aSourceElement, aFilterString) { |
89 | MochiKit.Iter.forEach(this.filterElements(), | 86 | MochiKit.Iter.forEach(this.filterElements(), |
90 | function (aFilterElement) { | 87 | function (aFilterElement) { |
91 | if (aFilterElement != aSourceElement) { | 88 | if (aFilterElement != aSourceElement) { |
92 | aFilterElement.value = aFilterString; | 89 | aFilterElement.value = aFilterString; |
93 | } | 90 | } |
94 | } | 91 | } |
95 | ); | 92 | ); |
96 | 93 | ||
97 | if (aSourceElement != null) { | 94 | if (aSourceElement != null) { |
98 | aSourceElement.focus(); | 95 | aSourceElement.focus(); |
99 | } | 96 | } |
100 | }, | 97 | }, |
101 | 98 | ||
102 | //----------------------------------------------------------------------------- | 99 | //----------------------------------------------------------------------------- |
103 | 100 | ||
104 | 'run': function () { | 101 | 'run': function () { |
105 | //Clipperz.log("=== FilterController.run"); | 102 | //Clipperz.log("=== FilterController.run"); |
106 | }, | 103 | }, |
107 | 104 | ||
108 | //----------------------------------------------------------------------------- | 105 | //----------------------------------------------------------------------------- |
109 | 106 | ||
110 | 'pendingSearchClicks': function () { | 107 | 'pendingSearchClicks': function () { |
111 | return this._pendingSearchClicks; | 108 | return this._pendingSearchClicks; |
112 | }, | 109 | }, |
113 | 110 | ||
114 | 'incrementPendingSearchClicks': function () { | 111 | 'incrementPendingSearchClicks': function () { |
115 | this._pendingSearchClicks++; | 112 | this._pendingSearchClicks++; |
116 | }, | 113 | }, |
117 | 114 | ||
118 | 'decrementPendingSearchClicks': function () { | 115 | 'decrementPendingSearchClicks': function () { |
119 | this._pendingSearchClicks--; | 116 | this._pendingSearchClicks--; |
120 | }, | 117 | }, |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js index 740a091..8bb3016 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Controllers.GridController = function(args) { | 28 | Clipperz.PM.UI.Web.Controllers.GridController = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Controllers.GridController.superclass.constructor.call(this, args); | 31 | Clipperz.PM.UI.Web.Controllers.GridController.superclass.constructor.call(this, args); |
35 | 32 | ||
36 | this._grid = null; | 33 | this._grid = null; |
37 | this._user = null; | 34 | this._user = null; |
38 | this._sortedColumnManager = null; | 35 | this._sortedColumnManager = null; |
39 | this._cachedObjects = null; | 36 | this._cachedObjects = null; |
40 | this._filterController = args.filterController || null; | 37 | this._filterController = args.filterController || null; |
41 | 38 | ||
42 | this._deferredDisplaySelectedRowsInvocation = null; | 39 | this._deferredDisplaySelectedRowsInvocation = null; |
43 | 40 | ||
44 | return this; | 41 | return this; |
45 | }; | 42 | }; |
46 | 43 | ||
47 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.GridController, Object, { | 44 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.GridController, Object, { |
48 | 45 | ||
49 | 'toString': function() { | 46 | 'toString': function() { |
50 | return "Clipperz.PM.UI.Web.Controllers.GridController"; | 47 | return "Clipperz.PM.UI.Web.Controllers.GridController"; |
51 | }, | 48 | }, |
52 | 49 | ||
53 | //----------------------------------------------------------------------------- | 50 | //----------------------------------------------------------------------------- |
54 | 51 | ||
55 | 'createGrid': function () { | 52 | 'createGrid': function () { |
56 | throw Clipperz.Base.exception.AbstractMethod; | 53 | throw Clipperz.Base.exception.AbstractMethod; |
57 | }, | 54 | }, |
58 | 55 | ||
59 | 'setupWithGrid': function (aGrid) { | 56 | 'setupWithGrid': function (aGrid) { |
60 | this._grid = aGrid; | 57 | this._grid = aGrid; |
61 | 58 | ||
62 | if (this._grid != null) { | 59 | if (this._grid != null) { |
63 | MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) { | 60 | MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) { |
64 | if (aColumnManager.isSortable()) { | 61 | if (aColumnManager.isSortable()) { |
65 | if (aColumnManager.isSorted()) { | 62 | if (aColumnManager.isSorted()) { |
66 | this.setSortedColumnManager(aColumnManager); | 63 | this.setSortedColumnManager(aColumnManager); |
67 | } | 64 | } |
68 | MochiKit.Signal.connect(aColumnManager, 'sort', this, 'handleColumnManagerSort'); | 65 | MochiKit.Signal.connect(aColumnManager, 'sort', this, 'handleColumnManagerSort'); |
69 | } | 66 | } |
70 | MochiKit.Signal.connect(aColumnManager, 'selectRow', this, 'handleColumnManagerSelectRow'); | 67 | MochiKit.Signal.connect(aColumnManager, 'selectRow', this, 'handleColumnManagerSelectRow'); |
71 | MochiKit.Signal.connect(aColumnManager, 'unselectRow', this, 'handleColumnManagerUnselectRow'); | 68 | MochiKit.Signal.connect(aColumnManager, 'unselectRow', this, 'handleColumnManagerUnselectRow'); |
72 | }, this); | 69 | }, this); |
73 | } | 70 | } |
74 | }, | 71 | }, |
75 | 72 | ||
76 | 'grid': function() { | 73 | 'grid': function() { |
77 | if (this._grid == null) { | 74 | if (this._grid == null) { |
78 | this.setupWithGrid(this.createGrid()); | 75 | this.setupWithGrid(this.createGrid()); |
79 | } | 76 | } |
80 | 77 | ||
81 | return this._grid; | 78 | return this._grid; |
82 | }, | 79 | }, |
83 | 80 | ||
84 | 'filterController': function () { | 81 | 'filterController': function () { |
85 | //Clipperz.log('GridController.filterController >>>', this._filterController); | 82 | //Clipperz.log('GridController.filterController >>>', this._filterController); |
86 | if (this._filterController == null) { | 83 | if (this._filterController == null) { |
87 | this._filterController = new Clipperz.PM.UI.Web.Controllers.FilterController(); | 84 | this._filterController = new Clipperz.PM.UI.Web.Controllers.FilterController(); |
88 | } | 85 | } |
89 | //Clipperz.log('GridController.filterController <<<', this._filterController); | 86 | //Clipperz.log('GridController.filterController <<<', this._filterController); |
90 | return this._filterController; | 87 | return this._filterController; |
91 | }, | 88 | }, |
92 | 89 | ||
93 | //----------------------------------------------------------------------------- | 90 | //----------------------------------------------------------------------------- |
94 | 91 | ||
95 | 'columnsManagers': function () { | 92 | 'columnsManagers': function () { |
96 | return this.grid().columnsManagers(); | 93 | return this.grid().columnsManagers(); |
97 | }, | 94 | }, |
98 | 95 | ||
99 | 'columnManagerWithName': function (aName) { | 96 | 'columnManagerWithName': function (aName) { |
100 | varmanagers; | 97 | varmanagers; |
101 | var result; | 98 | var result; |
102 | 99 | ||
103 | managers = MochiKit.Base.filter(function (aManager) { return aManager.name() == aName; } , this.columnsManagers()); | 100 | managers = MochiKit.Base.filter(function (aManager) { return aManager.name() == aName; } , this.columnsManagers()); |
104 | 101 | ||
105 | if (managers.length == 1) { | 102 | if (managers.length == 1) { |
106 | result = managers[0]; | 103 | result = managers[0]; |
107 | } else if (managers.length == 0) { | 104 | } else if (managers.length == 0) { |
108 | result = null; | 105 | result = null; |
109 | } else { | 106 | } else { |
110 | throw "WTF!!!"; | 107 | throw "WTF!!!"; |
111 | } | 108 | } |
112 | 109 | ||
113 | return result; | 110 | return result; |
114 | }, | 111 | }, |
115 | 112 | ||
116 | 'sortedColumnManager': function () { | 113 | 'sortedColumnManager': function () { |
117 | return this._sortedColumnManager; | 114 | return this._sortedColumnManager; |
118 | }, | 115 | }, |
119 | 116 | ||
120 | 'setSortedColumnManager': function(aValue) { | 117 | 'setSortedColumnManager': function(aValue) { |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js index d88af41..d0b378c 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Controllers.LoginController = function(args) { | 28 | Clipperz.PM.UI.Web.Controllers.LoginController = function(args) { |
32 | this._args = args || {}; | 29 | this._args = args || {}; |
33 | 30 | ||
34 | this._loginPage = null; | 31 | this._loginPage = null; |
35 | 32 | ||
36 | this._newUserWizardController = null; | 33 | this._newUserWizardController = null; |
37 | this._newUserCreationComponent = null; | 34 | this._newUserCreationComponent = null; |
38 | 35 | ||
39 | return this; | 36 | return this; |
40 | } | 37 | } |
41 | 38 | ||
42 | MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.LoginController.prototype, { | 39 | MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.LoginController.prototype, { |
43 | 40 | ||
44 | 'toString': function() { | 41 | 'toString': function() { |
45 | return "Clipperz.PM.UI.Web.Controllers.LoginController"; | 42 | return "Clipperz.PM.UI.Web.Controllers.LoginController"; |
46 | }, | 43 | }, |
47 | 44 | ||
48 | 'args': function () { | 45 | 'args': function () { |
49 | return this._args; | 46 | return this._args; |
50 | }, | 47 | }, |
51 | 48 | ||
52 | //----------------------------------------------------------------------------- | 49 | //----------------------------------------------------------------------------- |
53 | 50 | ||
54 | 'loginPage': function() { | 51 | 'loginPage': function() { |
55 | if (this._loginPage == null) { | 52 | if (this._loginPage == null) { |
56 | this._loginPage = new Clipperz.PM.UI.Web.Components.LoginPage(); | 53 | this._loginPage = new Clipperz.PM.UI.Web.Components.LoginPage(); |
57 | 54 | ||
58 | MochiKit.Signal.connect(this._loginPage, 'createNewAccountClick', this, 'handleCreateNewAccountClick') | 55 | MochiKit.Signal.connect(this._loginPage, 'createNewAccountClick', this, 'handleCreateNewAccountClick') |
59 | } | 56 | } |
60 | 57 | ||
61 | return this._loginPage; | 58 | return this._loginPage; |
62 | }, | 59 | }, |
63 | 60 | ||
64 | //----------------------------------------------------------------------------- | 61 | //----------------------------------------------------------------------------- |
65 | 62 | ||
66 | 'run': function(args) { | 63 | 'run': function(args) { |
67 | varslot; | 64 | varslot; |
68 | varloginPage; | 65 | varloginPage; |
69 | varloginForm; | 66 | varloginForm; |
70 | 67 | ||
71 | slot = args.slot; | 68 | slot = args.slot; |
72 | 69 | ||
73 | loginForm =new Clipperz.PM.UI.Web.Components.LoginForm({'autocomplete': this.args()['autocomplete']}); | 70 | loginForm =new Clipperz.PM.UI.Web.Components.LoginForm({'autocomplete': this.args()['autocomplete']}); |
74 | 71 | ||
75 | slot.setContent(this.loginPage()); | 72 | slot.setContent(this.loginPage()); |
76 | this.loginPage().slotNamed('loginForm').setContent(loginForm); | 73 | this.loginPage().slotNamed('loginForm').setContent(loginForm); |
77 | 74 | ||
78 | MochiKit.Signal.connect(loginForm, 'doLogin', MochiKit.Base.method(this, 'doLogin', loginForm)); | 75 | MochiKit.Signal.connect(loginForm, 'doLogin', MochiKit.Base.method(this, 'doLogin', loginForm)); |
79 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'doLogin', MochiKit.Base.method(this, 'doLogin', loginForm)); | 76 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'doLogin', MochiKit.Base.method(this, 'doLogin', loginForm)); |
80 | }, | 77 | }, |
81 | 78 | ||
82 | //----------------------------------------------------------------------------- | 79 | //----------------------------------------------------------------------------- |
83 | 80 | ||
84 | 'doLogin': function(aLoginForm, anEvent) { | 81 | 'doLogin': function(aLoginForm, anEvent) { |
85 | var deferredResult; | 82 | var deferredResult; |
86 | varparameters; | 83 | varparameters; |
87 | // varshouldUseOTP; | 84 | // varshouldUseOTP; |
88 | var loginProgress; | 85 | var loginProgress; |
89 | varuser; | 86 | varuser; |
90 | var getPassphraseDelegate; | 87 | var getPassphraseDelegate; |
91 | 88 | ||
92 | parameters = anEvent; | 89 | parameters = anEvent; |
93 | // shouldUseOTP = (typeof(parameters.passphrase) == 'undefined'); | 90 | // shouldUseOTP = (typeof(parameters.passphrase) == 'undefined'); |
94 | 91 | ||
95 | getPassphraseDelegate = MochiKit.Base.partial(MochiKit.Async.succeed, parameters.passphrase); | 92 | getPassphraseDelegate = MochiKit.Base.partial(MochiKit.Async.succeed, parameters.passphrase); |
96 | user = new Clipperz.PM.DataModel.User({'username':parameters.username, 'getPassphraseFunction':MochiKit.Base.method(Clipperz.PM.RunTime.mainController, 'getPassphrase')}); | 93 | user = new Clipperz.PM.DataModel.User({'username':parameters.username, 'getPassphraseFunction':MochiKit.Base.method(Clipperz.PM.RunTime.mainController, 'getPassphrase')}); |
97 | 94 | ||
98 | loginProgress = new Clipperz.PM.UI.Web.Components.LoginProgress(); | 95 | loginProgress = new Clipperz.PM.UI.Web.Components.LoginProgress(); |
99 | 96 | ||
100 | deferredResult = new Clipperz.Async.Deferred("LoginController.doLogin", {trace:false}); | 97 | deferredResult = new Clipperz.Async.Deferred("LoginController.doLogin", {trace:false}); |
101 | deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'initProgress', {'steps':4}); | 98 | deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'initProgress', {'steps':4}); |
102 | deferredResult.addMethod(Clipperz.PM.RunTime.mainController, 'setPassphraseDelegate', getPassphraseDelegate); | 99 | deferredResult.addMethod(Clipperz.PM.RunTime.mainController, 'setPassphraseDelegate', getPassphraseDelegate); |
103 | deferredResult.addMethod(loginProgress, 'deferredShowModal', {deferredObject:deferredResult, openFromElement:aLoginForm.submitButtonElement()}); | 100 | deferredResult.addMethod(loginProgress, 'deferredShowModal', {deferredObject:deferredResult, openFromElement:aLoginForm.submitButtonElement()}); |
104 | deferredResult.addMethod(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'deferredEntropyCollection'); | 101 | deferredResult.addMethod(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'deferredEntropyCollection'); |
105 | // if (shouldUseOTP == false) { | 102 | // if (shouldUseOTP == false) { |
106 | deferredResult.addMethod(user, 'login'); | 103 | deferredResult.addMethod(user, 'login'); |
107 | // } else { | 104 | // } else { |
108 | // deferredResult.addMethod(user, 'loginUsingOTP', parameters.username, parameters.otp); | 105 | // deferredResult.addMethod(user, 'loginUsingOTP', parameters.username, parameters.otp); |
109 | // } | 106 | // } |
110 | deferredResult.addCallback(function(aLoginProgress, res) { | 107 | deferredResult.addCallback(function(aLoginProgress, res) { |
111 | aLoginProgress.disableCancel(); | 108 | aLoginProgress.disableCancel(); |
112 | return res; | 109 | return res; |
113 | }, loginProgress); | 110 | }, loginProgress); |
114 | deferredResult.addCallback(function () { | 111 | deferredResult.addCallback(function () { |
115 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'CARDS_CONTROLLER_DID_RUN',MochiKit.Base.method(loginProgress, 'deferredHideModalAndRemove', {closeToElement:MochiKit.DOM.currentDocument().body})); | 112 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'CARDS_CONTROLLER_DID_RUN',MochiKit.Base.method(loginProgress, 'deferredHideModalAndRemove', {closeToElement:MochiKit.DOM.currentDocument().body})); |
116 | }) | 113 | }) |
117 | deferredResult.addMethod(this, 'userLoggedIn', user, loginProgress, aLoginForm); | 114 | deferredResult.addMethod(this, 'userLoggedIn', user, loginProgress, aLoginForm); |
118 | deferredResult.addErrback (MochiKit.Base.method(this, 'handleFailedLogin', loginProgress)); | 115 | deferredResult.addErrback (MochiKit.Base.method(this, 'handleFailedLogin', loginProgress)); |
119 | 116 | ||
120 | deferredResult.addErrback (MochiKit.Base.method(loginProgress, 'deferredHideModalAndRemove', {closeToElement:aLoginForm.submitButtonElement()})); | 117 | deferredResult.addErrback (MochiKit.Base.method(loginProgress, 'deferredHideModalAndRemove', {closeToElement:aLoginForm.submitButtonElement()})); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js index aa0d6ad..c83e3c0 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Controllers.MainController = function(args) { | 28 | Clipperz.PM.UI.Web.Controllers.MainController = function(args) { |
32 | this._args = args; | 29 | this._args = args; |
33 | 30 | ||
34 | //controllers | 31 | //controllers |
35 | this._loginController =null; | 32 | this._loginController =null; |
36 | this._appController =null; | 33 | this._appController =null; |
37 | 34 | ||
38 | //components | 35 | //components |
39 | this._headerComponent = null; | 36 | this._headerComponent = null; |
40 | this._pageComponent =null; | 37 | this._pageComponent =null; |
41 | this._footerComponent = null; | 38 | this._footerComponent = null; |
42 | 39 | ||
43 | this._passphraseDelegateLock = new MochiKit.Async.DeferredLock(); | 40 | this._passphraseDelegateLock = new MochiKit.Async.DeferredLock(); |
44 | this._passphraseDelegateLock.acquire(); | 41 | this._passphraseDelegateLock.acquire(); |
45 | //Clipperz.log('MainController init _passphraseDelegateLock', this._passphraseDelegateLock); | 42 | //Clipperz.log('MainController init _passphraseDelegateLock', this._passphraseDelegateLock); |
46 | this._passphraseDelegate = null; | 43 | this._passphraseDelegate = null; |
47 | 44 | ||
48 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'remoteRequestSent', this, 'handleRemoteRequestSent'); | 45 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'remoteRequestSent', this, 'handleRemoteRequestSent'); |
49 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'remoteRequestReceived',this, 'handleRemoteRequestReceived'); | 46 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'remoteRequestReceived',this, 'handleRemoteRequestReceived'); |
50 | 47 | ||
51 | return this; | 48 | return this; |
52 | } | 49 | } |
53 | 50 | ||
54 | MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.MainController.prototype, { | 51 | MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.MainController.prototype, { |
55 | 52 | ||
56 | 'toString': function() { | 53 | 'toString': function() { |
57 | return "Clipperz.PM.UI.Web.Controllers.MainController"; | 54 | return "Clipperz.PM.UI.Web.Controllers.MainController"; |
58 | }, | 55 | }, |
59 | 56 | ||
60 | 'args': function () { | 57 | 'args': function () { |
61 | return this._args; | 58 | return this._args; |
62 | }, | 59 | }, |
63 | 60 | ||
64 | //----------------------------------------------------------------------------- | 61 | //----------------------------------------------------------------------------- |
65 | 62 | ||
66 | 'headerComponent': function() { | 63 | 'headerComponent': function() { |
67 | if (this._headerComponent == null) { | 64 | if (this._headerComponent == null) { |
68 | this._headerComponent = new Clipperz.PM.UI.Web.Components.PageHeader(); | 65 | this._headerComponent = new Clipperz.PM.UI.Web.Components.PageHeader(); |
69 | } | 66 | } |
70 | 67 | ||
71 | return this._headerComponent; | 68 | return this._headerComponent; |
72 | }, | 69 | }, |
73 | 70 | ||
74 | 'footerComponent': function() { | 71 | 'footerComponent': function() { |
75 | if (this._footerComponent == null) { | 72 | if (this._footerComponent == null) { |
76 | this._footerComponent = new Clipperz.PM.UI.Web.Components.PageFooter(); | 73 | this._footerComponent = new Clipperz.PM.UI.Web.Components.PageFooter(); |
77 | } | 74 | } |
78 | 75 | ||
79 | return this._footerComponent; | 76 | return this._footerComponent; |
80 | }, | 77 | }, |
81 | 78 | ||
82 | //----------------------------------------------------------------------------- | 79 | //----------------------------------------------------------------------------- |
83 | 80 | ||
84 | 'pageComponent': function() { | 81 | 'pageComponent': function() { |
85 | if (this._pageComponent == null) { | 82 | if (this._pageComponent == null) { |
86 | this._pageComponent = new Clipperz.PM.UI.Web.Components.Page({element:MochiKit.DOM.getElement('mainDiv')}); | 83 | this._pageComponent = new Clipperz.PM.UI.Web.Components.Page({element:MochiKit.DOM.getElement('mainDiv')}); |
87 | } | 84 | } |
88 | 85 | ||
89 | return this._pageComponent; | 86 | return this._pageComponent; |
90 | }, | 87 | }, |
91 | 88 | ||
92 | //----------------------------------------------------------------------------- | 89 | //----------------------------------------------------------------------------- |
93 | 90 | ||
94 | 'loginController': function() { | 91 | 'loginController': function() { |
95 | if (this._loginController == null) { | 92 | if (this._loginController == null) { |
96 | this._loginController = new Clipperz.PM.UI.Web.Controllers.LoginController(this.args()); | 93 | this._loginController = new Clipperz.PM.UI.Web.Controllers.LoginController(this.args()); |
97 | 94 | ||
98 | MochiKit.Signal.connect(this._loginController, 'userLoggedIn', this, 'loginControllerUserLoggedInCallback'); | 95 | MochiKit.Signal.connect(this._loginController, 'userLoggedIn', this, 'loginControllerUserLoggedInCallback'); |
99 | } | 96 | } |
100 | 97 | ||
101 | return this._loginController; | 98 | return this._loginController; |
102 | }, | 99 | }, |
103 | 100 | ||
104 | 'appController': function() { | 101 | 'appController': function() { |
105 | if (this._appController == null) { | 102 | if (this._appController == null) { |
106 | this._appController = new Clipperz.PM.UI.Web.Controllers.AppController(); | 103 | this._appController = new Clipperz.PM.UI.Web.Controllers.AppController(); |
107 | 104 | ||
108 | MochiKit.Signal.connect(this._appController, 'logout', this, 'handleLogout'); | 105 | MochiKit.Signal.connect(this._appController, 'logout', this, 'handleLogout'); |
109 | } | 106 | } |
110 | 107 | ||
111 | return this._appController; | 108 | return this._appController; |
112 | }, | 109 | }, |
113 | 110 | ||
114 | //----------------------------------------------------------------------------- | 111 | //----------------------------------------------------------------------------- |
115 | 112 | ||
116 | 'run': function(shoudShowRegistrationForm) { | 113 | 'run': function(shoudShowRegistrationForm) { |
117 | this.pageComponent().slotNamed('header').setContent(this.headerComponent()); | 114 | this.pageComponent().slotNamed('header').setContent(this.headerComponent()); |
118 | this.pageComponent().slotNamed('footer').setContent(this.footerComponent()); | 115 | this.pageComponent().slotNamed('footer').setContent(this.footerComponent()); |
119 | 116 | ||
120 | this.pageComponent().render(); | 117 | this.pageComponent().render(); |
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js index 28d9d20..7db6888 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Controllers.NewUserWizardController = function(args) { | 28 | Clipperz.PM.UI.Web.Controllers.NewUserWizardController = function(args) { |
32 | this._newUserCreationComponent = args.newUserCreationComponent|| Clipperz.Base.exception.raise('MandatoryParameter'); | 29 | this._newUserCreationComponent = args.newUserCreationComponent|| Clipperz.Base.exception.raise('MandatoryParameter'); |
33 | 30 | ||
34 | MochiKit.Signal.connect(this._newUserCreationComponent, 'changedValue',this, 'handleChangedValue'); | 31 | MochiKit.Signal.connect(this._newUserCreationComponent, 'changedValue',this, 'handleChangedValue'); |
35 | MochiKit.Signal.connect(this._newUserCreationComponent, 'moveForward',this, 'handleMoveForward'); | 32 | MochiKit.Signal.connect(this._newUserCreationComponent, 'moveForward',this, 'handleMoveForward'); |
36 | MochiKit.Signal.connect(this._newUserCreationComponent, 'keyPressed',this, 'handleNewUserCreationComponentKeyPressed'); | 33 | MochiKit.Signal.connect(this._newUserCreationComponent, 'keyPressed',this, 'handleNewUserCreationComponentKeyPressed'); |
37 | 34 | ||
38 | this._rulerComponent = null; | 35 | this._rulerComponent = null; |
39 | 36 | ||
40 | this._steps = null; | 37 | this._steps = null; |
41 | this._currentStepIndex = 0; | 38 | this._currentStepIndex = 0; |
42 | this._isNextEnabled = false; | 39 | this._isNextEnabled = false; |
43 | 40 | ||
44 | this._userCreationState = 'IDLE'; //'IN PROGRESS', 'DONE', 'FAILED' | 41 | this._userCreationState = 'IDLE'; //'IN PROGRESS', 'DONE', 'FAILED' |
45 | this._user = null; | 42 | this._user = null; |
46 | return this; | 43 | return this; |
47 | } | 44 | } |
48 | 45 | ||
49 | MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.NewUserWizardController.prototype, { | 46 | MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.NewUserWizardController.prototype, { |
50 | 47 | ||
51 | 'toString': function() { | 48 | 'toString': function() { |
52 | return "Clipperz.PM.UI.Web.Controllers.NewUserWizardController"; | 49 | return "Clipperz.PM.UI.Web.Controllers.NewUserWizardController"; |
53 | }, | 50 | }, |
54 | 51 | ||
55 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
56 | 53 | ||
57 | 'newUserCreationComponent': function () { | 54 | 'newUserCreationComponent': function () { |
58 | return this._newUserCreationComponent; | 55 | return this._newUserCreationComponent; |
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 | 'userCreationState': function () { | 70 | 'userCreationState': function () { |
74 | return this._userCreationState; | 71 | return this._userCreationState; |
75 | }, | 72 | }, |
76 | 73 | ||
77 | 'setUserCreationState': function (aValue) { | 74 | 'setUserCreationState': function (aValue) { |
78 | //console.log("+++ NewUserWizardController.setUserCreationState", aValue); | 75 | //console.log("+++ NewUserWizardController.setUserCreationState", aValue); |
79 | this._userCreationState = aValue; | 76 | this._userCreationState = aValue; |
80 | this.checkState(); | 77 | this.checkState(); |
81 | }, | 78 | }, |
82 | 79 | ||
83 | //============================================================================= | 80 | //============================================================================= |
84 | 81 | ||
85 | 'resetCurrentStepIndex': function () { | 82 | 'resetCurrentStepIndex': function () { |
86 | this._currentStepIndex = 0; | 83 | this._currentStepIndex = 0; |
87 | this.rulerComponent().resetStatus({animateTransition:true}); | 84 | this.rulerComponent().resetStatus({animateTransition:true}); |
88 | }, | 85 | }, |
89 | 86 | ||
90 | //----------------------------------------------------------------------------- | 87 | //----------------------------------------------------------------------------- |
91 | 88 | ||
92 | 'enableNext': function (aValue) { | 89 | 'enableNext': function (aValue) { |
93 | this.rulerComponent().enableNext(aValue); | 90 | this.rulerComponent().enableNext(aValue); |
94 | this._isNextEnabled = aValue; | 91 | this._isNextEnabled = aValue; |
95 | }, | 92 | }, |
96 | 93 | ||
97 | 'isNextEnabled': function () { | 94 | 'isNextEnabled': function () { |
98 | return this._isNextEnabled; | 95 | return this._isNextEnabled; |
99 | }, | 96 | }, |
100 | 97 | ||
101 | //----------------------------------------------------------------------------- | 98 | //----------------------------------------------------------------------------- |
102 | 99 | ||
103 | 'enablePrevious': function (aValue) { | 100 | 'enablePrevious': function (aValue) { |
104 | this.rulerComponent().enablePrevious(aValue); | 101 | this.rulerComponent().enablePrevious(aValue); |
105 | }, | 102 | }, |
106 | 103 | ||
107 | //============================================================================= | 104 | //============================================================================= |
108 | 105 | ||
109 | 'rulerComponent': function () { | 106 | 'rulerComponent': function () { |
110 | if (this._rulerComponent == null) { | 107 | if (this._rulerComponent == null) { |
111 | this._rulerComponent = new Clipperz.PM.UI.Web.Components.RulerComponent({ | 108 | this._rulerComponent = new Clipperz.PM.UI.Web.Components.RulerComponent({ |
112 | translationContext:'Wizards.NewUserWizard' | 109 | translationContext:'Wizards.NewUserWizard' |
113 | }); | 110 | }); |
114 | this._rulerComponent.render(); | 111 | this._rulerComponent.render(); |
115 | 112 | ||
116 | MochiKit.Signal.connect(this._rulerComponent, 'exit', this, 'handleExit'); | 113 | MochiKit.Signal.connect(this._rulerComponent, 'exit', this, 'handleExit'); |
117 | MochiKit.Signal.connect(this._rulerComponent, 'done', this, 'done'); | 114 | MochiKit.Signal.connect(this._rulerComponent, 'done', this, 'done'); |
118 | MochiKit.Signal.connect(this._rulerComponent, 'moveForward',this, 'handleMoveForward'); | 115 | MochiKit.Signal.connect(this._rulerComponent, 'moveForward',this, 'handleMoveForward'); |
119 | MochiKit.Signal.connect(this._rulerComponent, 'moveBackward',this, 'handleMoveBackward'); | 116 | MochiKit.Signal.connect(this._rulerComponent, 'moveBackward',this, 'handleMoveBackward'); |
120 | MochiKit.Signal.connect(this._rulerComponent, 'cursorMoved',this, 'handleCursorMoved'); | 117 | MochiKit.Signal.connect(this._rulerComponent, 'cursorMoved',this, 'handleCursorMoved'); |