author | Clipperz <info@clipperz.com> | 2013-01-31 13:42:04 (UTC) |
---|---|---|
committer | Clipperz <info@clipperz.com> | 2013-01-31 13:42:04 (UTC) |
commit | 07d0357beef5d9328a2dd8d07ad7b39c87ac55e4 (patch) (unidiff) | |
tree | f7a4aed8848302db153c2a211f8e58b944eb4c5b /frontend/gamma/js/Clipperz/PM/UI/Web/Components | |
parent | 767a3dcf48b6ac911c088af5dd7738a728eb6b99 (diff) | |
download | clipperz-07d0357beef5d9328a2dd8d07ad7b39c87ac55e4.zip clipperz-07d0357beef5d9328a2dd8d07ad7b39c87ac55e4.tar.gz clipperz-07d0357beef5d9328a2dd8d07ad7b39c87ac55e4.tar.bz2 |
Updated Copyright claims
- updated reference dates;
- removed reference to Community Edition;
- normalized logging using Clipperz.log[Warn|Error|Debug]
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Components') (more/less context) (ignore whitespace changes)
34 files changed, 340 insertions, 439 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 d6b0574..82c8dfd 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.AccountPanel = function(args) { | 26 | Clipperz.PM.UI.Web.Components.AccountPanel = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.AccountPanel.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.AccountPanel.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | //this._initiallySelectedTab = args.selected || 'ACCOUNT'; | 31 | //this._initiallySelectedTab = args.selected || 'ACCOUNT'; |
34 | this._initiallySelectedTab = args.selected || 'PASSPHRASE'; | 32 | this._initiallySelectedTab = args.selected || 'PASSPHRASE'; |
35 | this._tabPanelControllerConfiguration = { | 33 | this._tabPanelControllerConfiguration = { |
36 | // 'ACCOUNT': { | 34 | // 'ACCOUNT': { |
37 | // tab:'accountTab', | 35 | // tab:'accountTab', |
38 | // panel:'accountPanel' | 36 | // panel:'accountPanel' |
39 | // }, | 37 | // }, |
40 | 'PASSPHRASE': { | 38 | 'PASSPHRASE': { |
41 | tab:'passphraseTab', | 39 | tab:'passphraseTab', |
42 | panel:'passphrasePanel' | 40 | panel:'passphrasePanel' |
43 | }, | 41 | }, |
44 | 'OTP': { | 42 | 'OTP': { |
45 | tab:'OTPTab', | 43 | tab:'OTPTab', |
46 | panel:'OTPPanel' | 44 | panel:'OTPPanel' |
47 | }, | 45 | }, |
48 | 'PREFERENCES': { | 46 | 'PREFERENCES': { |
49 | tab:'preferencesTab', | 47 | tab:'preferencesTab', |
50 | panel:'preferencesPanel' | 48 | panel:'preferencesPanel' |
51 | }, | 49 | }, |
52 | 'LOGIN_HISTORY': { | 50 | 'LOGIN_HISTORY': { |
53 | tab:'loginHistoryTab', | 51 | tab:'loginHistoryTab', |
54 | panel:'loginHistoryPanel' | 52 | panel:'loginHistoryPanel' |
55 | } | 53 | } |
56 | }; | 54 | }; |
57 | 55 | ||
58 | return this; | 56 | return this; |
59 | } | 57 | } |
60 | 58 | ||
61 | //============================================================================= | 59 | //============================================================================= |
62 | 60 | ||
63 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.AccountPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { | 61 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.AccountPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { |
64 | 62 | ||
65 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
66 | 64 | ||
67 | 'toString': function () { | 65 | 'toString': function () { |
68 | return "Clipperz.PM.UI.Web.Components.AccountPanel component"; | 66 | return "Clipperz.PM.UI.Web.Components.AccountPanel component"; |
69 | }, | 67 | }, |
70 | 68 | ||
71 | //------------------------------------------------------------------------- | 69 | //------------------------------------------------------------------------- |
72 | 70 | ||
73 | 'renderSelf': function(/*aContainer, aPosition*/) { | 71 | 'renderSelf': function(/*aContainer, aPosition*/) { |
74 | //Clipperz.log("AccountPanel.renderSelf element", this.element()); | 72 | //Clipperz.log("AccountPanel.renderSelf element", this.element()); |
75 | this.append(this.element(), [ | 73 | this.append(this.element(), [ |
76 | {tag:'div', cls:'header', children:[ | 74 | {tag:'div', cls:'header', children:[ |
77 | {tag:'div', cls:'subPanelTabs', children:[ | 75 | {tag:'div', cls:'subPanelTabs', children:[ |
78 | {tag:'ul', children:[ | 76 | {tag:'ul', children:[ |
79 | // {tag:'li', id:this.getId('accountTab'), children:[{tag:'a', href:'#', html:'Account'}], cls:'first'}, | 77 | // {tag:'li', id:this.getId('accountTab'), children:[{tag:'a', href:'#', html:'Account'}], cls:'first'}, |
80 | {tag:'li', id:this.getId('passphraseTab'), children:[{tag:'a', href:'#', html:'Passphrase'}], cls:'first'}, | 78 | {tag:'li', id:this.getId('passphraseTab'), children:[{tag:'a', href:'#', html:'Passphrase'}], cls:'first'}, |
81 | {tag:'li', id:this.getId('OTPTab'), children:[{tag:'a', href:'#', html:'One Time Passwords'}]}, | 79 | {tag:'li', id:this.getId('OTPTab'), children:[{tag:'a', href:'#', html:'One Time Passwords'}]}, |
82 | {tag:'li', id:this.getId('preferencesTab'), children:[{tag:'a', href:'#', html:'Preferences'}]}, | 80 | {tag:'li', id:this.getId('preferencesTab'), children:[{tag:'a', href:'#', html:'Preferences'}]}, |
83 | {tag:'li', id:this.getId('loginHistoryTab'),children:[{tag:'a', href:'#', html:'Login history'}]} | 81 | {tag:'li', id:this.getId('loginHistoryTab'),children:[{tag:'a', href:'#', html:'Login history'}]} |
84 | ]} | 82 | ]} |
85 | ]} | 83 | ]} |
86 | ]}, | 84 | ]}, |
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 3b3c8b4..da5fd76 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AppPage.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AppPage.js | |||
@@ -1,75 +1,73 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.AppPage = function(args) { | 26 | Clipperz.PM.UI.Web.Components.AppPage = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | Clipperz.PM.UI.Web.Components.AppPage.superclass.constructor.call(this, args); | 28 | Clipperz.PM.UI.Web.Components.AppPage.superclass.constructor.call(this, args); |
31 | 29 | ||
32 | this._element = args.element || null; | 30 | this._element = args.element || null; |
33 | 31 | ||
34 | this._slots = { | 32 | this._slots = { |
35 | 'cardGrid' : this.getId('cardGrid'), | 33 | 'cardGrid' : this.getId('cardGrid'), |
36 | // 'directLoginGrid' : this.getId('directLoginGrid'), | 34 | // 'directLoginGrid' : this.getId('directLoginGrid'), |
37 | 'accountPanel': this.getId('accountPanel'), | 35 | 'accountPanel': this.getId('accountPanel'), |
38 | 'dataPanel': this.getId('dataPanel'), | 36 | 'dataPanel': this.getId('dataPanel'), |
39 | 'toolsPanel': this.getId('toolsPanel'), | 37 | 'toolsPanel': this.getId('toolsPanel'), |
40 | 'userInfoBox': this.getId('userInfoBox'), | 38 | 'userInfoBox': this.getId('userInfoBox'), |
41 | 'tabSidePanel': this.getId('tabSidePanel') | 39 | 'tabSidePanel': this.getId('tabSidePanel') |
42 | }; | 40 | }; |
43 | 41 | ||
44 | return this; | 42 | return this; |
45 | } | 43 | } |
46 | 44 | ||
47 | //============================================================================= | 45 | //============================================================================= |
48 | 46 | ||
49 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.AppPage, Clipperz.PM.UI.Common.Components.BaseComponent, { | 47 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.AppPage, Clipperz.PM.UI.Common.Components.BaseComponent, { |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'toString': function () { | 51 | 'toString': function () { |
54 | return "Clipperz.PM.UI.Web.Components.AppPage component"; | 52 | return "Clipperz.PM.UI.Web.Components.AppPage component"; |
55 | }, | 53 | }, |
56 | 54 | ||
57 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
58 | 56 | ||
59 | 'renderSelf': function(/*aContainer, aPosition*/) { | 57 | 'renderSelf': function(/*aContainer, aPosition*/) { |
60 | this.append(this.element(), {tag:'div', id:this.getId('userInfoBox'), cls:'userInfoBox'}); | 58 | this.append(this.element(), {tag:'div', id:this.getId('userInfoBox'), cls:'userInfoBox'}); |
61 | this.append(this.element(), {tag:'div', id:this.getId('sidePanels'), cls:'sidePanels'}); | 59 | this.append(this.element(), {tag:'div', id:this.getId('sidePanels'), cls:'sidePanels'}); |
62 | this.append(this.getId('sidePanels'),{tag:'div', id:this.getId('tabSidePanel'), cls:'tabSidePanel', children:[]}); | 60 | this.append(this.getId('sidePanels'),{tag:'div', id:this.getId('tabSidePanel'), cls:'tabSidePanel', children:[]}); |
63 | 61 | ||
64 | this.append(this.element(), {tag:'div', id:this.getId('mainPanels'), cls:'mainPanels'}); | 62 | this.append(this.element(), {tag:'div', id:this.getId('mainPanels'), cls:'mainPanels'}); |
65 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('cardGrid'), cls:'gridComponent cardGrid'}); | 63 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('cardGrid'), cls:'gridComponent cardGrid'}); |
66 | // this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('directLoginGrid'), cls:'gridComponent directLoginGrid'}); | 64 | // this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('directLoginGrid'), cls:'gridComponent directLoginGrid'}); |
67 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('accountPanel'), cls:'otherPanel'}); | 65 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('accountPanel'), cls:'otherPanel'}); |
68 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('dataPanel'), cls:'otherPanel'}); | 66 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('dataPanel'), cls:'otherPanel'}); |
69 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('toolsPanel'), cls:'otherPanel'}); | 67 | this.append(this.getId('mainPanels'), {tag:'div', id:this.getId('toolsPanel'), cls:'otherPanel'}); |
70 | }, | 68 | }, |
71 | 69 | ||
72 | //------------------------------------------------------------------------- | 70 | //------------------------------------------------------------------------- |
73 | 71 | ||
74 | __syntaxFix__: "syntax fix" | 72 | __syntaxFix__: "syntax fix" |
75 | }); | 73 | }); |
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 1835ca9..4cfca32 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/BookmarkletComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/BookmarkletComponent.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.BookmarkletComponent = function(args) { | 26 | Clipperz.PM.UI.Web.Components.BookmarkletComponent = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.BookmarkletComponent.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.BookmarkletComponent.superclass.constructor.apply(this, arguments); |
32 | MochiKit.Signal.connect(Clipperz.PM.Strings.Languages, 'switchLanguage', this, 'updateBookmarkletURLs'); | 30 | MochiKit.Signal.connect(Clipperz.PM.Strings.Languages, 'switchLanguage', this, 'updateBookmarkletURLs'); |
33 | 31 | ||
34 | return this; | 32 | return this; |
35 | } | 33 | } |
36 | 34 | ||
37 | //============================================================================= | 35 | //============================================================================= |
38 | 36 | ||
39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.BookmarkletComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 37 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.BookmarkletComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
40 | 38 | ||
41 | //------------------------------------------------------------------------- | 39 | //------------------------------------------------------------------------- |
42 | 40 | ||
43 | 'toString': function () { | 41 | 'toString': function () { |
44 | return "Clipperz.PM.UI.Web.Components.BookmarkletComponent component"; | 42 | return "Clipperz.PM.UI.Web.Components.BookmarkletComponent component"; |
45 | }, | 43 | }, |
46 | 44 | ||
47 | //------------------------------------------------------------------------- | 45 | //------------------------------------------------------------------------- |
48 | 46 | ||
49 | 'renderSelf': function() { | 47 | 'renderSelf': function() { |
50 | // var bookmarkletUrl; | 48 | // var bookmarkletUrl; |
51 | // | 49 | // |
52 | // if (Clipperz_IEisBroken == true) { | 50 | // if (Clipperz_IEisBroken == true) { |
53 | // bookmarkletUrl = bookmarklet_ie; | 51 | // bookmarkletUrl = bookmarklet_ie; |
54 | // } else { | 52 | // } else { |
55 | /// bookmarkletUrl = bookmarklet; | 53 | /// bookmarkletUrl = bookmarklet; |
56 | // bookmarkletUrl = Clipperz.PM.Strings['bookmarklet']; | 54 | // bookmarkletUrl = Clipperz.PM.Strings['bookmarklet']; |
57 | // } | 55 | // } |
58 | 56 | ||
59 | this.append(this.element(), {tag:'div', cls:'bookmarklet', children: [ | 57 | this.append(this.element(), {tag:'div', cls:'bookmarklet', children: [ |
60 | {tag:'div', id:this.getId('linkBlock'), cls:'bookmarklet_link', children:[ | 58 | {tag:'div', id:this.getId('linkBlock'), cls:'bookmarklet_link', children:[ |
61 | // {tag:'a', id:this.getId('link'), href:bookmarkletUrl, children:[ | 59 | // {tag:'a', id:this.getId('link'), href:bookmarkletUrl, children:[ |
62 | {tag:'a', id:this.getId('link'), href:'#', children:[ | 60 | {tag:'a', id:this.getId('link'), href:'#', children:[ |
63 | {tag:'div', cls:'icon'}, | 61 | {tag:'div', cls:'icon'}, |
64 | {tag:'div', cls:'text', children:[ | 62 | {tag:'div', cls:'text', children:[ |
65 | {tag:'span', html:"add to Clipperz"} | 63 | {tag:'span', html:"add to Clipperz"} |
66 | ]} | 64 | ]} |
67 | ]} | 65 | ]} |
68 | ]} | 66 | ]} |
69 | ]}); | 67 | ]}); |
70 | 68 | ||
71 | new Clipperz.PM.UI.Common.Components.Tooltip({ | 69 | new Clipperz.PM.UI.Common.Components.Tooltip({ |
72 | element:this.getElement('linkBlock'), | 70 | element:this.getElement('linkBlock'), |
73 | text: "Drag and drop the \"add to Clipperz\" link above to the bookmark bar.", | 71 | text: "Drag and drop the \"add to Clipperz\" link above to the bookmark bar.", |
74 | position:'BELOW' | 72 | position:'BELOW' |
75 | }); | 73 | }); |
76 | 74 | ||
77 | MochiKit.Signal.connect(this.getId('link'), 'onclick', this, 'handleOnclick'); | 75 | MochiKit.Signal.connect(this.getId('link'), 'onclick', this, 'handleOnclick'); |
78 | this.updateBookmarkletURLs(); | 76 | this.updateBookmarkletURLs(); |
79 | }, | 77 | }, |
80 | 78 | ||
81 | //------------------------------------------------------------------------- | 79 | //------------------------------------------------------------------------- |
82 | 80 | ||
83 | 'handleOnclick': function (anEvent) { | 81 | 'handleOnclick': function (anEvent) { |
84 | anEvent.preventDefault(); | 82 | anEvent.preventDefault(); |
85 | 83 | ||
86 | Clipperz.log("BOOKMARKLET CLICK"); | 84 | Clipperz.log("BOOKMARKLET CLICK"); |
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 af33d85..8bb64f5 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogComponent.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.CardDialogComponent = function(args) { | 26 | Clipperz.PM.UI.Web.Components.CardDialogComponent = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.CardDialogComponent.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.CardDialogComponent.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._tabPanelController = null; | 31 | this._tabPanelController = null; |
34 | 32 | ||
35 | this._tabPanelControllerConfiguration = { | 33 | this._tabPanelControllerConfiguration = { |
36 | 'DETAILS': { | 34 | 'DETAILS': { |
37 | tab:'detailTab', | 35 | tab:'detailTab', |
38 | panel:'detailTabpanel' | 36 | panel:'detailTabpanel' |
39 | }, | 37 | }, |
40 | 'DIRECT_LOGINS': { | 38 | 'DIRECT_LOGINS': { |
41 | tab:'directLoginTab', | 39 | tab:'directLoginTab', |
42 | panel:'directLoginTabpanel' | 40 | panel:'directLoginTabpanel' |
43 | }, | 41 | }, |
44 | 'SHARING': { | 42 | 'SHARING': { |
45 | tab:'sharingTab', | 43 | tab:'sharingTab', |
46 | panel:'sharingTabpanel' | 44 | panel:'sharingTabpanel' |
47 | } | 45 | } |
48 | }; | 46 | }; |
49 | 47 | ||
50 | this._tooltips = null; | 48 | this._tooltips = null; |
51 | 49 | ||
52 | this._isSavingEnabled = false; | 50 | this._isSavingEnabled = false; |
53 | this._hintMode = 'OFF'; //'ON' | 51 | this._hintMode = 'OFF'; //'ON' |
54 | 52 | ||
55 | this._fieldComponents = {}; | 53 | this._fieldComponents = {}; |
56 | this._directLoginComponents = {}; | 54 | this._directLoginComponents = {}; |
57 | 55 | ||
58 | this._displayMode = 'fixed'; //'scrollable'; | 56 | this._displayMode = 'fixed'; //'scrollable'; |
59 | 57 | ||
60 | return this; | 58 | return this; |
61 | } | 59 | } |
62 | 60 | ||
63 | //============================================================================= | 61 | //============================================================================= |
64 | 62 | ||
65 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 63 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
66 | 64 | ||
67 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
68 | 66 | ||
69 | 'toString': function () { | 67 | 'toString': function () { |
70 | return "Clipperz.PM.UI.Web.Components.CardDialogComponent component"; | 68 | return "Clipperz.PM.UI.Web.Components.CardDialogComponent component"; |
71 | }, | 69 | }, |
72 | 70 | ||
73 | //------------------------------------------------------------------------- | 71 | //------------------------------------------------------------------------- |
74 | 72 | ||
75 | 'tabPanelController': function () { | 73 | 'tabPanelController': function () { |
76 | if (this._tabPanelController == null) { | 74 | if (this._tabPanelController == null) { |
77 | this._tabPanelController = new Clipperz.PM.UI.Common.Controllers.TabPanelController({ | 75 | this._tabPanelController = new Clipperz.PM.UI.Common.Controllers.TabPanelController({ |
78 | component:this, | 76 | component:this, |
79 | configuration:this._tabPanelControllerConfiguration | 77 | configuration:this._tabPanelControllerConfiguration |
80 | }); | 78 | }); |
81 | 79 | ||
82 | MochiKit.Signal.connect(this._tabPanelController, 'tabSelected', this, 'handleTabSelected') | 80 | MochiKit.Signal.connect(this._tabPanelController, 'tabSelected', this, 'handleTabSelected') |
83 | } | 81 | } |
84 | 82 | ||
85 | return this._tabPanelController; | 83 | return this._tabPanelController; |
86 | }, | 84 | }, |
@@ -621,246 +619,242 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogComponent, Clipperz | |||
621 | MochiKit.Async.callLater(0.1, MochiKit.Base.method(this, 'fixRendering')); | 619 | MochiKit.Async.callLater(0.1, MochiKit.Base.method(this, 'fixRendering')); |
622 | } | 620 | } |
623 | }, | 621 | }, |
624 | 622 | ||
625 | //------------------------------------------------------------------------- | 623 | //------------------------------------------------------------------------- |
626 | 624 | ||
627 | 'fixRendering': function () { | 625 | 'fixRendering': function () { |
628 | // varheight; | 626 | // varheight; |
629 | var y; | 627 | var y; |
630 | varscrollHeight; | 628 | varscrollHeight; |
631 | var viewportHeight; | 629 | var viewportHeight; |
632 | var viewportY; | 630 | var viewportY; |
633 | var footerElement; | 631 | var footerElement; |
634 | var footerElementPosition; | 632 | var footerElementPosition; |
635 | var footerElementDimensions; | 633 | var footerElementDimensions; |
636 | var footerComputedHeight; | 634 | var footerComputedHeight; |
637 | 635 | ||
638 | // height = MochiKit.Style.getElementDimensions(this.displayElement())['h']; | 636 | // height = MochiKit.Style.getElementDimensions(this.displayElement())['h']; |
639 | y = MochiKit.Style.getElementPosition(this.displayElement())['y']; | 637 | y = MochiKit.Style.getElementPosition(this.displayElement())['y']; |
640 | 638 | ||
641 | footerElement = MochiKit.Selector.findChildElements(this.displayElement(), ['div.footer'])[0]; | 639 | footerElement = MochiKit.Selector.findChildElements(this.displayElement(), ['div.footer'])[0]; |
642 | footerElementPosition = MochiKit.Style.getElementPosition(footerElement); | 640 | footerElementPosition = MochiKit.Style.getElementPosition(footerElement); |
643 | footerElementDimensions = MochiKit.Style.getElementDimensions(footerElement); | 641 | footerElementDimensions = MochiKit.Style.getElementDimensions(footerElement); |
644 | footerComputedHeight = footerElementPosition['y'] + footerElementDimensions['h'] - y; | 642 | footerComputedHeight = footerElementPosition['y'] + footerElementDimensions['h'] - y; |
645 | 643 | ||
646 | // scrollHeight = this.displayElement().scrollHeight; | 644 | // scrollHeight = this.displayElement().scrollHeight; |
647 | scrollHeight = footerComputedHeight; | 645 | scrollHeight = footerComputedHeight; |
648 | 646 | ||
649 | viewportHeight = MochiKit.Style.getViewportDimensions()['h']; | 647 | viewportHeight = MochiKit.Style.getViewportDimensions()['h']; |
650 | viewportY = MochiKit.Style.getViewportPosition()['y']; | 648 | viewportY = MochiKit.Style.getViewportPosition()['y']; |
651 | 649 | ||
652 | if ((y + scrollHeight) > (viewportY + viewportHeight)) { | 650 | if ((y + scrollHeight) > (viewportY + viewportHeight)) { |
653 | this.setDisplayMode('scrollable'); | 651 | this.setDisplayMode('scrollable'); |
654 | MochiKit.DOM.addElementClass(this.element(), 'scrollable'); | 652 | MochiKit.DOM.addElementClass(this.element(), 'scrollable'); |
655 | MochiKit.DOM.removeElementClass(this.element(), 'fixed'); | 653 | MochiKit.DOM.removeElementClass(this.element(), 'fixed'); |
656 | MochiKit.Style.setElementPosition(this.displayElement(), {y:Math.max(0, Math.min(y, (viewportY + viewportHeight) - scrollHeight))}, 'px'); | 654 | MochiKit.Style.setElementPosition(this.displayElement(), {y:Math.max(0, Math.min(y, (viewportY + viewportHeight) - scrollHeight))}, 'px'); |
657 | MochiKit.Visual.ScrollTo(this.displayElement(), {duration:0.5}); | 655 | MochiKit.Visual.ScrollTo(this.displayElement(), {duration:0.5}); |
658 | } else { | 656 | } else { |
659 | this.setDisplayMode('fixed'); | 657 | this.setDisplayMode('fixed'); |
660 | MochiKit.DOM.removeElementClass(this.element(), 'scrollable'); | 658 | MochiKit.DOM.removeElementClass(this.element(), 'scrollable'); |
661 | MochiKit.DOM.addElementClass(this.element(), 'fixed'); | 659 | MochiKit.DOM.addElementClass(this.element(), 'fixed'); |
662 | } | 660 | } |
663 | }, | 661 | }, |
664 | 662 | ||
665 | //========================================================================= | 663 | //========================================================================= |
666 | 664 | ||
667 | 'unselectCurrentSelectedItems': function () { | 665 | 'unselectCurrentSelectedItems': function () { |
668 | MochiKit.Iter.forEach(MochiKit.Selector.findChildElements(this.displayElement(), ['.selectedField']), function (anElement) { | 666 | MochiKit.Iter.forEach(MochiKit.Selector.findChildElements(this.displayElement(), ['.selectedField']), function (anElement) { |
669 | MochiKit.DOM.removeElementClass(anElement, 'selectedField'); | 667 | MochiKit.DOM.removeElementClass(anElement, 'selectedField'); |
670 | }); | 668 | }); |
671 | }, | 669 | }, |
672 | 670 | ||
673 | //========================================================================= | 671 | //========================================================================= |
674 | 672 | ||
675 | 'hideProgressMask': function () { | 673 | 'hideProgressMask': function () { |
676 | MochiKit.DOM.removeElementClass(this.getId('panel'), 'loading'); | 674 | MochiKit.DOM.removeElementClass(this.getId('panel'), 'loading'); |
677 | }, | 675 | }, |
678 | 676 | ||
679 | 'showProgressMask': function () { | 677 | 'showProgressMask': function () { |
680 | this.getElement('progressDescription').innerHTML = "Saving"; | 678 | this.getElement('progressDescription').innerHTML = "Saving"; |
681 | MochiKit.DOM.addElementClass(this.getId('panel'), 'loading'); | 679 | MochiKit.DOM.addElementClass(this.getId('panel'), 'loading'); |
682 | }, | 680 | }, |
683 | 681 | ||
684 | 'showError': function (anError) { | 682 | 'showError': function (anError) { |
685 | //console.log(">>> showError", anError); | ||
686 | MochiKit.Style.hideElement(this.getId('progress')); | 683 | MochiKit.Style.hideElement(this.getId('progress')); |
687 | this.getElement('errorMessage').innerHTML = Clipperz.PM.Strings.errorDescriptionForException(anError['message']); | 684 | this.getElement('errorMessage').innerHTML = Clipperz.PM.Strings.errorDescriptionForException(anError['message']); |
688 | MochiKit.Style.showElement(this.getId('error')); | 685 | MochiKit.Style.showElement(this.getId('error')); |
689 | }, | 686 | }, |
690 | 687 | ||
691 | //------------------------------------------------------------------------- | 688 | //------------------------------------------------------------------------- |
692 | 689 | ||
693 | 'cancel': function () { | 690 | 'cancel': function () { |
694 | /* | 691 | /* |
695 | var deferredResult; | 692 | var deferredResult; |
696 | 693 | ||
697 | deferredResult = new Clipperz.Async.Deferred("CardDialogComponent.cancel", {trace:false}); | 694 | deferredResult = new Clipperz.Async.Deferred("CardDialogComponent.cancel", {trace:false}); |
698 | deferredResult.addCallback(MochiKit.Base.method(this, 'isSavingEnabled')); | 695 | deferredResult.addCallback(MochiKit.Base.method(this, 'isSavingEnabled')); |
699 | deferredResult.addIf([ | 696 | deferredResult.addIf([ |
700 | MochiKit.Base.method(this, 'askConfirmationForLoosingPendingChanges') | 697 | MochiKit.Base.method(this, 'askConfirmationForLoosingPendingChanges') |
701 | ], []); | 698 | ], []); |
702 | deferredResult.addCallback(MochiKit.Base.partial(MochiKit.Signal.signal, this, 'cancel')); | 699 | deferredResult.addCallback(MochiKit.Base.partial(MochiKit.Signal.signal, this, 'cancel')); |
703 | deferredResult.callback(); | 700 | deferredResult.callback(); |
704 | 701 | ||
705 | return deferredResult; | 702 | return deferredResult; |
706 | */ | 703 | */ |
707 | MochiKit.Signal.signal(this, 'cancel'); | 704 | MochiKit.Signal.signal(this, 'cancel'); |
708 | }, | 705 | }, |
709 | 706 | ||
710 | 'handleCancelEvent': function (anEvent) { | 707 | 'handleCancelEvent': function (anEvent) { |
711 | anEvent.preventDefault(); | 708 | anEvent.preventDefault(); |
712 | this.cancel(); | 709 | this.cancel(); |
713 | }, | 710 | }, |
714 | 711 | ||
715 | //------------------------------------------------------------------------- | 712 | //------------------------------------------------------------------------- |
716 | 713 | ||
717 | 'handleSaveEvent': function (anEvent) { | 714 | 'handleSaveEvent': function (anEvent) { |
718 | anEvent.preventDefault(); | 715 | anEvent.preventDefault(); |
719 | 716 | ||
720 | if (! MochiKit.DOM.hasElementClass(anEvent.src(), 'disabled')) { | 717 | if (! MochiKit.DOM.hasElementClass(anEvent.src(), 'disabled')) { |
721 | MochiKit.Signal.signal(this, 'save'); | 718 | MochiKit.Signal.signal(this, 'save'); |
722 | } | 719 | } |
723 | }, | 720 | }, |
724 | 721 | ||
725 | //------------------------------------------------------------------------- | 722 | //------------------------------------------------------------------------- |
726 | 723 | ||
727 | 'handleAddDirectLogin': function (anEvent) { | 724 | 'handleAddDirectLogin': function (anEvent) { |
728 | anEvent.preventDefault(); | 725 | anEvent.preventDefault(); |
729 | 726 | ||
730 | MochiKit.Signal.signal(this, 'addDirectLogin'); | 727 | MochiKit.Signal.signal(this, 'addDirectLogin'); |
731 | }, | 728 | }, |
732 | 729 | ||
733 | //------------------------------------------------------------------------- | 730 | //------------------------------------------------------------------------- |
734 | 731 | ||
735 | 'handleOnFocusEvent': function (anElement, anEvent) { | 732 | 'handleOnFocusEvent': function (anElement, anEvent) { |
736 | this.unselectCurrentSelectedItems(); | 733 | this.unselectCurrentSelectedItems(); |
737 | MochiKit.DOM.addElementClass(anElement, 'selectedField'); | 734 | MochiKit.DOM.addElementClass(anElement, 'selectedField'); |
738 | }, | 735 | }, |
739 | 736 | ||
740 | 'handleLooseFocusEvent': function (anElement, anEvent) { | 737 | 'handleLooseFocusEvent': function (anElement, anEvent) { |
741 | this.unselectCurrentSelectedItems(); | 738 | this.unselectCurrentSelectedItems(); |
742 | }, | 739 | }, |
743 | 740 | ||
744 | //------------------------------------------------------------------------- | 741 | //------------------------------------------------------------------------- |
745 | 742 | ||
746 | 'handleTabSelected': function (aSelectedTab) { | 743 | 'handleTabSelected': function (aSelectedTab) { |
747 | this.unselectCurrentSelectedItems(); | 744 | this.unselectCurrentSelectedItems(); |
748 | 745 | ||
749 | switch (aSelectedTab) { | 746 | switch (aSelectedTab) { |
750 | case 'DETAILS': | 747 | case 'DETAILS': |
751 | // MochiKit.Style.hideElement(this.getElement('addDirectLoginButton')); | 748 | // MochiKit.Style.hideElement(this.getElement('addDirectLoginButton')); |
752 | break; | 749 | break; |
753 | case 'DIRECT_LOGINS': | 750 | case 'DIRECT_LOGINS': |
754 | // MochiKit.Style.showElement(this.getElement('addDirectLoginButton')); | 751 | // MochiKit.Style.showElement(this.getElement('addDirectLoginButton')); |
755 | break; | 752 | break; |
756 | case 'SHARING': | 753 | case 'SHARING': |
757 | // MochiKit.Style.hideElement(this.getElement('addDirectLoginButton')); | 754 | // MochiKit.Style.hideElement(this.getElement('addDirectLoginButton')); |
758 | break; | 755 | break; |
759 | } | 756 | } |
760 | }, | 757 | }, |
761 | 758 | ||
762 | //------------------------------------------------------------------------- | 759 | //------------------------------------------------------------------------- |
763 | 760 | ||
764 | 'handleKeyEvent': function (anEvent) { | 761 | 'handleKeyEvent': function (anEvent) { |
765 | //console.log("####", anEvent.key().string); | ||
766 | if (anEvent.key().string == 'KEY_ESCAPE') { | 762 | if (anEvent.key().string == 'KEY_ESCAPE') { |
767 | MochiKit.Signal.signal(this, 'changedValue'); | 763 | MochiKit.Signal.signal(this, 'changedValue'); |
768 | this.cancel(); | 764 | this.cancel(); |
769 | } else if (anEvent.key().string == 'KEY_ENTER') { | 765 | } else if (anEvent.key().string == 'KEY_ENTER') { |
770 | if (anEvent.target().nodeName == 'TEXTAREA') { | 766 | if (anEvent.target().nodeName == 'TEXTAREA') { |
771 | 767 | ||
772 | } else { | 768 | } else { |
773 | anEvent.preventDefault(); | 769 | anEvent.preventDefault(); |
774 | } | 770 | } |
775 | } | 771 | } |
776 | }, | 772 | }, |
777 | 773 | ||
778 | //========================================================================= | 774 | //========================================================================= |
779 | 775 | ||
780 | 'askConfirmationForLoosingPendingChanges': function () { | 776 | 'askConfirmationForLoosingPendingChanges': function () { |
781 | var deferredResult; | 777 | var deferredResult; |
782 | var confirmationDialog; | 778 | var confirmationDialog; |
783 | 779 | ||
784 | confirmationDialog = new Clipperz.PM.UI.Common.Components.SimpleMessagePanel({ | 780 | confirmationDialog = new Clipperz.PM.UI.Common.Components.SimpleMessagePanel({ |
785 | title:"Alert", | 781 | title:"Alert", |
786 | text:"Should lost pending changes?", | 782 | text:"Should lost pending changes?", |
787 | type:'ALERT', | 783 | type:'ALERT', |
788 | buttons: [ | 784 | buttons: [ |
789 | {text:"Cancel",result:'CANCEL', isDefault:true}, | 785 | {text:"Cancel",result:'CANCEL', isDefault:true}, |
790 | {text:"Ok", result:'OK'} | 786 | {text:"Ok", result:'OK'} |
791 | ] | 787 | ] |
792 | }); | 788 | }); |
793 | 789 | ||
794 | deferredResult = new Clipperz.Async.Deferred("CardDialogComponent.askConfirmationForLoosingPendingChanges", {trace:false}); | 790 | deferredResult = new Clipperz.Async.Deferred("CardDialogComponent.askConfirmationForLoosingPendingChanges", {trace:false}); |
795 | // deferredResult = confirmationDialog.deferredShow({openFromElement:anEvent.src(), onOkCloseToElement:MochiKit.DOM.currentDocument().body, onCancelCloseToElement:anEvent.src()}); | 791 | // deferredResult = confirmationDialog.deferredShow({openFromElement:anEvent.src(), onOkCloseToElement:MochiKit.DOM.currentDocument().body, onCancelCloseToElement:anEvent.src()}); |
796 | deferredResult.addMethod(confirmationDialog, 'deferredShow', { | 792 | deferredResult.addMethod(confirmationDialog, 'deferredShow', { |
797 | 'openFromElement': this.getElement('cancelButton'), | 793 | 'openFromElement': this.getElement('cancelButton'), |
798 | 'onOkCloseToElement': null, //this.getElement('cancelButton'), | 794 | 'onOkCloseToElement': null, //this.getElement('cancelButton'), |
799 | 'onCancelCloseToElement':this.getElement('cancelButton') | 795 | 'onCancelCloseToElement':this.getElement('cancelButton') |
800 | }); | 796 | }); |
801 | // deferredResult.addCallback(function () { console.log("DELETE: " + anObject.toString(), anObject); }); | ||
802 | // deferredResult.addErrbackPass(function () { console.log("skip deletion: " + anObject.toString(), anObject); }); | ||
803 | deferredResult.callback(); | 797 | deferredResult.callback(); |
804 | 798 | ||
805 | return deferredResult; | 799 | return deferredResult; |
806 | }, | 800 | }, |
807 | 801 | ||
808 | //========================================================================= | 802 | //========================================================================= |
809 | 803 | ||
810 | 'showDirectLoginEditingComponent': function () { | 804 | 'showDirectLoginEditingComponent': function () { |
811 | varwidth; | 805 | varwidth; |
812 | var transition; | 806 | var transition; |
813 | var duration; | 807 | var duration; |
814 | 808 | ||
815 | width = MochiKit.Style.getElementDimensions(this.getElement('directLoginsComponentContainer'))['w']; | 809 | width = MochiKit.Style.getElementDimensions(this.getElement('directLoginsComponentContainer'))['w']; |
816 | transition = MochiKit.Visual.Transitions.sinoidal; | 810 | transition = MochiKit.Visual.Transitions.sinoidal; |
817 | duration = 1; | 811 | duration = 1; |
818 | 812 | ||
819 | return Clipperz.Async.callbacks("CardDialogComponent.showDirectLoginEditingComponent", [ | 813 | return Clipperz.Async.callbacks("CardDialogComponent.showDirectLoginEditingComponent", [ |
820 | MochiKit.Base.method(this, 'disableCardTitleEditing'), | 814 | MochiKit.Base.method(this, 'disableCardTitleEditing'), |
821 | MochiKit.Base.method(this.tabPanelController(), 'disable'), | 815 | MochiKit.Base.method(this.tabPanelController(), 'disable'), |
822 | 816 | ||
823 | MochiKit.Base.bind(function () { | 817 | MochiKit.Base.bind(function () { |
824 | MochiKit.Style.setElementPosition (this.getElement('directLoginEditDetail'), {x:width, y:-MochiKit.Style.getElementDimensions(this.getElement('directLogins'))['h']}); | 818 | MochiKit.Style.setElementPosition (this.getElement('directLoginEditDetail'), {x:width, y:-MochiKit.Style.getElementDimensions(this.getElement('directLogins'))['h']}); |
825 | MochiKit.Style.setElementDimensions(this.getElement('directLoginEditDetail'), {w:width}); | 819 | MochiKit.Style.setElementDimensions(this.getElement('directLoginEditDetail'), {w:width}); |
826 | MochiKit.Style.showElement(this.getElement('directLoginEditDetail')); | 820 | MochiKit.Style.showElement(this.getElement('directLoginEditDetail')); |
827 | MochiKit.Style.setOpacity(this.getElement('directLoginEditDetail'), 0); | 821 | MochiKit.Style.setOpacity(this.getElement('directLoginEditDetail'), 0); |
828 | MochiKit.Style.setElementDimensions(this.getElement('directLoginsComponentContainer'), { | 822 | MochiKit.Style.setElementDimensions(this.getElement('directLoginsComponentContainer'), { |
829 | h:Math.max( | 823 | h:Math.max( |
830 | MochiKit.Style.getElementDimensions(this.getElement('directLogins'))['h'], | 824 | MochiKit.Style.getElementDimensions(this.getElement('directLogins'))['h'], |
831 | MochiKit.Style.getElementDimensions(this.getElement('directLoginEditDetail'))['h'] | 825 | MochiKit.Style.getElementDimensions(this.getElement('directLoginEditDetail'))['h'] |
832 | ) | 826 | ) |
833 | }); | 827 | }); |
834 | // MochiKit.Style.setElementDimensions(this.getElement('directLoginsComponentContainer'), {h:MochiKit.Style.getElementDimensions(this.getElement('directLogins'))['h']}); | 828 | // MochiKit.Style.setElementDimensions(this.getElement('directLoginsComponentContainer'), {h:MochiKit.Style.getElementDimensions(this.getElement('directLogins'))['h']}); |
835 | }, this), | 829 | }, this), |
836 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimations,MochiKit.Visual.Parallel, [ | 830 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimations,MochiKit.Visual.Parallel, [ |
837 | new MochiKit.Visual.Move(this.getElement('directLogins'), {x:-width, y:0, mode:'relative', transition:transition, sync:true}), | 831 | new MochiKit.Visual.Move(this.getElement('directLogins'), {x:-width, y:0, mode:'relative', transition:transition, sync:true}), |
838 | new MochiKit.Visual.Opacity(this.getElement('directLogins'), {from:1.0, to:0.0, transition:transition, sync:true}), | 832 | new MochiKit.Visual.Opacity(this.getElement('directLogins'), {from:1.0, to:0.0, transition:transition, sync:true}), |
839 | new MochiKit.Visual.Move(this.getElement('directLoginEditDetail'), {x:-width, y:0, mode:'relative', transition:transition, sync:true}), | 833 | new MochiKit.Visual.Move(this.getElement('directLoginEditDetail'), {x:-width, y:0, mode:'relative', transition:transition, sync:true}), |
840 | new MochiKit.Visual.Opacity(this.getElement('directLoginEditDetail'),{from:0.0, to:1.0, transition:transition, sync:true}) | 834 | new MochiKit.Visual.Opacity(this.getElement('directLoginEditDetail'),{from:0.0, to:1.0, transition:transition, sync:true}) |
841 | ], {duration:duration}), | 835 | ], {duration:duration}), |
842 | 836 | ||
843 | MochiKit.Base.noop | 837 | MochiKit.Base.noop |
844 | ], {trace:false}); | 838 | ], {trace:false}); |
845 | }, | 839 | }, |
846 | 840 | ||
847 | //------------------------------------------------------------------------- | 841 | //------------------------------------------------------------------------- |
848 | 842 | ||
849 | 'hideDirectLoginEditingComponent': function () { | 843 | 'hideDirectLoginEditingComponent': function () { |
850 | varwidth; | 844 | varwidth; |
851 | var transition; | 845 | var transition; |
852 | var duration; | 846 | var duration; |
853 | 847 | ||
854 | width = MochiKit.Style.getElementDimensions(this.getElement('directLoginsComponentContainer'))['w']; | 848 | width = MochiKit.Style.getElementDimensions(this.getElement('directLoginsComponentContainer'))['w']; |
855 | transition = MochiKit.Visual.Transitions.sinoidal; | 849 | transition = MochiKit.Visual.Transitions.sinoidal; |
856 | duration = 1; | 850 | duration = 1; |
857 | 851 | ||
858 | return Clipperz.Async.callbacks("CardDialogComponent.hideDirectLoginEditingComponent", [ | 852 | return Clipperz.Async.callbacks("CardDialogComponent.hideDirectLoginEditingComponent", [ |
859 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimations,MochiKit.Visual.Parallel, [ | 853 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimations,MochiKit.Visual.Parallel, [ |
860 | new MochiKit.Visual.Move(this.getElement('directLogins'), {x:width, y:0, mode:'relative', transition:transition, sync:true}), | 854 | new MochiKit.Visual.Move(this.getElement('directLogins'), {x:width, y:0, mode:'relative', transition:transition, sync:true}), |
861 | new MochiKit.Visual.Opacity(this.getElement('directLogins'), {from:0.0, to:1.0, transition:transition, sync:true}), | 855 | new MochiKit.Visual.Opacity(this.getElement('directLogins'), {from:0.0, to:1.0, transition:transition, sync:true}), |
862 | new MochiKit.Visual.Move(this.getElement('directLoginEditDetail'), {x:width, y:0, mode:'relative', transition:transition, sync:true}), | 856 | new MochiKit.Visual.Move(this.getElement('directLoginEditDetail'), {x:width, y:0, mode:'relative', transition:transition, sync:true}), |
863 | new MochiKit.Visual.Opacity(this.getElement('directLoginEditDetail'),{from:1.0, to:0.0, transition:transition, sync:true}) | 857 | new MochiKit.Visual.Opacity(this.getElement('directLoginEditDetail'),{from:1.0, to:0.0, transition:transition, sync:true}) |
864 | ], {duration:duration}), | 858 | ], {duration:duration}), |
865 | // MochiKit.Base.partial(MochiKit.Visual.appear, this.getElement('addDirectLoginButton'), {duration:0.3}), | 859 | // MochiKit.Base.partial(MochiKit.Visual.appear, this.getElement('addDirectLoginButton'), {duration:0.3}), |
866 | Clipperz.Async.clearResult, | 860 | Clipperz.Async.clearResult, |
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 2e61f5f..0cee650 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordDirectLoginComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordDirectLoginComponent.js | |||
@@ -1,179 +1,173 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent = function(args) { | 26 | Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._reference = args.reference|| Clipperz.Base.exception.raise('MandatoryParameter'); | 31 | this._reference = args.reference|| Clipperz.Base.exception.raise('MandatoryParameter'); |
34 | this._faviconComponent = null; | 32 | this._faviconComponent = null; |
35 | 33 | ||
36 | return this; | 34 | return this; |
37 | } | 35 | } |
38 | 36 | ||
39 | //============================================================================= | 37 | //============================================================================= |
40 | 38 | ||
41 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
42 | 40 | ||
43 | //------------------------------------------------------------------------- | 41 | //------------------------------------------------------------------------- |
44 | 42 | ||
45 | 'toString': function () { | 43 | 'toString': function () { |
46 | return "Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent component"; | 44 | return "Clipperz.PM.UI.Web.Components.CardDialogRecordDirectLoginComponent component"; |
47 | }, | 45 | }, |
48 | 46 | ||
49 | //------------------------------------------------------------------------- | 47 | //------------------------------------------------------------------------- |
50 | 48 | ||
51 | 'reference': function () { | 49 | 'reference': function () { |
52 | return this._reference; | 50 | return this._reference; |
53 | }, | 51 | }, |
54 | 52 | ||
55 | //------------------------------------------------------------------------- | 53 | //------------------------------------------------------------------------- |
56 | 54 | ||
57 | 'renderSelf': function() { | 55 | 'renderSelf': function() { |
58 | //console.log(">>> CardDialogRecordDirectLoginComponent.renderSelf"); | ||
59 | this.append(this.element(), [ | 56 | this.append(this.element(), [ |
60 | {tag:'div', cls:'cardDialogRecordDirectLoginComponent_favicon', children:[ | 57 | {tag:'div', cls:'cardDialogRecordDirectLoginComponent_favicon', children:[ |
61 | {tag:'img', cls:'favicon', id:this.getId('favicon')} | 58 | {tag:'img', cls:'favicon', id:this.getId('favicon')} |
62 | ]}, | 59 | ]}, |
63 | {tag:'div', cls:'cardDialogRecordDirectLoginComponent_label', children:[ | 60 | {tag:'div', cls:'cardDialogRecordDirectLoginComponent_label', children:[ |
64 | {tag:'input', id:this.getId('label'), type:'text'} | 61 | {tag:'input', id:this.getId('label'), type:'text'} |
65 | ]}, | 62 | ]}, |
66 | {tag:'div', cls:'open', children:[ | 63 | {tag:'div', cls:'open', children:[ |
67 | {tag:'span', children:[ | 64 | {tag:'span', children:[ |
68 | {tag:'a', href:'open', id:this.getId('open'), html:' '} | 65 | {tag:'a', href:'open', id:this.getId('open'), html:' '} |
69 | ]} | 66 | ]} |
70 | ]}, | 67 | ]}, |
71 | {tag:'div', cls:'edit', children:[ | 68 | {tag:'div', cls:'edit', children:[ |
72 | {tag:'span', children:[ | 69 | {tag:'span', children:[ |
73 | {tag:'a', href:'edit', id:this.getId('edit'), html:"edit"} | 70 | {tag:'a', href:'edit', id:this.getId('edit'), html:"edit"} |
74 | ]} | 71 | ]} |
75 | ]}, | 72 | ]}, |
76 | {tag:'div', cls:'delete', children:[ | 73 | {tag:'div', cls:'delete', children:[ |
77 | {tag:'span', children:[ | 74 | {tag:'span', children:[ |
78 | {tag:'a', href:'delete', id:this.getId('delete'), html:"delete"} | 75 | {tag:'a', href:'delete', id:this.getId('delete'), html:"delete"} |
79 | ]} | 76 | ]} |
80 | ]} | 77 | ]} |
81 | /* | 78 | /* |
82 | {tag:'td', cls:'fieldState'}, | 79 | {tag:'td', cls:'fieldState'}, |
83 | {tag:'td', cls:'fieldLabel', children:[ | 80 | {tag:'td', cls:'fieldLabel', children:[ |
84 | {tag:'input', cls:'label', id:this.getId('label')} | 81 | {tag:'input', cls:'label', id:this.getId('label')} |
85 | ]}, | 82 | ]}, |
86 | {tag:'td', cls:'fieldLock', children:[ | 83 | {tag:'td', cls:'fieldLock', children:[ |
87 | {tag:'div', cls:'unlocked', id:this.getId('isHidden')} | 84 | {tag:'div', cls:'unlocked', id:this.getId('isHidden')} |
88 | ]}, | 85 | ]}, |
89 | {tag:'td', cls:'fieldValue', children:[ | 86 | {tag:'td', cls:'fieldValue', children:[ |
90 | {tag:'div', cls:'unlocked', id:this.getId('valueWrapper'), children:[ | 87 | {tag:'div', cls:'unlocked', id:this.getId('valueWrapper'), children:[ |
91 | {tag:'input', type:'text', cls:'value', id:this.getId('value')} | 88 | {tag:'input', type:'text', cls:'value', id:this.getId('value')} |
92 | ]} | 89 | ]} |
93 | ]}, | 90 | ]}, |
94 | {tag:'td', cls:'fieldAddDelete', children:[ | 91 | {tag:'td', cls:'fieldAddDelete', children:[ |
95 | {tag:'div', cls:'delete', children:[ | 92 | {tag:'div', cls:'delete', children:[ |
96 | {tag:'span', children:[ | 93 | {tag:'span', children:[ |
97 | {tag:'a', href:'#', id:this.getId('delete'), html:"delete"} | 94 | {tag:'a', href:'#', id:this.getId('delete'), html:"delete"} |
98 | ]} | 95 | ]} |
99 | ]} | 96 | ]} |
100 | ]} | 97 | ]} |
101 | */ | 98 | */ |
102 | ]); | 99 | ]); |
103 | 100 | ||
104 | MochiKit.Signal.connect(this.getId('label'), 'onkeyup',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); | 101 | MochiKit.Signal.connect(this.getId('label'), 'onkeyup',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); |
105 | MochiKit.Signal.connect(this.getId('open'), 'onclick',this, 'openDirectLogin'); | 102 | MochiKit.Signal.connect(this.getId('open'), 'onclick',this, 'openDirectLogin'); |
106 | MochiKit.Signal.connect(this.getId('edit'), 'onclick',this, 'editDirectLogin'); | 103 | MochiKit.Signal.connect(this.getId('edit'), 'onclick',this, 'editDirectLogin'); |
107 | MochiKit.Signal.connect(this.getId('delete'), 'onclick',this, 'deleteDirectLogin'); | 104 | MochiKit.Signal.connect(this.getId('delete'), 'onclick',this, 'deleteDirectLogin'); |
108 | }, | 105 | }, |
109 | 106 | ||
110 | //------------------------------------------------------------------------- | 107 | //------------------------------------------------------------------------- |
111 | 108 | ||
112 | 'shouldShowElementWhileRendering': function () { | 109 | 'shouldShowElementWhileRendering': function () { |
113 | return false; | 110 | return false; |
114 | }, | 111 | }, |
115 | 112 | ||
116 | //------------------------------------------------------------------------- | 113 | //------------------------------------------------------------------------- |
117 | 114 | ||
118 | 'faviconComponent': function () { | 115 | 'faviconComponent': function () { |
119 | if (this._faviconComponent == null) { | 116 | if (this._faviconComponent == null) { |
120 | //console.log("created the FAVICON component"); | ||
121 | this._faviconComponent = new Clipperz.PM.UI.Common.Components.FaviconComponent({element:this.getId('favicon')}); | 117 | this._faviconComponent = new Clipperz.PM.UI.Common.Components.FaviconComponent({element:this.getId('favicon')}); |
122 | } | 118 | } |
123 | 119 | ||
124 | return this._faviconComponent; | 120 | return this._faviconComponent; |
125 | }, | 121 | }, |
126 | 122 | ||
127 | //========================================================================= | 123 | //========================================================================= |
128 | 124 | ||
129 | 'label': function () { | 125 | 'label': function () { |
130 | return this.getElement('label').value; | 126 | return this.getElement('label').value; |
131 | }, | 127 | }, |
132 | 128 | ||
133 | 'setLabel': function (aValue) { | 129 | 'setLabel': function (aValue) { |
134 | this.getElement('label').value = Clipperz.Base.sanitizeString(aValue); | 130 | this.getElement('label').value = Clipperz.Base.sanitizeString(aValue); |
135 | }, | 131 | }, |
136 | 132 | ||
137 | //------------------------------------------------------------------------- | 133 | //------------------------------------------------------------------------- |
138 | 134 | ||
139 | 'favicon': function () { | 135 | 'favicon': function () { |
140 | // return this.getElement('favicon').src; | 136 | // return this.getElement('favicon').src; |
141 | return this.faviconComponent().src(); | 137 | return this.faviconComponent().src(); |
142 | }, | 138 | }, |
143 | 139 | ||
144 | 'setFavicon': function (aValue) { | 140 | 'setFavicon': function (aValue) { |
145 | // this.getElement('favicon').src = Clipperz.Base.sanitizeString(aValue); | 141 | // this.getElement('favicon').src = Clipperz.Base.sanitizeString(aValue); |
146 | this.faviconComponent().setSrc(Clipperz.Base.sanitizeString(aValue)); | 142 | this.faviconComponent().setSrc(Clipperz.Base.sanitizeString(aValue)); |
147 | }, | 143 | }, |
148 | 144 | ||
149 | //========================================================================= | 145 | //========================================================================= |
150 | 146 | ||
151 | 'openDirectLogin': function (anEvent) { | 147 | 'openDirectLogin': function (anEvent) { |
152 | anEvent.preventDefault(); | 148 | anEvent.preventDefault(); |
153 | 149 | ||
154 | MochiKit.Signal.signal(this, 'openDirectLogin', this.reference()); | 150 | MochiKit.Signal.signal(this, 'openDirectLogin', this.reference()); |
155 | }, | 151 | }, |
156 | 152 | ||
157 | //------------------------------------------------------------------------- | 153 | //------------------------------------------------------------------------- |
158 | 154 | ||
159 | 'editDirectLogin': function (anEvent) { | 155 | 'editDirectLogin': function (anEvent) { |
160 | anEvent.preventDefault(); | 156 | anEvent.preventDefault(); |
161 | 157 | ||
162 | MochiKit.Signal.signal(this, 'editDirectLogin', this.reference()); | 158 | MochiKit.Signal.signal(this, 'editDirectLogin', this.reference()); |
163 | //console.log("EDIT DIRECT LOGIN"); | ||
164 | }, | 159 | }, |
165 | 160 | ||
166 | //------------------------------------------------------------------------- | 161 | //------------------------------------------------------------------------- |
167 | 162 | ||
168 | 'deleteDirectLogin': function (anEvent) { | 163 | 'deleteDirectLogin': function (anEvent) { |
169 | anEvent.preventDefault(); | 164 | anEvent.preventDefault(); |
170 | 165 | ||
171 | MochiKit.Signal.signal(this, 'deleteDirectLogin', this.reference()); | 166 | MochiKit.Signal.signal(this, 'deleteDirectLogin', this.reference()); |
172 | //console.log("DELETE DIRECT LOGIN"); | ||
173 | }, | 167 | }, |
174 | 168 | ||
175 | 169 | ||
176 | 170 | ||
177 | //========================================================================= | 171 | //========================================================================= |
178 | __syntaxFix__: "syntax fix" | 172 | __syntaxFix__: "syntax fix" |
179 | }); | 173 | }); |
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 b58062c..689406a 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CardDialogRecordFieldComponent.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent = function(args) { | 26 | Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._reference = args.reference|| Clipperz.Base.exception.raise('MandatoryParameter'); | 31 | this._reference = args.reference|| Clipperz.Base.exception.raise('MandatoryParameter'); |
34 | this._actionType = null; | 32 | this._actionType = null; |
35 | 33 | ||
36 | return this; | 34 | return this; |
37 | } | 35 | } |
38 | 36 | ||
39 | //============================================================================= | 37 | //============================================================================= |
40 | 38 | ||
41 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
42 | 40 | ||
43 | //------------------------------------------------------------------------- | 41 | //------------------------------------------------------------------------- |
44 | 42 | ||
45 | 'toString': function () { | 43 | 'toString': function () { |
46 | return "Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent component"; | 44 | return "Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponent component"; |
47 | }, | 45 | }, |
48 | 46 | ||
49 | //------------------------------------------------------------------------- | 47 | //------------------------------------------------------------------------- |
50 | 48 | ||
51 | 'renderSelf': function() { | 49 | 'renderSelf': function() { |
52 | this.append(this.element(), [ | 50 | this.append(this.element(), [ |
53 | {tag:'td', cls:'fieldState'}, | 51 | {tag:'td', cls:'fieldState'}, |
54 | {tag:'td', cls:'fieldLabel', children:[ | 52 | {tag:'td', cls:'fieldLabel', children:[ |
55 | {tag:'input', cls:'label', id:this.getId('label')} | 53 | {tag:'input', cls:'label', id:this.getId('label')} |
56 | ]}, | 54 | ]}, |
57 | {tag:'td', cls:'fieldLock', children:[ | 55 | {tag:'td', cls:'fieldLock', children:[ |
58 | {tag:'div', cls:'unlocked', id:this.getId('isHidden')} | 56 | {tag:'div', cls:'unlocked', id:this.getId('isHidden')} |
59 | ]}, | 57 | ]}, |
60 | {tag:'td', cls:'fieldValue', children:[ | 58 | {tag:'td', cls:'fieldValue', children:[ |
61 | {tag:'div', cls:'unlocked', id:this.getId('valueWrapper'), children:[ | 59 | {tag:'div', cls:'unlocked', id:this.getId('valueWrapper'), children:[ |
62 | {tag:'input', type:'text', cls:'value', id:this.getId('value')} | 60 | {tag:'input', type:'text', cls:'value', id:this.getId('value')} |
63 | ]} | 61 | ]} |
64 | ]}, | 62 | ]}, |
65 | {tag:'td', cls:'fieldAction', children:[ | 63 | {tag:'td', cls:'fieldAction', children:[ |
66 | {tag:'a', href:'#', id:this.getId('actionLink'), html:' '} | 64 | {tag:'a', href:'#', id:this.getId('actionLink'), html:' '} |
67 | ]}, | 65 | ]}, |
68 | {tag:'td', cls:'fieldAddDelete', children:[ | 66 | {tag:'td', cls:'fieldAddDelete', children:[ |
69 | {tag:'div', cls:'delete', children:[ | 67 | {tag:'div', cls:'delete', children:[ |
70 | {tag:'span', children:[ | 68 | {tag:'span', children:[ |
71 | {tag:'a', href:'#', id:this.getId('delete'), html:"delete"} | 69 | {tag:'a', href:'#', id:this.getId('delete'), html:"delete"} |
72 | ]} | 70 | ]} |
73 | ]} | 71 | ]} |
74 | ]} | 72 | ]} |
75 | ]); | 73 | ]); |
76 | 74 | ||
77 | MochiKit.Signal.connect(this.getId('label'), 'onkeyup',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); | 75 | MochiKit.Signal.connect(this.getId('label'), 'onkeyup',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); |
78 | MochiKit.Signal.connect(this.getId('isHidden'), 'onclick',this, 'toggleIsHidden'); | 76 | MochiKit.Signal.connect(this.getId('isHidden'), 'onclick',this, 'toggleIsHidden'); |
79 | MochiKit.Signal.connect(this.getId('value'), 'onkeyup',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); | 77 | MochiKit.Signal.connect(this.getId('value'), 'onkeyup',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'changedValue')); |
80 | MochiKit.Signal.connect(this.getId('actionLink'), 'onclick',this, 'handleActionLink'); | 78 | MochiKit.Signal.connect(this.getId('actionLink'), 'onclick',this, 'handleActionLink'); |
81 | MochiKit.Signal.connect(this.getId('delete'), 'onclick',this, 'deleteField'); | 79 | MochiKit.Signal.connect(this.getId('delete'), 'onclick',this, 'deleteField'); |
82 | // MochiKit.Signal.connect(this.getId('delete'), 'onclick',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'deleteField', this.reference())); | 80 | // MochiKit.Signal.connect(this.getId('delete'), 'onclick',MochiKit.Base.partial(MochiKit.Signal.signal, this, 'deleteField', this.reference())); |
83 | }, | 81 | }, |
84 | 82 | ||
85 | //------------------------------------------------------------------------- | 83 | //------------------------------------------------------------------------- |
86 | 84 | ||
@@ -108,80 +106,78 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CardDialogRecordFieldComponen | |||
108 | //========================================================================= | 106 | //========================================================================= |
109 | 107 | ||
110 | 'value': function () { | 108 | 'value': function () { |
111 | return this.getElement('value').value; | 109 | return this.getElement('value').value; |
112 | }, | 110 | }, |
113 | 111 | ||
114 | 'setValue': function (aValue) { | 112 | 'setValue': function (aValue) { |
115 | // this.getElement('value').value = Clipperz.Base.sanitizeString(aValue); | 113 | // this.getElement('value').value = Clipperz.Base.sanitizeString(aValue); |
116 | this.getElement('value').value = aValue; | 114 | this.getElement('value').value = aValue; |
117 | }, | 115 | }, |
118 | 116 | ||
119 | //------------------------------------------------------------------------- | 117 | //------------------------------------------------------------------------- |
120 | 118 | ||
121 | 'actionType': function () { | 119 | 'actionType': function () { |
122 | return this._actionType; | 120 | return this._actionType; |
123 | }, | 121 | }, |
124 | 122 | ||
125 | 'setActionType': function (anActionType) { | 123 | 'setActionType': function (anActionType) { |
126 | this._actionType = anActionType; | 124 | this._actionType = anActionType; |
127 | 125 | ||
128 | switch (this._actionType) { | 126 | switch (this._actionType) { |
129 | case 'NONE': | 127 | case 'NONE': |
130 | MochiKit.Style.hideElement(this.getId('actionLink')); | 128 | MochiKit.Style.hideElement(this.getId('actionLink')); |
131 | MochiKit.DOM.setElementClass(this.getId('actionLink'), ''); | 129 | MochiKit.DOM.setElementClass(this.getId('actionLink'), ''); |
132 | break; | 130 | break; |
133 | case 'URL': | 131 | case 'URL': |
134 | MochiKit.Style.showElement(this.getId('actionLink')); | 132 | MochiKit.Style.showElement(this.getId('actionLink')); |
135 | MochiKit.DOM.setElementClass(this.getId('actionLink'), 'url'); | 133 | MochiKit.DOM.setElementClass(this.getId('actionLink'), 'url'); |
136 | break; | 134 | break; |
137 | case 'EMAIL': | 135 | case 'EMAIL': |
138 | MochiKit.Style.showElement(this.getId('actionLink')); | 136 | MochiKit.Style.showElement(this.getId('actionLink')); |
139 | MochiKit.DOM.setElementClass(this.getId('actionLink'), 'email'); | 137 | MochiKit.DOM.setElementClass(this.getId('actionLink'), 'email'); |
140 | break; | 138 | break; |
141 | case 'PASSWORD': | 139 | case 'PASSWORD': |
142 | MochiKit.Style.showElement(this.getId('actionLink')); | 140 | MochiKit.Style.showElement(this.getId('actionLink')); |
143 | MochiKit.DOM.setElementClass(this.getId('actionLink'), 'password'); | 141 | MochiKit.DOM.setElementClass(this.getId('actionLink'), 'password'); |
144 | break; | 142 | break; |
145 | } | 143 | } |
146 | }, | 144 | }, |
147 | 145 | ||
148 | //========================================================================= | 146 | //========================================================================= |
149 | 147 | ||
150 | 'isHidden': function () { | 148 | 'isHidden': function () { |
151 | // return this.getElement('value').value; | 149 | // return this.getElement('value').value; |
152 | return MochiKit.DOM.hasElementClass(this.getElement('isHidden'), 'locked'); | 150 | return MochiKit.DOM.hasElementClass(this.getElement('isHidden'), 'locked'); |
153 | }, | 151 | }, |
154 | 152 | ||
155 | 'setIsHidden': function (aValue) { | 153 | 'setIsHidden': function (aValue) { |
156 | // this.getElement('value').value = Clipperz.Base.sanitizeString(aValue); | 154 | // this.getElement('value').value = Clipperz.Base.sanitizeString(aValue); |
157 | MochiKit.DOM.setElementClass(this.getElement('isHidden'), (aValue ? 'locked': 'unlocked')); | 155 | MochiKit.DOM.setElementClass(this.getElement('isHidden'), (aValue ? 'locked': 'unlocked')); |
158 | MochiKit.DOM.setElementClass(this.getElement('valueWrapper'), (aValue ? 'locked': 'unlocked')); | 156 | MochiKit.DOM.setElementClass(this.getElement('valueWrapper'), (aValue ? 'locked': 'unlocked')); |
159 | }, | 157 | }, |
160 | 158 | ||
161 | 'toggleIsHidden': function (anEvent) { | 159 | 'toggleIsHidden': function (anEvent) { |
162 | anEvent.preventDefault(); | 160 | anEvent.preventDefault(); |
163 | 161 | ||
164 | this.setIsHidden(! this.isHidden()); | 162 | this.setIsHidden(! this.isHidden()); |
165 | MochiKit.Signal.signal(this, 'changedValue'); | 163 | MochiKit.Signal.signal(this, 'changedValue'); |
166 | }, | 164 | }, |
167 | 165 | ||
168 | //========================================================================= | 166 | //========================================================================= |
169 | 167 | ||
170 | 'handleActionLink': function (anEvent) { | 168 | 'handleActionLink': function (anEvent) { |
171 | anEvent.preventDefault(); | 169 | anEvent.preventDefault(); |
172 | |||
173 | //console.log("ACTION LINK - " + this.actionType()); | ||
174 | MochiKit.Signal.signal(this, 'performAction', this.reference(), anEvent.target()); | 170 | MochiKit.Signal.signal(this, 'performAction', this.reference(), anEvent.target()); |
175 | }, | 171 | }, |
176 | 172 | ||
177 | //========================================================================= | 173 | //========================================================================= |
178 | 174 | ||
179 | 'deleteField': function (anEvent) { | 175 | 'deleteField': function (anEvent) { |
180 | anEvent.preventDefault(); | 176 | anEvent.preventDefault(); |
181 | 177 | ||
182 | MochiKit.Signal.signal(this, 'deleteField', this.reference()); | 178 | MochiKit.Signal.signal(this, 'deleteField', this.reference()); |
183 | }, | 179 | }, |
184 | 180 | ||
185 | //========================================================================= | 181 | //========================================================================= |
186 | __syntaxFix__: "syntax fix" | 182 | __syntaxFix__: "syntax fix" |
187 | }); | 183 | }); |
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 391c379..41e32a0 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ColumnManager.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | //############################################################################# | 26 | //############################################################################# |
29 | 27 | ||
30 | Clipperz.PM.UI.Web.Components.ColumnManager = function(args) { | 28 | Clipperz.PM.UI.Web.Components.ColumnManager = function(args) { |
31 | args = args || {}; | 29 | args = args || {}; |
32 | Clipperz.PM.UI.Web.Components.ColumnManager.superclass.constructor.call(this, args); | 30 | Clipperz.PM.UI.Web.Components.ColumnManager.superclass.constructor.call(this, args); |
33 | 31 | ||
34 | this._name = args.name || Clipperz.Base.exception.raise('MandatoryParameter'); | 32 | this._name = args.name || Clipperz.Base.exception.raise('MandatoryParameter'); |
35 | this._selector = args.selector|| Clipperz.Base.exception.raise('MandatoryParameter');; | 33 | this._selector = args.selector|| Clipperz.Base.exception.raise('MandatoryParameter');; |
36 | this._label = args.label || null; | 34 | this._label = args.label || null; |
37 | this._isSortable = args.sortable|| false; | 35 | this._isSortable = args.sortable|| false; |
38 | this._comparator = args.comparator|| null; | 36 | this._comparator = args.comparator|| null; |
39 | this._sorted = args.sorted || 'UNSORTED'; //'ASCENDING' | 'DESCENDING' | 'UNSORTED' | 37 | this._sorted = args.sorted || 'UNSORTED'; //'ASCENDING' | 'DESCENDING' | 'UNSORTED' |
40 | this._cssClass = args.cssClass|| ''; | 38 | this._cssClass = args.cssClass|| ''; |
41 | 39 | ||
42 | this._signalIdentifiers = []; | 40 | this._signalIdentifiers = []; |
43 | 41 | ||
44 | return this; | 42 | return this; |
45 | } | 43 | } |
46 | 44 | ||
47 | //============================================================================= | 45 | //============================================================================= |
48 | 46 | ||
49 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ColumnManager, Clipperz.PM.UI.Common.Components.BaseComponent, { | 47 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ColumnManager, Clipperz.PM.UI.Common.Components.BaseComponent, { |
50 | 48 | ||
51 | 'toString': function () { | 49 | 'toString': function () { |
52 | return "Clipperz.PM.UI.Web.Components.ColumnManager - " + this._name; | 50 | return "Clipperz.PM.UI.Web.Components.ColumnManager - " + this._name; |
53 | }, | 51 | }, |
54 | 52 | ||
55 | 'name': function () { | 53 | 'name': function () { |
56 | return this._name; | 54 | return this._name; |
57 | }, | 55 | }, |
58 | 56 | ||
59 | 'label': function () { | 57 | 'label': function () { |
60 | return this._label; | 58 | return this._label; |
61 | }, | 59 | }, |
62 | 60 | ||
63 | 'selector': function () { | 61 | 'selector': function () { |
64 | return this._selector; | 62 | return this._selector; |
65 | }, | 63 | }, |
66 | 64 | ||
67 | 'comparator': function() { | 65 | 'comparator': function() { |
68 | return this._comparator; | 66 | return this._comparator; |
69 | }, | 67 | }, |
70 | 68 | ||
71 | 'cssClass': function() { | 69 | 'cssClass': function() { |
72 | return this._cssClass; | 70 | return this._cssClass; |
73 | }, | 71 | }, |
74 | 72 | ||
75 | //------------------------------------------------------------------------- | 73 | //------------------------------------------------------------------------- |
76 | 74 | ||
77 | 'isSortable': function () { | 75 | 'isSortable': function () { |
78 | return this._isSortable; | 76 | return this._isSortable; |
79 | }, | 77 | }, |
80 | 78 | ||
81 | //------------------------------------------------------------------------- | 79 | //------------------------------------------------------------------------- |
82 | 80 | ||
83 | 'sorted': function () { | 81 | 'sorted': function () { |
84 | return this._sorted; | 82 | return this._sorted; |
85 | }, | 83 | }, |
86 | 84 | ||
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 d3aa175..3d0ba76 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CreateNewCardSplashComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/CreateNewCardSplashComponent.js | |||
@@ -1,68 +1,66 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent = function(args) { | 26 | Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | return this; | 31 | return this; |
34 | } | 32 | } |
35 | 33 | ||
36 | //============================================================================= | 34 | //============================================================================= |
37 | 35 | ||
38 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 36 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
39 | 37 | ||
40 | //------------------------------------------------------------------------- | 38 | //------------------------------------------------------------------------- |
41 | 39 | ||
42 | 'toString': function () { | 40 | 'toString': function () { |
43 | return "Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent component"; | 41 | return "Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent component"; |
44 | }, | 42 | }, |
45 | 43 | ||
46 | //------------------------------------------------------------------------- | 44 | //------------------------------------------------------------------------- |
47 | 45 | ||
48 | 'renderSelf': function() { | 46 | 'renderSelf': function() { |
49 | this.append(this.element(), [ | 47 | this.append(this.element(), [ |
50 | {tag:'div', cls:'createNewCardSplash', id:this.getId('button'), children:[ | 48 | {tag:'div', cls:'createNewCardSplash', id:this.getId('button'), children:[ |
51 | {tag:'span', html:"Create New Card"} | 49 | {tag:'span', html:"Create New Card"} |
52 | ]} | 50 | ]} |
53 | ]); | 51 | ]); |
54 | 52 | ||
55 | MochiKit.Signal.connect(this.getElement('button'), 'onclick', this, 'handleClick'); | 53 | MochiKit.Signal.connect(this.getElement('button'), 'onclick', this, 'handleClick'); |
56 | }, | 54 | }, |
57 | 55 | ||
58 | //------------------------------------------------------------------------- | 56 | //------------------------------------------------------------------------- |
59 | 57 | ||
60 | 'handleClick': function (anEvent) { | 58 | 'handleClick': function (anEvent) { |
61 | anEvent.preventDefault(); | 59 | anEvent.preventDefault(); |
62 | MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'addCard', this.element()); | 60 | MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'addCard', this.element()); |
63 | }, | 61 | }, |
64 | 62 | ||
65 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
66 | 64 | ||
67 | __syntaxFix__: "syntax fix" | 65 | __syntaxFix__: "syntax fix" |
68 | }); | 66 | }); |
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 462d864..23f6710 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.DataPanel = function(args) { | 26 | Clipperz.PM.UI.Web.Components.DataPanel = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.DataPanel.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.DataPanel.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._initiallySelectedTab = args.selected || 'OFFLINE_COPY'; | 31 | this._initiallySelectedTab = args.selected || 'OFFLINE_COPY'; |
34 | this._tabPanelControllerConfiguration = { | 32 | this._tabPanelControllerConfiguration = { |
35 | 'OFFLINE_COPY': { | 33 | 'OFFLINE_COPY': { |
36 | tab:'offlineCopyTab', | 34 | tab:'offlineCopyTab', |
37 | panel:'offlineCopyPanel' | 35 | panel:'offlineCopyPanel' |
38 | }, | 36 | }, |
39 | 'SHARING': { | 37 | 'SHARING': { |
40 | tab:'sharingTab', | 38 | tab:'sharingTab', |
41 | panel:'sharingPanel' | 39 | panel:'sharingPanel' |
42 | }, | 40 | }, |
43 | 'IMPORT': { | 41 | 'IMPORT': { |
44 | tab:'importTab', | 42 | tab:'importTab', |
45 | panel:'importPanel' | 43 | panel:'importPanel' |
46 | }, | 44 | }, |
47 | 'EXPORT': { | 45 | 'EXPORT': { |
48 | tab:'exportTab', | 46 | tab:'exportTab', |
49 | panel:'exportPanel' | 47 | panel:'exportPanel' |
50 | } | 48 | } |
51 | }; | 49 | }; |
52 | 50 | ||
53 | return this; | 51 | return this; |
54 | } | 52 | } |
55 | 53 | ||
56 | //============================================================================= | 54 | //============================================================================= |
57 | 55 | ||
58 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { | 56 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { |
59 | 57 | ||
60 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
61 | 59 | ||
62 | 'toString': function () { | 60 | 'toString': function () { |
63 | return "Clipperz.PM.UI.Web.Components.DataPanel component"; | 61 | return "Clipperz.PM.UI.Web.Components.DataPanel component"; |
64 | }, | 62 | }, |
65 | 63 | ||
66 | //------------------------------------------------------------------------- | 64 | //------------------------------------------------------------------------- |
67 | 65 | ||
68 | 'renderSelf': function(/*aContainer, aPosition*/) { | 66 | 'renderSelf': function(/*aContainer, aPosition*/) { |
69 | this.append(this.element(), [ | 67 | this.append(this.element(), [ |
70 | {tag:'div', cls:'header', children:[ | 68 | {tag:'div', cls:'header', children:[ |
71 | {tag:'div', cls:'subPanelTabs', children:[ | 69 | {tag:'div', cls:'subPanelTabs', children:[ |
72 | {tag:'ul', children:[ | 70 | {tag:'ul', children:[ |
73 | {tag:'li', id:this.getId('offlineCopyTab'),children:[{tag:'a', href:'#', html:'Offline copy'}], cls:'first'}, | 71 | {tag:'li', id:this.getId('offlineCopyTab'),children:[{tag:'a', href:'#', html:'Offline copy'}], cls:'first'}, |
74 | {tag:'li', id:this.getId('sharingTab'), children:[{tag:'a', href:'#', html:'Sharing'}]}, | 72 | {tag:'li', id:this.getId('sharingTab'), children:[{tag:'a', href:'#', html:'Sharing'}]}, |
75 | {tag:'li', id:this.getId('importTab'), children:[{tag:'a', href:'#', html:'Import'}]}, | 73 | {tag:'li', id:this.getId('importTab'), children:[{tag:'a', href:'#', html:'Import'}]}, |
76 | {tag:'li', id:this.getId('exportTab'), children:[{tag:'a', href:'#', html:'Export'}]} | 74 | {tag:'li', id:this.getId('exportTab'), children:[{tag:'a', href:'#', html:'Export'}]} |
77 | ]} | 75 | ]} |
78 | ]} | 76 | ]} |
79 | ]}, | 77 | ]}, |
80 | {tag:'div', cls:'body', children:[ | 78 | {tag:'div', cls:'body', children:[ |
81 | {tag:'div', cls:'accountPanel', children:[ | 79 | {tag:'div', cls:'accountPanel', children:[ |
82 | {tag:'div', cls:'subPanelContent', children:[ | 80 | {tag:'div', cls:'subPanelContent', children:[ |
83 | {tag:'ul', children:[ | 81 | {tag:'ul', children:[ |
84 | {tag:'li', id:this.getId('offlineCopyPanel'),children:[ | 82 | {tag:'li', id:this.getId('offlineCopyPanel'),children:[ |
85 | // {tag:'h3', html:"Offline copy"}, | 83 | // {tag:'h3', html:"Offline copy"}, |
86 | {tag:'p', html:"With just one click you can dump all your encrypted data from Clipperz servers to your hard disk and create a read-only offline version of Clipperz to be used when you are not connected to the Internet."}, | 84 | {tag:'p', html:"With just one click you can dump all your encrypted data from Clipperz servers to your hard disk and create a read-only offline version of Clipperz to be used when you are not connected to the Internet."}, |
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 ea55ba4..b305045 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DateColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DateColumnManager.js | |||
@@ -1,69 +1,67 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | //############################################################################# | 26 | //############################################################################# |
29 | 27 | ||
30 | Clipperz.PM.UI.Web.Components.DateColumnManager = function(args) { | 28 | Clipperz.PM.UI.Web.Components.DateColumnManager = function(args) { |
31 | args = args || {}; | 29 | args = args || {}; |
32 | Clipperz.PM.UI.Web.Components.DateColumnManager.superclass.constructor.call(this, args); | 30 | Clipperz.PM.UI.Web.Components.DateColumnManager.superclass.constructor.call(this, args); |
33 | 31 | ||
34 | this._format = args.format|| Clipperz.Base.exception.raise('MandatoryParameter'); | 32 | this._format = args.format|| Clipperz.Base.exception.raise('MandatoryParameter'); |
35 | 33 | ||
36 | return this; | 34 | return this; |
37 | } | 35 | } |
38 | 36 | ||
39 | //============================================================================= | 37 | //============================================================================= |
40 | 38 | ||
41 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DateColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { | 39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DateColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { |
42 | 40 | ||
43 | 'toString': function () { | 41 | 'toString': function () { |
44 | return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; | 42 | return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; |
45 | }, | 43 | }, |
46 | 44 | ||
47 | //------------------------------------------------------------------------- | 45 | //------------------------------------------------------------------------- |
48 | 46 | ||
49 | 'format': function () { | 47 | 'format': function () { |
50 | return this._format; | 48 | return this._format; |
51 | }, | 49 | }, |
52 | 50 | ||
53 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
54 | 52 | ||
55 | 'renderCell': function(aRowElement, anObject) { | 53 | 'renderCell': function(aRowElement, anObject) { |
56 | Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ | 54 | Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ |
57 | { | 55 | { |
58 | tag:'span', | 56 | tag:'span', |
59 | title:Clipperz.PM.Date.formatDateWithTemplate(anObject[this.name()], "D, d M Y H:i:s"), | 57 | title:Clipperz.PM.Date.formatDateWithTemplate(anObject[this.name()], "D, d M Y H:i:s"), |
60 | html:Clipperz.PM.Date.formatDateWithTemplate(anObject[this.name()], this.format()) | 58 | html:Clipperz.PM.Date.formatDateWithTemplate(anObject[this.name()], this.format()) |
61 | } | 59 | } |
62 | ]}); | 60 | ]}); |
63 | }, | 61 | }, |
64 | 62 | ||
65 | //----------------------------------------------------- | 63 | //----------------------------------------------------- |
66 | 64 | ||
67 | '__syntax_fix__' : 'syntax fix' | 65 | '__syntax_fix__' : 'syntax fix' |
68 | }); | 66 | }); |
69 | 67 | ||
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 fe59494..6efe4c6 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DeleteObjectColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DeleteObjectColumnManager.js | |||
@@ -1,67 +1,65 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | //############################################################################# | 26 | //############################################################################# |
29 | 27 | ||
30 | Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager = function(args) { | 28 | Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager = function(args) { |
31 | args = args || {}; | 29 | args = args || {}; |
32 | Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager.superclass.constructor.call(this, args); | 30 | Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager.superclass.constructor.call(this, args); |
33 | 31 | ||
34 | return this; | 32 | return this; |
35 | } | 33 | } |
36 | 34 | ||
37 | //============================================================================= | 35 | //============================================================================= |
38 | 36 | ||
39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager, Clipperz.PM.UI.Web.Components.LinkColumnManager, { | 37 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager, Clipperz.PM.UI.Web.Components.LinkColumnManager, { |
40 | 38 | ||
41 | 'toString': function () { | 39 | 'toString': function () { |
42 | return "Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager component"; | 40 | return "Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager component"; |
43 | }, | 41 | }, |
44 | 42 | ||
45 | //------------------------------------------------------------------------- | 43 | //------------------------------------------------------------------------- |
46 | 44 | ||
47 | 'renderCell': function(aRowElement, anObject) { | 45 | 'renderCell': function(aRowElement, anObject) { |
48 | var tdElement; | 46 | var tdElement; |
49 | var linkElement; | 47 | var linkElement; |
50 | 48 | ||
51 | tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ | 49 | tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ |
52 | {tag:'div', cls:'delete', children:[ | 50 | {tag:'div', cls:'delete', children:[ |
53 | {tag:'span', children:[ | 51 | {tag:'span', children:[ |
54 | {tag:'a', href:'delete', html:"delete"} | 52 | {tag:'a', href:'delete', html:"delete"} |
55 | ]} | 53 | ]} |
56 | ]} | 54 | ]} |
57 | ]}); | 55 | ]}); |
58 | 56 | ||
59 | linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); | 57 | linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); |
60 | // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); | 58 | // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); |
61 | this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); | 59 | this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); |
62 | }, | 60 | }, |
63 | 61 | ||
64 | //----------------------------------------------------- | 62 | //----------------------------------------------------- |
65 | '__syntax_fix__' : 'syntax fix' | 63 | '__syntax_fix__' : 'syntax fix' |
66 | }); | 64 | }); |
67 | 65 | ||
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 a1f0f9f..2dad703 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginColumnManager.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | /* | 24 | /* |
27 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 25 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
28 | 26 | ||
29 | //############################################################################# | 27 | //############################################################################# |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.DirectLoginColumnManager = function(args) { | 29 | Clipperz.PM.UI.Web.Components.DirectLoginColumnManager = function(args) { |
32 | args = args || {}; | 30 | args = args || {}; |
33 | Clipperz.PM.UI.Web.Components.DirectLoginColumnManager.superclass.constructor.call(this, args); | 31 | Clipperz.PM.UI.Web.Components.DirectLoginColumnManager.superclass.constructor.call(this, args); |
34 | 32 | ||
35 | this._actionMethod = args.actionMethod || null; | 33 | this._actionMethod = args.actionMethod || null; |
36 | 34 | ||
37 | return this; | 35 | return this; |
38 | } | 36 | } |
39 | 37 | ||
40 | //============================================================================= | 38 | //============================================================================= |
41 | 39 | ||
42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { | 40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { |
43 | 41 | ||
44 | 'toString': function () { | 42 | 'toString': function () { |
45 | return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; | 43 | return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; |
46 | }, | 44 | }, |
47 | 45 | ||
48 | //------------------------------------------------------------------------- | 46 | //------------------------------------------------------------------------- |
49 | 47 | ||
50 | 'actionMethod': function () { | 48 | 'actionMethod': function () { |
51 | return this._actionMethod; | 49 | return this._actionMethod; |
52 | }, | 50 | }, |
53 | 51 | ||
54 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
55 | 53 | ||
56 | 'renderCell': function(aRowElement, anObject) { | 54 | 'renderCell': function(aRowElement, anObject) { |
57 | vartdElement; | 55 | vartdElement; |
58 | varlinkElement; | 56 | varlinkElement; |
59 | 57 | ||
60 | tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ | 58 | tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ |
61 | {tag:'div', cls:'directLogin_directLogin', children:[ | 59 | {tag:'div', cls:'directLogin_directLogin', children:[ |
62 | {tag:'div', cls:'directLogin_directLogin_body', children:[ | 60 | {tag:'div', cls:'directLogin_directLogin_body', children:[ |
63 | {tag:'a', href:'#', html:anObject[this.name()]} | 61 | {tag:'a', href:'#', html:anObject[this.name()]} |
64 | ]} | 62 | ]} |
65 | ]} | 63 | ]} |
66 | ]}); | 64 | ]}); |
67 | 65 | ||
68 | linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); | 66 | linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); |
69 | // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); | 67 | // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); |
70 | this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); | 68 | this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); |
71 | }, | 69 | }, |
72 | 70 | ||
73 | //----------------------------------------------------- | 71 | //----------------------------------------------------- |
74 | 72 | ||
75 | 'handleLinkClick': function (anObject, anEvent) { | 73 | 'handleLinkClick': function (anObject, anEvent) { |
76 | anEvent.preventDefault(); | 74 | anEvent.preventDefault(); |
77 | 75 | ||
78 | if (this.actionMethod() != null) { | 76 | if (this.actionMethod() != null) { |
79 | this.actionMethod()(anObject, anEvent); | 77 | this.actionMethod()(anObject, anEvent); |
80 | } | 78 | } |
81 | }, | 79 | }, |
82 | 80 | ||
83 | //----------------------------------------------------- | 81 | //----------------------------------------------------- |
84 | '__syntax_fix__' : 'syntax fix' | 82 | '__syntax_fix__' : 'syntax fix' |
85 | }); | 83 | }); |
86 | 84 | ||
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 1a76b0c..f5f99d4 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingBindingComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingBindingComponent.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent = function(args) { | 26 | Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._formFieldName = args.formFieldName|| Clipperz.Base.exception.raise('MandatoryParameter'); | 31 | this._formFieldName = args.formFieldName|| Clipperz.Base.exception.raise('MandatoryParameter'); |
34 | this._fields = args.fields || Clipperz.Base.exception.raise('MandatoryParameter'); | 32 | this._fields = args.fields || Clipperz.Base.exception.raise('MandatoryParameter'); |
35 | this._initiallySelectedFieldKey = args.selectedFieldKey|| null; | 33 | this._initiallySelectedFieldKey = args.selectedFieldKey|| null; |
36 | 34 | ||
37 | return this; | 35 | return this; |
38 | } | 36 | } |
39 | 37 | ||
40 | //============================================================================= | 38 | //============================================================================= |
41 | 39 | ||
42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
43 | 41 | ||
44 | //------------------------------------------------------------------------- | 42 | //------------------------------------------------------------------------- |
45 | 43 | ||
46 | 'toString': function () { | 44 | 'toString': function () { |
47 | return "Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent component"; | 45 | return "Clipperz.PM.UI.Web.Components.DirectLoginEditingBindingComponent component"; |
48 | }, | 46 | }, |
49 | 47 | ||
50 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
51 | 49 | ||
52 | 'formFieldName': function () { | 50 | 'formFieldName': function () { |
53 | return this._formFieldName; | 51 | return this._formFieldName; |
54 | }, | 52 | }, |
55 | 53 | ||
56 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
57 | 55 | ||
58 | 'fields': function () { | 56 | 'fields': function () { |
59 | return this._fields; | 57 | return this._fields; |
60 | }, | 58 | }, |
61 | 59 | ||
62 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
63 | 61 | ||
64 | 'selectedValue': function () { | 62 | 'selectedValue': function () { |
65 | var result; | 63 | var result; |
66 | 64 | ||
67 | result = this.getElement('select').value; | 65 | result = this.getElement('select').value; |
68 | 66 | ||
69 | if (result == '---') { | 67 | if (result == '---') { |
70 | result = null; | 68 | result = null; |
71 | } | 69 | } |
72 | 70 | ||
73 | return result; | 71 | return result; |
74 | }, | 72 | }, |
75 | 73 | ||
76 | 'initiallySelectedFieldKey': function () { | 74 | 'initiallySelectedFieldKey': function () { |
77 | return this._initiallySelectedFieldKey; | 75 | return this._initiallySelectedFieldKey; |
78 | }, | 76 | }, |
79 | 77 | ||
80 | //========================================================================= | 78 | //========================================================================= |
81 | 79 | ||
82 | 'renderSelf': function() { | 80 | 'renderSelf': function() { |
83 | var initiallySelectedOptions; | 81 | var initiallySelectedOptions; |
84 | 82 | ||
85 | this.append(this.element(), {tag:'div', id:this.getId('div'), cls:'binding', children:[ | 83 | this.append(this.element(), {tag:'div', id:this.getId('div'), cls:'binding', children:[ |
86 | {tag:'span', cls:'formFieldName', html:this.formFieldName()}, | 84 | {tag:'span', cls:'formFieldName', html:this.formFieldName()}, |
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 5114b1d..55d2c01 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingComponent.js | |||
@@ -1,172 +1,169 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent = function(args) { | 26 | Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._tabPanelController = null; | 31 | this._tabPanelController = null; |
34 | 32 | ||
35 | this._initiallySelectedTab = args.selected || 'TYPE'; | 33 | this._initiallySelectedTab = args.selected || 'TYPE'; |
36 | this._tabPanelControllerConfiguration = { | 34 | this._tabPanelControllerConfiguration = { |
37 | 'LABEL': { | 35 | 'LABEL': { |
38 | tab:'labelTab', | 36 | tab:'labelTab', |
39 | panel:'labelTabpanel' | 37 | panel:'labelTabpanel' |
40 | }, | 38 | }, |
41 | 'TYPE': { | 39 | 'TYPE': { |
42 | tab:'typeTab', | 40 | tab:'typeTab', |
43 | panel:'typeTabpanel' | 41 | panel:'typeTabpanel' |
44 | }, | 42 | }, |
45 | 'CONFIGURATION': { | 43 | 'CONFIGURATION': { |
46 | tab:'configurationTab', | 44 | tab:'configurationTab', |
47 | panel:'configurationTabpanel' | 45 | panel:'configurationTabpanel' |
48 | }, | 46 | }, |
49 | 'BINDINGS': { | 47 | 'BINDINGS': { |
50 | tab:'bindingsTab', | 48 | tab:'bindingsTab', |
51 | panel:'bindingsTabpanel' | 49 | panel:'bindingsTabpanel' |
52 | }, | 50 | }, |
53 | 'FAVICON': { | 51 | 'FAVICON': { |
54 | tab:'faviconTab', | 52 | tab:'faviconTab', |
55 | panel:'faviconTabpanel' | 53 | panel:'faviconTabpanel' |
56 | }, | 54 | }, |
57 | 'DONE': { | 55 | 'DONE': { |
58 | tab:'doneTab', | 56 | tab:'doneTab', |
59 | panel:'doneTabpanel' | 57 | panel:'doneTabpanel' |
60 | } | 58 | } |
61 | }; | 59 | }; |
62 | 60 | ||
63 | this._directLoginReference = null; | 61 | this._directLoginReference = null; |
64 | 62 | ||
65 | this._directLoginFavicon = null; | 63 | this._directLoginFavicon = null; |
66 | 64 | ||
67 | this._updateFaviconCounter = 0; | 65 | this._updateFaviconCounter = 0; |
68 | this._faviconComponent = null; | 66 | this._faviconComponent = null; |
69 | 67 | ||
70 | this._bindingComponents= []; | 68 | this._bindingComponents= []; |
71 | this._formValueComponents = []; | 69 | this._formValueComponents = []; |
72 | 70 | ||
73 | return this; | 71 | return this; |
74 | } | 72 | } |
75 | 73 | ||
76 | //============================================================================= | 74 | //============================================================================= |
77 | 75 | ||
78 | //Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 76 | //Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
79 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent, Clipperz.PM.UI.Common.Components.TabPanelComponent, { | 77 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent, Clipperz.PM.UI.Common.Components.TabPanelComponent, { |
80 | 78 | ||
81 | //------------------------------------------------------------------------- | 79 | //------------------------------------------------------------------------- |
82 | 80 | ||
83 | 'toString': function () { | 81 | 'toString': function () { |
84 | return "Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent component"; | 82 | return "Clipperz.PM.UI.Web.Components.DirectLoginEditingComponent component"; |
85 | }, | 83 | }, |
86 | 84 | ||
87 | //========================================================================= | 85 | //========================================================================= |
88 | 86 | ||
89 | 'directLoginReference': function () { | 87 | 'directLoginReference': function () { |
90 | return this._directLoginReference; | 88 | return this._directLoginReference; |
91 | }, | 89 | }, |
92 | 90 | ||
93 | //------------------------------------------------------------------------- | 91 | //------------------------------------------------------------------------- |
94 | 92 | ||
95 | 'setDirectLoginReference': function (aDirectLoginReference) { | 93 | 'setDirectLoginReference': function (aDirectLoginReference) { |
96 | this._directLoginReference = aDirectLoginReference; | 94 | this._directLoginReference = aDirectLoginReference; |
97 | 95 | ||
98 | return this._directLoginReference; | 96 | return this._directLoginReference; |
99 | }, | 97 | }, |
100 | 98 | ||
101 | //========================================================================= | 99 | //========================================================================= |
102 | 100 | ||
103 | 'label': function () { | 101 | 'label': function () { |
104 | return this.getElement('label').value | 102 | return this.getElement('label').value |
105 | }, | 103 | }, |
106 | 104 | ||
107 | 'setLabel': function (aValue) { | 105 | 'setLabel': function (aValue) { |
108 | //console.log("##> LABEL: " + aValue); | ||
109 | this.getElement('label').value = (aValue ? aValue : ''); | 106 | this.getElement('label').value = (aValue ? aValue : ''); |
110 | }, | 107 | }, |
111 | 108 | ||
112 | //------------------------------------------------------------------------- | 109 | //------------------------------------------------------------------------- |
113 | 110 | ||
114 | 'favicon': function () { | 111 | 'favicon': function () { |
115 | return this.getElement('faviconURL').value; | 112 | return this.getElement('faviconURL').value; |
116 | }, | 113 | }, |
117 | 114 | ||
118 | 'setFavicon': function (aValue) { | 115 | 'setFavicon': function (aValue) { |
119 | var regexp; | 116 | var regexp; |
120 | var displayValue; | 117 | var displayValue; |
121 | 118 | ||
122 | regexp = new RegExp('^data\:\/\/.*', 'i'); | 119 | regexp = new RegExp('^data\:\/\/.*', 'i'); |
123 | if (regexp.test(aValue)) { | 120 | if (regexp.test(aValue)) { |
124 | displayValue = '' | 121 | displayValue = '' |
125 | } else { | 122 | } else { |
126 | displayValue = (aValue ? aValue : ''); | 123 | displayValue = (aValue ? aValue : ''); |
127 | } | 124 | } |
128 | 125 | ||
129 | this.getElement('faviconURL').value = displayValue; | 126 | this.getElement('faviconURL').value = displayValue; |
130 | this.faviconComponent().setSrc(aValue); | 127 | this.faviconComponent().setSrc(aValue); |
131 | }, | 128 | }, |
132 | 129 | ||
133 | //'setFaviconData': function (aValue) { | 130 | //'setFaviconData': function (aValue) { |
134 | // this.getElement('faviconIcon').src = aValue; | 131 | // this.getElement('faviconIcon').src = aValue; |
135 | //}, | 132 | //}, |
136 | 133 | ||
137 | 'directLoginFavicon': function () { | 134 | 'directLoginFavicon': function () { |
138 | return this._directLoginFavicon; | 135 | return this._directLoginFavicon; |
139 | }, | 136 | }, |
140 | 137 | ||
141 | 'setDirectLoginFavicon': function (aValue) { | 138 | 'setDirectLoginFavicon': function (aValue) { |
142 | this._directLoginFavicon = aValue; | 139 | this._directLoginFavicon = aValue; |
143 | this.setFavicon(aValue); | 140 | this.setFavicon(aValue); |
144 | }, | 141 | }, |
145 | 142 | ||
146 | //------------------------------------------------------------------------- | 143 | //------------------------------------------------------------------------- |
147 | 144 | ||
148 | 'bookmarkletConfiguration': function () { | 145 | 'bookmarkletConfiguration': function () { |
149 | return this.getElement('bookmarkletConfiguration').value | 146 | return this.getElement('bookmarkletConfiguration').value |
150 | }, | 147 | }, |
151 | 148 | ||
152 | 'setBookmarkletConfiguration': function (aValue) { | 149 | 'setBookmarkletConfiguration': function (aValue) { |
153 | this.getElement('bookmarkletConfiguration').value = aValue; | 150 | this.getElement('bookmarkletConfiguration').value = aValue; |
154 | }, | 151 | }, |
155 | 152 | ||
156 | 'highlightConfigurationSyntaxError': function () { | 153 | 'highlightConfigurationSyntaxError': function () { |
157 | MochiKit.DOM.addElementClass(this.getElement('bookmarkletConfiguration'), 'error'); | 154 | MochiKit.DOM.addElementClass(this.getElement('bookmarkletConfiguration'), 'error'); |
158 | }, | 155 | }, |
159 | 156 | ||
160 | 'removeHighlightConfigurationSyntaxError': function () { | 157 | 'removeHighlightConfigurationSyntaxError': function () { |
161 | MochiKit.DOM.removeElementClass(this.getElement('bookmarkletConfiguration'), 'error'); | 158 | MochiKit.DOM.removeElementClass(this.getElement('bookmarkletConfiguration'), 'error'); |
162 | }, | 159 | }, |
163 | 160 | ||
164 | //========================================================================= | 161 | //========================================================================= |
165 | 162 | ||
166 | 'disableAllPanels': function () { | 163 | 'disableAllPanels': function () { |
167 | this.getElement('label').disabled = true; | 164 | this.getElement('label').disabled = true; |
168 | MochiKit.DOM.addElementClass(this.getElement('label').parentNode, 'disabled'); | 165 | MochiKit.DOM.addElementClass(this.getElement('label').parentNode, 'disabled'); |
169 | 166 | ||
170 | this.tabPanelController().selectTab(null); | 167 | this.tabPanelController().selectTab(null); |
171 | }, | 168 | }, |
172 | 169 | ||
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 fa57233..58b5b26 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingFormValueComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginEditingFormValueComponent.js | |||
@@ -1,176 +1,169 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent = function(args) { | 26 | Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._formFieldName = args.formFieldName|| Clipperz.Base.exception.raise('MandatoryParameter'); | 31 | this._formFieldName = args.formFieldName|| Clipperz.Base.exception.raise('MandatoryParameter'); |
34 | this._fieldOptions = args.fieldOptions || Clipperz.Base.exception.raise('MandatoryParameter'); | 32 | this._fieldOptions = args.fieldOptions || Clipperz.Base.exception.raise('MandatoryParameter'); |
35 | this._initialValue = args.initialValue || null; | 33 | this._initialValue = args.initialValue || null; |
36 | 34 | ||
37 | return this; | 35 | return this; |
38 | } | 36 | } |
39 | 37 | ||
40 | //============================================================================= | 38 | //============================================================================= |
41 | 39 | ||
42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
43 | 41 | ||
44 | //------------------------------------------------------------------------- | 42 | //------------------------------------------------------------------------- |
45 | 43 | ||
46 | 'toString': function () { | 44 | 'toString': function () { |
47 | return "Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent component"; | 45 | return "Clipperz.PM.UI.Web.Components.DirectLoginEditingFormValueComponent component"; |
48 | }, | 46 | }, |
49 | 47 | ||
50 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
51 | 49 | ||
52 | 'formFieldName': function () { | 50 | 'formFieldName': function () { |
53 | return this._formFieldName; | 51 | return this._formFieldName; |
54 | }, | 52 | }, |
55 | 53 | ||
56 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
57 | 55 | ||
58 | 'fieldOptions': function () { | 56 | 'fieldOptions': function () { |
59 | return this._fieldOptions; | 57 | return this._fieldOptions; |
60 | }, | 58 | }, |
61 | 59 | ||
62 | 'fieldType': function () { | 60 | 'fieldType': function () { |
63 | return this.fieldOptions()['type']; | 61 | return this.fieldOptions()['type']; |
64 | }, | 62 | }, |
65 | 63 | ||
66 | 'optionValues': function () { | 64 | 'optionValues': function () { |
67 | return MochiKit.Base.map(function (anOptionValue) { | 65 | return MochiKit.Base.map(function (anOptionValue) { |
68 | return { | 66 | return { |
69 | 'label': anOptionValue['label'] || anOptionValue['value'], | 67 | 'label': anOptionValue['label'] || anOptionValue['value'], |
70 | 'value': anOptionValue['value'] | 68 | 'value': anOptionValue['value'] |
71 | } | 69 | } |
72 | }, this.fieldOptions()['options']); | 70 | }, this.fieldOptions()['options']); |
73 | }, | 71 | }, |
74 | 72 | ||
75 | //------------------------------------------------------------------------- | 73 | //------------------------------------------------------------------------- |
76 | 74 | ||
77 | 'selectedValue': function () { | 75 | 'selectedValue': function () { |
78 | var result; | 76 | var result; |
79 | 77 | ||
80 | result = this.getElement('select').value; | 78 | result = this.getElement('select').value; |
81 | 79 | ||
82 | if (result == '---') { | 80 | if (result == '---') { |
83 | result = null; | 81 | result = null; |
84 | } | 82 | } |
85 | 83 | ||
86 | return result; | 84 | return result; |
87 | }, | 85 | }, |
88 | 86 | ||
89 | 'initialValue': function () { | 87 | 'initialValue': function () { |
90 | return this._initialValue; | 88 | return this._initialValue; |
91 | }, | 89 | }, |
92 | 90 | ||
93 | //========================================================================= | 91 | //========================================================================= |
94 | 92 | ||
95 | 'renderSelf': function() { | 93 | 'renderSelf': function() { |
96 | //console.log(">>> DirectLoginEditingFormValueComponent.renderSelf"); | ||
97 | //console.log("FIELD OPTIONS", this.fieldOptions()); | ||
98 | //console.log("OPTION VALUES", this.optionValues()); | ||
99 | this.append(this.element(), {tag:'div', id:this.getId('div'), cls:'formValue', children:[ | 94 | this.append(this.element(), {tag:'div', id:this.getId('div'), cls:'formValue', children:[ |
100 | {tag:'span', cls:'formFieldName', html:this.formFieldName()}, | 95 | {tag:'span', cls:'formFieldName', html:this.formFieldName()}, |
101 | {tag:'div', id:this.getId('values')} | 96 | {tag:'div', id:this.getId('values')} |
102 | ]}); | 97 | ]}); |
103 | 98 | ||
104 | if ((this.fieldType() == 'radio') || (this.fieldType() == 'select')) { | 99 | if ((this.fieldType() == 'radio') || (this.fieldType() == 'select')) { |
105 | this.append(this.getElement('values'), | 100 | this.append(this.getElement('values'), |
106 | {tag:'select', name:this.formFieldName(), id:this.getId('select'), cls:'formFieldMatchinCardField', children: | 101 | {tag:'select', name:this.formFieldName(), id:this.getId('select'), cls:'formFieldMatchinCardField', children: |
107 | MochiKit.Base.flattenArguments( | 102 | MochiKit.Base.flattenArguments( |
108 | // {tag:'option', value:'---', html:"---"}, | 103 | // {tag:'option', value:'---', html:"---"}, |
109 | MochiKit.Base.map( | 104 | MochiKit.Base.map( |
110 | MochiKit.Base.bind(function (aValue) { return {tag:'option', value:aValue['value'], html:aValue['label']}; }, this), | 105 | MochiKit.Base.bind(function (aValue) { return {tag:'option', value:aValue['value'], html:aValue['label']}; }, this), |
111 | this.optionValues() | 106 | this.optionValues() |
112 | ) | 107 | ) |
113 | ) | 108 | ) |
114 | } | 109 | } |
115 | ); | 110 | ); |
116 | 111 | ||
117 | MochiKit.Signal.connect(this.getElement('select'), 'onchange', this, 'handleSelectChange'); | 112 | MochiKit.Signal.connect(this.getElement('select'), 'onchange', this, 'handleSelectChange'); |
118 | 113 | ||
119 | if (! MochiKit.Base.isUndefinedOrNull(this.initialValue())) { | 114 | if (! MochiKit.Base.isUndefinedOrNull(this.initialValue())) { |
120 | var initiallySelectedOptions; | 115 | var initiallySelectedOptions; |
121 | initiallySelectedOptions = MochiKit.Selector.findChildElements(this.element(), ['option[value=' + this.initialValue() + ']']); | 116 | initiallySelectedOptions = MochiKit.Selector.findChildElements(this.element(), ['option[value=' + this.initialValue() + ']']); |
122 | if (initiallySelectedOptions.length == 1) { | 117 | if (initiallySelectedOptions.length == 1) { |
123 | MochiKit.DOM.updateNodeAttributes(initiallySelectedOptions[0], {selected:true}); | 118 | MochiKit.DOM.updateNodeAttributes(initiallySelectedOptions[0], {selected:true}); |
124 | this.handleSelectChange(); | 119 | this.handleSelectChange(); |
125 | } else { | 120 | } else { |
126 | Clipperz.DOM.Helper.insertBefore(this.getElement('select').childNodes[0], {tag:'option', value:'---', html:"", selected:true}); | 121 | Clipperz.DOM.Helper.insertBefore(this.getElement('select').childNodes[0], {tag:'option', value:'---', html:"", selected:true}); |
127 | } | 122 | } |
128 | } else { | 123 | } else { |
129 | Clipperz.DOM.Helper.insertBefore(this.getElement('select').childNodes[0], {tag:'option', value:'---', html:"", selected:true}); | 124 | Clipperz.DOM.Helper.insertBefore(this.getElement('select').childNodes[0], {tag:'option', value:'---', html:"", selected:true}); |
130 | } | 125 | } |
131 | } else if (this.fieldType() == 'checkbox') { | 126 | } else if (this.fieldType() == 'checkbox') { |
132 | this.append(this.getElement('values'), | 127 | this.append(this.getElement('values'), |
133 | {tag:'input', type:'checkbox', name:this.formFieldName(), id:this.getId('checkbox'), cls:'formFieldMatchinCardField'} | 128 | {tag:'input', type:'checkbox', name:this.formFieldName(), id:this.getId('checkbox'), cls:'formFieldMatchinCardField'} |
134 | ); | 129 | ); |
135 | 130 | ||
136 | MochiKit.Signal.connect(this.getElement('checkbox'), 'onchange', this, 'handleSelectChange'); | 131 | MochiKit.Signal.connect(this.getElement('checkbox'), 'onchange', this, 'handleSelectChange'); |
137 | 132 | ||
138 | if (this.initialValue()) { | 133 | if (this.initialValue()) { |
139 | MochiKit.DOM.updateNodeAttributes(this.getElement('checkbox'), {checked:true}); | 134 | MochiKit.DOM.updateNodeAttributes(this.getElement('checkbox'), {checked:true}); |
140 | } | 135 | } |
141 | } else { | 136 | } else { |
142 | WTF = TODO; | 137 | WTF = TODO; |
143 | } | 138 | } |
144 | //console.log("<<< DirectLoginEditingFormValueComponent.renderSelf"); | ||
145 | }, | 139 | }, |
146 | 140 | ||
147 | //========================================================================= | 141 | //========================================================================= |
148 | 142 | ||
149 | 'handleSelectChange': function (anEvent) { | 143 | 'handleSelectChange': function (anEvent) { |
150 | //console.log("handleSelectChange", anEvent, anEvent.src(), anEvent.src().value); | ||
151 | var options; | 144 | var options; |
152 | 145 | ||
153 | options = {}; | 146 | options = {}; |
154 | 147 | ||
155 | options['fieldName'] = this.formFieldName(); | 148 | options['fieldName'] = this.formFieldName(); |
156 | 149 | ||
157 | if (this.fieldType() == 'checkbox') { | 150 | if (this.fieldType() == 'checkbox') { |
158 | options['selectedValue'] = (this.getElement('checkbox').checked ? 1 : null); | 151 | options['selectedValue'] = (this.getElement('checkbox').checked ? 1 : null); |
159 | } else { | 152 | } else { |
160 | options['selectedValue'] = this.selectedValue(); | 153 | options['selectedValue'] = this.selectedValue(); |
161 | } | 154 | } |
162 | 155 | ||
163 | MochiKit.Signal.signal(this, 'formValueChange', options); | 156 | MochiKit.Signal.signal(this, 'formValueChange', options); |
164 | }, | 157 | }, |
165 | 158 | ||
166 | //========================================================================= | 159 | //========================================================================= |
167 | __syntaxFix__: "syntax fix" | 160 | __syntaxFix__: "syntax fix" |
168 | }); | 161 | }); |
169 | 162 | ||
170 | 163 | ||
171 | 164 | ||
172 | 165 | ||
173 | 166 | ||
174 | 167 | ||
175 | 168 | ||
176 | 169 | ||
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 d8dc941..b4fc24e 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginsColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DirectLoginsColumnManager.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | //############################################################################# | 26 | //############################################################################# |
29 | 27 | ||
30 | Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager = function(args) { | 28 | Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager = function(args) { |
31 | args = args || {}; | 29 | args = args || {}; |
32 | Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager.superclass.constructor.call(this, args); | 30 | Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager.superclass.constructor.call(this, args); |
33 | 31 | ||
34 | this._enterLeaveCounter = 0; | 32 | this._enterLeaveCounter = 0; |
35 | this._selectedRowObject = null; | 33 | this._selectedRowObject = null; |
36 | 34 | ||
37 | return this; | 35 | return this; |
38 | } | 36 | } |
39 | 37 | ||
40 | //============================================================================= | 38 | //============================================================================= |
41 | 39 | ||
42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { | 40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { |
43 | 41 | ||
44 | 'toString': function () { | 42 | 'toString': function () { |
45 | return "Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager component"; | 43 | return "Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager component"; |
46 | }, | 44 | }, |
47 | 45 | ||
48 | //------------------------------------------------------------------------- | 46 | //------------------------------------------------------------------------- |
49 | 47 | ||
50 | 'renderHeader': function(aTRElement) { | 48 | 'renderHeader': function(aTRElement) { |
51 | Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager.superclass.renderHeader.call(this, aTRElement); | 49 | Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager.superclass.renderHeader.call(this, aTRElement); |
52 | 50 | ||
53 | Clipperz.DOM.Helper.append(MochiKit.DOM.currentDocument().body, {tag:'div', cls:'DirectLoginListPopup', id:this.getId('DirectLoginListPopup'), children:[ | 51 | Clipperz.DOM.Helper.append(MochiKit.DOM.currentDocument().body, {tag:'div', cls:'DirectLoginListPopup', id:this.getId('DirectLoginListPopup'), children:[ |
54 | {tag:'div', cls:'DirectLoginListPopup_body', children:[ | 52 | {tag:'div', cls:'DirectLoginListPopup_body', children:[ |
55 | {tag:'ul', id:this.getId('DirectLoginListPopup_list'), children:[ | 53 | {tag:'ul', id:this.getId('DirectLoginListPopup_list'), children:[ |
56 | // {tag:'li', children:[ | 54 | // {tag:'li', children:[ |
57 | // {tag:'img', cls:'favicon', src:'http://www.microsoft.com/favicon.ico'}, | 55 | // {tag:'img', cls:'favicon', src:'http://www.microsoft.com/favicon.ico'}, |
58 | // {tag:'a', href:'#', html:"Google Mail"} | 56 | // {tag:'a', href:'#', html:"Google Mail"} |
59 | // ]}, | 57 | // ]}, |
60 | // ... | 58 | // ... |
61 | ]} | 59 | ]} |
62 | ]}, | 60 | ]}, |
63 | {tag:'div', cls:'DirectLoginListPopup_footer'} | 61 | {tag:'div', cls:'DirectLoginListPopup_footer'} |
64 | ]}); | 62 | ]}); |
65 | 63 | ||
66 | MochiKit.Style.hideElement(this.getId('DirectLoginListPopup')); | 64 | MochiKit.Style.hideElement(this.getId('DirectLoginListPopup')); |
67 | 65 | ||
68 | //BEWARE: use MochiKit.Signal.connect instead of this.connectEvent, as the HEADER is NOT redrawn after each refresh | 66 | //BEWARE: use MochiKit.Signal.connect instead of this.connectEvent, as the HEADER is NOT redrawn after each refresh |
69 | MochiKit.Signal.connect(this.getId('DirectLoginListPopup'), 'onmouseenter', this, 'handleDirectLoginListPopupEnter'); | 67 | MochiKit.Signal.connect(this.getId('DirectLoginListPopup'), 'onmouseenter', this, 'handleDirectLoginListPopupEnter'); |
70 | MochiKit.Signal.connect(this.getId('DirectLoginListPopup'), 'onmouseleave', this, 'handleDirectLoginListPopupLeave'); | 68 | MochiKit.Signal.connect(this.getId('DirectLoginListPopup'), 'onmouseleave', this, 'handleDirectLoginListPopupLeave'); |
71 | }, | 69 | }, |
72 | 70 | ||
73 | //------------------------------------------------------------------------- | 71 | //------------------------------------------------------------------------- |
74 | 72 | ||
75 | 'renderCell': function(aRowElement, anObject) { | 73 | 'renderCell': function(aRowElement, anObject) { |
76 | var i,c; | 74 | var i,c; |
77 | var directLoginsInfo; | 75 | var directLoginsInfo; |
78 | 76 | ||
79 | directLoginsInfo = anObject[this.name()]; | 77 | directLoginsInfo = anObject[this.name()]; |
80 | 78 | ||
81 | TDElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:'card_directLogins'}); | 79 | TDElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:'card_directLogins'}); |
82 | 80 | ||
83 | c = Math.min(2, directLoginsInfo.length); | 81 | c = Math.min(2, directLoginsInfo.length); |
84 | for (i=0; i<c; i++) { | 82 | for (i=0; i<c; i++) { |
85 | var elementID; | 83 | var elementID; |
86 | 84 | ||
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 6297002..bdb044a 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/FaviconColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/FaviconColumnManager.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | //############################################################################# | 26 | //############################################################################# |
29 | 27 | ||
30 | Clipperz.PM.UI.Web.Components.FaviconColumnManager = function(args) { | 28 | Clipperz.PM.UI.Web.Components.FaviconColumnManager = function(args) { |
31 | args = args || {}; | 29 | args = args || {}; |
32 | Clipperz.PM.UI.Web.Components.FaviconColumnManager.superclass.constructor.call(this, args); | 30 | Clipperz.PM.UI.Web.Components.FaviconColumnManager.superclass.constructor.call(this, args); |
33 | 31 | ||
34 | return this; | 32 | return this; |
35 | } | 33 | } |
36 | 34 | ||
37 | //============================================================================= | 35 | //============================================================================= |
38 | 36 | ||
39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.FaviconColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { | 37 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.FaviconColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { |
40 | 38 | ||
41 | 'toString': function () { | 39 | 'toString': function () { |
42 | return "Clipperz.PM.UI.Web.Components.FaviconColumnManager component"; | 40 | return "Clipperz.PM.UI.Web.Components.FaviconColumnManager component"; |
43 | }, | 41 | }, |
44 | 42 | ||
45 | //------------------------------------------------------------------------- | 43 | //------------------------------------------------------------------------- |
46 | 44 | ||
47 | 'renderCell': function(aRowElement, anObject) { | 45 | 'renderCell': function(aRowElement, anObject) { |
48 | varfaviconImageElement; | 46 | varfaviconImageElement; |
49 | var faviconUrl; | 47 | var faviconUrl; |
50 | 48 | ||
51 | faviconImageElement = this.getId('favicon'); | 49 | faviconImageElement = this.getId('favicon'); |
52 | faviconUrl = anObject[this.name()]; | 50 | faviconUrl = anObject[this.name()]; |
53 | 51 | ||
54 | if (faviconUrl == null) { | 52 | if (faviconUrl == null) { |
55 | faviconUrl = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); | 53 | faviconUrl = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); |
56 | } | 54 | } |
57 | 55 | ||
58 | Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ | 56 | Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ |
59 | {tag:'img', id:faviconImageElement, src:faviconUrl} | 57 | {tag:'img', id:faviconImageElement, src:faviconUrl} |
60 | ]}); | 58 | ]}); |
61 | 59 | ||
62 | MochiKit.Signal.connect(faviconImageElement, 'onload', this, 'handleLoadedFaviconImage'); | 60 | MochiKit.Signal.connect(faviconImageElement, 'onload', this, 'handleLoadedFaviconImage'); |
63 | MochiKit.Signal.connect(faviconImageElement, 'onerror', this, 'handleMissingFaviconImage'); | 61 | MochiKit.Signal.connect(faviconImageElement, 'onerror', this, 'handleMissingFaviconImage'); |
64 | MochiKit.Signal.connect(faviconImageElement, 'onabort', this, 'handleMissingFaviconImage'); | 62 | MochiKit.Signal.connect(faviconImageElement, 'onabort', this, 'handleMissingFaviconImage'); |
65 | }, | 63 | }, |
66 | 64 | ||
67 | //----------------------------------------------------- | 65 | //----------------------------------------------------- |
68 | 66 | ||
69 | 'handleLoadedFaviconImage': function(anEvent) { | 67 | 'handleLoadedFaviconImage': function(anEvent) { |
70 | MochiKit.Signal.disconnectAllTo(anEvent.src()); | 68 | MochiKit.Signal.disconnectAllTo(anEvent.src()); |
71 | if (anEvent.src().complete == false) { | 69 | if (anEvent.src().complete == false) { |
72 | anEvent.src().src = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); | 70 | anEvent.src().src = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); |
73 | } | 71 | } |
74 | }, | 72 | }, |
75 | 73 | ||
76 | //----------------------------------------------------- | 74 | //----------------------------------------------------- |
77 | 75 | ||
78 | 'handleMissingFaviconImage': function(anEvent) { | 76 | 'handleMissingFaviconImage': function(anEvent) { |
79 | MochiKit.Signal.disconnectAllTo(anEvent.src()); | 77 | MochiKit.Signal.disconnectAllTo(anEvent.src()); |
80 | anEvent.src().src = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); | 78 | anEvent.src().src = Clipperz.PM.Strings.getValue('defaultFaviconUrl'); |
81 | }, | 79 | }, |
82 | 80 | ||
83 | //----------------------------------------------------- | 81 | //----------------------------------------------------- |
84 | '__syntax_fix__' : 'syntax fix' | 82 | '__syntax_fix__' : 'syntax fix' |
85 | }); | 83 | }); |
86 | 84 | ||
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 51d55f4..21dddc9 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/GridComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/GridComponent.js | |||
@@ -1,198 +1,194 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.GridComponent = function(args) { | 26 | Clipperz.PM.UI.Web.Components.GridComponent = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.GridComponent.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.GridComponent.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._columnsManagers = args.columnsManagers; | 31 | this._columnsManagers = args.columnsManagers; |
34 | 32 | ||
35 | this._rowsObjects = []; | 33 | this._rowsObjects = []; |
36 | this._noRowsGridComponent = null; | 34 | this._noRowsGridComponent = null; |
37 | 35 | ||
38 | this._slots = { | 36 | this._slots = { |
39 | 'headerSlot':this.getId('headerSlot') | 37 | 'headerSlot':this.getId('headerSlot') |
40 | }; | 38 | }; |
41 | 39 | ||
42 | return this; | 40 | return this; |
43 | } | 41 | } |
44 | 42 | ||
45 | //============================================================================= | 43 | //============================================================================= |
46 | 44 | ||
47 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.GridComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 45 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.GridComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
48 | 46 | ||
49 | //------------------------------------------------------------------------- | 47 | //------------------------------------------------------------------------- |
50 | 48 | ||
51 | 'toString': function () { | 49 | 'toString': function () { |
52 | return "Clipperz.PM.UI.Web.Components.GridComponent component"; | 50 | return "Clipperz.PM.UI.Web.Components.GridComponent component"; |
53 | }, | 51 | }, |
54 | 52 | ||
55 | //------------------------------------------------------------------------- | 53 | //------------------------------------------------------------------------- |
56 | 54 | ||
57 | 'rows': function () { | 55 | 'rows': function () { |
58 | throw Clipperz.Base.exception.AbstractMethod; | 56 | throw Clipperz.Base.exception.AbstractMethod; |
59 | // return this._rows; | 57 | // return this._rows; |
60 | }, | 58 | }, |
61 | 59 | ||
62 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
63 | 61 | ||
64 | 'columnsManagers': function () { | 62 | 'columnsManagers': function () { |
65 | return this._columnsManagers; | 63 | return this._columnsManagers; |
66 | }, | 64 | }, |
67 | 65 | ||
68 | //------------------------------------------------------------------------- | 66 | //------------------------------------------------------------------------- |
69 | 67 | ||
70 | 'renderSelf': function(/*aContainer, aPosition*/) { | 68 | 'renderSelf': function(/*aContainer, aPosition*/) { |
71 | this.append(this.element(), [ | 69 | this.append(this.element(), [ |
72 | {tag:'div', cls:'header', children:[ | 70 | {tag:'div', cls:'header', children:[ |
73 | {tag:'form', id:this.getId('searchForm'), cls:'search', children:[ | 71 | {tag:'form', id:this.getId('searchForm'), cls:'search', children:[ |
74 | {tag:'div', cls:'search', children:[ | 72 | {tag:'div', cls:'search', children:[ |
75 | {tag:'input', type:'text', id:this.getId('search'), cls:'search', placeholder:"search", name:'textToSearch'/*, value:"clipperz"*/} | 73 | {tag:'input', type:'text', id:this.getId('search'), cls:'search', placeholder:"search", name:'textToSearch'/*, value:"clipperz"*/} |
76 | ]}, | 74 | ]}, |
77 | {tag:'div', cls:'clearSearchButton', id:this.getId('clearSearch')}, | 75 | {tag:'div', cls:'clearSearchButton', id:this.getId('clearSearch')}, |
78 | // {tag:'input', type:'button', cls:'searchButton', name:'searchButton', value:"search"}, | 76 | // {tag:'input', type:'button', cls:'searchButton', name:'searchButton', value:"search"}, |
79 | {tag:'div', cls:'headerSlot', id:this.getId('headerSlot')} | 77 | {tag:'div', cls:'headerSlot', id:this.getId('headerSlot')} |
80 | ]} | 78 | ]} |
81 | ]}, | 79 | ]}, |
82 | {tag:'div', cls:'body', children:[ | 80 | {tag:'div', cls:'body', children:[ |
83 | {tag:'div', cls:'rows', id:this.getId('rows'), children:[ | 81 | {tag:'div', cls:'rows', id:this.getId('rows'), children:[ |
84 | {tag:'table', cellpadding:'0', cellspacing:'0', cls:'rows', children:[ | 82 | {tag:'table', cellpadding:'0', cellspacing:'0', cls:'rows', children:[ |
85 | {tag:'thead', children:[ | 83 | {tag:'thead', children:[ |
86 | {tag:'tr', id:this.getId('thead_tr'), children:[]} | 84 | {tag:'tr', id:this.getId('thead_tr'), children:[]} |
87 | ]}, | 85 | ]}, |
88 | {tag:'tbody', id:this.getId('gridRows'), children:[]} | 86 | {tag:'tbody', id:this.getId('gridRows'), children:[]} |
89 | ]} | 87 | ]} |
90 | ]}, | 88 | ]}, |
91 | {tag:'div', cls:'noRowsBlock', id:this.getId('noRowsBlock'), children:[]} | 89 | {tag:'div', cls:'noRowsBlock', id:this.getId('noRowsBlock'), children:[]} |
92 | ]}, | 90 | ]}, |
93 | {tag:'div', cls:'footer'} | 91 | {tag:'div', cls:'footer'} |
94 | ]); | 92 | ]); |
95 | 93 | ||
96 | this.renderHeader(); | 94 | this.renderHeader(); |
97 | MochiKit.Signal.connect(this.getId('clearSearch'), 'onclick', this, 'clearSearchHandler'); | 95 | MochiKit.Signal.connect(this.getId('clearSearch'), 'onclick', this, 'clearSearchHandler'); |
98 | }, | 96 | }, |
99 | 97 | ||
100 | //------------------------------------------------------------------------- | 98 | //------------------------------------------------------------------------- |
101 | 99 | ||
102 | 'renderHeader': function () { | 100 | 'renderHeader': function () { |
103 | var headerElement; | 101 | var headerElement; |
104 | 102 | ||
105 | headerElement = this.getElement('thead_tr'); | 103 | headerElement = this.getElement('thead_tr'); |
106 | headerElement.innerHTML = ""; | 104 | headerElement.innerHTML = ""; |
107 | 105 | ||
108 | MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) { | 106 | MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) { |
109 | aColumnManager.renderHeader(headerElement); | 107 | aColumnManager.renderHeader(headerElement); |
110 | }); | 108 | }); |
111 | }, | 109 | }, |
112 | 110 | ||
113 | //------------------------------------------------------------------------- | 111 | //------------------------------------------------------------------------- |
114 | 112 | ||
115 | 'update': function (someObjects) { | 113 | 'update': function (someObjects) { |
116 | this._rowsObjects = someObjects | 114 | this._rowsObjects = someObjects |
117 | this.refresh(); | 115 | this.refresh(); |
118 | this.focus(); | 116 | this.focus(); |
119 | }, | 117 | }, |
120 | 118 | ||
121 | 'focus': function () { | 119 | 'focus': function () { |
122 | this.getElement('search').focus(); | 120 | this.getElement('search').focus(); |
123 | }, | 121 | }, |
124 | 122 | ||
125 | //------------------------------------------------------------------------- | 123 | //------------------------------------------------------------------------- |
126 | 124 | ||
127 | 'startSearch': function () { | 125 | 'startSearch': function () { |
128 | //console.log("--> startSearch"); | ||
129 | MochiKit.DOM.addElementClass(this.getElement('search'), 'running'); | 126 | MochiKit.DOM.addElementClass(this.getElement('search'), 'running'); |
130 | }, | 127 | }, |
131 | 128 | ||
132 | 'endSearch': function () { | 129 | 'endSearch': function () { |
133 | MochiKit.DOM.removeElementClass(this.getElement('search'), 'running'); | 130 | MochiKit.DOM.removeElementClass(this.getElement('search'), 'running'); |
134 | //console.log("<-- startSearch"); | ||
135 | }, | 131 | }, |
136 | 132 | ||
137 | //------------------------------------------------------------------------- | 133 | //------------------------------------------------------------------------- |
138 | 134 | ||
139 | 'disconnectColumnManagersRowsSignals': function () { | 135 | 'disconnectColumnManagersRowsSignals': function () { |
140 | MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) { | 136 | MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) { |
141 | aColumnManager.disconnectRowsSignals(); | 137 | aColumnManager.disconnectRowsSignals(); |
142 | }); | 138 | }); |
143 | }, | 139 | }, |
144 | 140 | ||
145 | //------------------------------------------------------------------------- | 141 | //------------------------------------------------------------------------- |
146 | 142 | ||
147 | 'refresh': function () { | 143 | 'refresh': function () { |
148 | var gridRowsElement; | 144 | var gridRowsElement; |
149 | var rowClass; | 145 | var rowClass; |
150 | 146 | ||
151 | this.disconnectColumnManagersRowsSignals(); | 147 | this.disconnectColumnManagersRowsSignals(); |
152 | 148 | ||
153 | { | 149 | { |
154 | MochiKit.DOM.removeElementClass(this.getElement('search'), 'disabled'); | 150 | MochiKit.DOM.removeElementClass(this.getElement('search'), 'disabled'); |
155 | // MochiKit.DOM.setNodeAttribute(this.getElement('search'), 'disabled', null); | 151 | // MochiKit.DOM.setNodeAttribute(this.getElement('search'), 'disabled', null); |
156 | MochiKit.DOM.removeElementClass(this.element(), 'empty'); | 152 | MochiKit.DOM.removeElementClass(this.element(), 'empty'); |
157 | MochiKit.DOM.removeElementClass(this.element(), 'noRows'); | 153 | MochiKit.DOM.removeElementClass(this.element(), 'noRows'); |
158 | } | 154 | } |
159 | 155 | ||
160 | 156 | ||
161 | gridRowsElement = this.getElement('gridRows'); | 157 | gridRowsElement = this.getElement('gridRows'); |
162 | gridRowsElement.innerHTML = ""; | 158 | gridRowsElement.innerHTML = ""; |
163 | 159 | ||
164 | MochiKit.DOM.removeElementClass(this.element(), 'empty'); | 160 | MochiKit.DOM.removeElementClass(this.element(), 'empty'); |
165 | 161 | ||
166 | rowClass = 'odd'; | 162 | rowClass = 'odd'; |
167 | MochiKit.Iter.forEach(this._rowsObjects, MochiKit.Base.bind(function (aRowObject) { | 163 | MochiKit.Iter.forEach(this._rowsObjects, MochiKit.Base.bind(function (aRowObject) { |
168 | var cardRowElement; | 164 | var cardRowElement; |
169 | 165 | ||
170 | cardRowElement = this.append(gridRowsElement, {tag:'tr', id:this.getId(aRowObject['_reference']), cls:rowClass}); | 166 | cardRowElement = this.append(gridRowsElement, {tag:'tr', id:this.getId(aRowObject['_reference']), cls:rowClass}); |
171 | MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) { | 167 | MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) { |
172 | aColumnManager.renderCell(cardRowElement, aRowObject); | 168 | aColumnManager.renderCell(cardRowElement, aRowObject); |
173 | }); | 169 | }); |
174 | 170 | ||
175 | rowClass = (rowClass == 'odd') ? 'even' : 'odd'; | 171 | rowClass = (rowClass == 'odd') ? 'even' : 'odd'; |
176 | }, this)); | 172 | }, this)); |
177 | }, | 173 | }, |
178 | 174 | ||
179 | //----------------------------------------------------------------------------- | 175 | //----------------------------------------------------------------------------- |
180 | 176 | ||
181 | 'filterElement': function () { | 177 | 'filterElement': function () { |
182 | return this.getElement('search'); | 178 | return this.getElement('search'); |
183 | }, | 179 | }, |
184 | 180 | ||
185 | //------------------------------------------------------------------------- | 181 | //------------------------------------------------------------------------- |
186 | 182 | ||
187 | 'shouldShowElementWhileRendering': function () { | 183 | 'shouldShowElementWhileRendering': function () { |
188 | return false; | 184 | return false; |
189 | }, | 185 | }, |
190 | 186 | ||
191 | //------------------------------------------------------------------------- | 187 | //------------------------------------------------------------------------- |
192 | 188 | ||
193 | 'selectRow': function (aRowObject) { | 189 | 'selectRow': function (aRowObject) { |
194 | MochiKit.DOM.addElementClass(this.getId(aRowObject['_reference']), 'selected'); | 190 | MochiKit.DOM.addElementClass(this.getId(aRowObject['_reference']), 'selected'); |
195 | }, | 191 | }, |
196 | 192 | ||
197 | 'unselectRow': function (aRowObject) { | 193 | 'unselectRow': function (aRowObject) { |
198 | MochiKit.DOM.removeElementClass(this.getId(aRowObject['_reference']), 'selected'); | 194 | MochiKit.DOM.removeElementClass(this.getId(aRowObject['_reference']), 'selected'); |
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 3e03fcf..d1d9d7f 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ImageColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ImageColumnManager.js | |||
@@ -1,65 +1,63 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | //############################################################################# | 26 | //############################################################################# |
29 | 27 | ||
30 | Clipperz.PM.UI.Web.Components.ImageColumnManager = function(args) { | 28 | Clipperz.PM.UI.Web.Components.ImageColumnManager = function(args) { |
31 | args = args || {}; | 29 | args = args || {}; |
32 | Clipperz.PM.UI.Web.Components.ImageColumnManager.superclass.constructor.call(this, args); | 30 | Clipperz.PM.UI.Web.Components.ImageColumnManager.superclass.constructor.call(this, args); |
33 | 31 | ||
34 | return this; | 32 | return this; |
35 | } | 33 | } |
36 | 34 | ||
37 | //============================================================================= | 35 | //============================================================================= |
38 | 36 | ||
39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ImageColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { | 37 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ImageColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { |
40 | 38 | ||
41 | 'toString': function () { | 39 | 'toString': function () { |
42 | return "Clipperz.PM.UI.Web.Components.ImageColumnManager component"; | 40 | return "Clipperz.PM.UI.Web.Components.ImageColumnManager component"; |
43 | }, | 41 | }, |
44 | 42 | ||
45 | //------------------------------------------------------------------------- | 43 | //------------------------------------------------------------------------- |
46 | 44 | ||
47 | 'renderCell': function(aRowElement, anObject) { | 45 | 'renderCell': function(aRowElement, anObject) { |
48 | Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ | 46 | Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ |
49 | {tag:'img', src:anObject[this.name()]} | 47 | {tag:'img', src:anObject[this.name()]} |
50 | ]}); | 48 | ]}); |
51 | 49 | ||
52 | // return Clipperz.Async.callbacks("ImageColumnManager.renderCell", [ | 50 | // return Clipperz.Async.callbacks("ImageColumnManager.renderCell", [ |
53 | // this.selector(), | 51 | // this.selector(), |
54 | // MochiKit.Base.bind(function (aValue) { | 52 | // MochiKit.Base.bind(function (aValue) { |
55 | // Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ | 53 | // Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ |
56 | // {tag:'img', src:aValue} | 54 | // {tag:'img', src:aValue} |
57 | // ]}); | 55 | // ]}); |
58 | // }, this) | 56 | // }, this) |
59 | // ], {trace:false}, anObject); | 57 | // ], {trace:false}, anObject); |
60 | }, | 58 | }, |
61 | 59 | ||
62 | //----------------------------------------------------- | 60 | //----------------------------------------------------- |
63 | '__syntax_fix__' : 'syntax fix' | 61 | '__syntax_fix__' : 'syntax fix' |
64 | }); | 62 | }); |
65 | 63 | ||
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 f3f9cd5..69f735b 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LinkColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LinkColumnManager.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | //############################################################################# | 26 | //############################################################################# |
29 | 27 | ||
30 | Clipperz.PM.UI.Web.Components.LinkColumnManager = function(args) { | 28 | Clipperz.PM.UI.Web.Components.LinkColumnManager = function(args) { |
31 | args = args || {}; | 29 | args = args || {}; |
32 | Clipperz.PM.UI.Web.Components.LinkColumnManager.superclass.constructor.call(this, args); | 30 | Clipperz.PM.UI.Web.Components.LinkColumnManager.superclass.constructor.call(this, args); |
33 | 31 | ||
34 | this._actionMethod = args.actionMethod || null; | 32 | this._actionMethod = args.actionMethod || null; |
35 | 33 | ||
36 | return this; | 34 | return this; |
37 | } | 35 | } |
38 | 36 | ||
39 | //============================================================================= | 37 | //============================================================================= |
40 | 38 | ||
41 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LinkColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { | 39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LinkColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { |
42 | 40 | ||
43 | 'toString': function () { | 41 | 'toString': function () { |
44 | return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; | 42 | return "Clipperz.PM.UI.Web.Components.DateColumnManager component"; |
45 | }, | 43 | }, |
46 | 44 | ||
47 | //------------------------------------------------------------------------- | 45 | //------------------------------------------------------------------------- |
48 | 46 | ||
49 | 'actionMethod': function () { | 47 | 'actionMethod': function () { |
50 | return this._actionMethod; | 48 | return this._actionMethod; |
51 | }, | 49 | }, |
52 | 50 | ||
53 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
54 | 52 | ||
55 | 'renderCell': function(aRowElement, anObject) { | 53 | 'renderCell': function(aRowElement, anObject) { |
56 | vartdElement; | 54 | vartdElement; |
57 | varlinkElement; | 55 | varlinkElement; |
58 | 56 | ||
59 | tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ | 57 | tdElement = Clipperz.DOM.Helper.append(aRowElement, {tag:'td', cls:this.cssClass(), children:[ |
60 | {tag:'span', children:[ | 58 | {tag:'span', children:[ |
61 | {tag:'a', href:'#', html:anObject[this.name()]} | 59 | {tag:'a', href:'#', html:anObject[this.name()]} |
62 | ]} | 60 | ]} |
63 | ]}); | 61 | ]}); |
64 | 62 | ||
65 | linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); | 63 | linkElement = MochiKit.DOM.getFirstElementByTagAndClassName('a', null, tdElement); |
66 | // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); | 64 | // MochiKit.Signal.connect(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); |
67 | this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); | 65 | this.connectEvent(linkElement, 'onclick', MochiKit.Base.method(this, 'handleLinkClick', anObject['_rowObject'])); |
68 | }, | 66 | }, |
69 | 67 | ||
70 | //----------------------------------------------------- | 68 | //----------------------------------------------------- |
71 | 69 | ||
72 | 'handleLinkClick': function (anObject, anEvent) { | 70 | 'handleLinkClick': function (anObject, anEvent) { |
73 | anEvent.preventDefault(); | 71 | anEvent.preventDefault(); |
74 | 72 | ||
75 | if (this.actionMethod() != null) { | 73 | if (this.actionMethod() != null) { |
76 | var deferredResult; | 74 | var deferredResult; |
77 | 75 | ||
78 | deferredResult = new Clipperz.Async.Deferred("LinkColumnManager.handleLinkClick", {trace:false}); | 76 | deferredResult = new Clipperz.Async.Deferred("LinkColumnManager.handleLinkClick", {trace:false}); |
79 | // deferredResult.addCallbackPass(MochiKit.Signal.signal, this, 'selectRow', anObject); | 77 | // deferredResult.addCallbackPass(MochiKit.Signal.signal, this, 'selectRow', anObject); |
80 | deferredResult.addCallback(this.actionMethod(), anObject, anEvent); | 78 | deferredResult.addCallback(this.actionMethod(), anObject, anEvent); |
81 | // deferredResult.addBothPass(MochiKit.Signal.signal, this, 'unselectRow', anObject); | 79 | // deferredResult.addBothPass(MochiKit.Signal.signal, this, 'unselectRow', anObject); |
82 | deferredResult.callback(); | 80 | deferredResult.callback(); |
83 | } | 81 | } |
84 | }, | 82 | }, |
85 | 83 | ||
86 | //----------------------------------------------------- | 84 | //----------------------------------------------------- |
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 a10ba4f..38a9421 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.LoginForm = function(args) { | 26 | Clipperz.PM.UI.Web.Components.LoginForm = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | this._autocomplete = args.autocomplete || 'off'; | 29 | this._autocomplete = args.autocomplete || 'off'; |
32 | 30 | ||
33 | Clipperz.PM.UI.Web.Components.LoginForm.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.LoginForm.superclass.constructor.apply(this, arguments); |
34 | 32 | ||
35 | this._slots = { | 33 | this._slots = { |
36 | 'passphraseEntropy':this.getId('passphraseEntropy') | 34 | 'passphraseEntropy':this.getId('passphraseEntropy') |
37 | }; | 35 | }; |
38 | 36 | ||
39 | return this; | 37 | return this; |
40 | } | 38 | } |
41 | 39 | ||
42 | //============================================================================= | 40 | //============================================================================= |
43 | 41 | ||
44 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginForm, Clipperz.PM.UI.Common.Components.BaseComponent, { | 42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginForm, Clipperz.PM.UI.Common.Components.BaseComponent, { |
45 | 43 | ||
46 | //------------------------------------------------------------------------- | 44 | //------------------------------------------------------------------------- |
47 | 45 | ||
48 | 'toString': function () { | 46 | 'toString': function () { |
49 | return "Clipperz.PM.UI.Web.Components.LoginForm component"; | 47 | return "Clipperz.PM.UI.Web.Components.LoginForm component"; |
50 | }, | 48 | }, |
51 | 49 | ||
52 | 'autocomplete': function () { | 50 | 'autocomplete': function () { |
53 | return this._autocomplete; | 51 | return this._autocomplete; |
54 | }, | 52 | }, |
55 | 53 | ||
56 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
57 | 55 | ||
58 | 'renderSelf': function() { | 56 | 'renderSelf': function() { |
59 | this.append(this.element(), {tag:'div', id:'loginBox', children:[ | 57 | this.append(this.element(), {tag:'div', id:'loginBox', children:[ |
60 | {tag:'div', cls:'header'}, | 58 | {tag:'div', cls:'header'}, |
61 | {tag:'div', cls:'body', id:this.getId('body'), children:[ | 59 | {tag:'div', cls:'body', id:this.getId('body'), children:[ |
62 | {tag:'div', id:this.getId('loginForm'), children:[ | 60 | {tag:'div', id:this.getId('loginForm'), children:[ |
63 | {tag:'div', children:[ | 61 | {tag:'div', children:[ |
64 | {tag:'h4', html:'Login'}, | 62 | {tag:'h4', html:'Login'}, |
65 | // {tag:'form', cls:'loginForm', autocomplete:this.autocomplete(), children:[ | 63 | // {tag:'form', cls:'loginForm', autocomplete:this.autocomplete(), children:[ |
66 | {tag:'form', id:this.getId('form'), cls:'loginForm', children:[ | 64 | {tag:'form', id:this.getId('form'), cls:'loginForm', children:[ |
67 | {tag:'label', html:'username', 'for':this.getId('usernameField')}, | 65 | {tag:'label', html:'username', 'for':this.getId('usernameField')}, |
68 | {tag:'input', id:this.getId('usernameField'), type:'text', cls:'username'}, | 66 | {tag:'input', id:this.getId('usernameField'), type:'text', cls:'username'}, |
69 | {tag:'label', html:'passphrase / OTP', 'for':this.getId('passphraseField')}, | 67 | {tag:'label', html:'passphrase / OTP', 'for':this.getId('passphraseField')}, |
70 | {tag:'input', id:this.getId('passphraseField'), type:'password', cls:'password'}, | 68 | {tag:'input', id:this.getId('passphraseField'), type:'password', cls:'password'}, |
71 | 69 | ||
72 | {tag:'div', cls:'translations', children:[ | 70 | {tag:'div', cls:'translations', children:[ |
73 | {tag:'h4', html:'choose your language'}, | 71 | {tag:'h4', html:'choose your language'}, |
74 | {tag:'ul', children:[ | 72 | {tag:'ul', children:[ |
75 | {tag:'li', cls:'selected', html:'english'}, | 73 | {tag:'li', cls:'selected', html:'english'}, |
76 | {tag:'li', html:'italiano'}, | 74 | {tag:'li', html:'italiano'}, |
77 | {tag:'li', html:'dutch'}, | 75 | {tag:'li', html:'dutch'}, |
78 | {tag:'li', html:'french'}, | 76 | {tag:'li', html:'french'}, |
79 | {tag:'li', html:'spanish'}, | 77 | {tag:'li', html:'spanish'}, |
80 | {tag:'li', html:'chinese'}, | 78 | {tag:'li', html:'chinese'}, |
81 | {tag:'li', html:'japanese'}, | 79 | {tag:'li', html:'japanese'}, |
82 | {tag:'li', html:'portugal'}, | 80 | {tag:'li', html:'portugal'}, |
83 | {tag:'li', html:'arabic'} | 81 | {tag:'li', html:'arabic'} |
84 | ]} | 82 | ]} |
85 | ]}, | 83 | ]}, |
86 | 84 | ||
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 2894af8..3498e3f 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.LoginPage = function(args) { | 26 | Clipperz.PM.UI.Web.Components.LoginPage = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.LoginPage.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.LoginPage.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._slots = { | 31 | this._slots = { |
34 | 'loginForm':this.getId('loginBoxSlot') | 32 | 'loginForm':this.getId('loginBoxSlot') |
35 | }; | 33 | }; |
36 | 34 | ||
37 | return this; | 35 | return this; |
38 | } | 36 | } |
39 | 37 | ||
40 | //============================================================================= | 38 | //============================================================================= |
41 | 39 | ||
42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginPage, Clipperz.PM.UI.Common.Components.BaseComponent, { | 40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginPage, Clipperz.PM.UI.Common.Components.BaseComponent, { |
43 | 41 | ||
44 | //------------------------------------------------------------------------- | 42 | //------------------------------------------------------------------------- |
45 | 43 | ||
46 | 'toString': function () { | 44 | 'toString': function () { |
47 | return "Clipperz.PM.UI.Web.Components.LoginPage component"; | 45 | return "Clipperz.PM.UI.Web.Components.LoginPage component"; |
48 | }, | 46 | }, |
49 | 47 | ||
50 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
51 | 49 | ||
52 | 'renderSelf': function(/*aContainer, aPosition*/) { | 50 | 'renderSelf': function(/*aContainer, aPosition*/) { |
53 | this.append(this.element(), [ | 51 | this.append(this.element(), [ |
54 | {tag:'div', id:this.getId('loginBoxSlot')}, | 52 | {tag:'div', id:this.getId('loginBoxSlot')}, |
55 | {tag:'div', id:'main', children:[ | 53 | {tag:'div', id:'main', children:[ |
56 | {tag:'div', id:'featurePoints', children:[ | 54 | {tag:'div', id:'featurePoints', children:[ |
57 | {tag:'table', children:[ | 55 | {tag:'table', children:[ |
58 | {tag:'tr', children:[ | 56 | {tag:'tr', children:[ |
59 | {tag:'td', children:[ | 57 | {tag:'td', children:[ |
60 | {tag:'div', cls:'block', children:[ | 58 | {tag:'div', cls:'block', children:[ |
61 | {tag:'h3', html:'Clipperz is:'}, | 59 | {tag:'h3', html:'Clipperz is:'}, |
62 | {tag:'ul', children:[ | 60 | {tag:'ul', children:[ |
63 | {tag:'li', html:'a secure and simple password manager'}, | 61 | {tag:'li', html:'a secure and simple password manager'}, |
64 | {tag:'li', html:'an effective single sign-on solution'}, | 62 | {tag:'li', html:'an effective single sign-on solution'}, |
65 | {tag:'li', html:'a digital vault for your personal data'} | 63 | {tag:'li', html:'a digital vault for your personal data'} |
66 | ]} | 64 | ]} |
67 | ]}, | 65 | ]}, |
68 | {tag:'div', cls:'block', children:[ | 66 | {tag:'div', cls:'block', children:[ |
69 | {tag:'h3', html:'Clipperz benefits:'}, | 67 | {tag:'h3', html:'Clipperz benefits:'}, |
70 | {tag:'ul', children:[ | 68 | {tag:'ul', children:[ |
71 | {tag:'li', html:'free and completely anonymous'}, | 69 | {tag:'li', html:'free and completely anonymous'}, |
72 | {tag:'li', html:'access it any time from any computer'}, | 70 | {tag:'li', html:'access it any time from any computer'}, |
73 | {tag:'li', html:'no software to download and nothing to install'}, | 71 | {tag:'li', html:'no software to download and nothing to install'}, |
74 | {tag:'li', html:'avoid keeping secrets on your PC or on paper'} | 72 | {tag:'li', html:'avoid keeping secrets on your PC or on paper'} |
75 | ]} | 73 | ]} |
76 | ]} | 74 | ]} |
77 | ]}, {tag:'td', children:[ | 75 | ]}, {tag:'td', children:[ |
78 | {tag:'div', cls:'block', children:[ | 76 | {tag:'div', cls:'block', children:[ |
79 | {tag:'h3', html:'Clipperz security:'}, | 77 | {tag:'h3', html:'Clipperz security:'}, |
80 | {tag:'ul', children:[ | 78 | {tag:'ul', children:[ |
81 | {tag:'li', html:'your secretes are locally encrypted by your browser before being uploaded to Clipperz'}, | 79 | {tag:'li', html:'your secretes are locally encrypted by your browser before being uploaded to Clipperz'}, |
82 | {tag:'li', html:'the encryption key is a passphrase known only to you'}, | 80 | {tag:'li', html:'the encryption key is a passphrase known only to you'}, |
83 | {tag:'li', html:'Clipperz hosts your sensitive data in an encrypted form and could never access the data in its plain form'}, | 81 | {tag:'li', html:'Clipperz hosts your sensitive data in an encrypted form and could never access the data in its plain form'}, |
84 | {tag:'li', html:'Clipperz is built upon standard encryption schemes, nothing fancies of homemade'}, | 82 | {tag:'li', html:'Clipperz is built upon standard encryption schemes, nothing fancies of homemade'}, |
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!'} | 83 | {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!'} |
86 | ]} | 84 | ]} |
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 26506e7..3fef6c5 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js | |||
@@ -1,133 +1,130 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.LoginProgress = function(args) { | 26 | Clipperz.PM.UI.Web.Components.LoginProgress = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.LoginProgress.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.LoginProgress.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._deferred = null; | 31 | this._deferred = null; |
34 | 32 | ||
35 | return this; | 33 | return this; |
36 | } | 34 | } |
37 | 35 | ||
38 | //============================================================================= | 36 | //============================================================================= |
39 | 37 | ||
40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI.Common.Components.BaseComponent, { | 38 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI.Common.Components.BaseComponent, { |
41 | 39 | ||
42 | //------------------------------------------------------------------------- | 40 | //------------------------------------------------------------------------- |
43 | 41 | ||
44 | 'toString': function () { | 42 | 'toString': function () { |
45 | return "Clipperz.PM.UI.Web.Components.LoginProgress component"; | 43 | return "Clipperz.PM.UI.Web.Components.LoginProgress component"; |
46 | }, | 44 | }, |
47 | 45 | ||
48 | //------------------------------------------------------------------------- | 46 | //------------------------------------------------------------------------- |
49 | 47 | ||
50 | 'deferred': function() { | 48 | 'deferred': function() { |
51 | return this._deferred; | 49 | return this._deferred; |
52 | }, | 50 | }, |
53 | 51 | ||
54 | 'setDeferred': function(aValue) { | 52 | 'setDeferred': function(aValue) { |
55 | this._deferred = aValue; | 53 | this._deferred = aValue; |
56 | }, | 54 | }, |
57 | 55 | ||
58 | //------------------------------------------------------------------------- | 56 | //------------------------------------------------------------------------- |
59 | 57 | ||
60 | 'renderSelf': function() { | 58 | 'renderSelf': function() { |
61 | // var loginProgressElement; | 59 | // var loginProgressElement; |
62 | // | 60 | // |
63 | // loginProgressElement = MochiKit.DOM.getElement('loginProgress'); | 61 | // loginProgressElement = MochiKit.DOM.getElement('loginProgress'); |
64 | // | 62 | // |
65 | // if (loginProgressElement == null) { | 63 | // if (loginProgressElement == null) { |
66 | // loginProgressElement = this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress'}, true); | 64 | // loginProgressElement = this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress'}, true); |
67 | // } | 65 | // } |
68 | 66 | ||
69 | //console.log(">> LoginProgress.renderSelf", this.element()); | ||
70 | this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress', children: [ | 67 | this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress', children: [ |
71 | // this.append(loginProgressElement, [ | 68 | // this.append(loginProgressElement, [ |
72 | {tag:'div', cls:'header', children:[ | 69 | {tag:'div', cls:'header', children:[ |
73 | {tag:'h3', id:this.getId('title'), html:"login progress"} | 70 | {tag:'h3', id:this.getId('title'), html:"login progress"} |
74 | ]}, | 71 | ]}, |
75 | {tag:'div', cls:'body', children:[ | 72 | {tag:'div', cls:'body', children:[ |
76 | {tag:'div', id:this.getId('progressBar')}, | 73 | {tag:'div', id:this.getId('progressBar')}, |
77 | {tag:'div', id:this.getId('errorBox'), cls:'errorBox', children:[ | 74 | {tag:'div', id:this.getId('errorBox'), cls:'errorBox', children:[ |
78 | // {tag:'div',cls:'img ALERT', children:[{tag:'div'}]}, | 75 | // {tag:'div',cls:'img ALERT', children:[{tag:'div'}]}, |
79 | {tag:'div',cls:'img ALERT', children:[{tag:'canvas', id:this.getId('canvas')}]}, | 76 | {tag:'div',cls:'img ALERT', children:[{tag:'canvas', id:this.getId('canvas')}]}, |
80 | {tag:'p', html:"Login failed"} | 77 | {tag:'p', html:"Login failed"} |
81 | ]} | 78 | ]} |
82 | ]}, | 79 | ]}, |
83 | {tag:'div', cls:'footer', children:[ | 80 | {tag:'div', cls:'footer', children:[ |
84 | {tag:'div', cls:'buttonArea', id:this.getId('buttonArea'), children:[ | 81 | {tag:'div', cls:'buttonArea', id:this.getId('buttonArea'), children:[ |
85 | // {tag:'div', cls:'button', id:this.getId('button'), children:[ | 82 | // {tag:'div', cls:'button', id:this.getId('button'), children:[ |
86 | // {tag:'a', href:'#', id:this.getId('buttonLink'), html:"cancel"} | 83 | // {tag:'a', href:'#', id:this.getId('buttonLink'), html:"cancel"} |
87 | // ]} | 84 | // ]} |
88 | {tag:'a', cls:'button', id:this.getId('button'), html:"cancel"} | 85 | {tag:'a', cls:'button', id:this.getId('button'), html:"cancel"} |
89 | ]} | 86 | ]} |
90 | ]} | 87 | ]} |
91 | ]}); | 88 | ]}); |
92 | // ]); | 89 | // ]); |
93 | 90 | ||
94 | Clipperz.PM.UI.Canvas.marks['!'](this.getElement('canvas'), "#ffffff"); | 91 | Clipperz.PM.UI.Canvas.marks['!'](this.getElement('canvas'), "#ffffff"); |
95 | 92 | ||
96 | this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':this.getElement('progressBar')})); | 93 | this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':this.getElement('progressBar')})); |
97 | MochiKit.Style.hideElement(this.getElement('errorBox')); | 94 | MochiKit.Style.hideElement(this.getElement('errorBox')); |
98 | 95 | ||
99 | // MochiKit.Signal.connect(this.getId('buttonLink'), 'onclick', this, 'cancelEventHandler'); | 96 | // MochiKit.Signal.connect(this.getId('buttonLink'), 'onclick', this, 'cancelEventHandler'); |
100 | MochiKit.Signal.connect(this.getId('button'), 'onclick', this, 'cancelEventHandler'); | 97 | MochiKit.Signal.connect(this.getId('button'), 'onclick', this, 'cancelEventHandler'); |
101 | }, | 98 | }, |
102 | 99 | ||
103 | //------------------------------------------------------------------------- | 100 | //------------------------------------------------------------------------- |
104 | 101 | ||
105 | 'displayElement': function() { | 102 | 'displayElement': function() { |
106 | return MochiKit.DOM.getElement('loginProgress'); | 103 | return MochiKit.DOM.getElement('loginProgress'); |
107 | }, | 104 | }, |
108 | 105 | ||
109 | //------------------------------------------------------------------------- | 106 | //------------------------------------------------------------------------- |
110 | 107 | ||
111 | 'cancelEventHandler': function(anEvent) { | 108 | 'cancelEventHandler': function(anEvent) { |
112 | anEvent.preventDefault(); | 109 | anEvent.preventDefault(); |
113 | 110 | ||
114 | MochiKit.Signal.signal(this, 'cancelEvent'); | 111 | MochiKit.Signal.signal(this, 'cancelEvent'); |
115 | }, | 112 | }, |
116 | 113 | ||
117 | //------------------------------------------------------------------------- | 114 | //------------------------------------------------------------------------- |
118 | 115 | ||
119 | 'disableCancel': function() { | 116 | 'disableCancel': function() { |
120 | MochiKit.Style.hideElement(this.getElement('buttonArea')); | 117 | MochiKit.Style.hideElement(this.getElement('buttonArea')); |
121 | }, | 118 | }, |
122 | 119 | ||
123 | //------------------------------------------------------------------------- | 120 | //------------------------------------------------------------------------- |
124 | 121 | ||
125 | 'showErrorMessage': function() { | 122 | 'showErrorMessage': function() { |
126 | // this.getElement('buttonLink').innerHTML = "close"; | 123 | // this.getElement('buttonLink').innerHTML = "close"; |
127 | this.getElement('button').innerHTML = "close"; | 124 | this.getElement('button').innerHTML = "close"; |
128 | MochiKit.DOM.addElementClass(this.getElement('button'), 'default'); | 125 | MochiKit.DOM.addElementClass(this.getElement('button'), 'default'); |
129 | 126 | ||
130 | MochiKit.Style.hideElement(this.getElement('progressBar')); | 127 | MochiKit.Style.hideElement(this.getElement('progressBar')); |
131 | 128 | ||
132 | this.getElement('title').innerHTML = "Error"; | 129 | this.getElement('title').innerHTML = "Error"; |
133 | MochiKit.Style.showElement(this.getElement('errorBox')); | 130 | MochiKit.Style.showElement(this.getElement('errorBox')); |
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 feb16ad..06746d1 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js | |||
@@ -1,191 +1,187 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.NewUserCreationComponent = function(args) { | 26 | Clipperz.PM.UI.Web.Components.NewUserCreationComponent = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.NewUserCreationComponent.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.NewUserCreationComponent.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._tabPanelController = null; | 31 | this._tabPanelController = null; |
34 | 32 | ||
35 | this._initiallySelectedTab = args.selected || 'CREDENTIALS'; | 33 | this._initiallySelectedTab = args.selected || 'CREDENTIALS'; |
36 | this._tabPanelControllerConfiguration = { | 34 | this._tabPanelControllerConfiguration = { |
37 | 'CREDENTIALS': { | 35 | 'CREDENTIALS': { |
38 | tab:'credentialsTab', | 36 | tab:'credentialsTab', |
39 | panel:'credentialsTabpanel' | 37 | panel:'credentialsTabpanel' |
40 | }, | 38 | }, |
41 | 'CHECK_CREDENTIALS': { | 39 | 'CHECK_CREDENTIALS': { |
42 | tab:'checkCredentialsTab', | 40 | tab:'checkCredentialsTab', |
43 | panel:'checkCredentialsTabpanel' | 41 | panel:'checkCredentialsTabpanel' |
44 | }, | 42 | }, |
45 | 'TERMS_OF_SERVICE': { | 43 | 'TERMS_OF_SERVICE': { |
46 | tab:'termsOfServiceTab', | 44 | tab:'termsOfServiceTab', |
47 | panel:'termsOfServiceTabpanel' | 45 | panel:'termsOfServiceTabpanel' |
48 | }, | 46 | }, |
49 | 'CREATE_USER': { | 47 | 'CREATE_USER': { |
50 | tab:'createUserTab', | 48 | tab:'createUserTab', |
51 | panel:'createUserTabpanel' | 49 | panel:'createUserTabpanel' |
52 | }//, | 50 | }//, |
53 | /* | 51 | /* |
54 | 'LOGIN': { | 52 | 'LOGIN': { |
55 | tab:'loginTab', | 53 | tab:'loginTab', |
56 | panel:'loginTabpanel' | 54 | panel:'loginTabpanel' |
57 | } | 55 | } |
58 | */ | 56 | */ |
59 | }; | 57 | }; |
60 | 58 | ||
61 | return this; | 59 | return this; |
62 | } | 60 | } |
63 | 61 | ||
64 | //============================================================================= | 62 | //============================================================================= |
65 | 63 | ||
66 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.NewUserCreationComponent, Clipperz.PM.UI.Common.Components.TabPanelComponent, { | 64 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.NewUserCreationComponent, Clipperz.PM.UI.Common.Components.TabPanelComponent, { |
67 | 65 | ||
68 | //------------------------------------------------------------------------- | 66 | //------------------------------------------------------------------------- |
69 | 67 | ||
70 | 'toString': function () { | 68 | 'toString': function () { |
71 | return "Clipperz.PM.UI.Web.Components.NewUserCreationComponent component"; | 69 | return "Clipperz.PM.UI.Web.Components.NewUserCreationComponent component"; |
72 | }, | 70 | }, |
73 | 71 | ||
74 | //========================================================================= | 72 | //========================================================================= |
75 | 73 | ||
76 | 'disableAllPanels': function () { | 74 | 'disableAllPanels': function () { |
77 | this.tabPanelController().selectTab(null); | 75 | this.tabPanelController().selectTab(null); |
78 | }, | 76 | }, |
79 | 77 | ||
80 | //------------------------------------------------------------------------- | 78 | //------------------------------------------------------------------------- |
81 | 79 | ||
82 | 'enableCredentialsPanel': function () { | 80 | 'enableCredentialsPanel': function () { |
83 | this.tabPanelController().selectTab('CREDENTIALS'); | 81 | this.tabPanelController().selectTab('CREDENTIALS'); |
84 | }, | 82 | }, |
85 | 83 | ||
86 | 'enableCheckCredentialsPanel': function () { | 84 | 'enableCheckCredentialsPanel': function () { |
87 | this.tabPanelController().selectTab('CHECK_CREDENTIALS'); | 85 | this.tabPanelController().selectTab('CHECK_CREDENTIALS'); |
88 | }, | 86 | }, |
89 | 87 | ||
90 | 'enableTermsOfServicePanel': function () { | 88 | 'enableTermsOfServicePanel': function () { |
91 | this.tabPanelController().selectTab('TERMS_OF_SERVICE'); | 89 | this.tabPanelController().selectTab('TERMS_OF_SERVICE'); |
92 | }, | 90 | }, |
93 | 91 | ||
94 | 'enableCreateUserPanel': function () { | 92 | 'enableCreateUserPanel': function () { |
95 | this.tabPanelController().selectTab('CREATE_USER'); | 93 | this.tabPanelController().selectTab('CREATE_USER'); |
96 | }, | 94 | }, |
97 | 95 | ||
98 | //'enableLoginPanel': function () { | 96 | //'enableLoginPanel': function () { |
99 | // this.tabPanelController().selectTab('LOGIN'); | 97 | // this.tabPanelController().selectTab('LOGIN'); |
100 | //}, | 98 | //}, |
101 | 99 | ||
102 | //========================================================================= | 100 | //========================================================================= |
103 | 101 | ||
104 | 'shouldShowElementWhileRendering': function() { | 102 | 'shouldShowElementWhileRendering': function() { |
105 | return false; | 103 | return false; |
106 | }, | 104 | }, |
107 | 105 | ||
108 | //========================================================================= | 106 | //========================================================================= |
109 | 107 | ||
110 | 'tabPanelController': function () { | 108 | 'tabPanelController': function () { |
111 | if (this._tabPanelController == null) { | 109 | if (this._tabPanelController == null) { |
112 | this._tabPanelController = new Clipperz.PM.UI.Common.Controllers.TabPanelController({ | 110 | this._tabPanelController = new Clipperz.PM.UI.Common.Controllers.TabPanelController({ |
113 | component:this, | 111 | component:this, |
114 | configuration:this._tabPanelControllerConfiguration | 112 | configuration:this._tabPanelControllerConfiguration |
115 | }); | 113 | }); |
116 | 114 | ||
117 | MochiKit.Signal.connect(this._tabPanelController, 'tabSelected', this, 'handleTabSelected') | 115 | MochiKit.Signal.connect(this._tabPanelController, 'tabSelected', this, 'handleTabSelected') |
118 | } | 116 | } |
119 | 117 | ||
120 | return this._tabPanelController; | 118 | return this._tabPanelController; |
121 | }, | 119 | }, |
122 | 120 | ||
123 | //------------------------------------------------------------------------- | 121 | //------------------------------------------------------------------------- |
124 | 122 | ||
125 | 'renderSelf': function() { | 123 | 'renderSelf': function() { |
126 | //console.log('** Clipperz.targetModalDimensionsAndPosition', Clipperz.Base.serializeJSON(Clipperz.PM.UI.Common.Components.BaseComponent.targetModalDimensionsAndPosition)); | ||
127 | |||
128 | this.append(this.element(), {tag:'div', cls:'NewUserCreation mainDialog', id:this.getId('panel'), children: [ | 124 | this.append(this.element(), {tag:'div', cls:'NewUserCreation mainDialog', id:this.getId('panel'), children: [ |
129 | {tag:'form', id:this.getId('form'), cls:'newUserCreationForm', children:[ | 125 | {tag:'form', id:this.getId('form'), cls:'newUserCreationForm', children:[ |
130 | {tag:'div', cls:'header', children:[ | 126 | {tag:'div', cls:'header', children:[ |
131 | {tag:'div', cls:'title', children:[ | 127 | {tag:'div', cls:'title', children:[ |
132 | {tag:'h3', id:this.getId('title'), html:"Create new user"} | 128 | {tag:'h3', id:this.getId('title'), html:"Create new user"} |
133 | ]} | 129 | ]} |
134 | ]}, | 130 | ]}, |
135 | {tag:'div', id:this.getId('body'), cls:'body', children:[ | 131 | {tag:'div', id:this.getId('body'), cls:'body', children:[ |
136 | {tag:'div', cls:'tabContainer', children:[ | 132 | {tag:'div', cls:'tabContainer', children:[ |
137 | {tag:'ul', cls:'tabs', children:[ | 133 | {tag:'ul', cls:'tabs', children:[ |
138 | {tag:'li', id:this.getId('credentialsTab'), children:[{tag:'span', html:"credentials"}]}, | 134 | {tag:'li', id:this.getId('credentialsTab'), children:[{tag:'span', html:"credentials"}]}, |
139 | {tag:'li', id:this.getId('checkCredentialsTab'),children:[{tag:'span', html:"credentials check"}]}, | 135 | {tag:'li', id:this.getId('checkCredentialsTab'),children:[{tag:'span', html:"credentials check"}]}, |
140 | {tag:'li', id:this.getId('termsOfServiceTab'), children:[{tag:'span', html:"terms of service"}]}, | 136 | {tag:'li', id:this.getId('termsOfServiceTab'), children:[{tag:'span', html:"terms of service"}]}, |
141 | {tag:'li', id:this.getId('createUserTab'), children:[{tag:'span', html:"create user"}]}//, | 137 | {tag:'li', id:this.getId('createUserTab'), children:[{tag:'span', html:"create user"}]}//, |
142 | // {tag:'li', id:this.getId('loginTab'), children:[{tag:'span', html:"login"}]}, | 138 | // {tag:'li', id:this.getId('loginTab'), children:[{tag:'span', html:"login"}]}, |
143 | ]}, | 139 | ]}, |
144 | {tag:'ul', cls:'tabPanels', children:[ | 140 | {tag:'ul', cls:'tabPanels', children:[ |
145 | {tag:'li', id:this.getId('credentialsTabpanel'), cls:'tabPanel credentials', children:[ | 141 | {tag:'li', id:this.getId('credentialsTabpanel'), cls:'tabPanel credentials', children:[ |
146 | {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.CREDENTIALS.description')}]}, | 142 | {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.CREDENTIALS.description')}]}, |
147 | {tag:'ul', cls:'credentials', children:[ | 143 | {tag:'ul', cls:'credentials', children:[ |
148 | {tag:'li', children:[{tag:'span', cls:'label', html:"username"},{tag:'input', type:'text', id:this.getId('username')/*, value:'test'*/}]}, | 144 | {tag:'li', children:[{tag:'span', cls:'label', html:"username"},{tag:'input', type:'text', id:this.getId('username')/*, value:'test'*/}]}, |
149 | {tag:'li', children:[{tag:'span', cls:'label', html:"passphrase"},{tag:'input', type:'password', id:this.getId('passphrase')/*, value:'test'*/}]} | 145 | {tag:'li', children:[{tag:'span', cls:'label', html:"passphrase"},{tag:'input', type:'password', id:this.getId('passphrase')/*, value:'test'*/}]} |
150 | ]} | 146 | ]} |
151 | ]}, | 147 | ]}, |
152 | {tag:'li', id:this.getId('checkCredentialsTabpanel'), cls:'tabPanel checkCredentials', children:[ | 148 | {tag:'li', id:this.getId('checkCredentialsTabpanel'), cls:'tabPanel checkCredentials', children:[ |
153 | {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.CHECK_CREDENTIALS.description')}]}, | 149 | {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.CHECK_CREDENTIALS.description')}]}, |
154 | {tag:'ul', cls:'credentials', children:[ | 150 | {tag:'ul', cls:'credentials', children:[ |
155 | {tag:'li', children:[{tag:'span', cls:'label', html:"re-passphrase"},{tag:'input', type:'password', id:this.getId('re-passphrase')/*, value:'test'*/}]} | 151 | {tag:'li', children:[{tag:'span', cls:'label', html:"re-passphrase"},{tag:'input', type:'password', id:this.getId('re-passphrase')/*, value:'test'*/}]} |
156 | ]} | 152 | ]} |
157 | ]}, | 153 | ]}, |
158 | {tag:'li', id:this.getId('termsOfServiceTabpanel'), cls:'tabPanel termsOfService', children:[ | 154 | {tag:'li', id:this.getId('termsOfServiceTabpanel'), cls:'tabPanel termsOfService', children:[ |
159 | {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.TERMS_OF_SERVICE.description')}]}, | 155 | {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.TERMS_OF_SERVICE.description')}]}, |
160 | {tag:'ul', cls:'termsOfService', children:[ | 156 | {tag:'ul', cls:'termsOfService', children:[ |
161 | {tag:'li', children:[{tag:'input', type:'checkbox', id:this.getId('awareOfUnrecoverablePassphrase')/*, checked:true*/}, {tag:'label', cls:'label', 'for':this.getId('awareOfUnrecoverablePassphrase'), html:"I understand that Clipperz will not be able to recover a lost passphrase."}]}, | 157 | {tag:'li', children:[{tag:'input', type:'checkbox', id:this.getId('awareOfUnrecoverablePassphrase')/*, checked:true*/}, {tag:'label', cls:'label', 'for':this.getId('awareOfUnrecoverablePassphrase'), html:"I understand that Clipperz will not be able to recover a lost passphrase."}]}, |
162 | {tag:'li', children:[{tag:'input', type:'checkbox', id:this.getId('readTermsOfService')/*, checked:true*/}, {tag:'label', cls:'label', 'for':this.getId('readTermsOfService'), htmlString:"I have read and agreed to the <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Terms of Service</a>."}]} | 158 | {tag:'li', children:[{tag:'input', type:'checkbox', id:this.getId('readTermsOfService')/*, checked:true*/}, {tag:'label', cls:'label', 'for':this.getId('readTermsOfService'), htmlString:"I have read and agreed to the <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Terms of Service</a>."}]} |
163 | ]} | 159 | ]} |
164 | ]}, | 160 | ]}, |
165 | {tag:'li', id:this.getId('createUserTabpanel'), cls:'tabPanel createUser', children:[ | 161 | {tag:'li', id:this.getId('createUserTabpanel'), cls:'tabPanel createUser', children:[ |
166 | {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.CREATE_USER.description')}]}, | 162 | {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.CREATE_USER.description')}]}, |
167 | {tag:'ul', cls:'createUserStates', children:[ | 163 | {tag:'ul', cls:'createUserStates', children:[ |
168 | {tag:'li', cls:'creating', id:this.getId('creatingRegistering'), children:[{tag:'span', html:"registering user"}]}, | 164 | {tag:'li', cls:'creating', id:this.getId('creatingRegistering'), children:[{tag:'span', html:"registering user"}]}, |
169 | {tag:'li', cls:'done', id:this.getId('creatingDone'), children:[{tag:'span', html:"done"}]}, | 165 | {tag:'li', cls:'done', id:this.getId('creatingDone'), children:[{tag:'span', html:"done"}]}, |
170 | {tag:'li', cls:'fail', id:this.getId('creatingFailed'), children:[{tag:'span', html:"fail"}]} | 166 | {tag:'li', cls:'fail', id:this.getId('creatingFailed'), children:[{tag:'span', html:"fail"}]} |
171 | ]} | 167 | ]} |
172 | ]}//, | 168 | ]}//, |
173 | // {tag:'li', id:this.getId('loginTabpanel'), cls:'tabPanel login', children:[ | 169 | // {tag:'li', id:this.getId('loginTabpanel'), cls:'tabPanel login', children:[ |
174 | // {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.LOGIN.description')}]}, | 170 | // {tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.LOGIN.description')}]}, |
175 | // ]} | 171 | // ]} |
176 | ]} | 172 | ]} |
177 | ]} | 173 | ]} |
178 | ]}, | 174 | ]}, |
179 | {tag:'div', id:this.getId('footer'), cls:'footer', children:[ | 175 | {tag:'div', id:this.getId('footer'), cls:'footer', children:[ |
180 | {tag:'div', cls:'buttonArea', children:[ | 176 | {tag:'div', cls:'buttonArea', children:[ |
181 | // {tag:'div', cls:'cancel', id:this.getId('cancelButton'), html:"cancel"}, | 177 | // {tag:'div', cls:'cancel', id:this.getId('cancelButton'), html:"cancel"}, |
182 | // {tag:'div', cls:'save disabled', id:this.getId('saveButton'), html:"save"} | 178 | // {tag:'div', cls:'save disabled', id:this.getId('saveButton'), html:"save"} |
183 | ]} | 179 | ]} |
184 | ]} | 180 | ]} |
185 | ]}, | 181 | ]}, |
186 | {tag:'div', cls:'clear'} | 182 | {tag:'div', cls:'clear'} |
187 | ]}); | 183 | ]}); |
188 | 184 | ||
189 | this.tabPanelController().setup(); | 185 | this.tabPanelController().setup(); |
190 | // MochiKit.Signal.connect(this.getId('panel'), 'onkeydown', this, 'handleKeyEvent'); | 186 | // MochiKit.Signal.connect(this.getId('panel'), 'onkeydown', this, 'handleKeyEvent'); |
191 | MochiKit.Signal.connect(MochiKit.DOM.currentDocument().body, 'onkeydown', this, 'handleKeyEvent'); | 187 | MochiKit.Signal.connect(MochiKit.DOM.currentDocument().body, 'onkeydown', this, 'handleKeyEvent'); |
@@ -272,132 +268,128 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.NewUserCreationComponent, Cli | |||
272 | } | 268 | } |
273 | }, | 269 | }, |
274 | */ | 270 | */ |
275 | //========================================================================= | 271 | //========================================================================= |
276 | /* | 272 | /* |
277 | 'bindingComponents': function () { | 273 | 'bindingComponents': function () { |
278 | return this._bindingComponents; | 274 | return this._bindingComponents; |
279 | }, | 275 | }, |
280 | 276 | ||
281 | 'clearAllBindingsComponents': function () { | 277 | 'clearAllBindingsComponents': function () { |
282 | MochiKit.Iter.forEach(this.bindingComponents(), MochiKit.Base.methodcaller('remove')); | 278 | MochiKit.Iter.forEach(this.bindingComponents(), MochiKit.Base.methodcaller('remove')); |
283 | this._bindingComponents = []; | 279 | this._bindingComponents = []; |
284 | this.getElement('bindings').innerHTML = ''; | 280 | this.getElement('bindings').innerHTML = ''; |
285 | }, | 281 | }, |
286 | 282 | ||
287 | 'addBindingComponent': function (aBindingComponent) { | 283 | 'addBindingComponent': function (aBindingComponent) { |
288 | this.bindingComponents().push(aBindingComponent); | 284 | this.bindingComponents().push(aBindingComponent); |
289 | aBindingComponent.renderInNode(this.append(this.getElement('bindings'), {tag:'div'})); | 285 | aBindingComponent.renderInNode(this.append(this.getElement('bindings'), {tag:'div'})); |
290 | }, | 286 | }, |
291 | */ | 287 | */ |
292 | //========================================================================= | 288 | //========================================================================= |
293 | /* | 289 | /* |
294 | 'formValueComponents': function () { | 290 | 'formValueComponents': function () { |
295 | return this._formValueComponents; | 291 | return this._formValueComponents; |
296 | }, | 292 | }, |
297 | 293 | ||
298 | 'clearAllFormValueComponents': function () { | 294 | 'clearAllFormValueComponents': function () { |
299 | MochiKit.Iter.forEach(this.formValueComponents(), MochiKit.Base.methodcaller('remove')); | 295 | MochiKit.Iter.forEach(this.formValueComponents(), MochiKit.Base.methodcaller('remove')); |
300 | this._formValueComponents = []; | 296 | this._formValueComponents = []; |
301 | this.getElement('formValues').innerHTML = ''; | 297 | this.getElement('formValues').innerHTML = ''; |
302 | }, | 298 | }, |
303 | 299 | ||
304 | 'addFormValueComponent': function (aFormValueComponent) { | 300 | 'addFormValueComponent': function (aFormValueComponent) { |
305 | this.formValueComponents().push(aFormValueComponent); | 301 | this.formValueComponents().push(aFormValueComponent); |
306 | aFormValueComponent.renderInNode(this.append(this.getElement('formValues'), {tag:'div'})); | 302 | aFormValueComponent.renderInNode(this.append(this.getElement('formValues'), {tag:'div'})); |
307 | }, | 303 | }, |
308 | */ | 304 | */ |
309 | //========================================================================= | 305 | //========================================================================= |
310 | 306 | ||
311 | 'changedValue': function (anEvent) { | 307 | 'changedValue': function (anEvent) { |
312 | MochiKit.Signal.signal(this, 'changedValue', anEvent); | 308 | MochiKit.Signal.signal(this, 'changedValue', anEvent); |
313 | 309 | ||
314 | this.incrementUpdateFaviconCounter(); | 310 | this.incrementUpdateFaviconCounter(); |
315 | MochiKit.Async.callLater(1, MochiKit.Base.method(this, 'updateFavicon')); | 311 | MochiKit.Async.callLater(1, MochiKit.Base.method(this, 'updateFavicon')); |
316 | }, | 312 | }, |
317 | 313 | ||
318 | //------------------------------------------------------------------------- | 314 | //------------------------------------------------------------------------- |
319 | 315 | ||
320 | 'handleBackClick': function (anEvent) { | 316 | 'handleBackClick': function (anEvent) { |
321 | anEvent.preventDefault(); | 317 | anEvent.preventDefault(); |
322 | 318 | ||
323 | MochiKit.Signal.signal(this, 'back'); | 319 | MochiKit.Signal.signal(this, 'back'); |
324 | }, | 320 | }, |
325 | 321 | ||
326 | //========================================================================= | 322 | //========================================================================= |
327 | 323 | ||
328 | 'bottomMargin': function () { | 324 | 'bottomMargin': function () { |
329 | var result; | 325 | var result; |
330 | 326 | ||
331 | //TODO: WTF!!! | 327 | //TODO: WTF!!! |
332 | // result =MochiKit.Style.getElementPosition(this.element())['y'] + | 328 | // result =MochiKit.Style.getElementPosition(this.element())['y'] + |
333 | // MochiKit.Style.getElementDimensions(this.element())['h']; | 329 | // MochiKit.Style.getElementDimensions(this.element())['h']; |
334 | 330 | ||
335 | // result =MochiKit.Style.getElementPosition(this.getElement('footer'))['y']; | 331 | // result =MochiKit.Style.getElementPosition(this.getElement('footer'))['y']; |
336 | //console.log("### bottomMargin"); | ||
337 | //console.log('displayElement', this.displayElement()); | ||
338 | //console.log('-- Clipperz.targetModalDimensionsAndPosition', Clipperz.Base.serializeJSON(Clipperz.PM.UI.Common.Components.BaseComponent.targetModalDimensionsAndPosition)); | ||
339 | //console.log('element', MochiKit.Style.getElementPosition('modalDialog') ['y'], MochiKit.Style.getElementDimensions('modalDialog')['h']); | ||
340 | // result = 450; | 332 | // result = 450; |
341 | 333 | ||
342 | result =Clipperz.PM.UI.Common.Components.BaseComponent.targetModalDimensionsAndPosition['position']['y'] + | 334 | result =Clipperz.PM.UI.Common.Components.BaseComponent.targetModalDimensionsAndPosition['position']['y'] + |
343 | Clipperz.PM.UI.Common.Components.BaseComponent.targetModalDimensionsAndPosition['dimensions']['h'] - | 335 | Clipperz.PM.UI.Common.Components.BaseComponent.targetModalDimensionsAndPosition['dimensions']['h'] - |
344 | 60; | 336 | 60; |
345 | 337 | ||
346 | return result; | 338 | return result; |
347 | }, | 339 | }, |
348 | 340 | ||
349 | //========================================================================= | 341 | //========================================================================= |
350 | 342 | ||
351 | 'focusOnUsernameElement': function () { | 343 | 'focusOnUsernameElement': function () { |
352 | MochiKit.Async.callLater(0.1, MochiKit.Base.method(this.getElement('username'), 'focus')); | 344 | MochiKit.Async.callLater(0.1, MochiKit.Base.method(this.getElement('username'), 'focus')); |
353 | }, | 345 | }, |
354 | 346 | ||
355 | 'focusOnRePassphraseElement': function () { | 347 | 'focusOnRePassphraseElement': function () { |
356 | this.getElement('re-passphrase').focus(); | 348 | this.getElement('re-passphrase').focus(); |
357 | }, | 349 | }, |
358 | /* | 350 | /* |
359 | 'focusOnBookmarkletConfigurationElement': function () { | 351 | 'focusOnBookmarkletConfigurationElement': function () { |
360 | this.getElement('bookmarkletConfiguration').focus(); | 352 | this.getElement('bookmarkletConfiguration').focus(); |
361 | }, | 353 | }, |
362 | 354 | ||
363 | 'focusOnFaviconElement': function () { | 355 | 'focusOnFaviconElement': function () { |
364 | this.getElement('faviconURL').focus(); | 356 | this.getElement('faviconURL').focus(); |
365 | }, | 357 | }, |
366 | */ | 358 | */ |
367 | 359 | ||
368 | //========================================================================= | 360 | //========================================================================= |
369 | 361 | ||
370 | 'hideAllProgeressStates': function () { | 362 | 'hideAllProgeressStates': function () { |
371 | MochiKit.Style.hideElement(this.getElement('creatingRegistering')); | 363 | MochiKit.Style.hideElement(this.getElement('creatingRegistering')); |
372 | MochiKit.Style.hideElement(this.getElement('creatingDone')); | 364 | MochiKit.Style.hideElement(this.getElement('creatingDone')); |
373 | MochiKit.Style.hideElement(this.getElement('creatingFailed')); | 365 | MochiKit.Style.hideElement(this.getElement('creatingFailed')); |
374 | }, | 366 | }, |
375 | 367 | ||
376 | 'showProgressOnUserCreation': function () { | 368 | 'showProgressOnUserCreation': function () { |
377 | //Clipperz.log(">>> NewUserCreationComponent.showProgressOnUserCreation"); | 369 | //Clipperz.log(">>> NewUserCreationComponent.showProgressOnUserCreation"); |
378 | this.hideAllProgeressStates(); | 370 | this.hideAllProgeressStates(); |
379 | MochiKit.Style.showElement(this.getElement('creatingRegistering')); | 371 | MochiKit.Style.showElement(this.getElement('creatingRegistering')); |
380 | }, | 372 | }, |
381 | 373 | ||
382 | 'showUserCreationDone': function () { | 374 | 'showUserCreationDone': function () { |
383 | //Clipperz.log(">>> NewUserCreationComponent.showUserCreationDone"); | 375 | //Clipperz.log(">>> NewUserCreationComponent.showUserCreationDone"); |
384 | this.hideAllProgeressStates(); | 376 | this.hideAllProgeressStates(); |
385 | MochiKit.Style.showElement(this.getElement('creatingDone')); | 377 | MochiKit.Style.showElement(this.getElement('creatingDone')); |
386 | //Clipperz.log("<<< NewUserCreationComponent.showUserCreationDone"); | 378 | //Clipperz.log("<<< NewUserCreationComponent.showUserCreationDone"); |
387 | }, | 379 | }, |
388 | 380 | ||
389 | 'showUserCreationFailed': function () { | 381 | 'showUserCreationFailed': function () { |
390 | //Clipperz.log(">>> NewUserCreationComponent.showUserCreationFailed"); | 382 | //Clipperz.log(">>> NewUserCreationComponent.showUserCreationFailed"); |
391 | this.hideAllProgeressStates(); | 383 | this.hideAllProgeressStates(); |
392 | MochiKit.Style.showElement(this.getElement('creatingFailed')); | 384 | MochiKit.Style.showElement(this.getElement('creatingFailed')); |
393 | }, | 385 | }, |
394 | 386 | ||
395 | //========================================================================= | 387 | //========================================================================= |
396 | 388 | ||
397 | 'handleKeyEvent': function (anEvent) { | 389 | 'handleKeyEvent': function (anEvent) { |
398 | MochiKit.Signal.signal(this, 'keyPressed', anEvent); | 390 | MochiKit.Signal.signal(this, 'keyPressed', anEvent); |
399 | /* | 391 | /* |
400 | if (anEvent.key().string == 'KEY_ENTER') { | 392 | if (anEvent.key().string == 'KEY_ENTER') { |
401 | if (anEvent.target().nodeName != 'TEXTAREA') { | 393 | if (anEvent.target().nodeName != 'TEXTAREA') { |
402 | MochiKit.Signal.signal(this, 'moveForward'); | 394 | MochiKit.Signal.signal(this, 'moveForward'); |
403 | anEvent.preventDefault(); | 395 | anEvent.preventDefault(); |
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 3cc5a37..30cbeb2 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/Page.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/Page.js | |||
@@ -1,68 +1,66 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.Page = function(args) { | 26 | Clipperz.PM.UI.Web.Components.Page = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.Page.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.Page.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._slots = { | 31 | this._slots = { |
34 | 'header':'pageHeader', | 32 | 'header':'pageHeader', |
35 | 'body': 'pageBody', | 33 | 'body': 'pageBody', |
36 | 'footer':'pageFooter' | 34 | 'footer':'pageFooter' |
37 | }; | 35 | }; |
38 | 36 | ||
39 | return this; | 37 | return this; |
40 | } | 38 | } |
41 | 39 | ||
42 | //============================================================================= | 40 | //============================================================================= |
43 | 41 | ||
44 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.Page, Clipperz.PM.UI.Common.Components.BaseComponent, { | 42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.Page, Clipperz.PM.UI.Common.Components.BaseComponent, { |
45 | 43 | ||
46 | //------------------------------------------------------------------------- | 44 | //------------------------------------------------------------------------- |
47 | 45 | ||
48 | 'toString': function () { | 46 | 'toString': function () { |
49 | return "Clipperz.PM.UI.Web.Components.Page component"; | 47 | return "Clipperz.PM.UI.Web.Components.Page component"; |
50 | }, | 48 | }, |
51 | 49 | ||
52 | //------------------------------------------------------------------------- | 50 | //------------------------------------------------------------------------- |
53 | 51 | ||
54 | 'renderSelf': function(/*aContainer, aPosition*/) { | 52 | 'renderSelf': function(/*aContainer, aPosition*/) { |
55 | this.append(this.element(), [ | 53 | this.append(this.element(), [ |
56 | {tag:'div', id:'pageHeaderAndBody', cls:'pageHeaderAndBody', children:[ | 54 | {tag:'div', id:'pageHeaderAndBody', cls:'pageHeaderAndBody', children:[ |
57 | {tag:'div', id:'pageHeader', cls:'pageHeader'}, | 55 | {tag:'div', id:'pageHeader', cls:'pageHeader'}, |
58 | {tag:'div', id:'pageBody', cls:'pageBody'} | 56 | {tag:'div', id:'pageBody', cls:'pageBody'} |
59 | ]}, | 57 | ]}, |
60 | {tag:'div', id:'pageFooter', cls:'pageFooter'} | 58 | {tag:'div', id:'pageFooter', cls:'pageFooter'} |
61 | ]); | 59 | ]); |
62 | 60 | ||
63 | }, | 61 | }, |
64 | 62 | ||
65 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
66 | 64 | ||
67 | __syntaxFix__: "syntax fix" | 65 | __syntaxFix__: "syntax fix" |
68 | }); | 66 | }); |
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 dcf506f..df3ca0c 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageFooter.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageFooter.js | |||
@@ -1,67 +1,65 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.PageFooter = function(args) { | 26 | Clipperz.PM.UI.Web.Components.PageFooter = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.PageFooter.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.PageFooter.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | return this; | 31 | return this; |
34 | } | 32 | } |
35 | 33 | ||
36 | //============================================================================= | 34 | //============================================================================= |
37 | 35 | ||
38 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PageFooter, Clipperz.PM.UI.Common.Components.BaseComponent, { | 36 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PageFooter, Clipperz.PM.UI.Common.Components.BaseComponent, { |
39 | 37 | ||
40 | //------------------------------------------------------------------------- | 38 | //------------------------------------------------------------------------- |
41 | 39 | ||
42 | 'toString': function () { | 40 | 'toString': function () { |
43 | return "Clipperz.PM.UI.Web.Components.PageFooter component"; | 41 | return "Clipperz.PM.UI.Web.Components.PageFooter component"; |
44 | }, | 42 | }, |
45 | 43 | ||
46 | //------------------------------------------------------------------------- | 44 | //------------------------------------------------------------------------- |
47 | 45 | ||
48 | 'renderSelf': function(/*aContainer, aPosition*/) { | 46 | 'renderSelf': function(/*aContainer, aPosition*/) { |
49 | this.append(this.element(), [ | 47 | this.append(this.element(), [ |
50 | {tag:'div', cls:'footerWrapper', children:[ | 48 | {tag:'div', cls:'footerWrapper', children:[ |
51 | {tag:'div', cls:'footerContent', children:[ | 49 | {tag:'div', cls:'footerContent', children:[ |
52 | {tag:'canvas', id:this.getId('footerStarIcon'), cls:'footerStarIcon'}, | 50 | {tag:'canvas', id:this.getId('footerStarIcon'), cls:'footerStarIcon'}, |
53 | {tag:'span', cls:'copyright', html:'Copyright © 2009-2013 Clipperz Srl'}, | 51 | {tag:'span', cls:'copyright', html:'Copyright © 2009-2013 Clipperz Srl'}, |
54 | {tag:'a', href:'http://www.clipperz.com/terms_of_service',target:'_blank', html:'terms of service'}, | 52 | {tag:'a', href:'http://www.clipperz.com/terms_of_service',target:'_blank', html:'terms of service'}, |
55 | {tag:'a', href:'http://www.clipperz.com/privacy_policy',target:'_blank', html:'privacy policy'}, | 53 | {tag:'a', href:'http://www.clipperz.com/privacy_policy',target:'_blank', html:'privacy policy'}, |
56 | {tag:'div', cls:'applicationVersion', htmlString:'application version: <a href="https://github.com/clipperz/password-manager/tree/' + Clipperz_version + '" target="github">' + Clipperz_version + '</a>'} | 54 | {tag:'div', cls:'applicationVersion', htmlString:'application version: <a href="https://github.com/clipperz/password-manager/tree/' + Clipperz_version + '" target="github">' + Clipperz_version + '</a>'} |
57 | ]} | 55 | ]} |
58 | ]} | 56 | ]} |
59 | ]); | 57 | ]); |
60 | 58 | ||
61 | Clipperz.PM.UI.Canvas.star.normal(this.getElement('footerStarIcon'), "#7e7e7e"); | 59 | Clipperz.PM.UI.Canvas.star.normal(this.getElement('footerStarIcon'), "#7e7e7e"); |
62 | }, | 60 | }, |
63 | 61 | ||
64 | //------------------------------------------------------------------------- | 62 | //------------------------------------------------------------------------- |
65 | 63 | ||
66 | __syntaxFix__: "syntax fix" | 64 | __syntaxFix__: "syntax fix" |
67 | }); | 65 | }); |
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 b8f3b05..5e49fb5 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.PageHeader = function(args) { | 26 | Clipperz.PM.UI.Web.Components.PageHeader = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.PageHeader.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.PageHeader.superclass.constructor.apply(this, arguments); |
32 | this._newsIsOpen = args.newsIsOpen || false; | 30 | this._newsIsOpen = args.newsIsOpen || false; |
33 | this._animationDuration = args.animationDuration || 0.5; | 31 | this._animationDuration = args.animationDuration || 0.5; |
34 | 32 | ||
35 | this._offset = 82; | 33 | this._offset = 82; |
36 | 34 | ||
37 | return this; | 35 | return this; |
38 | } | 36 | } |
39 | 37 | ||
40 | //============================================================================= | 38 | //============================================================================= |
41 | 39 | ||
42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PageHeader, Clipperz.PM.UI.Common.Components.BaseComponent, { | 40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PageHeader, Clipperz.PM.UI.Common.Components.BaseComponent, { |
43 | 41 | ||
44 | //------------------------------------------------------------------------- | 42 | //------------------------------------------------------------------------- |
45 | 43 | ||
46 | 'toString': function () { | 44 | 'toString': function () { |
47 | return "Clipperz.PM.UI.Web.Components.PageHeader component"; | 45 | return "Clipperz.PM.UI.Web.Components.PageHeader component"; |
48 | }, | 46 | }, |
49 | 47 | ||
50 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
51 | 49 | ||
52 | 'iframeURL': function () { | 50 | 'iframeURL': function () { |
53 | // return './rss_view.html'; | 51 | // return './rss_view.html'; |
54 | return 'http://www.clipperz.com/files/clipperz.com/appTips/index.html'; | 52 | return 'http://www.clipperz.com/files/clipperz.com/appTips/index.html'; |
55 | }, | 53 | }, |
56 | 54 | ||
57 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
58 | 56 | ||
59 | 'renderSelf': function(/*aContainer, aPosition*/) { | 57 | 'renderSelf': function(/*aContainer, aPosition*/) { |
60 | this.append(this.element(), [ | 58 | this.append(this.element(), [ |
61 | {tag:'div', id:'miscLinks', children:[ | 59 | {tag:'div', id:'miscLinks', children:[ |
62 | {tag:'ul', children:[ | 60 | {tag:'ul', children:[ |
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')}]}, | 61 | {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')}]}, |
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')}]}, | 62 | {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')}]}, |
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')}]}, | 63 | {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')}]}, |
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')}]}, | 64 | {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')}]}, |
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')}]} | 65 | {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')}]} |
68 | ]} | 66 | ]} |
69 | ]}, | 67 | ]}, |
70 | {tag:'div', id:'logoFrame', children:[ | 68 | {tag:'div', id:'logoFrame', children:[ |
71 | {tag:'a', href:'http://www.clipperz.com', target:'_blank', children:[ | 69 | {tag:'a', href:'http://www.clipperz.com', target:'_blank', children:[ |
72 | // {tag:'h1', cls:'logo', html:"clipperz"}, | 70 | // {tag:'h1', cls:'logo', html:"clipperz"}, |
73 | {tag:'canvas', id:this.getId('logo'), cls:'logo'}, | 71 | {tag:'canvas', id:this.getId('logo'), cls:'logo'}, |
74 | {tag:'h5', cls:'clipperzPayoff', html:"keep it to yourself!"} | 72 | {tag:'h5', cls:'clipperzPayoff', html:"keep it to yourself!"} |
75 | ]} | 73 | ]} |
76 | ]}, | 74 | ]}, |
77 | {tag:'div', id:'news', cls:'hidden', children:[ | 75 | {tag:'div', id:'news', cls:'hidden', children:[ |
78 | // {tag:'div', cls:'close', children:[ | 76 | // {tag:'div', cls:'close', children:[ |
79 | // {tag:'a', href:'#', id:this.getId('closeTips'), html:'x'} | 77 | // {tag:'a', href:'#', id:this.getId('closeTips'), html:'x'} |
80 | // ]}, | 78 | // ]}, |
81 | {tag:'div', id:'newsframe', children:[ | 79 | {tag:'div', id:'newsframe', children:[ |
82 | {tag:'iframe', id:this.getId('iframe'), src:this.iframeURL()} | 80 | {tag:'iframe', id:this.getId('iframe'), src:this.iframeURL()} |
83 | ]}, | 81 | ]}, |
84 | {tag:'div', id:this.getId('newsGrip'), cls:'grip', children:[ | 82 | {tag:'div', id:this.getId('newsGrip'), cls:'grip', children:[ |
85 | {tag:'div', cls:'gripHandler', children:[]} | 83 | {tag:'div', cls:'gripHandler', children:[]} |
86 | ]} | 84 | ]} |
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 987e51e..5eb0c1f 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PasswordTooltip.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.PasswordTooltip = function(args) { | 26 | Clipperz.PM.UI.Web.Components.PasswordTooltip = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.PasswordTooltip.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.PasswordTooltip.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._referenceElement = args.referenceElement|| Clipperz.Base.exception.raise('MandatoryParameter'); | 31 | this._referenceElement = args.referenceElement|| Clipperz.Base.exception.raise('MandatoryParameter'); |
34 | this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); | 32 | this._text = args.text || Clipperz.Base.exception.raise('MandatoryParameter'); |
35 | 33 | ||
36 | this._boxDimensions = null; | 34 | this._boxDimensions = null; |
37 | this._isVisible = false; | 35 | this._isVisible = false; |
38 | 36 | ||
39 | this.renderSelf(); | 37 | this.renderSelf(); |
40 | 38 | ||
41 | return this; | 39 | return this; |
42 | } | 40 | } |
43 | 41 | ||
44 | //============================================================================= | 42 | //============================================================================= |
45 | 43 | ||
46 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PasswordTooltip, Clipperz.PM.UI.Common.Components.BaseComponent, { | 44 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PasswordTooltip, Clipperz.PM.UI.Common.Components.BaseComponent, { |
47 | 45 | ||
48 | //------------------------------------------------------------------------- | 46 | //------------------------------------------------------------------------- |
49 | 47 | ||
50 | 'toString': function () { | 48 | 'toString': function () { |
51 | return "Clipperz.PM.UI.Web.Components.PasswordTooltip component"; | 49 | return "Clipperz.PM.UI.Web.Components.PasswordTooltip component"; |
52 | }, | 50 | }, |
53 | 51 | ||
54 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
55 | 53 | ||
56 | 'referenceElement': function () { | 54 | 'referenceElement': function () { |
57 | return this._referenceElement; | 55 | return this._referenceElement; |
58 | }, | 56 | }, |
59 | 57 | ||
60 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
61 | 59 | ||
62 | 'text': function () { | 60 | 'text': function () { |
63 | return this._text; | 61 | return this._text; |
64 | }, | 62 | }, |
65 | 63 | ||
66 | 'setText': function (aValue) { | 64 | 'setText': function (aValue) { |
67 | this._text = aValue; | 65 | this._text = aValue; |
68 | }, | 66 | }, |
69 | 67 | ||
70 | //------------------------------------------------------------------------- | 68 | //------------------------------------------------------------------------- |
71 | 69 | ||
72 | 'isVisible': function () { | 70 | 'isVisible': function () { |
73 | return this._isVisible; | 71 | return this._isVisible; |
74 | }, | 72 | }, |
75 | 73 | ||
76 | 'setIsVisible': function (aValue) { | 74 | 'setIsVisible': function (aValue) { |
77 | this._isVisible = aValue; | 75 | this._isVisible = aValue; |
78 | }, | 76 | }, |
79 | 77 | ||
80 | //------------------------------------------------------------------------- | 78 | //------------------------------------------------------------------------- |
81 | 79 | ||
82 | 'renderSelf': function() { | 80 | 'renderSelf': function() { |
83 | this.append(MochiKit.DOM.getElement('Clipperz_PM_UI_Common_Components_Tooltip_wrapperNode'), {tag:'div', id:this.getId('tooltip'), cls:'passwordTooltip', children:[ | 81 | this.append(MochiKit.DOM.getElement('Clipperz_PM_UI_Common_Components_Tooltip_wrapperNode'), {tag:'div', id:this.getId('tooltip'), cls:'passwordTooltip', children:[ |
84 | {tag:'div', id:this.getId('body'), cls:'passwordTooltip_body', children:[ | 82 | {tag:'div', id:this.getId('body'), cls:'passwordTooltip_body', children:[ |
85 | {tag:'div', cls:'passwordTooltip_text', children:[ | 83 | {tag:'div', cls:'passwordTooltip_text', children:[ |
86 | {tag:'span', html:this.text()} | 84 | {tag:'span', html:this.text()} |
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 69c1ede..ad8d677 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/RulerComponent.js | |||
@@ -1,179 +1,176 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.RulerComponent = function(args) { | 26 | Clipperz.PM.UI.Web.Components.RulerComponent = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | Clipperz.PM.UI.Web.Components.RulerComponent.superclass.constructor.apply(this, arguments); | 28 | Clipperz.PM.UI.Web.Components.RulerComponent.superclass.constructor.apply(this, arguments); |
31 | 29 | ||
32 | this._translationContext = args.translationContext|| Clipperz.Base.exception.raise('MandatoryParameter'); | 30 | this._translationContext = args.translationContext|| Clipperz.Base.exception.raise('MandatoryParameter'); |
33 | // this._steps = args.steps || Clipperz.Base.exception.raise('MandatoryParameter'); | 31 | // this._steps = args.steps || Clipperz.Base.exception.raise('MandatoryParameter'); |
34 | this._steps = args.steps; | 32 | this._steps = args.steps; |
35 | 33 | ||
36 | this._currentStep = -1; | 34 | this._currentStep = -1; |
37 | 35 | ||
38 | return this; | 36 | return this; |
39 | } | 37 | } |
40 | 38 | ||
41 | //============================================================================= | 39 | //============================================================================= |
42 | 40 | ||
43 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.RulerComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { | 41 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.RulerComponent, Clipperz.PM.UI.Common.Components.BaseComponent, { |
44 | 42 | ||
45 | //------------------------------------------------------------------------- | 43 | //------------------------------------------------------------------------- |
46 | 44 | ||
47 | 'toString': function () { | 45 | 'toString': function () { |
48 | return "Clipperz.PM.UI.Web.Components.RulerComponent component"; | 46 | return "Clipperz.PM.UI.Web.Components.RulerComponent component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'resetStatus': function (args) { | 51 | 'resetStatus': function (args) { |
54 | args = args || {}; | 52 | args = args || {}; |
55 | 53 | ||
56 | if (this.currentStep() != 0) { | 54 | if (this.currentStep() != 0) { |
57 | var shouldAnimateTransition; | 55 | var shouldAnimateTransition; |
58 | 56 | ||
59 | shouldAnimateTransition = args.animateTransition || false; | 57 | shouldAnimateTransition = args.animateTransition || false; |
60 | 58 | ||
61 | if (shouldAnimateTransition) { | 59 | if (shouldAnimateTransition) { |
62 | this.moveToFirstStep(MochiKit.Base.method(this, 'cursorMoved')); | 60 | this.moveToFirstStep(MochiKit.Base.method(this, 'cursorMoved')); |
63 | } else { | 61 | } else { |
64 | this._currentStep = 0; | 62 | this._currentStep = 0; |
65 | this.cursorMoved(); | 63 | this.cursorMoved(); |
66 | } | 64 | } |
67 | } | 65 | } |
68 | }, | 66 | }, |
69 | 67 | ||
70 | //------------------------------------------------------------------------- | 68 | //------------------------------------------------------------------------- |
71 | 69 | ||
72 | 'translationContext': function () { | 70 | 'translationContext': function () { |
73 | return this._translationContext; | 71 | return this._translationContext; |
74 | }, | 72 | }, |
75 | 73 | ||
76 | 'steps': function () { | 74 | 'steps': function () { |
77 | return this._steps; | 75 | return this._steps; |
78 | }, | 76 | }, |
79 | 77 | ||
80 | 'setSteps': function (aValue) { | 78 | 'setSteps': function (aValue) { |
81 | this._steps = aValue; | 79 | this._steps = aValue; |
82 | this.renderStepsComponents(); | 80 | this.renderStepsComponents(); |
83 | this.resetStatus(); | 81 | this.resetStatus(); |
84 | }, | 82 | }, |
85 | 83 | ||
86 | 'translatedStepDescription': function (aStep) { | 84 | 'translatedStepDescription': function (aStep) { |
87 | return Clipperz.PM.Strings.getValue(this.translationContext() + '.' + aStep + '.' + 'name'); | 85 | return Clipperz.PM.Strings.getValue(this.translationContext() + '.' + aStep + '.' + 'name'); |
88 | }, | 86 | }, |
89 | 87 | ||
90 | //------------------------------------------------------------------------- | 88 | //------------------------------------------------------------------------- |
91 | 89 | ||
92 | 'renderSelf': function(/*aContainer, aPosition*/) { | 90 | 'renderSelf': function(/*aContainer, aPosition*/) { |
93 | this.setElement(this.append(MochiKit.DOM.currentDocument().body, [ | 91 | this.setElement(this.append(MochiKit.DOM.currentDocument().body, [ |
94 | {tag:'div', id:this.getId('rulerWrapper'), cls:'rulerWrapper fixed', children:[ | 92 | {tag:'div', id:this.getId('rulerWrapper'), cls:'rulerWrapper fixed', children:[ |
95 | {tag:'div', cls:'ruler', children:[ | 93 | {tag:'div', cls:'ruler', children:[ |
96 | {tag:'a', href:'#', id:this.getId('exit'), cls:'exit', html:' '}, | 94 | {tag:'a', href:'#', id:this.getId('exit'), cls:'exit', html:' '}, |
97 | {tag:'a', href:'#', id:this.getId('smallPreviousButton'),cls:'smallButton previous', html:' '}, | 95 | {tag:'a', href:'#', id:this.getId('smallPreviousButton'),cls:'smallButton previous', html:' '}, |
98 | {tag:'a', href:'#', id:this.getId('smallNextButton'), cls:'smallButton next', html:' '}, | 96 | {tag:'a', href:'#', id:this.getId('smallNextButton'), cls:'smallButton next', html:' '}, |
99 | {tag:'div', cls:'marker', id:this.getId('marker'), children:[ | 97 | {tag:'div', cls:'marker', id:this.getId('marker'), children:[ |
100 | {tag:'div', cls:'previous', id:this.getId('previousButton')}, | 98 | {tag:'div', cls:'previous', id:this.getId('previousButton')}, |
101 | {tag:'div', cls:'markerBody'}, | 99 | {tag:'div', cls:'markerBody'}, |
102 | {tag:'div', cls:'next', id:this.getId('nextButton')} | 100 | {tag:'div', cls:'next', id:this.getId('nextButton')} |
103 | ]}, | 101 | ]}, |
104 | {tag:'div', cls:'steps', id:this.getId('stepsFrame')}, | 102 | {tag:'div', cls:'steps', id:this.getId('stepsFrame')}, |
105 | // {tag:'div', cls:'steps' + ' ' + 'steps_' + this.steps().length, children:[ | 103 | // {tag:'div', cls:'steps' + ' ' + 'steps_' + this.steps().length, children:[ |
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())} | 104 | // {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())} |
107 | // ]}, | 105 | // ]}, |
108 | {tag:'div', cls:'dots', id:this.getId('dotsFrame')} | 106 | {tag:'div', cls:'dots', id:this.getId('dotsFrame')} |
109 | // {tag:'div', cls:'dots' + ' ' + 'steps_' + this.steps().length, children:[ | 107 | // {tag:'div', cls:'dots' + ' ' + 'steps_' + this.steps().length, children:[ |
110 | // {tag:'ul', id:this.getId('dots'), children:MochiKit.Base.map(function (aStep) { return {tag:'li', children:[{tag:'span', html:'*'}]}}, this.steps())} | 108 | // {tag:'ul', id:this.getId('dots'), children:MochiKit.Base.map(function (aStep) { return {tag:'li', children:[{tag:'span', html:'*'}]}}, this.steps())} |
111 | // ]} | 109 | // ]} |
112 | ]} | 110 | ]} |
113 | ]} | 111 | ]} |
114 | ])); | 112 | ])); |
115 | //console.log("ELEMENT", this.element()); | ||
116 | 113 | ||
117 | MochiKit.Signal.connect(this.getElement('exit'), 'onclick', this, 'handleExit'); | 114 | MochiKit.Signal.connect(this.getElement('exit'), 'onclick', this, 'handleExit'); |
118 | 115 | ||
119 | MochiKit.Signal.connect(this.getElement('previousButton'), 'onclick', this, 'handlePrevious'); | 116 | MochiKit.Signal.connect(this.getElement('previousButton'), 'onclick', this, 'handlePrevious'); |
120 | MochiKit.Signal.connect(this.getElement('smallPreviousButton'),'onclick', this, 'handlePrevious'); | 117 | MochiKit.Signal.connect(this.getElement('smallPreviousButton'),'onclick', this, 'handlePrevious'); |
121 | 118 | ||
122 | MochiKit.Signal.connect(this.getElement('nextButton'), 'onclick', this, 'handleNext'); | 119 | MochiKit.Signal.connect(this.getElement('nextButton'), 'onclick', this, 'handleNext'); |
123 | MochiKit.Signal.connect(this.getElement('smallNextButton'), 'onclick', this, 'handleNext'); | 120 | MochiKit.Signal.connect(this.getElement('smallNextButton'), 'onclick', this, 'handleNext'); |
124 | 121 | ||
125 | this.enablePrevious(false); | 122 | this.enablePrevious(false); |
126 | this.enableNext(false); | 123 | this.enableNext(false); |
127 | 124 | ||
128 | // this.cursorMoved(); | 125 | // this.cursorMoved(); |
129 | }, | 126 | }, |
130 | 127 | ||
131 | //......................................................................... | 128 | //......................................................................... |
132 | 129 | ||
133 | 'renderStepsComponents': function () { | 130 | 'renderStepsComponents': function () { |
134 | varstepsFrame; | 131 | varstepsFrame; |
135 | var dotsFrame; | 132 | var dotsFrame; |
136 | 133 | ||
137 | stepsFrames = this.getElement('stepsFrame'); | 134 | stepsFrames = this.getElement('stepsFrame'); |
138 | MochiKit.DOM.setElementClass(stepsFrames, 'steps'); | 135 | MochiKit.DOM.setElementClass(stepsFrames, 'steps'); |
139 | MochiKit.DOM.addElementClass(stepsFrames, 'steps_' + this.steps().length); | 136 | MochiKit.DOM.addElementClass(stepsFrames, 'steps_' + this.steps().length); |
140 | 137 | ||
141 | stepsFrames.innerHTML = ""; | 138 | stepsFrames.innerHTML = ""; |
142 | this.append(stepsFrames, {tag:'ul', id:this.getId('steps'), children:MochiKit.Base.map( | 139 | this.append(stepsFrames, {tag:'ul', id:this.getId('steps'), children:MochiKit.Base.map( |
143 | MochiKit.Base.bind(function (aStep) { return {tag:'li', children:[{tag:'span', html:this.translatedStepDescription(aStep)}]}}, this), | 140 | MochiKit.Base.bind(function (aStep) { return {tag:'li', children:[{tag:'span', html:this.translatedStepDescription(aStep)}]}}, this), |
144 | this.steps())} | 141 | this.steps())} |
145 | ); | 142 | ); |
146 | 143 | ||
147 | dotsFrames = this.getElement('dotsFrame'); | 144 | dotsFrames = this.getElement('dotsFrame'); |
148 | MochiKit.DOM.setElementClass(dotsFrames, 'dots'); | 145 | MochiKit.DOM.setElementClass(dotsFrames, 'dots'); |
149 | MochiKit.DOM.addElementClass(dotsFrames, 'steps_' + this.steps().length); | 146 | MochiKit.DOM.addElementClass(dotsFrames, 'steps_' + this.steps().length); |
150 | 147 | ||
151 | dotsFrames.innerHTML = ""; | 148 | dotsFrames.innerHTML = ""; |
152 | this.append(dotsFrames, {tag:'ul', id:this.getId('dots'), children:MochiKit.Base.map( | 149 | this.append(dotsFrames, {tag:'ul', id:this.getId('dots'), children:MochiKit.Base.map( |
153 | function (aStep) { return {tag:'li', children:[{tag:'span', html:'*'}]}; }, | 150 | function (aStep) { return {tag:'li', children:[{tag:'span', html:'*'}]}; }, |
154 | this.steps())} | 151 | this.steps())} |
155 | ); | 152 | ); |
156 | }, | 153 | }, |
157 | 154 | ||
158 | //------------------------------------------------------------------------- | 155 | //------------------------------------------------------------------------- |
159 | 156 | ||
160 | 'handleExit': function (anEvent) { | 157 | 'handleExit': function (anEvent) { |
161 | anEvent.preventDefault(); | 158 | anEvent.preventDefault(); |
162 | 159 | ||
163 | MochiKit.Signal.signal(this, 'exit'); | 160 | MochiKit.Signal.signal(this, 'exit'); |
164 | }, | 161 | }, |
165 | 162 | ||
166 | //------------------------------------------------------------------------- | 163 | //------------------------------------------------------------------------- |
167 | 164 | ||
168 | 'handlePrevious': function (anEvent) { | 165 | 'handlePrevious': function (anEvent) { |
169 | anEvent.preventDefault(); | 166 | anEvent.preventDefault(); |
170 | 167 | ||
171 | // if (!MochiKit.DOM.hasElementClass(this.getElement('previousButton'), 'disabled')) { | 168 | // if (!MochiKit.DOM.hasElementClass(this.getElement('previousButton'), 'disabled')) { |
172 | // this.moveBackward(); | 169 | // this.moveBackward(); |
173 | // } | 170 | // } |
174 | 171 | ||
175 | MochiKit.Signal.signal(this, 'moveBackward'); | 172 | MochiKit.Signal.signal(this, 'moveBackward'); |
176 | }, | 173 | }, |
177 | 174 | ||
178 | 'handleNext': function (anEvent) { | 175 | 'handleNext': function (anEvent) { |
179 | anEvent.preventDefault(); | 176 | anEvent.preventDefault(); |
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 666afe9..edcdb62 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.TabSidePanel = function(args) { | 26 | Clipperz.PM.UI.Web.Components.TabSidePanel = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | Clipperz.PM.UI.Web.Components.TabSidePanel.superclass.constructor.call(this, args); | 28 | Clipperz.PM.UI.Web.Components.TabSidePanel.superclass.constructor.call(this, args); |
31 | 29 | ||
32 | this._element = args.element || null; | 30 | this._element = args.element || null; |
33 | 31 | ||
34 | this._slots = { | 32 | this._slots = { |
35 | }; | 33 | }; |
36 | 34 | ||
37 | return this; | 35 | return this; |
38 | } | 36 | } |
39 | 37 | ||
40 | //============================================================================= | 38 | //============================================================================= |
41 | 39 | ||
42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.TabSidePanel, Clipperz.PM.UI.Common.Components.BaseComponent, { | 40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.TabSidePanel, Clipperz.PM.UI.Common.Components.BaseComponent, { |
43 | 41 | ||
44 | //------------------------------------------------------------------------- | 42 | //------------------------------------------------------------------------- |
45 | 43 | ||
46 | 'toString': function () { | 44 | 'toString': function () { |
47 | return "Clipperz.PM.UI.Web.Components.TabSidePanel component"; | 45 | return "Clipperz.PM.UI.Web.Components.TabSidePanel component"; |
48 | }, | 46 | }, |
49 | 47 | ||
50 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
51 | 49 | ||
52 | 'deselectAllTabs': function() { | 50 | 'deselectAllTabs': function() { |
53 | var tabListItems; | 51 | var tabListItems; |
54 | 52 | ||
55 | tabListItems = [ | 53 | tabListItems = [ |
56 | 'cardsLI', | 54 | 'cardsLI', |
57 | // 'directLoginLI', | 55 | // 'directLoginLI', |
58 | 'accountLI', | 56 | 'accountLI', |
59 | 'dataLI', | 57 | 'dataLI', |
60 | 'toolsLI' | 58 | 'toolsLI' |
61 | ]; | 59 | ]; |
62 | 60 | ||
63 | //Clipperz.log("=== TabSidePanel.tabSelected anEvent.src().id", anEvent.src().id); | 61 | //Clipperz.log("=== TabSidePanel.tabSelected anEvent.src().id", anEvent.src().id); |
64 | for (var i in tabListItems) { | 62 | for (var i in tabListItems) { |
65 | //Clipperz.log("=== TabSidePanel.tabSelected aTabListItem", tabListItems[i]); | 63 | //Clipperz.log("=== TabSidePanel.tabSelected aTabListItem", tabListItems[i]); |
66 | MochiKit.DOM.removeElementClass(this.getId(tabListItems[i]), 'selected'); | 64 | MochiKit.DOM.removeElementClass(this.getId(tabListItems[i]), 'selected'); |
67 | } | 65 | } |
68 | }, | 66 | }, |
69 | 67 | ||
70 | 'selectTab': function(aTabName) { | 68 | 'selectTab': function(aTabName) { |
71 | this.deselectAllTabs(); | 69 | this.deselectAllTabs(); |
72 | MochiKit.DOM.addElementClass(this.getId(this.listItemIdForTabNamed(aTabName)), 'selected'); | 70 | MochiKit.DOM.addElementClass(this.getId(this.listItemIdForTabNamed(aTabName)), 'selected'); |
73 | MochiKit.Signal.signal(this, 'tabSelected', aTabName); | 71 | MochiKit.Signal.signal(this, 'tabSelected', aTabName); |
74 | }, | 72 | }, |
75 | 73 | ||
76 | 'tabNameForAnchorId': function(anId) { | 74 | 'tabNameForAnchorId': function(anId) { |
77 | var result; | 75 | var result; |
78 | 76 | ||
79 | switch(anId) { | 77 | switch(anId) { |
80 | case 'cards_tabSidePanel': | 78 | case 'cards_tabSidePanel': |
81 | result = 'cards'; | 79 | result = 'cards'; |
82 | break; | 80 | break; |
83 | // case 'directLogins_tabSidePanel': | 81 | // case 'directLogins_tabSidePanel': |
84 | // result = 'directLogins'; | 82 | // result = 'directLogins'; |
85 | // break; | 83 | // break; |
86 | case 'account_tabSidePanel': | 84 | case 'account_tabSidePanel': |
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 3dc9ce9..9b1796a 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TextColumnManager.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TextColumnManager.js | |||
@@ -1,50 +1,48 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | //############################################################################# | 26 | //############################################################################# |
29 | 27 | ||
30 | Clipperz.PM.UI.Web.Components.TextColumnManager = function(args) { | 28 | Clipperz.PM.UI.Web.Components.TextColumnManager = function(args) { |
31 | args = args || {}; | 29 | args = args || {}; |
32 | Clipperz.PM.UI.Web.Components.TextColumnManager.superclass.constructor.call(this, args); | 30 | Clipperz.PM.UI.Web.Components.TextColumnManager.superclass.constructor.call(this, args); |
33 | 31 | ||
34 | return this; | 32 | return this; |
35 | } | 33 | } |
36 | 34 | ||
37 | //============================================================================= | 35 | //============================================================================= |
38 | 36 | ||
39 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.TextColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { | 37 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.TextColumnManager, Clipperz.PM.UI.Web.Components.ColumnManager, { |
40 | 38 | ||
41 | 'toString': function () { | 39 | 'toString': function () { |
42 | return "Clipperz.PM.UI.Web.Components.TextColumnManager component"; | 40 | return "Clipperz.PM.UI.Web.Components.TextColumnManager component"; |
43 | }, | 41 | }, |
44 | 42 | ||
45 | //----------------------------------------------------- | 43 | //----------------------------------------------------- |
46 | 44 | ||
47 | '__syntax_fix__' : 'syntax fix' | 45 | '__syntax_fix__' : 'syntax fix' |
48 | 46 | ||
49 | }); | 47 | }); |
50 | 48 | ||
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 0fa369f..034ed91 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.ToolsPanel = function(args) { | 26 | Clipperz.PM.UI.Web.Components.ToolsPanel = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.ToolsPanel.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.ToolsPanel.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._initiallySelectedTab = args.selected || 'PASSWORD_GENERATOR'; | 31 | this._initiallySelectedTab = args.selected || 'PASSWORD_GENERATOR'; |
34 | this._tabPanelControllerConfiguration = { | 32 | this._tabPanelControllerConfiguration = { |
35 | 'PASSWORD_GENERATOR': { | 33 | 'PASSWORD_GENERATOR': { |
36 | tab:'passwordGeneratorTab', | 34 | tab:'passwordGeneratorTab', |
37 | panel:'passwordGeneratorPanel' | 35 | panel:'passwordGeneratorPanel' |
38 | }, | 36 | }, |
39 | 'BOOKMARKLET': { | 37 | 'BOOKMARKLET': { |
40 | tab:'bookmarkletTab', | 38 | tab:'bookmarkletTab', |
41 | panel:'bookmarkletPanel' | 39 | panel:'bookmarkletPanel' |
42 | }, | 40 | }, |
43 | 'COMPACT_EDITION': { | 41 | 'COMPACT_EDITION': { |
44 | tab:'compactEditionTab', | 42 | tab:'compactEditionTab', |
45 | panel:'compactEditionPanel' | 43 | panel:'compactEditionPanel' |
46 | }, | 44 | }, |
47 | 'HTTP_AUTH': { | 45 | 'HTTP_AUTH': { |
48 | tab:'httpAuthTab', | 46 | tab:'httpAuthTab', |
49 | panel:'httpAuthPanel' | 47 | panel:'httpAuthPanel' |
50 | } | 48 | } |
51 | }; | 49 | }; |
52 | 50 | ||
53 | return this; | 51 | return this; |
54 | } | 52 | } |
55 | 53 | ||
56 | //============================================================================= | 54 | //============================================================================= |
57 | 55 | ||
58 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ToolsPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { | 56 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ToolsPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { |
59 | 57 | ||
60 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
61 | 59 | ||
62 | 'toString': function () { | 60 | 'toString': function () { |
63 | return "Clipperz.PM.UI.Web.Components.ToolsPanel component"; | 61 | return "Clipperz.PM.UI.Web.Components.ToolsPanel component"; |
64 | }, | 62 | }, |
65 | 63 | ||
66 | //------------------------------------------------------------------------- | 64 | //------------------------------------------------------------------------- |
67 | 65 | ||
68 | 'renderSelf': function(/*aContainer, aPosition*/) { | 66 | 'renderSelf': function(/*aContainer, aPosition*/) { |
69 | this.append(this.element(), [ | 67 | this.append(this.element(), [ |
70 | {tag:'div', cls:'header', children:[ | 68 | {tag:'div', cls:'header', children:[ |
71 | {tag:'div', cls:'subPanelTabs', children:[ | 69 | {tag:'div', cls:'subPanelTabs', children:[ |
72 | {tag:'ul', children:[ | 70 | {tag:'ul', children:[ |
73 | {tag:'li', id:this.getId('passwordGeneratorTab'),children:[{tag:'a', href:'#', html:'Password generator'}], cls:'first'}, | 71 | {tag:'li', id:this.getId('passwordGeneratorTab'),children:[{tag:'a', href:'#', html:'Password generator'}], cls:'first'}, |
74 | {tag:'li', id:this.getId('bookmarkletTab'), children:[{tag:'a', href:'#', html:'Bookmarklet'}]}, | 72 | {tag:'li', id:this.getId('bookmarkletTab'), children:[{tag:'a', href:'#', html:'Bookmarklet'}]}, |
75 | {tag:'li', id:this.getId('compactEditionTab'), children:[{tag:'a', href:'#', html:'Compact edition'}]}, | 73 | {tag:'li', id:this.getId('compactEditionTab'), children:[{tag:'a', href:'#', html:'Compact edition'}]}, |
76 | {tag:'li', id:this.getId('httpAuthTab'), children:[{tag:'a', href:'#', html:'HTTP Auth'}]} | 74 | {tag:'li', id:this.getId('httpAuthTab'), children:[{tag:'a', href:'#', html:'HTTP Auth'}]} |
77 | ]} | 75 | ]} |
78 | ]} | 76 | ]} |
79 | ]}, | 77 | ]}, |
80 | {tag:'div', cls:'body', children:[ | 78 | {tag:'div', cls:'body', children:[ |
81 | {tag:'div', cls:'accountPanel', children:[ | 79 | {tag:'div', cls:'accountPanel', children:[ |
82 | {tag:'div', cls:'subPanelContent', children:[ | 80 | {tag:'div', cls:'subPanelContent', children:[ |
83 | {tag:'ul', children:[ | 81 | {tag:'ul', children:[ |
84 | {tag:'li', id:this.getId('passwordGeneratorPanel'),children:[ | 82 | {tag:'li', id:this.getId('passwordGeneratorPanel'),children:[ |
85 | // {tag:'h3', html:"Password generator"} | 83 | // {tag:'h3', html:"Password generator"} |
86 | ]}, | 84 | ]}, |
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 21ccf2a..fe46729 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UnlockPasswordComponent.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UnlockPasswordComponent.js | |||
@@ -1,86 +1,84 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.UnlockPasswordComponent = function(args) { | 26 | Clipperz.PM.UI.Web.Components.UnlockPasswordComponent = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._openFromElement = args.openFromElement || null; | 31 | this._openFromElement = args.openFromElement || null; |
34 | this._onOkCloseToElement = args.onOkCloseToElement || null; | 32 | this._onOkCloseToElement = args.onOkCloseToElement || null; |
35 | this._onCancelCloseToElement = args.onCancelCloseToElement|| null; | 33 | this._onCancelCloseToElement = args.onCancelCloseToElement|| null; |
36 | 34 | ||
37 | this._progressBarComponent = null; | 35 | this._progressBarComponent = null; |
38 | 36 | ||
39 | return this; | 37 | return this; |
40 | } | 38 | } |
41 | 39 | ||
42 | //============================================================================= | 40 | //============================================================================= |
43 | 41 | ||
44 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.UnlockPasswordComponent, Clipperz.PM.UI.Common.Components.SimpleMessagePanel, { | 42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.UnlockPasswordComponent, Clipperz.PM.UI.Common.Components.SimpleMessagePanel, { |
45 | 43 | ||
46 | //------------------------------------------------------------------------- | 44 | //------------------------------------------------------------------------- |
47 | 45 | ||
48 | 'toString': function () { | 46 | 'toString': function () { |
49 | return "Clipperz.PM.UI.Web.Components.UnlockPasswordComponent component"; | 47 | return "Clipperz.PM.UI.Web.Components.UnlockPasswordComponent component"; |
50 | }, | 48 | }, |
51 | 49 | ||
52 | //------------------------------------------------------------------------- | 50 | //------------------------------------------------------------------------- |
53 | 51 | ||
54 | 'getPassphrase': function () { | 52 | 'getPassphrase': function () { |
55 | /* var deferredResult; | 53 | /* var deferredResult; |
56 | 54 | ||
57 | if (this.passphrase() == null) { | 55 | if (this.passphrase() == null) { |
58 | this.deferredShowModal({'openFromElement': this.openFromElement()}); | 56 | this.deferredShowModal({'openFromElement': this.openFromElement()}); |
59 | deferredResult = this.deferred(); | 57 | deferredResult = this.deferred(); |
60 | } else { | 58 | } else { |
61 | deferredResult = MochiKit.Async.succeed(this.passphrase()); | 59 | deferredResult = MochiKit.Async.succeed(this.passphrase()); |
62 | } | 60 | } |
63 | 61 | ||
64 | return deferredResult; | 62 | return deferredResult; |
65 | */ | 63 | */ |
66 | 64 | ||
67 | this.deferredShowModal({'openFromElement': this.openFromElement()}); | 65 | this.deferredShowModal({'openFromElement': this.openFromElement()}); |
68 | 66 | ||
69 | return this.deferred(); | 67 | return this.deferred(); |
70 | }, | 68 | }, |
71 | 69 | ||
72 | //------------------------------------------------------------------------- | 70 | //------------------------------------------------------------------------- |
73 | 71 | ||
74 | 'deferredShowModal': function (someParameters) { | 72 | 'deferredShowModal': function (someParameters) { |
75 | return Clipperz.Async.callbacks("UnlockPasswordComponent.deferredShowModal", [ | 73 | return Clipperz.Async.callbacks("UnlockPasswordComponent.deferredShowModal", [ |
76 | MochiKit.Base.bind(Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.deferredShowModal, this, someParameters), | 74 | MochiKit.Base.bind(Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.deferredShowModal, this, someParameters), |
77 | MochiKit.Base.method(this, 'getElement', 'passphrase'), | 75 | MochiKit.Base.method(this, 'getElement', 'passphrase'), |
78 | MochiKit.Base.methodcaller('focus') | 76 | MochiKit.Base.methodcaller('focus') |
79 | ], {trace:false}) | 77 | ], {trace:false}) |
80 | }, | 78 | }, |
81 | 79 | ||
82 | //------------------------------------------------------------------------- | 80 | //------------------------------------------------------------------------- |
83 | 81 | ||
84 | 'openFromElement': function () { | 82 | 'openFromElement': function () { |
85 | return this._openFromElement; | 83 | return this._openFromElement; |
86 | }, | 84 | }, |
@@ -99,83 +97,82 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.UnlockPasswordComponent, Clip | |||
99 | Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.renderSelf.apply(this, arguments); | 97 | Clipperz.PM.UI.Web.Components.UnlockPasswordComponent.superclass.renderSelf.apply(this, arguments); |
100 | 98 | ||
101 | this.append(this.getElement('container'), {tag:'div', cls:'passphrase', children: [ | 99 | this.append(this.getElement('container'), {tag:'div', cls:'passphrase', children: [ |
102 | // {tag:'form', id:this.getId('passphraseForm'), children:[ | 100 | // {tag:'form', id:this.getId('passphraseForm'), children:[ |
103 | {tag:'input', id:this.getId('passphrase'), type:'password', name:'passphrase', value:''} | 101 | {tag:'input', id:this.getId('passphrase'), type:'password', name:'passphrase', value:''} |
104 | // ]} | 102 | // ]} |
105 | ]}); | 103 | ]}); |
106 | 104 | ||
107 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userSuccessfullyLoggedIn', this, 'userSuccessfullyLoggedInHandler'); | 105 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userSuccessfullyLoggedIn', this, 'userSuccessfullyLoggedInHandler'); |
108 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userLoginFailed', this, 'userLoginFailedHandler'); | 106 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userLoginFailed', this, 'userLoginFailedHandler'); |
109 | 107 | ||
110 | 108 | ||
111 | // MochiKit.Async.callLater(0.1, MochiKit.Base.method(this.getElement('passphrase'), 'focus')); | 109 | // MochiKit.Async.callLater(0.1, MochiKit.Base.method(this.getElement('passphrase'), 'focus')); |
112 | // this.getElement('passphrase').select(); | 110 | // this.getElement('passphrase').select(); |
113 | }, | 111 | }, |
114 | 112 | ||
115 | //------------------------------------------------------------------------- | 113 | //------------------------------------------------------------------------- |
116 | 114 | ||
117 | 'showProgressBar': function () { | 115 | 'showProgressBar': function () { |
118 | varprogressBarElement; | 116 | varprogressBarElement; |
119 | 117 | ||
120 | this.getElement('container').innerHTML = ''; | 118 | this.getElement('container').innerHTML = ''; |
121 | 119 | ||
122 | progressBarElement = this.append(this.getElement('container'), {tag:'div', cls:'progressBarWrapper'}); | 120 | progressBarElement = this.append(this.getElement('container'), {tag:'div', cls:'progressBarWrapper'}); |
123 | this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':progressBarElement})); | 121 | this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':progressBarElement})); |
124 | 122 | ||
125 | this.setButtons([{text:"Cancel", result:'CANCEL'}]); | 123 | this.setButtons([{text:"Cancel", result:'CANCEL'}]); |
126 | }, | 124 | }, |
127 | 125 | ||
128 | //------------------------------------------------------------------------- | 126 | //------------------------------------------------------------------------- |
129 | 127 | ||
130 | 'showFailure': function () { | 128 | 'showFailure': function () { |
131 | this.setType('ALERT'); | 129 | this.setType('ALERT'); |
132 | this.setTitle("Login failed"); | 130 | this.setTitle("Login failed"); |
133 | this.setText("Wrong passphrase; the unlock has failed."); | 131 | this.setText("Wrong passphrase; the unlock has failed."); |
134 | this.getElement('container').innerHTML = ''; | 132 | this.getElement('container').innerHTML = ''; |
135 | this.setButtons([{text:"Close", result:'CANCEL', isDefault:true}]); | 133 | this.setButtons([{text:"Close", result:'CANCEL', isDefault:true}]); |
136 | }, | 134 | }, |
137 | 135 | ||
138 | //------------------------------------------------------------------------- | 136 | //------------------------------------------------------------------------- |
139 | 137 | ||
140 | 'closeOk': function () { | 138 | 'closeOk': function () { |
141 | var passphrase; | 139 | var passphrase; |
142 | 140 | ||
143 | passphrase = this.getElement('passphrase').value; | 141 | passphrase = this.getElement('passphrase').value; |
144 | this.showProgressBar(); | 142 | this.showProgressBar(); |
145 | // this.deferred().callback(passphrase); | 143 | // this.deferred().callback(passphrase); |
146 | MochiKit.Async.callLater(0.5, MochiKit.Base.method(this.deferred(), 'callback', passphrase)); | 144 | MochiKit.Async.callLater(0.5, MochiKit.Base.method(this.deferred(), 'callback', passphrase)); |
147 | this._deferred = null; | 145 | this._deferred = null; |
148 | }, | 146 | }, |
149 | 147 | ||
150 | 'closeCancel': function () { | 148 | 'closeCancel': function () { |
151 | this.deferredHideModal({closeToElement:this.onCancelCloseToElement()}); | 149 | this.deferredHideModal({closeToElement:this.onCancelCloseToElement()}); |
152 | this.deferred().cancel(); | 150 | this.deferred().cancel(); |
153 | this._deferred = null; | 151 | this._deferred = null; |
154 | }, | 152 | }, |
155 | 153 | ||
156 | //------------------------------------------------------------------------- | 154 | //------------------------------------------------------------------------- |
157 | 155 | ||
158 | 'userSuccessfullyLoggedInHandler': function (anEvent) { | 156 | 'userSuccessfullyLoggedInHandler': function (anEvent) { |
159 | this.deferredHideModal({closeToElement:this.onOkCloseToElement()}); | 157 | this.deferredHideModal({closeToElement:this.onOkCloseToElement()}); |
160 | }, | 158 | }, |
161 | 159 | ||
162 | 'userLoginFailedHandler': function (anEvent) { | 160 | 'userLoginFailedHandler': function (anEvent) { |
163 | //console.log("############### FAILED LOGIN ################"); | ||
164 | this.showFailure(); | 161 | this.showFailure(); |
165 | }, | 162 | }, |
166 | 163 | ||
167 | //------------------------------------------------------------------------- | 164 | //------------------------------------------------------------------------- |
168 | /* | 165 | /* |
169 | 'deferredShow': function (someArgs, aResult) { | 166 | 'deferredShow': function (someArgs, aResult) { |
170 | this.deferredShowModal(someArgs); | 167 | this.deferredShowModal(someArgs); |
171 | 168 | ||
172 | // this.deferred().addMethod(this, 'deferredHideModal', {closeToElement:someArgs.onOkCloseToElement }); | 169 | // this.deferred().addMethod(this, 'deferredHideModal', {closeToElement:someArgs.onOkCloseToElement }); |
173 | // this.deferred().addErrback (MochiKit.Base.method(this, 'deferredHideModal', {closeToElement:someArgs.onCancelCloseToElement })); | 170 | // this.deferred().addErrback (MochiKit.Base.method(this, 'deferredHideModal', {closeToElement:someArgs.onCancelCloseToElement })); |
174 | // this.deferred().addCallback(MochiKit.Async.succeed, aResult); | 171 | // this.deferred().addCallback(MochiKit.Async.succeed, aResult); |
175 | 172 | ||
176 | return this.deferred(); | 173 | return this.deferred(); |
177 | }, | 174 | }, |
178 | */ | 175 | */ |
179 | //------------------------------------------------------------------------- | 176 | //------------------------------------------------------------------------- |
180 | __syntaxFix__: "syntax fix" | 177 | __syntaxFix__: "syntax fix" |
181 | }); | 178 | }); |
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 d699dc6..fbf58e0 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js | |||
@@ -1,213 +1,207 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 25 | ||
28 | Clipperz.PM.UI.Web.Components.UserInfoBox = function(args) { | 26 | Clipperz.PM.UI.Web.Components.UserInfoBox = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.UI.Web.Components.UserInfoBox.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.UserInfoBox.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._slots = {}; | 31 | this._slots = {}; |
34 | this._isLocked = false; | 32 | this._isLocked = false; |
35 | this._lockTooltip = null; | 33 | this._lockTooltip = null; |
36 | 34 | ||
37 | return this; | 35 | return this; |
38 | } | 36 | } |
39 | 37 | ||
40 | //============================================================================= | 38 | //============================================================================= |
41 | 39 | ||
42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.UserInfoBox, Clipperz.PM.UI.Common.Components.BaseComponent, { | 40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.UserInfoBox, Clipperz.PM.UI.Common.Components.BaseComponent, { |
43 | 41 | ||
44 | //------------------------------------------------------------------------- | 42 | //------------------------------------------------------------------------- |
45 | 43 | ||
46 | 'toString': function () { | 44 | 'toString': function () { |
47 | return "Clipperz.PM.UI.Web.Components.UserInfoBox component"; | 45 | return "Clipperz.PM.UI.Web.Components.UserInfoBox component"; |
48 | }, | 46 | }, |
49 | 47 | ||
50 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
51 | 49 | ||
52 | 'handleLogout': function(anEvent) { | 50 | 'handleLogout': function(anEvent) { |
53 | //Clipperz.log(">>> UserInfoBox.handleLogout"); | 51 | //Clipperz.log(">>> UserInfoBox.handleLogout"); |
54 | anEvent.preventDefault(); | 52 | anEvent.preventDefault(); |
55 | MochiKit.Signal.signal(this, 'logout'); | 53 | MochiKit.Signal.signal(this, 'logout'); |
56 | //Clipperz.log("<<< UserInfoBox.handleLogout"); | 54 | //Clipperz.log("<<< UserInfoBox.handleLogout"); |
57 | }, | 55 | }, |
58 | 56 | ||
59 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
60 | 58 | ||
61 | 'lockTooltip': function () { | 59 | 'lockTooltip': function () { |
62 | return this._lockTooltip; | 60 | return this._lockTooltip; |
63 | }, | 61 | }, |
64 | 62 | ||
65 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
66 | 64 | ||
67 | 'isLocked': function () { | 65 | 'isLocked': function () { |
68 | return this._isLocked; | 66 | return this._isLocked; |
69 | }, | 67 | }, |
70 | 68 | ||
71 | 'setIsLocked': function (aValue) { | 69 | 'setIsLocked': function (aValue) { |
72 | this._isLocked = aValue; | 70 | this._isLocked = aValue; |
73 | }, | 71 | }, |
74 | 72 | ||
75 | 'toggleLock': function(anEvent) { | 73 | 'toggleLock': function(anEvent) { |
76 | var deferredResult; | 74 | var deferredResult; |
77 | var shouldLock; | 75 | var shouldLock; |
78 | 76 | ||
79 | //console.log(">>> UserInfoBox.toggleLock [locked: " + this.isLocked() + "]"); | ||
80 | anEvent.preventDefault(); | 77 | anEvent.preventDefault(); |
81 | this.lockTooltip().hide(); | 78 | this.lockTooltip().hide(); |
82 | 79 | ||
83 | shouldLock = (this.isLocked() == false); | 80 | shouldLock = (this.isLocked() == false); |
84 | 81 | ||
85 | if (shouldLock) { | 82 | if (shouldLock) { |
86 | var maskElement; | 83 | var maskElement; |
87 | 84 | ||
88 | this.setIsLocked(true); | 85 | this.setIsLocked(true); |
89 | maskElement = this.getId('modalDialogMask'); | 86 | maskElement = this.getId('modalDialogMask'); |
90 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.toggleLock [lock]", [ | 87 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.toggleLock [lock]", [ |
91 | MochiKit.Base.partial(MochiKit.DOM.addElementClass, this.element(), 'locked'), | 88 | MochiKit.Base.partial(MochiKit.DOM.addElementClass, this.element(), 'locked'), |
92 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.appear, maskElement, {from:0.0, to:0.75, duration:0.5}), | 89 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.appear, maskElement, {from:0.0, to:0.75, duration:0.5}), |
93 | MochiKit.Base.method(Clipperz.PM.RunTime.mainController, 'setPassphraseDelegate', MochiKit.Base.method(this, 'askForPassphrase')), | 90 | MochiKit.Base.method(Clipperz.PM.RunTime.mainController, 'setPassphraseDelegate', MochiKit.Base.method(this, 'askForPassphrase')), |
94 | MochiKit.Base.partial(MochiKit.Signal.signal, this, 'lock') | 91 | MochiKit.Base.partial(MochiKit.Signal.signal, this, 'lock') |
95 | ], {trace:false}); | 92 | ], {trace:false}); |
96 | } else { | 93 | } else { |
97 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.toggleLock [unlock]", [ | 94 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.toggleLock [unlock]", [ |
98 | MochiKit.Base.partial(MochiKit.Signal.signal, this, 'unlock') | 95 | MochiKit.Base.partial(MochiKit.Signal.signal, this, 'unlock') |
99 | ], {trace:false}); | 96 | ], {trace:false}); |
100 | } | 97 | } |
101 | //console.log("<<< UserInfoBox.toggleLock"); | ||
102 | 98 | ||
103 | return deferredResult; | 99 | return deferredResult; |
104 | }, | 100 | }, |
105 | 101 | ||
106 | //------------------------------------------------------------------------- | 102 | //------------------------------------------------------------------------- |
107 | 103 | ||
108 | 'unlock': function () { | 104 | 'unlock': function () { |
109 | var deferredResult; | 105 | var deferredResult; |
110 | var maskElement; | 106 | var maskElement; |
111 | 107 | ||
112 | this.setIsLocked(false); | 108 | this.setIsLocked(false); |
113 | maskElement = this.getId('modalDialogMask'); | 109 | maskElement = this.getId('modalDialogMask'); |
114 | 110 | ||
115 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.unlock", [ | 111 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.unlock", [ |
116 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.fade, maskElement, {from:0.75, to:0.0, duration:0.5}), | 112 | MochiKit.Base.partial(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}), | 113 | // Clipperz.Visual.deferredAnimation(MochiKit.Visual.fade, maskElement, {from:0.75, to:0.0, duration:0.5}), |
118 | MochiKit.Base.partial(MochiKit.DOM.removeElementClass, this.element(), 'locked') | 114 | MochiKit.Base.partial(MochiKit.DOM.removeElementClass, this.element(), 'locked') |
119 | ], {trace:false}); | 115 | ], {trace:false}); |
120 | }, | 116 | }, |
121 | 117 | ||
122 | //------------------------------------------------------------------------- | 118 | //------------------------------------------------------------------------- |
123 | 119 | ||
124 | 'askForPassphrase': function () { | 120 | 'askForPassphrase': function () { |
125 | varunlockPasswordComponent; | 121 | varunlockPasswordComponent; |
126 | /* | 122 | /* |
127 | vardeferredResult; | 123 | vardeferredResult; |
128 | 124 | ||
129 | deferredResult = new Clipperz.Async.Deferred("UserInfoBox.askForPassphrase", {trace:false}); | 125 | deferredResult = new Clipperz.Async.Deferred("UserInfoBox.askForPassphrase", {trace:false}); |
130 | deferredResult.addCallback(MochiKit.Async.succeed, 'test'); | 126 | deferredResult.addCallback(MochiKit.Async.succeed, 'test'); |
131 | 127 | ||
132 | deferredResult.callback(); | 128 | deferredResult.callback(); |
133 | 129 | ||
134 | return deferredResult; | 130 | return deferredResult; |
135 | */ | 131 | */ |
136 | //console.log(">>> UserInfoBox.askForPassphrase"); | ||
137 | unlockPasswordComponent = new Clipperz.PM.UI.Web.Components.UnlockPasswordComponent({ | 132 | unlockPasswordComponent = new Clipperz.PM.UI.Web.Components.UnlockPasswordComponent({ |
138 | 'title':"Unlock account", | 133 | 'title':"Unlock account", |
139 | 'text': "Insert the passprase to unlock the account", | 134 | 'text': "Insert the passprase to unlock the account", |
140 | 'type': 'INFO', | 135 | 'type': 'INFO', |
141 | 'buttons': [ | 136 | 'buttons': [ |
142 | {text:"Cancel",result:'CANCEL'}, | 137 | {text:"Cancel",result:'CANCEL'}, |
143 | {text:"Unlock", result:'OK',isDefault:true} | 138 | {text:"Unlock", result:'OK',isDefault:true} |
144 | ], | 139 | ], |
145 | 'openFromElement': this.getElement('lock'), | 140 | 'openFromElement': this.getElement('lock'), |
146 | 'onOkCloseToElement': null, | 141 | 'onOkCloseToElement': null, |
147 | 'onCancelCloseToElement':this.getId('lock') | 142 | 'onCancelCloseToElement':this.getId('lock') |
148 | }); | 143 | }); |
149 | //console.log("<<< UserInfoBox.askForPassphrase"); | ||
150 | 144 | ||
151 | return unlockPasswordComponent.getPassphrase(); | 145 | return unlockPasswordComponent.getPassphrase(); |
152 | }, | 146 | }, |
153 | 147 | ||
154 | //========================================================================= | 148 | //========================================================================= |
155 | 149 | ||
156 | 'renderSelf': function(/*aContainer, aPosition*/) { | 150 | 'renderSelf': function(/*aContainer, aPosition*/) { |
157 | this.append(this.element(), [ | 151 | this.append(this.element(), [ |
158 | // {tag:'canvas', id:this.getId('canvas'), cls:'canvas', width:'188', height:'154'}, | 152 | // {tag:'canvas', id:this.getId('canvas'), cls:'canvas', width:'188', height:'154'}, |
159 | {tag:'div', cls:'header', children:[ | 153 | {tag:'div', cls:'header', children:[ |
160 | {tag:'h1', html:"Welcome"}, | 154 | {tag:'h1', html:"Welcome"}, |
161 | {tag:'a', cls:'lockButton', href:'#', id:this.getId('lock'), html:' '} | 155 | {tag:'a', cls:'lockButton', href:'#', id:this.getId('lock'), html:' '} |
162 | ]}, | 156 | ]}, |
163 | {tag:'div', cls:'body', children:[ | 157 | {tag:'div', cls:'body', children:[ |
164 | {tag:'h3', id:this.getId('username'), html:""}, | 158 | {tag:'h3', id:this.getId('username'), html:""}, |
165 | {tag:'ul', children:[ | 159 | {tag:'ul', children:[ |
166 | {tag:'li', id:this.getId('cards'), children:[ | 160 | {tag:'li', id:this.getId('cards'), children:[ |
167 | {tag:'span', id:this.getId('cardsNumber'), cls:'number', html:"-"}, | 161 | {tag:'span', id:this.getId('cardsNumber'), cls:'number', html:"-"}, |
168 | {tag:'span', id:this.getId('cardsLabel'), html:"cards"} | 162 | {tag:'span', id:this.getId('cardsLabel'), html:"cards"} |
169 | ]}, | 163 | ]}, |
170 | {tag:'li', id:this.getId('directLogins'), children:[ | 164 | {tag:'li', id:this.getId('directLogins'), children:[ |
171 | {tag:'span', id:this.getId('directLoginsNumber'), cls:'number', html:"-"}, | 165 | {tag:'span', id:this.getId('directLoginsNumber'), cls:'number', html:"-"}, |
172 | {tag:'span', id:this.getId('directLoginsLabel'), html:"direct logins"} | 166 | {tag:'span', id:this.getId('directLoginsLabel'), html:"direct logins"} |
173 | ]} | 167 | ]} |
174 | ]}, | 168 | ]}, |
175 | {tag:'a', href:'#', id:this.getId('logout'), html:"logout >"} | 169 | {tag:'a', href:'#', id:this.getId('logout'), html:"logout >"} |
176 | ]}, | 170 | ]}, |
177 | {tag:'div', cls:'footer'} | 171 | {tag:'div', cls:'footer'} |
178 | ]); | 172 | ]); |
179 | 173 | ||
180 | MochiKit.Signal.connect(this.getElement('logout'), 'onclick', this, 'handleLogout'); | 174 | MochiKit.Signal.connect(this.getElement('logout'), 'onclick', this, 'handleLogout'); |
181 | MochiKit.Signal.connect(this.getElement('lock'), 'onclick', this, 'toggleLock'); | 175 | MochiKit.Signal.connect(this.getElement('lock'), 'onclick', this, 'toggleLock'); |
182 | 176 | ||
183 | this._lockTooltip = new Clipperz.PM.UI.Common.Components.Tooltip({ | 177 | this._lockTooltip = new Clipperz.PM.UI.Common.Components.Tooltip({ |
184 | element:this.getElement('lock'), | 178 | element:this.getElement('lock'), |
185 | text: "Click here to lock/unlock your account.", | 179 | text: "Click here to lock/unlock your account.", |
186 | position:'RIGHT' | 180 | position:'RIGHT' |
187 | }); | 181 | }); |
188 | 182 | ||
189 | Clipperz.DOM.Helper.append(MochiKit.DOM.currentDocument().body, | 183 | Clipperz.DOM.Helper.append(MochiKit.DOM.currentDocument().body, |
190 | {tag:'div', id:this.getId('modalDialogWrapper'), cls:'modalDialogWrapper', children:[ | 184 | {tag:'div', id:this.getId('modalDialogWrapper'), cls:'modalDialogWrapper', children:[ |
191 | {tag:'div', id:this.getId('modalDialogMask'), cls:'modalDialogMask userInfoBoxMask'} | 185 | {tag:'div', id:this.getId('modalDialogMask'), cls:'modalDialogMask userInfoBoxMask'} |
192 | ]} | 186 | ]} |
193 | ); | 187 | ); |
194 | MochiKit.Style.hideElement(this.getId('modalDialogMask')); | 188 | MochiKit.Style.hideElement(this.getId('modalDialogMask')); |
195 | 189 | ||
196 | // this.drawUserInfoBackground(this.getElement('canvas')); | 190 | // this.drawUserInfoBackground(this.getElement('canvas')); |
197 | }, | 191 | }, |
198 | 192 | ||
199 | //------------------------------------------------------------------------- | 193 | //------------------------------------------------------------------------- |
200 | /* | 194 | /* |
201 | 'drawUserInfoBackground': function (canvas) { | 195 | 'drawUserInfoBackground': function (canvas) { |
202 | var kMyDrawingFunctionWidth = 188.0; | 196 | var kMyDrawingFunctionWidth = 188.0; |
203 | var kMyDrawingFunctionHeight = 154.0; | 197 | var kMyDrawingFunctionHeight = 154.0; |
204 | 198 | ||
205 | var context = canvas.getContext("2d"); | 199 | var context = canvas.getContext("2d"); |
206 | var color; | 200 | var color; |
207 | var resolution; | 201 | var resolution; |
208 | var alignStroke; | 202 | var alignStroke; |
209 | var path; | 203 | var path; |
210 | var pointX; | 204 | var pointX; |
211 | var pointY; | 205 | var pointY; |
212 | var controlPoint1X; | 206 | var controlPoint1X; |
213 | var controlPoint1Y; | 207 | var controlPoint1Y; |