summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers
Unidiff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Controllers') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js15
10 files changed, 60 insertions, 90 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js
index 05563bf..9a0e744 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js
@@ -1,120 +1,117 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer to http://www.clipperz.com.
12 9
13* Javascript Crypto Library is free software: you can redistribute 10* Clipperz Community Edition is free software: you can redistribute
14 it and/or modify it under the terms of the GNU Affero General Public 11 it and/or modify it under the terms of the GNU Affero General Public
15 License as published by the Free Software Foundation, either version 12 License as published by the Free Software Foundation, either version
16 3 of the License, or (at your option) any later version. 13 3 of the License, or (at your option) any later version.
17 14
18* Javascript Crypto Library is distributed in the hope that it will 15* Clipperz Community Edition is distributed in the hope that it will
19 be useful, but WITHOUT ANY WARRANTY; without even the implied 16 be useful, but WITHOUT ANY WARRANTY; without even the implied
20 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 See the GNU Affero General Public License for more details. 18 See the GNU Affero General Public License for more details.
22 19
23* You should have received a copy of the GNU Affero General Public 20* You should have received a copy of the GNU Affero General Public
24 License along with Javascript Crypto Library. If not, see 21 License along with Clipperz Community Edition. If not, see
25 <http://www.gnu.org/licenses/>. 22 <http://www.gnu.org/licenses/>.
26 23
27*/ 24*/
28 25
29Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); 26Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers');
30 27
31Clipperz.PM.UI.Web.Controllers.AppController = function(args) { 28Clipperz.PM.UI.Web.Controllers.AppController = function(args) {
32 29
33 this._user = null; 30 this._user = null;
34 this._tabSlotNames = { 31 this._tabSlotNames = {
35 //tabName: slotName 32 //tabName: slotName
36 'cards': 'cardGrid', 33 'cards': 'cardGrid',
37 // 'directLogins':'directLoginGrid', 34 // 'directLogins':'directLoginGrid',
38 'account': 'accountPanel', 35 'account': 'accountPanel',
39 'data': 'dataPanel', 36 'data': 'dataPanel',
40 'tools': 'toolsPanel' 37 'tools': 'toolsPanel'
41 }; 38 };
42 39
43 //controllers 40 //controllers
44 this._cardsController= null; 41 this._cardsController= null;
45 //this._directLoginsController = null; 42 //this._directLoginsController = null;
46 this._filterController = null; //new Clipperz.PM.UI.Web.Controllers.FilterController(); 43 this._filterController = null; //new Clipperz.PM.UI.Web.Controllers.FilterController();
47 44
48 //components 45 //components
49 this._appPage = null; 46 this._appPage = null;
50 this._userInfoBox = null; 47 this._userInfoBox = null;
51 this._tabSidePanel = null; 48 this._tabSidePanel = null;
52 49
53 // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'editCard', this, 'handleEditCard'); 50 // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'editCard', this, 'handleEditCard');
54 // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'deleteCard',this, 'handleDeleteCard'); 51 // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'deleteCard',this, 'handleDeleteCard');
55 52
56 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userDataSuccessfullySaved',this, 'userDataSuccessfullySavedHandler'); 53 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userDataSuccessfullySaved',this, 'userDataSuccessfullySavedHandler');
57 54
58 return this; 55 return this;
59} 56}
60 57
61MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.AppController.prototype, { 58MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.AppController.prototype, {
62 59
63 'toString': function() { 60 'toString': function() {
64 return "Clipperz.PM.UI.Web.Controllers.AppController"; 61 return "Clipperz.PM.UI.Web.Controllers.AppController";
65 }, 62 },
66 63
67 //----------------------------------------------------------------------------- 64 //-----------------------------------------------------------------------------
68 65
69 'setUser': function(anUser) { 66 'setUser': function(anUser) {
70 this._user = anUser; 67 this._user = anUser;
71 }, 68 },
72 69
73 'user': function() { 70 'user': function() {
74 return this._user; 71 return this._user;
75 }, 72 },
76 73
77 //----------------------------------------------------------------------------- 74 //-----------------------------------------------------------------------------
78 /* 75 /*
79 'tabSlotNames': function() { 76 'tabSlotNames': function() {
80 return this._tabSlotNames; 77 return this._tabSlotNames;
81 }, 78 },
82*/ 79*/
83 'slotNameForTab': function(aTabName) { 80 'slotNameForTab': function(aTabName) {
84 return this._tabSlotNames[aTabName]; 81 return this._tabSlotNames[aTabName];
85 }, 82 },
86 83
87 'hideAllAppPageTabSlots': function() { 84 'hideAllAppPageTabSlots': function() {
88 var aTabName; 85 var aTabName;
89 86
90 for (aTabName in this._tabSlotNames) { 87 for (aTabName in this._tabSlotNames) {
91 this.appPage().hideSlot(this.slotNameForTab(aTabName)); 88 this.appPage().hideSlot(this.slotNameForTab(aTabName));
92 } 89 }
93 }, 90 },
94 91
95 //----------------------------------------------------------------------------- 92 //-----------------------------------------------------------------------------
96 93
97 'appPage': function() { 94 'appPage': function() {
98 if (this._appPage == null) { 95 if (this._appPage == null) {
99 this._appPage = new Clipperz.PM.UI.Web.Components.AppPage(); 96 this._appPage = new Clipperz.PM.UI.Web.Components.AppPage();
100 } 97 }
101 98
102 return this._appPage; 99 return this._appPage;
103 }, 100 },
104 101
105 //----------------------------------------------------------------------------- 102 //-----------------------------------------------------------------------------
106 103
107 'tabSidePanel': function() { 104 'tabSidePanel': function() {
108 if (this._tabSidePanel == null) { 105 if (this._tabSidePanel == null) {
109 this._tabSidePanel = new Clipperz.PM.UI.Web.Components.TabSidePanel(); 106 this._tabSidePanel = new Clipperz.PM.UI.Web.Components.TabSidePanel();
110 } 107 }
111 108
112 return this._tabSidePanel; 109 return this._tabSidePanel;
113 }, 110 },
114 111
115 //----------------------------------------------------------------------------- 112 //-----------------------------------------------------------------------------
116 113
117 'userInfoBox': function() { 114 'userInfoBox': function() {
118 if (this._userInfoBox == null) { 115 if (this._userInfoBox == null) {
119 this._userInfoBox = new Clipperz.PM.UI.Web.Components.UserInfoBox(); 116 this._userInfoBox = new Clipperz.PM.UI.Web.Components.UserInfoBox();
120 117
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js
index 2340aeb..effde31 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js
@@ -1,120 +1,117 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer to http://www.clipperz.com.
12 9
13* Javascript Crypto Library is free software: you can redistribute 10* Clipperz Community Edition is free software: you can redistribute
14 it and/or modify it under the terms of the GNU Affero General Public 11 it and/or modify it under the terms of the GNU Affero General Public
15 License as published by the Free Software Foundation, either version 12 License as published by the Free Software Foundation, either version
16 3 of the License, or (at your option) any later version. 13 3 of the License, or (at your option) any later version.
17 14
18* Javascript Crypto Library is distributed in the hope that it will 15* Clipperz Community Edition is distributed in the hope that it will
19 be useful, but WITHOUT ANY WARRANTY; without even the implied 16 be useful, but WITHOUT ANY WARRANTY; without even the implied
20 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 See the GNU Affero General Public License for more details. 18 See the GNU Affero General Public License for more details.
22 19
23* You should have received a copy of the GNU Affero General Public 20* You should have received a copy of the GNU Affero General Public
24 License along with Javascript Crypto Library. If not, see 21 License along with Clipperz Community Edition. If not, see
25 <http://www.gnu.org/licenses/>. 22 <http://www.gnu.org/licenses/>.
26 23
27*/ 24*/
28 25
29Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); 26Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers');
30 27
31Clipperz.PM.UI.Web.Controllers.CardDialogController = function(args) { 28Clipperz.PM.UI.Web.Controllers.CardDialogController = function(args) {
32 args = args || {}; 29 args = args || {};
33 30
34 Clipperz.PM.UI.Web.Controllers.CardDialogController.superclass.constructor.call(this, args); 31 Clipperz.PM.UI.Web.Controllers.CardDialogController.superclass.constructor.call(this, args);
35 32
36 this._record = args.record || Clipperz.Base.exception.raise('MandatoryParameter'); 33 this._record = args.record || Clipperz.Base.exception.raise('MandatoryParameter');
37 this._delegate = args.delegate || Clipperz.Base.exception.raise('MandatoryParameter'); 34 this._delegate = args.delegate || Clipperz.Base.exception.raise('MandatoryParameter');
38 35
39 this._referenceElement = null; 36 this._referenceElement = null;
40 this._cardDialogComponent = null; 37 this._cardDialogComponent = null;
41 38
42 this._fieldsReferences = {}; 39 this._fieldsReferences = {};
43 this._directLoginReferences = {}; 40 this._directLoginReferences = {};
44 41
45 this._directLoginWizardController = null; 42 this._directLoginWizardController = null;
46 this._directLoginEditingComponent = null; 43 this._directLoginEditingComponent = null;
47 this._isDirectLoginEditingComponentVisible = false; 44 this._isDirectLoginEditingComponentVisible = false;
48 45
49 return this; 46 return this;
50}; 47};
51 48
52Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.CardDialogController, Object, { 49Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.CardDialogController, Object, {
53 50
54 'toString': function() { 51 'toString': function() {
55 return "Clipperz.PM.UI.Web.Controllers.CardDialogController"; 52 return "Clipperz.PM.UI.Web.Controllers.CardDialogController";
56 }, 53 },
57 54
58 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
59 56
60 'record': function () { 57 'record': function () {
61 return this._record; 58 return this._record;
62 }, 59 },
63 60
64 'delegate': function () { 61 'delegate': function () {
65 return this._delegate; 62 return this._delegate;
66 }, 63 },
67 64
68 //------------------------------------------------------------------------- 65 //-------------------------------------------------------------------------
69 66
70 'fieldsReferences': function () { 67 'fieldsReferences': function () {
71 return this._fieldsReferences; 68 return this._fieldsReferences;
72 }, 69 },
73 70
74 'directLoginReferences': function () { 71 'directLoginReferences': function () {
75 return this._directLoginReferences; 72 return this._directLoginReferences;
76 }, 73 },
77 74
78 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
79 76
80 'referenceElement': function () { 77 'referenceElement': function () {
81 return this._referenceElement; 78 return this._referenceElement;
82 }, 79 },
83 80
84 'setReferenceElement': function (anElement) { 81 'setReferenceElement': function (anElement) {
85 this._referenceElement = anElement; 82 this._referenceElement = anElement;
86 }, 83 },
87 84
88 //------------------------------------------------------------------------- 85 //-------------------------------------------------------------------------
89 86
90 'cardDialogComponent': function () { 87 'cardDialogComponent': function () {
91 if (this._cardDialogComponent == null) { 88 if (this._cardDialogComponent == null) {
92 this._cardDialogComponent = new Clipperz.PM.UI.Web.Components.CardDialogComponent(); 89 this._cardDialogComponent = new Clipperz.PM.UI.Web.Components.CardDialogComponent();
93 90
94 MochiKit.Signal.connect(this._cardDialogComponent, 'cancel', this, 'handleCancel'); 91 MochiKit.Signal.connect(this._cardDialogComponent, 'cancel', this, 'handleCancel');
95 MochiKit.Signal.connect(this._cardDialogComponent, 'save', this, 'handleSave'); 92 MochiKit.Signal.connect(this._cardDialogComponent, 'save', this, 'handleSave');
96 93
97 MochiKit.Signal.connect(this._cardDialogComponent, 'addField', this, 'handleAddField'); 94 MochiKit.Signal.connect(this._cardDialogComponent, 'addField', this, 'handleAddField');
98 MochiKit.Signal.connect(this._cardDialogComponent, 'changedValue',this, 'handleChangedValue'); 95 MochiKit.Signal.connect(this._cardDialogComponent, 'changedValue',this, 'handleChangedValue');
99 96
100 MochiKit.Signal.connect(this._cardDialogComponent, 'addDirectLogin',this, 'handleAddDirectLogin'); 97 MochiKit.Signal.connect(this._cardDialogComponent, 'addDirectLogin',this, 'handleAddDirectLogin');
101 MochiKit.Signal.connect(this._cardDialogComponent, 'keyPressed',this, 'handleCardDialogComponentKeyPressed'); 98 MochiKit.Signal.connect(this._cardDialogComponent, 'keyPressed',this, 'handleCardDialogComponentKeyPressed');
102 } 99 }
103 100
104 return this._cardDialogComponent; 101 return this._cardDialogComponent;
105 }, 102 },
106 103
107 //========================================================================= 104 //=========================================================================
108 105
109 'directLoginWizardController': function () { 106 'directLoginWizardController': function () {
110 if (this._directLoginWizardController == null) { 107 if (this._directLoginWizardController == null) {
111 this._directLoginWizardController = new Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController({ 108 this._directLoginWizardController = new Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController({
112 'cardLabel': this.cardDialogComponent().title(), 109 'cardLabel': this.cardDialogComponent().title(),
113 'directLoginEditingComponent': this.directLoginEditingComponent() 110 'directLoginEditingComponent': this.directLoginEditingComponent()
114 }) 111 })
115 112
116 MochiKit.Signal.connect(this._directLoginWizardController, 'exit',this, 'handleHideDirectLoginEditingComponent'); 113 MochiKit.Signal.connect(this._directLoginWizardController, 'exit',this, 'handleHideDirectLoginEditingComponent');
117 MochiKit.Signal.connect(this._directLoginWizardController, 'done',this, 'handleCompleteDirectLoginEditingComponent'); 114 MochiKit.Signal.connect(this._directLoginWizardController, 'done',this, 'handleCompleteDirectLoginEditingComponent');
118 } 115 }
119 116
120 return this._directLoginWizardController; 117 return this._directLoginWizardController;
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js
index b1a34b2..f58f0b8 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardsController.js
@@ -1,120 +1,117 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer to http://www.clipperz.com.
12 9
13* Javascript Crypto Library is free software: you can redistribute 10* Clipperz Community Edition is free software: you can redistribute
14 it and/or modify it under the terms of the GNU Affero General Public 11 it and/or modify it under the terms of the GNU Affero General Public
15 License as published by the Free Software Foundation, either version 12 License as published by the Free Software Foundation, either version
16 3 of the License, or (at your option) any later version. 13 3 of the License, or (at your option) any later version.
17 14
18* Javascript Crypto Library is distributed in the hope that it will 15* Clipperz Community Edition is distributed in the hope that it will
19 be useful, but WITHOUT ANY WARRANTY; without even the implied 16 be useful, but WITHOUT ANY WARRANTY; without even the implied
20 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 See the GNU Affero General Public License for more details. 18 See the GNU Affero General Public License for more details.
22 19
23* You should have received a copy of the GNU Affero General Public 20* You should have received a copy of the GNU Affero General Public
24 License along with Javascript Crypto Library. If not, see 21 License along with Clipperz Community Edition. If not, see
25 <http://www.gnu.org/licenses/>. 22 <http://www.gnu.org/licenses/>.
26 23
27*/ 24*/
28 25
29Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); 26Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers');
30 27
31Clipperz.PM.UI.Web.Controllers.CardsController = function() { 28Clipperz.PM.UI.Web.Controllers.CardsController = function() {
32 Clipperz.PM.UI.Web.Controllers.CardsController.superclass.constructor.apply(this, arguments); 29 Clipperz.PM.UI.Web.Controllers.CardsController.superclass.constructor.apply(this, arguments);
33 30
34 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'cardDialogComponentClosed', this, 'handleHideCard'); 31 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'cardDialogComponentClosed', this, 'handleHideCard');
35 32
36 return this; 33 return this;
37} 34}
38 35
39Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.CardsController, Clipperz.PM.UI.Web.Controllers.GridController, { 36Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.CardsController, Clipperz.PM.UI.Web.Controllers.GridController, {
40 37
41 'toString': function() { 38 'toString': function() {
42 return "Clipperz.PM.UI.Web.Controllers.CardsController"; 39 return "Clipperz.PM.UI.Web.Controllers.CardsController";
43 }, 40 },
44 41
45 'createGrid': function () { 42 'createGrid': function () {
46 var grid; 43 var grid;
47 44
48 grid = new Clipperz.PM.UI.Web.Components.GridComponent({columnsManagers: [ 45 grid = new Clipperz.PM.UI.Web.Components.GridComponent({columnsManagers: [
49 new Clipperz.PM.UI.Web.Components.FaviconColumnManager({ 46 new Clipperz.PM.UI.Web.Components.FaviconColumnManager({
50 'name': 'Cards.favicon', 47 'name': 'Cards.favicon',
51 'selector': MochiKit.Base.methodcaller('favicon'), 48 'selector': MochiKit.Base.methodcaller('favicon'),
52 'cssClass': 'favicon' 49 'cssClass': 'favicon'
53 }), 50 }),
54 new Clipperz.PM.UI.Web.Components.LinkColumnManager({ 51 new Clipperz.PM.UI.Web.Components.LinkColumnManager({
55 'name': 'Cards.title', 52 'name': 'Cards.title',
56 'selector': MochiKit.Base.methodcaller('label'), 53 'selector': MochiKit.Base.methodcaller('label'),
57 'label': 'title', 54 'label': 'title',
58 'cssClass': 'title', 55 'cssClass': 'title',
59 'comparator': Clipperz.Base.caseInsensitiveCompare, 56 'comparator': Clipperz.Base.caseInsensitiveCompare,
60 'sortable': true, 57 'sortable': true,
61 'sorted': 'ASCENDING', 58 'sorted': 'ASCENDING',
62 // 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'editCard', {objectData:anObject, element:anEvent.src()})} 59 // 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'editCard', {objectData:anObject, element:anEvent.src()})}
63 'actionMethod': MochiKit.Base.method(this, 'handleShowCard') 60 'actionMethod': MochiKit.Base.method(this, 'handleShowCard')
64 }), 61 }),
65 new Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager({ 62 new Clipperz.PM.UI.Web.Components.DirectLoginsColumnManager({
66 'name': 'Cards.directLogins', 63 'name': 'Cards.directLogins',
67 'selector': MochiKit.Base.methodcaller('directLoginReferences'), 64 'selector': MochiKit.Base.methodcaller('directLoginReferences'),
68 'label': 'direct logins', 65 'label': 'direct logins',
69 'cssClass': 'directLogin' 66 'cssClass': 'directLogin'
70 }), 67 }),
71 new Clipperz.PM.UI.Web.Components.DateColumnManager({ 68 new Clipperz.PM.UI.Web.Components.DateColumnManager({
72 'name': 'Cards.latestUpdate', 69 'name': 'Cards.latestUpdate',
73 'selector': MochiKit.Base.methodcaller('updateDate'), 70 'selector': MochiKit.Base.methodcaller('updateDate'),
74 'label': 'latest update', 71 'label': 'latest update',
75 'cssClass': 'latestUpdate', 72 'cssClass': 'latestUpdate',
76 'format': 'd-m-Y', 73 'format': 'd-m-Y',
77 'comparator': MochiKit.Base.compare, 74 'comparator': MochiKit.Base.compare,
78 'sortable': true, 75 'sortable': true,
79 'sorted': 'UNSORTED' 76 'sorted': 'UNSORTED'
80 }), 77 }),
81 new Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager({ 78 new Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager({
82 'name': 'Cards.delete', 79 'name': 'Cards.delete',
83 'selector': MochiKit.Base.noop, 80 'selector': MochiKit.Base.noop,
84 'cssClass': 'delete', 81 'cssClass': 'delete',
85 // 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'deleteCard', {objectData:anObject, element:anEvent.src()})} 82 // 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'deleteCard', {objectData:anObject, element:anEvent.src()})}
86 'actionMethod': MochiKit.Base.method(this, 'handleDeleteCard') 83 'actionMethod': MochiKit.Base.method(this, 'handleDeleteCard')
87 }) 84 })
88 ]}); 85 ]});
89 86
90 grid.setComponentForSlotNamed(new Clipperz.PM.UI.Web.Components.BookmarkletComponent(), 'headerSlot'); 87 grid.setComponentForSlotNamed(new Clipperz.PM.UI.Web.Components.BookmarkletComponent(), 'headerSlot');
91 88
92 return grid; 89 return grid;
93 }, 90 },
94 91
95 //----------------------------------------------------------------------------- 92 //-----------------------------------------------------------------------------
96 93
97 'getRows': function () { 94 'getRows': function () {
98 //TODO relying on user() in GridController, bad code smell :| 95 //TODO relying on user() in GridController, bad code smell :|
99 return this.user().getRecords(); 96 return this.user().getRecords();
100 }, 97 },
101 98
102 //============================================================================= 99 //=============================================================================
103 100
104 'displayEmptyContent': function () { 101 'displayEmptyContent': function () {
105 varemptyGridComponent; 102 varemptyGridComponent;
106 103
107 emptyGridComponent = new Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent(); 104 emptyGridComponent = new Clipperz.PM.UI.Web.Components.CreateNewCardSplashComponent();
108 105
109 return Clipperz.Async.callbacks("CardsController.displayEmptyContent", [ 106 return Clipperz.Async.callbacks("CardsController.displayEmptyContent", [
110 MochiKit.Base.method(this.grid(), 'setNoRowsGridComponent', emptyGridComponent), 107 MochiKit.Base.method(this.grid(), 'setNoRowsGridComponent', emptyGridComponent),
111 MochiKit.Base.bind(Clipperz.PM.UI.Web.Controllers.CardsController.superclass.displayEmptyContent, this) 108 MochiKit.Base.bind(Clipperz.PM.UI.Web.Controllers.CardsController.superclass.displayEmptyContent, this)
112 ], {trace:false}); 109 ], {trace:false});
113 }, 110 },
114 111
115 'displaySelectedRows': function (aFilter) { 112 'displaySelectedRows': function (aFilter) {
116 this.columnManagerWithName('Cards.directLogins').hideDirectLoginListPopup(); 113 this.columnManagerWithName('Cards.directLogins').hideDirectLoginListPopup();
117 114
118 return Clipperz.PM.UI.Web.Controllers.CardsController.superclass.displaySelectedRows.apply(this, arguments); 115 return Clipperz.PM.UI.Web.Controllers.CardsController.superclass.displaySelectedRows.apply(this, arguments);
119 }, 116 },
120 117
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js
index 38fdc08..c025a51 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginWizardController.js
@@ -1,120 +1,117 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer to http://www.clipperz.com.
12 9
13* Javascript Crypto Library is free software: you can redistribute 10* Clipperz Community Edition is free software: you can redistribute
14 it and/or modify it under the terms of the GNU Affero General Public 11 it and/or modify it under the terms of the GNU Affero General Public
15 License as published by the Free Software Foundation, either version 12 License as published by the Free Software Foundation, either version
16 3 of the License, or (at your option) any later version. 13 3 of the License, or (at your option) any later version.
17 14
18* Javascript Crypto Library is distributed in the hope that it will 15* Clipperz Community Edition is distributed in the hope that it will
19 be useful, but WITHOUT ANY WARRANTY; without even the implied 16 be useful, but WITHOUT ANY WARRANTY; without even the implied
20 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 See the GNU Affero General Public License for more details. 18 See the GNU Affero General Public License for more details.
22 19
23* You should have received a copy of the GNU Affero General Public 20* You should have received a copy of the GNU Affero General Public
24 License along with Javascript Crypto Library. If not, see 21 License along with Clipperz Community Edition. If not, see
25 <http://www.gnu.org/licenses/>. 22 <http://www.gnu.org/licenses/>.
26 23
27*/ 24*/
28 25
29Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); 26Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers');
30 27
31Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController = function(args) { 28Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController = function(args) {
32 this._directLoginEditingComponent = args.directLoginEditingComponent|| Clipperz.Base.exception.raise('MandatoryParameter'); 29 this._directLoginEditingComponent = args.directLoginEditingComponent|| Clipperz.Base.exception.raise('MandatoryParameter');
33 this._cardLabel = args.cardLabel || Clipperz.Base.exception.raise('MandatoryParameter'); 30 this._cardLabel = args.cardLabel || Clipperz.Base.exception.raise('MandatoryParameter');
34 31
35 MochiKit.Signal.connect(this._directLoginEditingComponent, 'changedValue',this, 'handleChangedValue'); 32 MochiKit.Signal.connect(this._directLoginEditingComponent, 'changedValue',this, 'handleChangedValue');
36 MochiKit.Signal.connect(this._directLoginEditingComponent, 'moveForward',this, 'handleMoveForward'); 33 MochiKit.Signal.connect(this._directLoginEditingComponent, 'moveForward',this, 'handleMoveForward');
37 MochiKit.Signal.connect(this._directLoginEditingComponent, 'keyPressed',this, 'handleDirectLoginEditingComponentKeyPressed'); 34 MochiKit.Signal.connect(this._directLoginEditingComponent, 'keyPressed',this, 'handleDirectLoginEditingComponentKeyPressed');
38 35
39 this._directLogin = null; 36 this._directLogin = null;
40 this._directLoginHasJustBeenAdded = false; 37 this._directLoginHasJustBeenAdded = false;
41 38
42 this._rulerComponent = null; 39 this._rulerComponent = null;
43 40
44 this._steps = null; 41 this._steps = null;
45 this._currentStepIndex = 0; 42 this._currentStepIndex = 0;
46 this._isNextEnabled = false; 43 this._isNextEnabled = false;
47 44
48 this._recordFields = null; 45 this._recordFields = null;
49 this._originalBindings = null; 46 this._originalBindings = null;
50 47
51 this._bindingComponents = []; 48 this._bindingComponents = [];
52 this._formValueComponents = []; 49 this._formValueComponents = [];
53 50
54 return this; 51 return this;
55} 52}
56 53
57MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController.prototype, { 54MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController.prototype, {
58 55
59 'toString': function() { 56 'toString': function() {
60 return "Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController"; 57 return "Clipperz.PM.UI.Web.Controllers.DirectLoginWizardController";
61 }, 58 },
62 59
63 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
64 61
65 'directLogin': function () { 62 'directLogin': function () {
66 return this._directLogin; 63 return this._directLogin;
67 }, 64 },
68 65
69 //------------------------------------------------------------------------- 66 //-------------------------------------------------------------------------
70 67
71 'directLoginHasJustBeenAdded': function () { 68 'directLoginHasJustBeenAdded': function () {
72 return this._directLoginHasJustBeenAdded; 69 return this._directLoginHasJustBeenAdded;
73 }, 70 },
74 71
75 'setDirectLoginHasJustBeenAdded': function (aValue) { 72 'setDirectLoginHasJustBeenAdded': function (aValue) {
76 this._directLoginHasJustBeenAdded = aValue; 73 this._directLoginHasJustBeenAdded = aValue;
77 }, 74 },
78 75
79 //------------------------------------------------------------------------- 76 //-------------------------------------------------------------------------
80 77
81 'directLoginEditingComponent': function () { 78 'directLoginEditingComponent': function () {
82 return this._directLoginEditingComponent; 79 return this._directLoginEditingComponent;
83 }, 80 },
84 81
85 //============================================================================= 82 //=============================================================================
86 83
87 'cardLabel': function () { 84 'cardLabel': function () {
88 return this._cardLabel; 85 return this._cardLabel;
89 }, 86 },
90 87
91 //============================================================================= 88 //=============================================================================
92 89
93 'resetCurrentStepIndex': function () { 90 'resetCurrentStepIndex': function () {
94 this._currentStepIndex = 0; 91 this._currentStepIndex = 0;
95 this.rulerComponent().resetStatus(); 92 this.rulerComponent().resetStatus();
96 }, 93 },
97 94
98 //----------------------------------------------------------------------------- 95 //-----------------------------------------------------------------------------
99 96
100 'enableNext': function (aValue) { 97 'enableNext': function (aValue) {
101 this.rulerComponent().enableNext(aValue); 98 this.rulerComponent().enableNext(aValue);
102 this._isNextEnabled = aValue; 99 this._isNextEnabled = aValue;
103 }, 100 },
104 101
105 'isNextEnabled': function () { 102 'isNextEnabled': function () {
106 return this._isNextEnabled; 103 return this._isNextEnabled;
107 }, 104 },
108 105
109 //----------------------------------------------------------------------------- 106 //-----------------------------------------------------------------------------
110 107
111 'enablePrevious': function (aValue) { 108 'enablePrevious': function (aValue) {
112 this.rulerComponent().enablePrevious(aValue); 109 this.rulerComponent().enablePrevious(aValue);
113 }, 110 },
114 111
115 //============================================================================= 112 //=============================================================================
116 113
117 'bindingComponents': function () { 114 'bindingComponents': function () {
118 return this._bindingComponents; 115 return this._bindingComponents;
119 }, 116 },
120 117
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.js
index 28401a2..6ca3be4 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/DirectLoginsController.js
@@ -1,120 +1,117 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer to http://www.clipperz.com.
12 9
13* Javascript Crypto Library is free software: you can redistribute 10* Clipperz Community Edition is free software: you can redistribute
14 it and/or modify it under the terms of the GNU Affero General Public 11 it and/or modify it under the terms of the GNU Affero General Public
15 License as published by the Free Software Foundation, either version 12 License as published by the Free Software Foundation, either version
16 3 of the License, or (at your option) any later version. 13 3 of the License, or (at your option) any later version.
17 14
18* Javascript Crypto Library is distributed in the hope that it will 15* Clipperz Community Edition is distributed in the hope that it will
19 be useful, but WITHOUT ANY WARRANTY; without even the implied 16 be useful, but WITHOUT ANY WARRANTY; without even the implied
20 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 See the GNU Affero General Public License for more details. 18 See the GNU Affero General Public License for more details.
22 19
23* You should have received a copy of the GNU Affero General Public 20* You should have received a copy of the GNU Affero General Public
24 License along with Javascript Crypto Library. If not, see 21 License along with Clipperz Community Edition. If not, see
25 <http://www.gnu.org/licenses/>. 22 <http://www.gnu.org/licenses/>.
26 23
27*/ 24*/
28 25
29/* 26/*
30Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); 27Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers');
31 28
32Clipperz.PM.UI.Web.Controllers.DirectLoginsController = function() { 29Clipperz.PM.UI.Web.Controllers.DirectLoginsController = function() {
33 Clipperz.PM.UI.Web.Controllers.DirectLoginsController.superclass.constructor.apply(this, arguments); 30 Clipperz.PM.UI.Web.Controllers.DirectLoginsController.superclass.constructor.apply(this, arguments);
34 31
35 return this; 32 return this;
36}; 33};
37 34
38Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.DirectLoginsController, Clipperz.PM.UI.Web.Controllers.GridController, { 35Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.DirectLoginsController, Clipperz.PM.UI.Web.Controllers.GridController, {
39 36
40 'createGrid': function () { 37 'createGrid': function () {
41 return new Clipperz.PM.UI.Web.Components.GridComponent({columnsManagers: [ 38 return new Clipperz.PM.UI.Web.Components.GridComponent({columnsManagers: [
42 new Clipperz.PM.UI.Web.Components.FaviconColumnManager({ 39 new Clipperz.PM.UI.Web.Components.FaviconColumnManager({
43 'name': 'DirectLogins.favicon', 40 'name': 'DirectLogins.favicon',
44 'selector': MochiKit.Base.methodcaller('favicon'), 41 'selector': MochiKit.Base.methodcaller('favicon'),
45 'cssClass': 'favicon' 42 'cssClass': 'favicon'
46 }), 43 }),
47 // new Clipperz.PM.UI.Web.Components.LinkColumnManager({ 44 // new Clipperz.PM.UI.Web.Components.LinkColumnManager({
48 new Clipperz.PM.UI.Web.Components.DirectLoginColumnManager({ 45 new Clipperz.PM.UI.Web.Components.DirectLoginColumnManager({
49 'name': 'DirectLogins.title', 46 'name': 'DirectLogins.title',
50 'selector': MochiKit.Base.methodcaller('label'), 47 'selector': MochiKit.Base.methodcaller('label'),
51 'label': 'title', 48 'label': 'title',
52 'cssClass': 'title', 49 'cssClass': 'title',
53 'comparator': Clipperz.Base.caseInsensitiveCompare, 50 'comparator': Clipperz.Base.caseInsensitiveCompare,
54 'sortable': true, 51 'sortable': true,
55 'sorted': 'ASCENDING', 52 'sorted': 'ASCENDING',
56 'actionMethod': MochiKit.Base.methodcaller('runDirectLogin') 53 'actionMethod': MochiKit.Base.methodcaller('runDirectLogin')
57 }), 54 }),
58 // new Clipperz.PM.UI.Web.Components.TextColumnManager({ //should be StrengthColumnManager 55 // new Clipperz.PM.UI.Web.Components.TextColumnManager({ //should be StrengthColumnManager
59 // 'label':'strength', 56 // 'label':'strength',
60 // 'cssClass':'title', 57 // 'cssClass':'title',
61 // 'selector': MochiKit.Base.methodcaller('label') //should be 'strength' or a strenght evaluation function 58 // 'selector': MochiKit.Base.methodcaller('label') //should be 'strength' or a strenght evaluation function
62 // }), 59 // }),
63 new Clipperz.PM.UI.Web.Components.LinkColumnManager({ 60 new Clipperz.PM.UI.Web.Components.LinkColumnManager({
64 'name': 'DirectLogins.cardTitle', 61 'name': 'DirectLogins.cardTitle',
65 'selector': MochiKit.Base.compose(MochiKit.Base.methodcaller('label'), MochiKit.Base.methodcaller('record')), 62 'selector': MochiKit.Base.compose(MochiKit.Base.methodcaller('label'), MochiKit.Base.methodcaller('record')),
66 'label': 'card', 63 'label': 'card',
67 'cssClass': 'cardTitle', 64 'cssClass': 'cardTitle',
68 'comparator': Clipperz.Base.caseInsensitiveCompare, 65 'comparator': Clipperz.Base.caseInsensitiveCompare,
69 'sortable': true, 66 'sortable': true,
70 'sorted': 'UNSORTED', 67 'sorted': 'UNSORTED',
71 'actionMethod': MochiKit.Base.method(this, 'handleShowCard') 68 'actionMethod': MochiKit.Base.method(this, 'handleShowCard')
72 }), 69 }),
73 // new Clipperz.PM.UI.Web.Components.TextColumnManager({ //should be StrengthColumnManager 70 // new Clipperz.PM.UI.Web.Components.TextColumnManager({ //should be StrengthColumnManager
74 // 'label':'last access', 71 // 'label':'last access',
75 // 'cssClass':'title', 72 // 'cssClass':'title',
76 // 'selector': MochiKit.Base.methodcaller('label') 73 // 'selector': MochiKit.Base.methodcaller('label')
77 // // 'sortable': true, 74 // // 'sortable': true,
78 // // 'sorted': 'UNSORTED' 75 // // 'sorted': 'UNSORTED'
79 // }), 76 // }),
80 // new Clipperz.PM.UI.Web.Components.TextColumnManager({ 77 // new Clipperz.PM.UI.Web.Components.TextColumnManager({
81 // 'label':'commands', 78 // 'label':'commands',
82 // 'cssClass':'title', 79 // 'cssClass':'title',
83 // 'selector': MochiKit.Base.methodcaller('label'), //should be a function for commands display 80 // 'selector': MochiKit.Base.methodcaller('label'), //should be a function for commands display
84 // }), 81 // }),
85 new Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager({ 82 new Clipperz.PM.UI.Web.Components.DeleteObjectColumnManager({
86 'name': 'DirectLogins.delete', 83 'name': 'DirectLogins.delete',
87 'selector': MochiKit.Base.noop, 84 'selector': MochiKit.Base.noop,
88 'cssClass': 'delete', 85 'cssClass': 'delete',
89 // 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'deleteDirectLogin', {objectData:anObject, element:anEvent.src()})} 86 // 'actionMethod': function(anObject, anEvent) { MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'deleteDirectLogin', {objectData:anObject, element:anEvent.src()})}
90 'actionMethod': MochiKit.Base.method(this, 'handleDeleteDirectLogin') 87 'actionMethod': MochiKit.Base.method(this, 'handleDeleteDirectLogin')
91 }) 88 })
92 ]}); 89 ]});
93 90
94 }, 91 },
95 92
96 //----------------------------------------------------------------------------- 93 //-----------------------------------------------------------------------------
97 94
98 'getRows': function () { 95 'getRows': function () {
99 //TODO: relying on user() in GridController, bad code smell :| 96 //TODO: relying on user() in GridController, bad code smell :|
100 return this.user().getDirectLogins(); 97 return this.user().getDirectLogins();
101 }, 98 },
102 99
103 //----------------------------------------------------------------------------- 100 //-----------------------------------------------------------------------------
104 101
105 'handleShowCard': function (anObject, anEvent) { 102 'handleShowCard': function (anObject, anEvent) {
106 var cardDialogController; 103 var cardDialogController;
107 104
108 cardDialogController = new Clipperz.PM.UI.Web.Controllers.CardDialogController({record:anObject.record()}) 105 cardDialogController = new Clipperz.PM.UI.Web.Controllers.CardDialogController({record:anObject.record()})
109 cardDialogController.run(anEvent.src()); 106 cardDialogController.run(anEvent.src());
110 }, 107 },
111 108
112 //----------------------------------------------------------------------------- 109 //-----------------------------------------------------------------------------
113 110
114 'handleDeleteDirectLogin': function (anObject, anEvent) { 111 'handleDeleteDirectLogin': function (anObject, anEvent) {
115 var deferredResult; 112 var deferredResult;
116 var confirmationDialog; 113 var confirmationDialog;
117 114
118 confirmationDialog = new Clipperz.PM.UI.Common.Components.SimpleMessagePanel({ 115 confirmationDialog = new Clipperz.PM.UI.Common.Components.SimpleMessagePanel({
119 title:"Delete DirectLogin", 116 title:"Delete DirectLogin",
120 text:"Do you want to delete …", 117 text:"Do you want to delete …",
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js
index 13e02bc..bfc093a 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/FilterController.js
@@ -1,120 +1,117 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer to http://www.clipperz.com.
12 9
13* Javascript Crypto Library is free software: you can redistribute 10* Clipperz Community Edition is free software: you can redistribute
14 it and/or modify it under the terms of the GNU Affero General Public 11 it and/or modify it under the terms of the GNU Affero General Public
15 License as published by the Free Software Foundation, either version 12 License as published by the Free Software Foundation, either version
16 3 of the License, or (at your option) any later version. 13 3 of the License, or (at your option) any later version.
17 14
18* Javascript Crypto Library is distributed in the hope that it will 15* Clipperz Community Edition is distributed in the hope that it will
19 be useful, but WITHOUT ANY WARRANTY; without even the implied 16 be useful, but WITHOUT ANY WARRANTY; without even the implied
20 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 See the GNU Affero General Public License for more details. 18 See the GNU Affero General Public License for more details.
22 19
23* You should have received a copy of the GNU Affero General Public 20* You should have received a copy of the GNU Affero General Public
24 License along with Javascript Crypto Library. If not, see 21 License along with Clipperz Community Edition. If not, see
25 <http://www.gnu.org/licenses/>. 22 <http://www.gnu.org/licenses/>.
26 23
27*/ 24*/
28 25
29Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); 26Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers');
30 27
31Clipperz.PM.UI.Web.Controllers.FilterController = function(args) { 28Clipperz.PM.UI.Web.Controllers.FilterController = function(args) {
32 args = args || {}; 29 args = args || {};
33 30
34 Clipperz.PM.UI.Web.Controllers.FilterController.superclass.constructor.call(this, args); 31 Clipperz.PM.UI.Web.Controllers.FilterController.superclass.constructor.call(this, args);
35 32
36 this._filterElements = []; 33 this._filterElements = [];
37 this._filter = ""; 34 this._filter = "";
38 35
39 this._pendingSearchClicks = 0; 36 this._pendingSearchClicks = 0;
40 37
41 return this; 38 return this;
42}; 39};
43 40
44 41
45Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.FilterController, Object, { 42Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.FilterController, Object, {
46 43
47 //----------------------------------------------------------------------------- 44 //-----------------------------------------------------------------------------
48 45
49 'getFilter': function () { 46 'getFilter': function () {
50 return this._filter; 47 return this._filter;
51 }, 48 },
52 49
53 '_setFilter': function (aFilterElement, aFilter) { 50 '_setFilter': function (aFilterElement, aFilter) {
54 if (aFilter != this._filter) { 51 if (aFilter != this._filter) {
55 this._filter = aFilter; 52 this._filter = aFilter;
56 MochiKit.Signal.signal(this, 'filterUpdated', aFilter); 53 MochiKit.Signal.signal(this, 'filterUpdated', aFilter);
57 this.updateFilterElements(aFilterElement, aFilter); 54 this.updateFilterElements(aFilterElement, aFilter);
58 } 55 }
59 }, 56 },
60 57
61 'setFilter': function (aFilter) { 58 'setFilter': function (aFilter) {
62 this._setFilter(null, aFilter); 59 this._setFilter(null, aFilter);
63 }, 60 },
64 61
65 //----------------------------------------------------------------------------- 62 //-----------------------------------------------------------------------------
66 63
67 'filterElements': function () { 64 'filterElements': function () {
68 return this._filterElements; 65 return this._filterElements;
69 }, 66 },
70 67
71 'registerFilterElement': function (aFilterElement) { 68 'registerFilterElement': function (aFilterElement) {
72//Clipperz.log("=== FilterController.registerFilterElement", aFilterElement); 69//Clipperz.log("=== FilterController.registerFilterElement", aFilterElement);
73 this._filterElements.push(aFilterElement); 70 this._filterElements.push(aFilterElement);
74 MochiKit.Signal.connect(aFilterElement, 'onkeydown', this, 'searchClickHandler'); 71 MochiKit.Signal.connect(aFilterElement, 'onkeydown', this, 'searchClickHandler');
75 MochiKit.Signal.connect(aFilterElement, 'onfocus', this, 'searchClickHandler'); 72 MochiKit.Signal.connect(aFilterElement, 'onfocus', this, 'searchClickHandler');
76 }, 73 },
77 74
78 'removeFilterElement': function (aFilterElement) { 75 'removeFilterElement': function (aFilterElement) {
79 var i; 76 var i;
80 var filterElements; 77 var filterElements;
81 for (i=0; i < filterElements; i++) { 78 for (i=0; i < filterElements; i++) {
82 if (filterElements[i] == aFilterElement); 79 if (filterElements[i] == aFilterElement);
83 filterElements.splice(i, 1); 80 filterElements.splice(i, 1);
84 // TODO unregister/disconnect filterElement ??MochiKit.Signal.disconnect(this.grid().filterElement(), 'updateFilter', this.filterController(), 'handleUpdateFilter'); 81 // TODO unregister/disconnect filterElement ??MochiKit.Signal.disconnect(this.grid().filterElement(), 'updateFilter', this.filterController(), 'handleUpdateFilter');
85 } 82 }
86 }, 83 },
87 84
88 'updateFilterElements': function (aSourceElement, aFilterString) { 85 'updateFilterElements': function (aSourceElement, aFilterString) {
89 MochiKit.Iter.forEach(this.filterElements(), 86 MochiKit.Iter.forEach(this.filterElements(),
90 function (aFilterElement) { 87 function (aFilterElement) {
91 if (aFilterElement != aSourceElement) { 88 if (aFilterElement != aSourceElement) {
92 aFilterElement.value = aFilterString; 89 aFilterElement.value = aFilterString;
93 } 90 }
94 } 91 }
95 ); 92 );
96 93
97 if (aSourceElement != null) { 94 if (aSourceElement != null) {
98 aSourceElement.focus(); 95 aSourceElement.focus();
99 } 96 }
100 }, 97 },
101 98
102 //----------------------------------------------------------------------------- 99 //-----------------------------------------------------------------------------
103 100
104 'run': function () { 101 'run': function () {
105//Clipperz.log("=== FilterController.run"); 102//Clipperz.log("=== FilterController.run");
106 }, 103 },
107 104
108 //----------------------------------------------------------------------------- 105 //-----------------------------------------------------------------------------
109 106
110 'pendingSearchClicks': function () { 107 'pendingSearchClicks': function () {
111 return this._pendingSearchClicks; 108 return this._pendingSearchClicks;
112 }, 109 },
113 110
114 'incrementPendingSearchClicks': function () { 111 'incrementPendingSearchClicks': function () {
115 this._pendingSearchClicks++; 112 this._pendingSearchClicks++;
116 }, 113 },
117 114
118 'decrementPendingSearchClicks': function () { 115 'decrementPendingSearchClicks': function () {
119 this._pendingSearchClicks--; 116 this._pendingSearchClicks--;
120 }, 117 },
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js
index 740a091..8bb3016 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/GridController.js
@@ -1,120 +1,117 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer to http://www.clipperz.com.
12 9
13* Javascript Crypto Library is free software: you can redistribute 10* Clipperz Community Edition is free software: you can redistribute
14 it and/or modify it under the terms of the GNU Affero General Public 11 it and/or modify it under the terms of the GNU Affero General Public
15 License as published by the Free Software Foundation, either version 12 License as published by the Free Software Foundation, either version
16 3 of the License, or (at your option) any later version. 13 3 of the License, or (at your option) any later version.
17 14
18* Javascript Crypto Library is distributed in the hope that it will 15* Clipperz Community Edition is distributed in the hope that it will
19 be useful, but WITHOUT ANY WARRANTY; without even the implied 16 be useful, but WITHOUT ANY WARRANTY; without even the implied
20 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 See the GNU Affero General Public License for more details. 18 See the GNU Affero General Public License for more details.
22 19
23* You should have received a copy of the GNU Affero General Public 20* You should have received a copy of the GNU Affero General Public
24 License along with Javascript Crypto Library. If not, see 21 License along with Clipperz Community Edition. If not, see
25 <http://www.gnu.org/licenses/>. 22 <http://www.gnu.org/licenses/>.
26 23
27*/ 24*/
28 25
29Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); 26Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers');
30 27
31Clipperz.PM.UI.Web.Controllers.GridController = function(args) { 28Clipperz.PM.UI.Web.Controllers.GridController = function(args) {
32 args = args || {}; 29 args = args || {};
33 30
34 Clipperz.PM.UI.Web.Controllers.GridController.superclass.constructor.call(this, args); 31 Clipperz.PM.UI.Web.Controllers.GridController.superclass.constructor.call(this, args);
35 32
36 this._grid = null; 33 this._grid = null;
37 this._user = null; 34 this._user = null;
38 this._sortedColumnManager = null; 35 this._sortedColumnManager = null;
39 this._cachedObjects = null; 36 this._cachedObjects = null;
40 this._filterController = args.filterController || null; 37 this._filterController = args.filterController || null;
41 38
42 this._deferredDisplaySelectedRowsInvocation = null; 39 this._deferredDisplaySelectedRowsInvocation = null;
43 40
44 return this; 41 return this;
45}; 42};
46 43
47Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.GridController, Object, { 44Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.GridController, Object, {
48 45
49 'toString': function() { 46 'toString': function() {
50 return "Clipperz.PM.UI.Web.Controllers.GridController"; 47 return "Clipperz.PM.UI.Web.Controllers.GridController";
51 }, 48 },
52 49
53 //----------------------------------------------------------------------------- 50 //-----------------------------------------------------------------------------
54 51
55 'createGrid': function () { 52 'createGrid': function () {
56 throw Clipperz.Base.exception.AbstractMethod; 53 throw Clipperz.Base.exception.AbstractMethod;
57 }, 54 },
58 55
59 'setupWithGrid': function (aGrid) { 56 'setupWithGrid': function (aGrid) {
60 this._grid = aGrid; 57 this._grid = aGrid;
61 58
62 if (this._grid != null) { 59 if (this._grid != null) {
63 MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) { 60 MochiKit.Iter.forEach(this.columnsManagers(), function (aColumnManager) {
64 if (aColumnManager.isSortable()) { 61 if (aColumnManager.isSortable()) {
65 if (aColumnManager.isSorted()) { 62 if (aColumnManager.isSorted()) {
66 this.setSortedColumnManager(aColumnManager); 63 this.setSortedColumnManager(aColumnManager);
67 } 64 }
68 MochiKit.Signal.connect(aColumnManager, 'sort', this, 'handleColumnManagerSort'); 65 MochiKit.Signal.connect(aColumnManager, 'sort', this, 'handleColumnManagerSort');
69 } 66 }
70 MochiKit.Signal.connect(aColumnManager, 'selectRow', this, 'handleColumnManagerSelectRow'); 67 MochiKit.Signal.connect(aColumnManager, 'selectRow', this, 'handleColumnManagerSelectRow');
71 MochiKit.Signal.connect(aColumnManager, 'unselectRow', this, 'handleColumnManagerUnselectRow'); 68 MochiKit.Signal.connect(aColumnManager, 'unselectRow', this, 'handleColumnManagerUnselectRow');
72 }, this); 69 }, this);
73 } 70 }
74 }, 71 },
75 72
76 'grid': function() { 73 'grid': function() {
77 if (this._grid == null) { 74 if (this._grid == null) {
78 this.setupWithGrid(this.createGrid()); 75 this.setupWithGrid(this.createGrid());
79 } 76 }
80 77
81 return this._grid; 78 return this._grid;
82 }, 79 },
83 80
84 'filterController': function () { 81 'filterController': function () {
85//Clipperz.log('GridController.filterController >>>', this._filterController); 82//Clipperz.log('GridController.filterController >>>', this._filterController);
86 if (this._filterController == null) { 83 if (this._filterController == null) {
87 this._filterController = new Clipperz.PM.UI.Web.Controllers.FilterController(); 84 this._filterController = new Clipperz.PM.UI.Web.Controllers.FilterController();
88 } 85 }
89//Clipperz.log('GridController.filterController <<<', this._filterController); 86//Clipperz.log('GridController.filterController <<<', this._filterController);
90 return this._filterController; 87 return this._filterController;
91 }, 88 },
92 89
93 //----------------------------------------------------------------------------- 90 //-----------------------------------------------------------------------------
94 91
95 'columnsManagers': function () { 92 'columnsManagers': function () {
96 return this.grid().columnsManagers(); 93 return this.grid().columnsManagers();
97 }, 94 },
98 95
99 'columnManagerWithName': function (aName) { 96 'columnManagerWithName': function (aName) {
100 varmanagers; 97 varmanagers;
101 var result; 98 var result;
102 99
103 managers = MochiKit.Base.filter(function (aManager) { return aManager.name() == aName; } , this.columnsManagers()); 100 managers = MochiKit.Base.filter(function (aManager) { return aManager.name() == aName; } , this.columnsManagers());
104 101
105 if (managers.length == 1) { 102 if (managers.length == 1) {
106 result = managers[0]; 103 result = managers[0];
107 } else if (managers.length == 0) { 104 } else if (managers.length == 0) {
108 result = null; 105 result = null;
109 } else { 106 } else {
110 throw "WTF!!!"; 107 throw "WTF!!!";
111 } 108 }
112 109
113 return result; 110 return result;
114 }, 111 },
115 112
116 'sortedColumnManager': function () { 113 'sortedColumnManager': function () {
117 return this._sortedColumnManager; 114 return this._sortedColumnManager;
118 }, 115 },
119 116
120 'setSortedColumnManager': function(aValue) { 117 'setSortedColumnManager': function(aValue) {
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js
index d88af41..d0b378c 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/LoginController.js
@@ -1,120 +1,117 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer to http://www.clipperz.com.
12 9
13* Javascript Crypto Library is free software: you can redistribute 10* Clipperz Community Edition is free software: you can redistribute
14 it and/or modify it under the terms of the GNU Affero General Public 11 it and/or modify it under the terms of the GNU Affero General Public
15 License as published by the Free Software Foundation, either version 12 License as published by the Free Software Foundation, either version
16 3 of the License, or (at your option) any later version. 13 3 of the License, or (at your option) any later version.
17 14
18* Javascript Crypto Library is distributed in the hope that it will 15* Clipperz Community Edition is distributed in the hope that it will
19 be useful, but WITHOUT ANY WARRANTY; without even the implied 16 be useful, but WITHOUT ANY WARRANTY; without even the implied
20 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 See the GNU Affero General Public License for more details. 18 See the GNU Affero General Public License for more details.
22 19
23* You should have received a copy of the GNU Affero General Public 20* You should have received a copy of the GNU Affero General Public
24 License along with Javascript Crypto Library. If not, see 21 License along with Clipperz Community Edition. If not, see
25 <http://www.gnu.org/licenses/>. 22 <http://www.gnu.org/licenses/>.
26 23
27*/ 24*/
28 25
29Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); 26Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers');
30 27
31Clipperz.PM.UI.Web.Controllers.LoginController = function(args) { 28Clipperz.PM.UI.Web.Controllers.LoginController = function(args) {
32 this._args = args || {}; 29 this._args = args || {};
33 30
34 this._loginPage = null; 31 this._loginPage = null;
35 32
36 this._newUserWizardController = null; 33 this._newUserWizardController = null;
37 this._newUserCreationComponent = null; 34 this._newUserCreationComponent = null;
38 35
39 return this; 36 return this;
40} 37}
41 38
42MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.LoginController.prototype, { 39MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.LoginController.prototype, {
43 40
44 'toString': function() { 41 'toString': function() {
45 return "Clipperz.PM.UI.Web.Controllers.LoginController"; 42 return "Clipperz.PM.UI.Web.Controllers.LoginController";
46 }, 43 },
47 44
48 'args': function () { 45 'args': function () {
49 return this._args; 46 return this._args;
50 }, 47 },
51 48
52 //----------------------------------------------------------------------------- 49 //-----------------------------------------------------------------------------
53 50
54 'loginPage': function() { 51 'loginPage': function() {
55 if (this._loginPage == null) { 52 if (this._loginPage == null) {
56 this._loginPage = new Clipperz.PM.UI.Web.Components.LoginPage(); 53 this._loginPage = new Clipperz.PM.UI.Web.Components.LoginPage();
57 54
58 MochiKit.Signal.connect(this._loginPage, 'createNewAccountClick', this, 'handleCreateNewAccountClick') 55 MochiKit.Signal.connect(this._loginPage, 'createNewAccountClick', this, 'handleCreateNewAccountClick')
59 } 56 }
60 57
61 return this._loginPage; 58 return this._loginPage;
62 }, 59 },
63 60
64 //----------------------------------------------------------------------------- 61 //-----------------------------------------------------------------------------
65 62
66 'run': function(args) { 63 'run': function(args) {
67 varslot; 64 varslot;
68 varloginPage; 65 varloginPage;
69 varloginForm; 66 varloginForm;
70 67
71 slot = args.slot; 68 slot = args.slot;
72 69
73 loginForm =new Clipperz.PM.UI.Web.Components.LoginForm({'autocomplete': this.args()['autocomplete']}); 70 loginForm =new Clipperz.PM.UI.Web.Components.LoginForm({'autocomplete': this.args()['autocomplete']});
74 71
75 slot.setContent(this.loginPage()); 72 slot.setContent(this.loginPage());
76 this.loginPage().slotNamed('loginForm').setContent(loginForm); 73 this.loginPage().slotNamed('loginForm').setContent(loginForm);
77 74
78 MochiKit.Signal.connect(loginForm, 'doLogin', MochiKit.Base.method(this, 'doLogin', loginForm)); 75 MochiKit.Signal.connect(loginForm, 'doLogin', MochiKit.Base.method(this, 'doLogin', loginForm));
79 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'doLogin', MochiKit.Base.method(this, 'doLogin', loginForm)); 76 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'doLogin', MochiKit.Base.method(this, 'doLogin', loginForm));
80 }, 77 },
81 78
82 //----------------------------------------------------------------------------- 79 //-----------------------------------------------------------------------------
83 80
84 'doLogin': function(aLoginForm, anEvent) { 81 'doLogin': function(aLoginForm, anEvent) {
85 var deferredResult; 82 var deferredResult;
86 varparameters; 83 varparameters;
87 // varshouldUseOTP; 84 // varshouldUseOTP;
88 var loginProgress; 85 var loginProgress;
89 varuser; 86 varuser;
90 var getPassphraseDelegate; 87 var getPassphraseDelegate;
91 88
92 parameters = anEvent; 89 parameters = anEvent;
93 // shouldUseOTP = (typeof(parameters.passphrase) == 'undefined'); 90 // shouldUseOTP = (typeof(parameters.passphrase) == 'undefined');
94 91
95 getPassphraseDelegate = MochiKit.Base.partial(MochiKit.Async.succeed, parameters.passphrase); 92 getPassphraseDelegate = MochiKit.Base.partial(MochiKit.Async.succeed, parameters.passphrase);
96 user = new Clipperz.PM.DataModel.User({'username':parameters.username, 'getPassphraseFunction':MochiKit.Base.method(Clipperz.PM.RunTime.mainController, 'getPassphrase')}); 93 user = new Clipperz.PM.DataModel.User({'username':parameters.username, 'getPassphraseFunction':MochiKit.Base.method(Clipperz.PM.RunTime.mainController, 'getPassphrase')});
97 94
98 loginProgress = new Clipperz.PM.UI.Web.Components.LoginProgress(); 95 loginProgress = new Clipperz.PM.UI.Web.Components.LoginProgress();
99 96
100 deferredResult = new Clipperz.Async.Deferred("LoginController.doLogin", {trace:false}); 97 deferredResult = new Clipperz.Async.Deferred("LoginController.doLogin", {trace:false});
101 deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'initProgress', {'steps':4}); 98 deferredResult.addCallbackPass(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'initProgress', {'steps':4});
102 deferredResult.addMethod(Clipperz.PM.RunTime.mainController, 'setPassphraseDelegate', getPassphraseDelegate); 99 deferredResult.addMethod(Clipperz.PM.RunTime.mainController, 'setPassphraseDelegate', getPassphraseDelegate);
103 deferredResult.addMethod(loginProgress, 'deferredShowModal', {deferredObject:deferredResult, openFromElement:aLoginForm.submitButtonElement()}); 100 deferredResult.addMethod(loginProgress, 'deferredShowModal', {deferredObject:deferredResult, openFromElement:aLoginForm.submitButtonElement()});
104 deferredResult.addMethod(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'deferredEntropyCollection'); 101 deferredResult.addMethod(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'deferredEntropyCollection');
105 // if (shouldUseOTP == false) { 102 // if (shouldUseOTP == false) {
106 deferredResult.addMethod(user, 'login'); 103 deferredResult.addMethod(user, 'login');
107 // } else { 104 // } else {
108 // deferredResult.addMethod(user, 'loginUsingOTP', parameters.username, parameters.otp); 105 // deferredResult.addMethod(user, 'loginUsingOTP', parameters.username, parameters.otp);
109 // } 106 // }
110 deferredResult.addCallback(function(aLoginProgress, res) { 107 deferredResult.addCallback(function(aLoginProgress, res) {
111 aLoginProgress.disableCancel(); 108 aLoginProgress.disableCancel();
112 return res; 109 return res;
113 }, loginProgress); 110 }, loginProgress);
114 deferredResult.addCallback(function () { 111 deferredResult.addCallback(function () {
115 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'CARDS_CONTROLLER_DID_RUN',MochiKit.Base.method(loginProgress, 'deferredHideModalAndRemove', {closeToElement:MochiKit.DOM.currentDocument().body})); 112 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'CARDS_CONTROLLER_DID_RUN',MochiKit.Base.method(loginProgress, 'deferredHideModalAndRemove', {closeToElement:MochiKit.DOM.currentDocument().body}));
116 }) 113 })
117 deferredResult.addMethod(this, 'userLoggedIn', user, loginProgress, aLoginForm); 114 deferredResult.addMethod(this, 'userLoggedIn', user, loginProgress, aLoginForm);
118 deferredResult.addErrback (MochiKit.Base.method(this, 'handleFailedLogin', loginProgress)); 115 deferredResult.addErrback (MochiKit.Base.method(this, 'handleFailedLogin', loginProgress));
119 116
120 deferredResult.addErrback (MochiKit.Base.method(loginProgress, 'deferredHideModalAndRemove', {closeToElement:aLoginForm.submitButtonElement()})); 117 deferredResult.addErrback (MochiKit.Base.method(loginProgress, 'deferredHideModalAndRemove', {closeToElement:aLoginForm.submitButtonElement()}));
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js
index aa0d6ad..c83e3c0 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/MainController.js
@@ -1,120 +1,117 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer to http://www.clipperz.com.
12 9
13* Javascript Crypto Library is free software: you can redistribute 10* Clipperz Community Edition is free software: you can redistribute
14 it and/or modify it under the terms of the GNU Affero General Public 11 it and/or modify it under the terms of the GNU Affero General Public
15 License as published by the Free Software Foundation, either version 12 License as published by the Free Software Foundation, either version
16 3 of the License, or (at your option) any later version. 13 3 of the License, or (at your option) any later version.
17 14
18* Javascript Crypto Library is distributed in the hope that it will 15* Clipperz Community Edition is distributed in the hope that it will
19 be useful, but WITHOUT ANY WARRANTY; without even the implied 16 be useful, but WITHOUT ANY WARRANTY; without even the implied
20 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 See the GNU Affero General Public License for more details. 18 See the GNU Affero General Public License for more details.
22 19
23* You should have received a copy of the GNU Affero General Public 20* You should have received a copy of the GNU Affero General Public
24 License along with Javascript Crypto Library. If not, see 21 License along with Clipperz Community Edition. If not, see
25 <http://www.gnu.org/licenses/>. 22 <http://www.gnu.org/licenses/>.
26 23
27*/ 24*/
28 25
29Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); 26Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers');
30 27
31Clipperz.PM.UI.Web.Controllers.MainController = function(args) { 28Clipperz.PM.UI.Web.Controllers.MainController = function(args) {
32 this._args = args; 29 this._args = args;
33 30
34 //controllers 31 //controllers
35 this._loginController =null; 32 this._loginController =null;
36 this._appController =null; 33 this._appController =null;
37 34
38 //components 35 //components
39 this._headerComponent = null; 36 this._headerComponent = null;
40 this._pageComponent =null; 37 this._pageComponent =null;
41 this._footerComponent = null; 38 this._footerComponent = null;
42 39
43 this._passphraseDelegateLock = new MochiKit.Async.DeferredLock(); 40 this._passphraseDelegateLock = new MochiKit.Async.DeferredLock();
44 this._passphraseDelegateLock.acquire(); 41 this._passphraseDelegateLock.acquire();
45//Clipperz.log('MainController init _passphraseDelegateLock', this._passphraseDelegateLock); 42//Clipperz.log('MainController init _passphraseDelegateLock', this._passphraseDelegateLock);
46 this._passphraseDelegate = null; 43 this._passphraseDelegate = null;
47 44
48 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'remoteRequestSent', this, 'handleRemoteRequestSent'); 45 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'remoteRequestSent', this, 'handleRemoteRequestSent');
49 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'remoteRequestReceived',this, 'handleRemoteRequestReceived'); 46 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'remoteRequestReceived',this, 'handleRemoteRequestReceived');
50 47
51 return this; 48 return this;
52} 49}
53 50
54MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.MainController.prototype, { 51MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.MainController.prototype, {
55 52
56 'toString': function() { 53 'toString': function() {
57 return "Clipperz.PM.UI.Web.Controllers.MainController"; 54 return "Clipperz.PM.UI.Web.Controllers.MainController";
58 }, 55 },
59 56
60 'args': function () { 57 'args': function () {
61 return this._args; 58 return this._args;
62 }, 59 },
63 60
64 //----------------------------------------------------------------------------- 61 //-----------------------------------------------------------------------------
65 62
66 'headerComponent': function() { 63 'headerComponent': function() {
67 if (this._headerComponent == null) { 64 if (this._headerComponent == null) {
68 this._headerComponent = new Clipperz.PM.UI.Web.Components.PageHeader(); 65 this._headerComponent = new Clipperz.PM.UI.Web.Components.PageHeader();
69 } 66 }
70 67
71 return this._headerComponent; 68 return this._headerComponent;
72 }, 69 },
73 70
74 'footerComponent': function() { 71 'footerComponent': function() {
75 if (this._footerComponent == null) { 72 if (this._footerComponent == null) {
76 this._footerComponent = new Clipperz.PM.UI.Web.Components.PageFooter(); 73 this._footerComponent = new Clipperz.PM.UI.Web.Components.PageFooter();
77 } 74 }
78 75
79 return this._footerComponent; 76 return this._footerComponent;
80 }, 77 },
81 78
82 //----------------------------------------------------------------------------- 79 //-----------------------------------------------------------------------------
83 80
84 'pageComponent': function() { 81 'pageComponent': function() {
85 if (this._pageComponent == null) { 82 if (this._pageComponent == null) {
86 this._pageComponent = new Clipperz.PM.UI.Web.Components.Page({element:MochiKit.DOM.getElement('mainDiv')}); 83 this._pageComponent = new Clipperz.PM.UI.Web.Components.Page({element:MochiKit.DOM.getElement('mainDiv')});
87 } 84 }
88 85
89 return this._pageComponent; 86 return this._pageComponent;
90 }, 87 },
91 88
92 //----------------------------------------------------------------------------- 89 //-----------------------------------------------------------------------------
93 90
94 'loginController': function() { 91 'loginController': function() {
95 if (this._loginController == null) { 92 if (this._loginController == null) {
96 this._loginController = new Clipperz.PM.UI.Web.Controllers.LoginController(this.args()); 93 this._loginController = new Clipperz.PM.UI.Web.Controllers.LoginController(this.args());
97 94
98 MochiKit.Signal.connect(this._loginController, 'userLoggedIn', this, 'loginControllerUserLoggedInCallback'); 95 MochiKit.Signal.connect(this._loginController, 'userLoggedIn', this, 'loginControllerUserLoggedInCallback');
99 } 96 }
100 97
101 return this._loginController; 98 return this._loginController;
102 }, 99 },
103 100
104 'appController': function() { 101 'appController': function() {
105 if (this._appController == null) { 102 if (this._appController == null) {
106 this._appController = new Clipperz.PM.UI.Web.Controllers.AppController(); 103 this._appController = new Clipperz.PM.UI.Web.Controllers.AppController();
107 104
108 MochiKit.Signal.connect(this._appController, 'logout', this, 'handleLogout'); 105 MochiKit.Signal.connect(this._appController, 'logout', this, 'handleLogout');
109 } 106 }
110 107
111 return this._appController; 108 return this._appController;
112 }, 109 },
113 110
114 //----------------------------------------------------------------------------- 111 //-----------------------------------------------------------------------------
115 112
116 'run': function(shoudShowRegistrationForm) { 113 'run': function(shoudShowRegistrationForm) {
117 this.pageComponent().slotNamed('header').setContent(this.headerComponent()); 114 this.pageComponent().slotNamed('header').setContent(this.headerComponent());
118 this.pageComponent().slotNamed('footer').setContent(this.footerComponent()); 115 this.pageComponent().slotNamed('footer').setContent(this.footerComponent());
119 116
120 this.pageComponent().render(); 117 this.pageComponent().render();
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js
index 28d9d20..7db6888 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/NewUserWizardController.js
@@ -1,120 +1,117 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer to http://www.clipperz.com.
12 9
13* Javascript Crypto Library is free software: you can redistribute 10* Clipperz Community Edition is free software: you can redistribute
14 it and/or modify it under the terms of the GNU Affero General Public 11 it and/or modify it under the terms of the GNU Affero General Public
15 License as published by the Free Software Foundation, either version 12 License as published by the Free Software Foundation, either version
16 3 of the License, or (at your option) any later version. 13 3 of the License, or (at your option) any later version.
17 14
18* Javascript Crypto Library is distributed in the hope that it will 15* Clipperz Community Edition is distributed in the hope that it will
19 be useful, but WITHOUT ANY WARRANTY; without even the implied 16 be useful, but WITHOUT ANY WARRANTY; without even the implied
20 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 See the GNU Affero General Public License for more details. 18 See the GNU Affero General Public License for more details.
22 19
23* You should have received a copy of the GNU Affero General Public 20* You should have received a copy of the GNU Affero General Public
24 License along with Javascript Crypto Library. If not, see 21 License along with Clipperz Community Edition. If not, see
25 <http://www.gnu.org/licenses/>. 22 <http://www.gnu.org/licenses/>.
26 23
27*/ 24*/
28 25
29Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); 26Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers');
30 27
31Clipperz.PM.UI.Web.Controllers.NewUserWizardController = function(args) { 28Clipperz.PM.UI.Web.Controllers.NewUserWizardController = function(args) {
32 this._newUserCreationComponent = args.newUserCreationComponent|| Clipperz.Base.exception.raise('MandatoryParameter'); 29 this._newUserCreationComponent = args.newUserCreationComponent|| Clipperz.Base.exception.raise('MandatoryParameter');
33 30
34 MochiKit.Signal.connect(this._newUserCreationComponent, 'changedValue',this, 'handleChangedValue'); 31 MochiKit.Signal.connect(this._newUserCreationComponent, 'changedValue',this, 'handleChangedValue');
35 MochiKit.Signal.connect(this._newUserCreationComponent, 'moveForward',this, 'handleMoveForward'); 32 MochiKit.Signal.connect(this._newUserCreationComponent, 'moveForward',this, 'handleMoveForward');
36 MochiKit.Signal.connect(this._newUserCreationComponent, 'keyPressed',this, 'handleNewUserCreationComponentKeyPressed'); 33 MochiKit.Signal.connect(this._newUserCreationComponent, 'keyPressed',this, 'handleNewUserCreationComponentKeyPressed');
37 34
38 this._rulerComponent = null; 35 this._rulerComponent = null;
39 36
40 this._steps = null; 37 this._steps = null;
41 this._currentStepIndex = 0; 38 this._currentStepIndex = 0;
42 this._isNextEnabled = false; 39 this._isNextEnabled = false;
43 40
44 this._userCreationState = 'IDLE'; //'IN PROGRESS', 'DONE', 'FAILED' 41 this._userCreationState = 'IDLE'; //'IN PROGRESS', 'DONE', 'FAILED'
45 this._user = null; 42 this._user = null;
46 return this; 43 return this;
47} 44}
48 45
49MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.NewUserWizardController.prototype, { 46MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.NewUserWizardController.prototype, {
50 47
51 'toString': function() { 48 'toString': function() {
52 return "Clipperz.PM.UI.Web.Controllers.NewUserWizardController"; 49 return "Clipperz.PM.UI.Web.Controllers.NewUserWizardController";
53 }, 50 },
54 51
55 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
56 53
57 'newUserCreationComponent': function () { 54 'newUserCreationComponent': function () {
58 return this._newUserCreationComponent; 55 return this._newUserCreationComponent;
59 }, 56 },
60 57
61 //============================================================================= 58 //=============================================================================
62 59
63 'user': function () { 60 'user': function () {
64 return this._user; 61 return this._user;
65 }, 62 },
66 63
67 'setUser': function (aValue) { 64 'setUser': function (aValue) {
68 this._user = aValue; 65 this._user = aValue;
69 }, 66 },
70 67
71 //----------------------------------------------------------------------------- 68 //-----------------------------------------------------------------------------
72 69
73 'userCreationState': function () { 70 'userCreationState': function () {
74 return this._userCreationState; 71 return this._userCreationState;
75 }, 72 },
76 73
77 'setUserCreationState': function (aValue) { 74 'setUserCreationState': function (aValue) {
78//console.log("+++ NewUserWizardController.setUserCreationState", aValue); 75//console.log("+++ NewUserWizardController.setUserCreationState", aValue);
79 this._userCreationState = aValue; 76 this._userCreationState = aValue;
80 this.checkState(); 77 this.checkState();
81 }, 78 },
82 79
83 //============================================================================= 80 //=============================================================================
84 81
85 'resetCurrentStepIndex': function () { 82 'resetCurrentStepIndex': function () {
86 this._currentStepIndex = 0; 83 this._currentStepIndex = 0;
87 this.rulerComponent().resetStatus({animateTransition:true}); 84 this.rulerComponent().resetStatus({animateTransition:true});
88 }, 85 },
89 86
90 //----------------------------------------------------------------------------- 87 //-----------------------------------------------------------------------------
91 88
92 'enableNext': function (aValue) { 89 'enableNext': function (aValue) {
93 this.rulerComponent().enableNext(aValue); 90 this.rulerComponent().enableNext(aValue);
94 this._isNextEnabled = aValue; 91 this._isNextEnabled = aValue;
95 }, 92 },
96 93
97 'isNextEnabled': function () { 94 'isNextEnabled': function () {
98 return this._isNextEnabled; 95 return this._isNextEnabled;
99 }, 96 },
100 97
101 //----------------------------------------------------------------------------- 98 //-----------------------------------------------------------------------------
102 99
103 'enablePrevious': function (aValue) { 100 'enablePrevious': function (aValue) {
104 this.rulerComponent().enablePrevious(aValue); 101 this.rulerComponent().enablePrevious(aValue);
105 }, 102 },
106 103
107 //============================================================================= 104 //=============================================================================
108 105
109 'rulerComponent': function () { 106 'rulerComponent': function () {
110 if (this._rulerComponent == null) { 107 if (this._rulerComponent == null) {
111 this._rulerComponent = new Clipperz.PM.UI.Web.Components.RulerComponent({ 108 this._rulerComponent = new Clipperz.PM.UI.Web.Components.RulerComponent({
112 translationContext:'Wizards.NewUserWizard' 109 translationContext:'Wizards.NewUserWizard'
113 }); 110 });
114 this._rulerComponent.render(); 111 this._rulerComponent.render();
115 112
116 MochiKit.Signal.connect(this._rulerComponent, 'exit', this, 'handleExit'); 113 MochiKit.Signal.connect(this._rulerComponent, 'exit', this, 'handleExit');
117 MochiKit.Signal.connect(this._rulerComponent, 'done', this, 'done'); 114 MochiKit.Signal.connect(this._rulerComponent, 'done', this, 'done');
118 MochiKit.Signal.connect(this._rulerComponent, 'moveForward',this, 'handleMoveForward'); 115 MochiKit.Signal.connect(this._rulerComponent, 'moveForward',this, 'handleMoveForward');
119 MochiKit.Signal.connect(this._rulerComponent, 'moveBackward',this, 'handleMoveBackward'); 116 MochiKit.Signal.connect(this._rulerComponent, 'moveBackward',this, 'handleMoveBackward');
120 MochiKit.Signal.connect(this._rulerComponent, 'cursorMoved',this, 'handleCursorMoved'); 117 MochiKit.Signal.connect(this._rulerComponent, 'cursorMoved',this, 'handleCursorMoved');