summaryrefslogtreecommitdiff
path: root/frontend/beta/js/Clipperz/PM/Components/RecordDetail
Unidiff
Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Components/RecordDetail') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js22
17 files changed, 170 insertions, 204 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js
index 5b50284..d6fde5c 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js
@@ -1,102 +1,100 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.AbstractComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.AbstractComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.AbstractComponent.superclass.constructor.call(this, args); 34 Clipperz.PM.Components.RecordDetail.AbstractComponent.superclass.constructor.call(this, args);
37 35
38 this._element = anElement; 36 this._element = anElement;
39 this._mainComponent = args.mainComponent; 37 this._mainComponent = args.mainComponent;
40 38
41 return this; 39 return this;
42} 40}
43 41
44//============================================================================= 42//=============================================================================
45 43
46YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractComponent, Clipperz.PM.Components.BaseComponent, { 44YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractComponent, Clipperz.PM.Components.BaseComponent, {
47 45
48 'toString': function() { 46 'toString': function() {
49 return "Clipperz.PM.Components.RecordDetail.AbstractComponent"; 47 return "Clipperz.PM.Components.RecordDetail.AbstractComponent";
50 }, 48 },
51 49
52 //------------------------------------------------------------------------- 50 //-------------------------------------------------------------------------
53 51
54 'mainComponent': function() { 52 'mainComponent': function() {
55 return this._mainComponent; 53 return this._mainComponent;
56 }, 54 },
57 55
58 //------------------------------------------------------------------------- 56 //-------------------------------------------------------------------------
59 57
60 'record': function() { 58 'record': function() {
61 return this.mainComponent().record(); 59 return this.mainComponent().record();
62 }, 60 },
63 61
64 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
65 63
66 'editMode': function() { 64 'editMode': function() {
67 return this.mainComponent().editMode(); 65 return this.mainComponent().editMode();
68 }, 66 },
69 67
70 //------------------------------------------------------------------------- 68 //-------------------------------------------------------------------------
71 69
72 'render': function() { 70 'render': function() {
73 this.element().update(""); 71 this.element().update("");
74 this.update(); 72 this.update();
75 }, 73 },
76 74
77 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
78 76
79 'update': function(anEvent) { 77 'update': function(anEvent) {
80 if (this.editMode() == 'EDIT') { 78 if (this.editMode() == 'EDIT') {
81 this.updateEditMode(); 79 this.updateEditMode();
82 } else if (this.editMode() == 'VIEW') { 80 } else if (this.editMode() == 'VIEW') {
83 this.updateViewMode(); 81 this.updateViewMode();
84 } 82 }
85 }, 83 },
86 84
87 //------------------------------------------------------------------------- 85 //-------------------------------------------------------------------------
88 86
89 'updateViewMode': function() {}, 87 'updateViewMode': function() {},
90 'updateEditMode': function() {}, 88 'updateEditMode': function() {},
91 'synchronizeComponentValues': function() {}, 89 'synchronizeComponentValues': function() {},
92 90
93 //------------------------------------------------------------------------- 91 //-------------------------------------------------------------------------
94 92
95 'destroy': function() { 93 'destroy': function() {
96 this.element().remove(); 94 this.element().remove();
97 }, 95 },
98 96
99 //------------------------------------------------------------------------- 97 //-------------------------------------------------------------------------
100 __syntaxFix__: "syntax fix" 98 __syntaxFix__: "syntax fix"
101}); 99});
102 100
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js
index ad733aa..ede42c2 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js
@@ -1,74 +1,72 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this._fieldComponent = args.fieldComponent || null; 36 this._fieldComponent = args.fieldComponent || null;
39 37
40 this.render(); 38 this.render();
41 39
42 return this; 40 return this;
43} 41}
44 42
45//============================================================================= 43//=============================================================================
46 44
47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 45YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
48 46
49 'toString': function() { 47 'toString': function() {
50 return "Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent"; 48 return "Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent";
51 }, 49 },
52 50
53 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
54 52
55 'fieldComponent': function() { 53 'fieldComponent': function() {
56 return this._fieldComponent; 54 return this._fieldComponent;
57 }, 55 },
58 56
59 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
60 58
61 'mainComponent': function() { 59 'mainComponent': function() {
62 return this.fieldComponent().mainComponent(); 60 return this.fieldComponent().mainComponent();
63 }, 61 },
64 62
65 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
66 64
67 'recordField': function() { 65 'recordField': function() {
68 return this.fieldComponent().recordField(); 66 return this.fieldComponent().recordField();
69 }, 67 },
70 68
71 //------------------------------------------------------------------------- 69 //-------------------------------------------------------------------------
72 __syntaxFix__: "syntax fix" 70 __syntaxFix__: "syntax fix"
73}); 71});
74 72
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js
index d4c7837..c703db4 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js
@@ -1,118 +1,116 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.CreationWizard = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.CreationWizard = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.CreationWizard.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.CreationWizard.superclass.constructor.call(this, anElement, args);
37 35
38 this._mainComponent = args.mainComponent; 36 this._mainComponent = args.mainComponent;
39 this._previouslySelectedRecord = args.previouslySelectedRecord; 37 this._previouslySelectedRecord = args.previouslySelectedRecord;
40//MochiKit.Logging.logDebug("--- new CreationWizard - previouslySelectedRecord: " + args.previouslySelectedRecord); 38//MochiKit.Logging.logDebug("--- new CreationWizard - previouslySelectedRecord: " + args.previouslySelectedRecord);
41 this._createButton_header = null; 39 this._createButton_header = null;
42 this._createButton_footer = null; 40 this._createButton_footer = null;
43 41
44 this._cancelButton_header = null; 42 this._cancelButton_header = null;
45 this._cancelButton_footer = null; 43 this._cancelButton_footer = null;
46 44
47 this.render(); 45 this.render();
48 46
49 return this; 47 return this;
50} 48}
51 49
52//============================================================================= 50//=============================================================================
53 51
54YAHOO.extendX(Clipperz.PM.Components.RecordDetail.CreationWizard, Clipperz.PM.Components.BaseComponent, { 52YAHOO.extendX(Clipperz.PM.Components.RecordDetail.CreationWizard, Clipperz.PM.Components.BaseComponent, {
55 53
56 'toString': function() { 54 'toString': function() {
57 return "Clipperz.PM.Components.RecordDetail.CreationWizard component"; 55 return "Clipperz.PM.Components.RecordDetail.CreationWizard component";
58 }, 56 },
59 57
60 //------------------------------------------------------------------------- 58 //-------------------------------------------------------------------------
61 59
62 'previouslySelectedRecord': function() { 60 'previouslySelectedRecord': function() {
63 return this._previouslySelectedRecord; 61 return this._previouslySelectedRecord;
64 }, 62 },
65 63
66 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
67 65
68 'render': function() { 66 'render': function() {
69 vartemplateListElement; 67 vartemplateListElement;
70 vartemplates; 68 vartemplates;
71 69
72 this.element().update(""); 70 this.element().update("");
73 71
74 Clipperz.YUI.DomHelper.append(this.element().dom, 72 Clipperz.YUI.DomHelper.append(this.element().dom,
75 {tag:'form', cls:'recordDataFORM', id:this.getId('form'), children:[ 73 {tag:'form', cls:'recordDataFORM', id:this.getId('form'), children:[
76 {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[ 74 {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[
77 {tag:'div', id:this.getId('wizardBox'), cls:'recordCreationWizard', children:[ 75 {tag:'div', id:this.getId('wizardBox'), cls:'recordCreationWizard', children:[
78 {tag:'div', id:this.getId('recordCreationWizardTitleBox'), cls:'recordCreationWizardTitleBox', htmlString:Clipperz.PM.Strings['newRecordWizardTitleBox']}, 76 {tag:'div', id:this.getId('recordCreationWizardTitleBox'), cls:'recordCreationWizardTitleBox', htmlString:Clipperz.PM.Strings['newRecordWizardTitleBox']},
79 {tag:'ul', id:this.getId('templateList'), cls:'radioList'} 77 {tag:'ul', id:this.getId('templateList'), cls:'radioList'}
80 ]} 78 ]}
81 ]} 79 ]}
82 ]} 80 ]}
83 ); 81 );
84 82
85 Clipperz.YUI.DomHelper.append(this.getDom('recordCreationWizardTitleBox'), {tag:'div', cls:'newRecordWizardHeader', children:[ 83 Clipperz.YUI.DomHelper.append(this.getDom('recordCreationWizardTitleBox'), {tag:'div', cls:'newRecordWizardHeader', children:[
86 {tag:'table', width:'100%', cellpadding:'5', children:[ 84 {tag:'table', width:'100%', cellpadding:'5', children:[
87 {tag:'tbody', children:[ 85 {tag:'tbody', children:[
88 {tag:'tr', children:[ 86 {tag:'tr', children:[
89 {tag:'td', width:'49%', align:'right', children:[ 87 {tag:'td', width:'49%', align:'right', children:[
90 {tag:'div', id:this.getId('cancelButton_header')} 88 {tag:'div', id:this.getId('cancelButton_header')}
91 ]}, 89 ]},
92 {tag:'td', width:'10', html:'&nbsp;'}, 90 {tag:'td', width:'10', html:'&nbsp;'},
93 {tag:'td', width:'49%', align:'left', children:[ 91 {tag:'td', width:'49%', align:'left', children:[
94 {tag:'div', id:this.getId('createButton_header')} 92 {tag:'div', id:this.getId('createButton_header')}
95 ]} 93 ]}
96 ]} 94 ]}
97 ]} 95 ]}
98 ]} 96 ]}
99 ]}); 97 ]});
100 98
101 templateListElement = this.getElement('templateList'); 99 templateListElement = this.getElement('templateList');
102 templates = Clipperz.PM.Strings['recordTemplates']; 100 templates = Clipperz.PM.Strings['recordTemplates'];
103 MochiKit.Iter.forEach(MochiKit.Base.keys(templates), MochiKit.Base.bind(function(aTemplateKey) { 101 MochiKit.Iter.forEach(MochiKit.Base.keys(templates), MochiKit.Base.bind(function(aTemplateKey) {
104 Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[ 102 Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[
105 {tag:'table', children:[ 103 {tag:'table', children:[
106 {tag:'tbody', children:[ 104 {tag:'tbody', children:[
107 {tag:'tr', children:[ 105 {tag:'tr', children:[
108 {tag:'td', valign:'top', children:[ 106 {tag:'td', valign:'top', children:[
109 {tag:'input', id:this.getId(aTemplateKey+"_radio"), type:'radio', name:'recordTemplate', value:"aTemplateKey"} 107 {tag:'input', id:this.getId(aTemplateKey+"_radio"), type:'radio', name:'recordTemplate', value:"aTemplateKey"}
110 ]}, 108 ]},
111 {tag:'td', valign:'top', children:[ 109 {tag:'td', valign:'top', children:[
112 {tag:'h4', id:this.getId(aTemplateKey+"_title"), html:templates[aTemplateKey]['title']}, 110 {tag:'h4', id:this.getId(aTemplateKey+"_title"), html:templates[aTemplateKey]['title']},
113 {tag:'div', cls:'templateDescription', htmlString:templates[aTemplateKey]['description']} 111 {tag:'div', cls:'templateDescription', htmlString:templates[aTemplateKey]['description']}
114 ]} 112 ]}
115 ]} 113 ]}
116 ]} 114 ]}
117 ]} 115 ]}
118 ]}); 116 ]});
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js
index 36dd9a8..0e4640e 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js
@@ -1,118 +1,116 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent = function(anElement, args) {
34//MochiKit.Logging.logDebug(">>> new DirectLoginBindingComponent"); 32//MochiKit.Logging.logDebug(">>> new DirectLoginBindingComponent");
35 args = args || {}; 33 args = args || {};
36 34
37 Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent.superclass.constructor.call(this, anElement, args); 35 Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent.superclass.constructor.call(this, anElement, args);
38 36
39 this._directLoginBinding = args.directLoginBinding || null; 37 this._directLoginBinding = args.directLoginBinding || null;
40 this.render(); 38 this.render();
41 39
42 Clipperz.NotificationCenter.register(this.record(), 'addNewRecordField',this, 'syncAndUpdateEditMode'); 40 Clipperz.NotificationCenter.register(this.record(), 'addNewRecordField',this, 'syncAndUpdateEditMode');
43 Clipperz.NotificationCenter.register(this.record(), 'removedField', this, 'syncAndUpdateEditMode'); 41 Clipperz.NotificationCenter.register(this.record(), 'removedField', this, 'syncAndUpdateEditMode');
44 Clipperz.NotificationCenter.register(this.record(), 'updatedFieldLabel',this, 'syncAndUpdateEditMode'); 42 Clipperz.NotificationCenter.register(this.record(), 'updatedFieldLabel',this, 'syncAndUpdateEditMode');
45//MochiKit.Logging.logDebug("<<< new DirectLoginBindingComponent"); 43//MochiKit.Logging.logDebug("<<< new DirectLoginBindingComponent");
46 44
47 return this; 45 return this;
48} 46}
49 47
50//============================================================================= 48//=============================================================================
51 49
52YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 50YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
53 51
54 'toString': function() { 52 'toString': function() {
55 return "Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent component"; 53 return "Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent component";
56 }, 54 },
57 55
58 //------------------------------------------------------------------------- 56 //-------------------------------------------------------------------------
59 57
60 'directLoginBinding': function() { 58 'directLoginBinding': function() {
61 return this._directLoginBinding; 59 return this._directLoginBinding;
62 }, 60 },
63 61
64 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
65 63
66 'render': function() { 64 'render': function() {
67 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', style:'font-weight:bold;', html:this.directLoginBinding().key()}) 65 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', style:'font-weight:bold;', html:this.directLoginBinding().key()})
68 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.directLoginBinding().value()}) 66 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.directLoginBinding().value()})
69//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.render"); 67//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.render");
70 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingLabelTD', children:[ 68 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingLabelTD', children:[
71 {tag:'span', html:this.directLoginBinding().key()} 69 {tag:'span', html:this.directLoginBinding().key()}
72 ]}); 70 ]});
73//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 1"); 71//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 1");
74 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingValueTD', children:[ 72 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingValueTD', children:[
75 {tag:'div', id:this.getId('editModeBox'), children:[ 73 {tag:'div', id:this.getId('editModeBox'), children:[
76 {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()} 74 {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()}
77 ]}, 75 ]},
78 {tag:'div', id:this.getId('viewModeBox'), children:[ 76 {tag:'div', id:this.getId('viewModeBox'), children:[
79 {tag:'span', id:this.getId('viewValue'), html:""} 77 {tag:'span', id:this.getId('viewValue'), html:""}
80 ]} 78 ]}
81 ]}); 79 ]});
82//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 2"); 80//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 2");
83 this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 81 this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
84 this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 82 this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
85 83
86 this.update(); 84 this.update();
87//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.render"); 85//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.render");
88 }, 86 },
89 87
90 //------------------------------------------------------------------------- 88 //-------------------------------------------------------------------------
91 89
92 'recordFieldOptions': function() { 90 'recordFieldOptions': function() {
93 varresult; 91 varresult;
94 var option; 92 var option;
95 varrecordFieldKey; 93 varrecordFieldKey;
96 varrecordFields; 94 varrecordFields;
97 95
98//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.recordFieldOptions"); 96//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.recordFieldOptions");
99 recordFields = this.directLoginBinding().directLogin().record().currentVersion().fields(); 97 recordFields = this.directLoginBinding().directLogin().record().currentVersion().fields();
100 result = []; 98 result = [];
101 option = {tag:'option', value:null, html:'---'}; 99 option = {tag:'option', value:null, html:'---'};
102 result.push(option); 100 result.push(option);
103 for (recordFieldKey in recordFields) { 101 for (recordFieldKey in recordFields) {
104 //TODO: remove the value: field and replace it with element.dom.value = <some value> 102 //TODO: remove the value: field and replace it with element.dom.value = <some value>
105 option = {tag:'option', value:recordFieldKey, html:recordFields[recordFieldKey].label()} 103 option = {tag:'option', value:recordFieldKey, html:recordFields[recordFieldKey].label()}
106 if (recordFieldKey == this.directLoginBinding().fieldKey()) { 104 if (recordFieldKey == this.directLoginBinding().fieldKey()) {
107 option['selected'] = true; 105 option['selected'] = true;
108 } 106 }
109 result.push(option); 107 result.push(option);
110 } 108 }
111//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.recordFieldOptions"); 109//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.recordFieldOptions");
112 110
113 return result; 111 return result;
114 }, 112 },
115 113
116 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
117 115
118 'syncAndUpdateEditMode': function() { 116 'syncAndUpdateEditMode': function() {
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js
index 69cad79..883c45c 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js
@@ -1,118 +1,116 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.DirectLoginComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.DirectLoginComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this._directLogin = args.directLogin || null; 36 this._directLogin = args.directLogin || null;
39 //this._titleElement = null; 37 //this._titleElement = null;
40 this._structureElement = null; 38 this._structureElement = null;
41 this._removeButton = null; 39 this._removeButton = null;
42 this._directLoginBindingComponents = null; 40 this._directLoginBindingComponents = null;
43 this._collapser = null; 41 this._collapser = null;
44 42
45 this.mainComponent().addEditComponent(this); 43 this.mainComponent().addEditComponent(this);
46 this.render(); 44 this.render();
47 45
48 return this; 46 return this;
49} 47}
50 48
51//============================================================================= 49//=============================================================================
52 50
53YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 51YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
54 52
55 'toString': function() { 53 'toString': function() {
56 return "Clipperz.PM.Components.RecordDetail.DirectLoginComponent component"; 54 return "Clipperz.PM.Components.RecordDetail.DirectLoginComponent component";
57 }, 55 },
58 56
59 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
60 58
61 'directLogin': function() { 59 'directLogin': function() {
62 return this._directLogin; 60 return this._directLogin;
63 }, 61 },
64 62
65 'directLoginBindingComponents': function() { 63 'directLoginBindingComponents': function() {
66 return this._directLoginBindingComponents; 64 return this._directLoginBindingComponents;
67 }, 65 },
68 66
69 //------------------------------------------------------------------------- 67 //-------------------------------------------------------------------------
70 68
71 'removeDirectLogin': function() { 69 'removeDirectLogin': function() {
72//MochiKit.Logging.logDebug(">>> DirectLoginComponent.removeDirectLogin"); 70//MochiKit.Logging.logDebug(">>> DirectLoginComponent.removeDirectLogin");
73 this.mainComponent().synchronizeComponentValues(); 71 this.mainComponent().synchronizeComponentValues();
74 this.directLogin().remove(); 72 this.directLogin().remove();
75 this.mainComponent().removeEditComponent(this); 73 this.mainComponent().removeEditComponent(this);
76 this.mainComponent().render(); 74 this.mainComponent().render();
77//MochiKit.Logging.logDebug("<<< DirectLoginComponent.removeDirectLogin"); 75//MochiKit.Logging.logDebug("<<< DirectLoginComponent.removeDirectLogin");
78 }, 76 },
79 77
80 //------------------------------------------------------------------------- 78 //-------------------------------------------------------------------------
81/* 79/*
82 'formDataValue': function() { 80 'formDataValue': function() {
83 return Clipperz.Base.serializeJSON(this.directLogin().formData()); 81 return Clipperz.Base.serializeJSON(this.directLogin().formData());
84 }, 82 },
85 83
86 'setFormDataValue': function(aValue) { 84 'setFormDataValue': function(aValue) {
87 85
88 }, 86 },
89 */ 87 */
90 //------------------------------------------------------------------------- 88 //-------------------------------------------------------------------------
91 89
92 'removeButton': function() { 90 'removeButton': function() {
93 return this._removeButton; 91 return this._removeButton;
94 }, 92 },
95 93
96 'setRemoveButton': function(aValue) { 94 'setRemoveButton': function(aValue) {
97 this._removeButton = aValue; 95 this._removeButton = aValue;
98 }, 96 },
99 97
100 //------------------------------------------------------------------------- 98 //-------------------------------------------------------------------------
101/* 99/*
102 'titleElement': function() { 100 'titleElement': function() {
103 return this._titleElement; 101 return this._titleElement;
104 }, 102 },
105 103
106 'setTitleElement': function(aValue) { 104 'setTitleElement': function(aValue) {
107 this._titleElement = aValue; 105 this._titleElement = aValue;
108 }, 106 },
109 */ 107 */
110 //------------------------------------------------------------------------- 108 //-------------------------------------------------------------------------
111 109
112 'structureElement': function() { 110 'structureElement': function() {
113 return this._structureElement; 111 return this._structureElement;
114 }, 112 },
115 113
116 'setStructureElement': function(aValue) { 114 'setStructureElement': function(aValue) {
117 this._structureElement = aValue; 115 this._structureElement = aValue;
118 }, 116 },
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js
index d210100..b478d94 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js
@@ -1,118 +1,116 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent = function(anElement, args) {
34//MochiKit.Logging.logDebug(">>> new DirectLoginValueComponent"); 32//MochiKit.Logging.logDebug(">>> new DirectLoginValueComponent");
35 args = args || {}; 33 args = args || {};
36 34
37 Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent.superclass.constructor.call(this, anElement, args); 35 Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent.superclass.constructor.call(this, anElement, args);
38 36
39 this._directLoginInputValue = args.directLoginInputValue || null; 37 this._directLoginInputValue = args.directLoginInputValue || null;
40 this._value = this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()]; 38 this._value = this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()];
41 39
42 this.render(); 40 this.render();
43//MochiKit.Logging.logDebug("<<< new DirectLoginValueComponent - record: " + this.record()); 41//MochiKit.Logging.logDebug("<<< new DirectLoginValueComponent - record: " + this.record());
44 42
45 return this; 43 return this;
46} 44}
47 45
48//============================================================================= 46//=============================================================================
49 47
50YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 48YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
51 49
52 'toString': function() { 50 'toString': function() {
53 return "Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent component - " + this.directLoginInputValue().name(); 51 return "Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent component - " + this.directLoginInputValue().name();
54 }, 52 },
55 53
56 //------------------------------------------------------------------------- 54 //-------------------------------------------------------------------------
57 55
58 'directLoginInputValue': function() { 56 'directLoginInputValue': function() {
59 return this._directLoginInputValue; 57 return this._directLoginInputValue;
60 }, 58 },
61 59
62 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
63 61
64 'render': function() { 62 'render': function() {
65//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.render"); 63//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.render");
66 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataLabelTD', children:[ 64 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataLabelTD', children:[
67 {tag:'span', html:this.directLoginInputValue().name()} 65 {tag:'span', html:this.directLoginInputValue().name()}
68 ]}); 66 ]});
69//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 1"); 67//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 1");
70 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataValueTD', children:[ 68 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataValueTD', children:[
71 {tag:'span', id:this.getId('inputElement')} 69 {tag:'span', id:this.getId('inputElement')}
72 ]}); 70 ]});
73//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 2"); 71//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 2");
74 this.update(); 72 this.update();
75//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.render"); 73//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.render");
76 }, 74 },
77 75
78 //------------------------------------------------------------------------- 76 //-------------------------------------------------------------------------
79 77
80 'inputElementConfiguration': function() { 78 'inputElementConfiguration': function() {
81 var result; 79 var result;
82 var currentValue; 80 var currentValue;
83 81
84//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.inputElementConfiguration - " + this.directLoginInputValue().name()); 82//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.inputElementConfiguration - " + this.directLoginInputValue().name());
85 result = []; 83 result = [];
86 currentValue = this.value(); 84 currentValue = this.value();
87 85
88 switch (this.directLoginInputValue().type()) { 86 switch (this.directLoginInputValue().type()) {
89 case 'checkbox': 87 case 'checkbox':
90 var checkbox; 88 var checkbox;
91//{"type":"checkbox", "name":"rememberUsernameChk", "value":"checkbox"} 89//{"type":"checkbox", "name":"rememberUsernameChk", "value":"checkbox"}
92 checkbox = {tag:'input', id:this.getId('checkbox'), type:'checkbox'} 90 checkbox = {tag:'input', id:this.getId('checkbox'), type:'checkbox'}
93 if (currentValue == true) { 91 if (currentValue == true) {
94 checkbox.checked = true; 92 checkbox.checked = true;
95 } 93 }
96 result.push(checkbox); 94 result.push(checkbox);
97 break; 95 break;
98 96
99 case 'select': 97 case 'select':
100 var input; 98 var input;
101//{"type":"select", "name":"DOMAIN", "options":[{"selected":true, "label":"@tin.it", "value":"tin.it"}, {"selected":false, "label":"@virgilio.it", "value":"virgilio.it"}]} 99//{"type":"select", "name":"DOMAIN", "options":[{"selected":true, "label":"@tin.it", "value":"tin.it"}, {"selected":false, "label":"@virgilio.it", "value":"virgilio.it"}]}
102 input = {tag:'select', id:this.getId('select'), name:this.directLoginInputValue().name(), children:[]}; 100 input = {tag:'select', id:this.getId('select'), name:this.directLoginInputValue().name(), children:[]};
103 input.children.push({tag:'option', value:null, html:"---"}); 101 input.children.push({tag:'option', value:null, html:"---"});
104 MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) { 102 MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) {
105 var option; 103 var option;
106 104
107 //TODO: remove the value: field and replace it with element.dom.value = <some value> 105 //TODO: remove the value: field and replace it with element.dom.value = <some value>
108 option = {tag:'option', value:anOption['value'], html:anOption['label']} 106 option = {tag:'option', value:anOption['value'], html:anOption['label']}
109 if (currentValue == anOption['value']) { 107 if (currentValue == anOption['value']) {
110 option.selected = true; 108 option.selected = true;
111 } 109 }
112 input.children.push(option); 110 input.children.push(option);
113 }) 111 })
114 result.push(input); 112 result.push(input);
115 break; 113 break;
116 114
117 case 'radio': 115 case 'radio':
118 var name; 116 var name;
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js
index 1396bd8..878adce 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js
@@ -1,118 +1,116 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.DirectLoginsComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.DirectLoginsComponent = function(anElement, args) {
34//MochiKit.Logging.logDebug(">>> new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); 32//MochiKit.Logging.logDebug(">>> new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent");
35 args = args || {}; 33 args = args || {};
36 34
37//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 0"); 35//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 0");
38 Clipperz.PM.Components.RecordDetail.DirectLoginsComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.RecordDetail.DirectLoginsComponent.superclass.constructor.call(this, anElement, args);
39//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 1"); 37//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 1");
40 38
41 this._addDirectLoginButton = null; 39 this._addDirectLoginButton = null;
42 40
43//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 2"); 41//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 2");
44 this.mainComponent().addEditComponent(this); 42 this.mainComponent().addEditComponent(this);
45//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 3"); 43//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 3");
46 this.render(); 44 this.render();
47//MochiKit.Logging.logDebug("<<< new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); 45//MochiKit.Logging.logDebug("<<< new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent");
48 46
49 return this; 47 return this;
50} 48}
51 49
52//============================================================================= 50//=============================================================================
53 51
54YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginsComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 52YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginsComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
55 53
56 'toString': function() { 54 'toString': function() {
57 return "Clipperz.PM.Components.RecordDetail.DirectLoginsComponent component"; 55 return "Clipperz.PM.Components.RecordDetail.DirectLoginsComponent component";
58 }, 56 },
59 57
60 //------------------------------------------------------------------------- 58 //-------------------------------------------------------------------------
61 59
62 'addDirectLoginButton': function() { 60 'addDirectLoginButton': function() {
63 return this._addDirectLoginButton; 61 return this._addDirectLoginButton;
64 }, 62 },
65 63
66 'setAddDirectLoginButton': function(aValue) { 64 'setAddDirectLoginButton': function(aValue) {
67 this._addDirectLoginButton = aValue; 65 this._addDirectLoginButton = aValue;
68 }, 66 },
69 67
70 //------------------------------------------------------------------------- 68 //-------------------------------------------------------------------------
71 69
72 'render': function() { 70 'render': function() {
73 this.element().update(""); 71 this.element().update("");
74 72
75 Clipperz.YUI.DomHelper.append(this.element().dom, 73 Clipperz.YUI.DomHelper.append(this.element().dom,
76 {tag:'div', cls:'directLoginsRecordBox', children:[ 74 {tag:'div', cls:'directLoginsRecordBox', children:[
77 {tag:'h3', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockTitle']}, 75 {tag:'h3', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockTitle']},
78 {tag:'ul', id:this.getId('directLogins')}, 76 {tag:'ul', id:this.getId('directLogins')},
79 77
80 {tag:'div', cls:'addDirectLoginBox', id:this.getId('addDirectLogin'), children:[ 78 {tag:'div', cls:'addDirectLoginBox', id:this.getId('addDirectLogin'), children:[
81 {tag:'div', cls:'addDirectLoginBoxContent', children:[ 79 {tag:'div', cls:'addDirectLoginBoxContent', children:[
82 {tag:'div', cls:'bookmarkletConfiguration', children:[ 80 {tag:'div', cls:'bookmarkletConfiguration', children:[
83 // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']}, 81 // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']},
84 {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']}, 82 {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']},
85 {tag:'textarea', id:this.getId('addDirectLoginTextarea')} 83 {tag:'textarea', id:this.getId('addDirectLoginTextarea')}
86 ]}, 84 ]},
87 {tag:'div', id:this.getId('addDirectLoginButton')} 85 {tag:'div', id:this.getId('addDirectLoginButton')}
88 ]} 86 ]}
89 ]} 87 ]}
90 ]} 88 ]}
91 ); 89 );
92 90
93 if (MochiKit.Base.keys(this.record().directLogins()).length == 0) { 91 if (MochiKit.Base.keys(this.record().directLogins()).length == 0) {
94//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 3"); 92//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 3");
95 Clipperz.YUI.DomHelper.append(this.getElement('directLogins'), 93 Clipperz.YUI.DomHelper.append(this.getElement('directLogins'),
96 {tag:'li', children:[ 94 {tag:'li', children:[
97 // {tag:'span', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredLabel']} 95 // {tag:'span', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredLabel']}
98 {tag:'div', cls:'recordDetailNoDirectLoginDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription']} 96 {tag:'div', cls:'recordDetailNoDirectLoginDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription']}
99 ]} 97 ]}
100 ); 98 );
101//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 4"); 99//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 4");
102 } else { 100 } else {
103//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 5"); 101//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 5");
104 for (directLoginReference in this.record().directLogins()) { 102 for (directLoginReference in this.record().directLogins()) {
105//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 6"); 103//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 6");
106 this.addDirectLogin(this.record().directLogins()[directLoginReference]); 104 this.addDirectLogin(this.record().directLogins()[directLoginReference]);
107//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 7"); 105//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 7");
108 } 106 }
109//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 8"); 107//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 8");
110 } 108 }
111//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 9"); 109//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 9");
112 110
113 this.setAddDirectLoginButton(new YAHOO.ext.Button(this.getDom('addDirectLoginButton'), { 111 this.setAddDirectLoginButton(new YAHOO.ext.Button(this.getDom('addDirectLoginButton'), {
114 text:Clipperz.PM.Strings['recordDetailAddNewDirectLoginButtonLabel'], 112 text:Clipperz.PM.Strings['recordDetailAddNewDirectLoginButtonLabel'],
115 handler:this.addNewDirectLogin, 113 handler:this.addNewDirectLogin,
116 scope:this 114 scope:this
117 })); 115 }));
118 MochiKit.Signal.connect(this.getId('addDirectLoginTextarea'), 'onkeydown', this, 'onkeydown'); 116 MochiKit.Signal.connect(this.getId('addDirectLoginTextarea'), 'onkeydown', this, 'onkeydown');
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js
index b79c365..661f94d 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js
@@ -1,114 +1,112 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.FieldButtonComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.FieldButtonComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.FieldButtonComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.FieldButtonComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this._button = null; 36 this._button = null;
39 37
40 this.render(); 38 this.render();
41 39
42 return this; 40 return this;
43} 41}
44 42
45//============================================================================= 43//=============================================================================
46 44
47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldButtonComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 45YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldButtonComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
48 46
49 'toString': function() { 47 'toString': function() {
50 return "Clipperz.PM.Components.RecordDetail.FieldButtonComponent"; 48 return "Clipperz.PM.Components.RecordDetail.FieldButtonComponent";
51 }, 49 },
52 50
53 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
54 52
55 'buttonText': function() { 53 'buttonText': function() {
56 varresult; 54 varresult;
57 55
58 if (this.recordField() == null) { 56 if (this.recordField() == null) {
59 //TODO: this is never used. It is just an obsolete legacy chunk of code 57 //TODO: this is never used. It is just an obsolete legacy chunk of code
60 result = Clipperz.PM.Strings['recordDetailAddFieldButtonLabel']; 58 result = Clipperz.PM.Strings['recordDetailAddFieldButtonLabel'];
61 } else { 59 } else {
62 result = Clipperz.PM.Strings['recordDetailRemoveFieldButtonLabel']; 60 result = Clipperz.PM.Strings['recordDetailRemoveFieldButtonLabel'];
63 } 61 }
64 62
65 return result; 63 return result;
66 }, 64 },
67 65
68 //------------------------------------------------------------------------- 66 //-------------------------------------------------------------------------
69 67
70 'button': function() { 68 'button': function() {
71 return this._button; 69 return this._button;
72 }, 70 },
73 71
74 'setButton': function(aValue) { 72 'setButton': function(aValue) {
75 this._button = aValue; 73 this._button = aValue;
76 }, 74 },
77 75
78 //------------------------------------------------------------------------- 76 //-------------------------------------------------------------------------
79 77
80 'render': function() { 78 'render': function() {
81 this.element().update(""); 79 this.element().update("");
82 80
83 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('button')}) 81 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('button')})
84 this.setButton(new YAHOO.ext.Button(this.getDom('button'), {text:this.buttonText(), handler:this.handleButtonClick, scope:this})); 82 this.setButton(new YAHOO.ext.Button(this.getDom('button'), {text:this.buttonText(), handler:this.handleButtonClick, scope:this}));
85 83
86 this.update(); 84 this.update();
87 }, 85 },
88 86
89 //------------------------------------------------------------------------- 87 //-------------------------------------------------------------------------
90 88
91 'handleButtonClick': function() { 89 'handleButtonClick': function() {
92 if (this.recordField() == null) { 90 if (this.recordField() == null) {
93 this.mainComponent().addNewField(); 91 this.mainComponent().addNewField();
94 } else { 92 } else {
95 this.mainComponent().removeField(this.fieldComponent()); 93 this.mainComponent().removeField(this.fieldComponent());
96 } 94 }
97 }, 95 },
98 96
99 //------------------------------------------------------------------------- 97 //-------------------------------------------------------------------------
100 98
101 'updateEditMode': function() { 99 'updateEditMode': function() {
102 this.button().show(); 100 this.button().show();
103 }, 101 },
104 102
105 //------------------------------------------------------------------------- 103 //-------------------------------------------------------------------------
106 104
107 'updateViewMode': function() { 105 'updateViewMode': function() {
108 this.button().hide(); 106 this.button().hide();
109 }, 107 },
110 108
111 //------------------------------------------------------------------------- 109 //-------------------------------------------------------------------------
112 __syntaxFix__: "syntax fix" 110 __syntaxFix__: "syntax fix"
113}); 111});
114 112
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js
index 978a54e..bfa4658 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js
@@ -1,118 +1,116 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.FieldComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.FieldComponent = function(anElement, args) {
34//MochiKit.Logging.logDebug(">>> new FieldComponent"); 32//MochiKit.Logging.logDebug(">>> new FieldComponent");
35 args = args || {}; 33 args = args || {};
36 34
37 Clipperz.PM.Components.RecordDetail.FieldComponent.superclass.constructor.call(this, anElement, args); 35 Clipperz.PM.Components.RecordDetail.FieldComponent.superclass.constructor.call(this, anElement, args);
38 36
39 this._element = anElement; 37 this._element = anElement;
40 this._recordField = args.recordField || null; 38 this._recordField = args.recordField || null;
41 39
42 this._buttonComponent = null; 40 this._buttonComponent = null;
43 this._labelComponent = null; 41 this._labelComponent = null;
44 this._dragHandler = null; 42 this._dragHandler = null;
45 this._valueComponent = null; 43 this._valueComponent = null;
46 this._typeComponent = null; 44 this._typeComponent = null;
47 45
48 this.mainComponent().addEditComponent(this); 46 this.mainComponent().addEditComponent(this);
49 47
50 this.render(); 48 this.render();
51 49
52 return this; 50 return this;
53} 51}
54 52
55//============================================================================= 53//=============================================================================
56 54
57YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 55YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
58 56
59 'toString': function() { 57 'toString': function() {
60 return "Clipperz.PM.Components.RecordDetail.FieldComponent component"; 58 return "Clipperz.PM.Components.RecordDetail.FieldComponent component";
61 }, 59 },
62 60
63 //------------------------------------------------------------------------- 61 //-------------------------------------------------------------------------
64 62
65 'recordField': function() { 63 'recordField': function() {
66 return this._recordField; 64 return this._recordField;
67 }, 65 },
68 66
69 //------------------------------------------------------------------------- 67 //-------------------------------------------------------------------------
70 68
71 'buttonComponent': function() { 69 'buttonComponent': function() {
72 return this._buttonComponent; 70 return this._buttonComponent;
73 }, 71 },
74 72
75 'setButtonComponent': function(aValue) { 73 'setButtonComponent': function(aValue) {
76 this._buttonComponent = aValue; 74 this._buttonComponent = aValue;
77 }, 75 },
78 76
79 //------------------------------------------------------------------------- 77 //-------------------------------------------------------------------------
80 78
81 'labelComponent': function() { 79 'labelComponent': function() {
82 return this._labelComponent; 80 return this._labelComponent;
83 }, 81 },
84 82
85 'setLabelComponent': function(aValue) { 83 'setLabelComponent': function(aValue) {
86 this._labelComponent = aValue; 84 this._labelComponent = aValue;
87 }, 85 },
88 86
89 //------------------------------------------------------------------------- 87 //-------------------------------------------------------------------------
90 88
91 'dragHandler': function() { 89 'dragHandler': function() {
92 return this._dragHandler; 90 return this._dragHandler;
93 }, 91 },
94 92
95 'setDragHandler': function(aValue) { 93 'setDragHandler': function(aValue) {
96 this._dragHandler = aValue; 94 this._dragHandler = aValue;
97 }, 95 },
98 96
99 //------------------------------------------------------------------------- 97 //-------------------------------------------------------------------------
100 98
101 'valueComponent': function() { 99 'valueComponent': function() {
102 return this._valueComponent; 100 return this._valueComponent;
103 }, 101 },
104 102
105 'setValueComponent': function(aValue) { 103 'setValueComponent': function(aValue) {
106 this._valueComponent = aValue; 104 this._valueComponent = aValue;
107 }, 105 },
108 106
109 //------------------------------------------------------------------------- 107 //-------------------------------------------------------------------------
110 108
111 'typeComponent': function() { 109 'typeComponent': function() {
112 return this._typeComponent; 110 return this._typeComponent;
113 }, 111 },
114 112
115 'setTypeComponent': function(aValue) { 113 'setTypeComponent': function(aValue) {
116 this._typeComponent = aValue; 114 this._typeComponent = aValue;
117 }, 115 },
118 116
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js
index f7c5e21..7fea132 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js
@@ -1,56 +1,54 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.FieldDragHandler = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.FieldDragHandler = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.FieldDragHandler.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.FieldDragHandler.superclass.constructor.call(this, anElement, args);
37 35
38 this._element = anElement; 36 this._element = anElement;
39 37
40 this.render(); 38 this.render();
41 39
42 return this; 40 return this;
43} 41}
44 42
45//============================================================================= 43//=============================================================================
46 44
47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldDragHandler, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 45YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldDragHandler, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
48 46
49 'toString': function() { 47 'toString': function() {
50 return "Clipperz.PM.Components.RecordDetail.FieldDragHandler component"; 48 return "Clipperz.PM.Components.RecordDetail.FieldDragHandler component";
51 }, 49 },
52 50
53 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
54 __syntaxFix__: "syntax fix" 52 __syntaxFix__: "syntax fix"
55}); 53});
56 54
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js
index c58a7e2..c6f8cbf 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js
@@ -1,118 +1,116 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.FieldLabelComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.FieldLabelComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.FieldLabelComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.FieldLabelComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this._inputElement = null; 36 this._inputElement = null;
39 37
40 this.render(); 38 this.render();
41 39
42 return this; 40 return this;
43} 41}
44 42
45//============================================================================= 43//=============================================================================
46 44
47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldLabelComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 45YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldLabelComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
48 46
49 'toString': function() { 47 'toString': function() {
50 return "Clipperz.PM.Components.RecordDetail.FieldLabelComponent component"; 48 return "Clipperz.PM.Components.RecordDetail.FieldLabelComponent component";
51 }, 49 },
52 50
53 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
54 52
55 'value': function() { 53 'value': function() {
56 return this.recordField().label(); 54 return this.recordField().label();
57 }, 55 },
58 56
59 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
60 58
61 'inputElement': function() { 59 'inputElement': function() {
62 return this._inputElement; 60 return this._inputElement;
63 }, 61 },
64 62
65 'setInputElement': function(aValue) { 63 'setInputElement': function(aValue) {
66 this._inputElement = aValue; 64 this._inputElement = aValue;
67 }, 65 },
68 66
69 //------------------------------------------------------------------------- 67 //-------------------------------------------------------------------------
70 68
71 'render': function() { 69 'render': function() {
72 varnewTextFormField; 70 varnewTextFormField;
73 this.element().update(""); 71 this.element().update("");
74 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'Clipperz_recordFieldLabel', id:this.getId('label')}); 72 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'Clipperz_recordFieldLabel', id:this.getId('label')});
75 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'font-size:8pt;', html:this.recordField().key()}); 73 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'font-size:8pt;', html:this.recordField().key()});
76 74
77 // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()})); 75 // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()}));
78 newTextFormField = new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()}); 76 newTextFormField = new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()});
79 // newTextFormField.inputElement().setStyle({border:'3px solid cyan;'}); 77 // newTextFormField.inputElement().setStyle({border:'3px solid cyan;'});
80 newTextFormField.on('change', this.notifyChanges, this, true) 78 newTextFormField.on('change', this.notifyChanges, this, true)
81 // this.inputElement().on('change', function() {alert("CHANGE");}); 79 // this.inputElement().on('change', function() {alert("CHANGE");});
82 // this.inputElement().getElement('editComponent_input').on('change', function() {alert("CHANGE");}) 80 // this.inputElement().getElement('editComponent_input').on('change', function() {alert("CHANGE");})
83 // this.inputElement().on('blur', this.notifyChanges, this, true); 81 // this.inputElement().on('blur', this.notifyChanges, this, true);
84 82
85 this.setInputElement(newTextFormField); 83 this.setInputElement(newTextFormField);
86 this.update(); 84 this.update();
87 }, 85 },
88 86
89 'notifyChanges': function() { 87 'notifyChanges': function() {
90//MochiKit.Logging.logDebug(">>> FieldLabelComponent.notifyChanges - " + this); 88//MochiKit.Logging.logDebug(">>> FieldLabelComponent.notifyChanges - " + this);
91 this.synchronizeComponentValues(); 89 this.synchronizeComponentValues();
92 Clipperz.NotificationCenter.notify(this.recordField().recordVersion().record(), 'updatedFieldLabel'); 90 Clipperz.NotificationCenter.notify(this.recordField().recordVersion().record(), 'updatedFieldLabel');
93//MochiKit.Logging.logDebug("<<< FieldLabelComponent.notifyChanges"); 91//MochiKit.Logging.logDebug("<<< FieldLabelComponent.notifyChanges");
94 }, 92 },
95 93
96 //------------------------------------------------------------------------- 94 //-------------------------------------------------------------------------
97 95
98 'update': function() { 96 'update': function() {
99//MochiKit.Logging.logDebug(">>> FieldLabelComponent.update"); 97//MochiKit.Logging.logDebug(">>> FieldLabelComponent.update");
100 this.inputElement().update({editMode:this.editMode(), value:this.value()}); 98 this.inputElement().update({editMode:this.editMode(), value:this.value()});
101//MochiKit.Logging.logDebug("<<< FieldLabelComponent.update"); 99//MochiKit.Logging.logDebug("<<< FieldLabelComponent.update");
102 }, 100 },
103 101
104 //------------------------------------------------------------------------- 102 //-------------------------------------------------------------------------
105/* 103/*
106 'updateViewMode': function() { 104 'updateViewMode': function() {
107 varwidth; 105 varwidth;
108 varelement; 106 varelement;
109 107
110 this.element().update(""); 108 this.element().update("");
111 width = this.element().getWidth(); 109 width = this.element().getWidth();
112 element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.value()}, true); 110 element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.value()}, true);
113 element.setWidth(width-1); 111 element.setWidth(width-1);
114 }, 112 },
115 113
116 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
117 115
118 'updateEditMode': function() { 116 'updateEditMode': function() {
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js
index 489258a..3108885 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js
@@ -1,118 +1,116 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.FieldTypeComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.FieldTypeComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.FieldTypeComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.FieldTypeComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this._inputElement = null; 36 this._inputElement = null;
39 37
40 this.render(); 38 this.render();
41 39
42 return this; 40 return this;
43} 41}
44 42
45//============================================================================= 43//=============================================================================
46 44
47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldTypeComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 45YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldTypeComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
48 46
49 'toString': function() { 47 'toString': function() {
50 return "Clipperz.PM.Components.RecordDetail.FieldTypeComponent component"; 48 return "Clipperz.PM.Components.RecordDetail.FieldTypeComponent component";
51 }, 49 },
52 50
53 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
54 52
55 'inputElement': function() { 53 'inputElement': function() {
56 return this._inputElement; 54 return this._inputElement;
57 }, 55 },
58 56
59 'setInputElement': function(aValue) { 57 'setInputElement': function(aValue) {
60 this._inputElement = aValue; 58 this._inputElement = aValue;
61 }, 59 },
62 60
63 //------------------------------------------------------------------------- 61 //-------------------------------------------------------------------------
64 62
65 'value': function() { 63 'value': function() {
66 return this.recordField().type(); 64 return this.recordField().type();
67 }, 65 },
68 66
69 'canChangeType': function() { 67 'canChangeType': function() {
70 var value; 68 var value;
71 var result; 69 var result;
72 70
73 value = this.value(); 71 value = this.value();
74 result = ((value == 'TXT') || (value == 'PWD') || (value == 'URL') || (value == 'DATE') || (value == 'ADDR')); 72 result = ((value == 'TXT') || (value == 'PWD') || (value == 'URL') || (value == 'DATE') || (value == 'ADDR'));
75 73
76 return result 74 return result
77 }, 75 },
78 76
79 //------------------------------------------------------------------------- 77 //-------------------------------------------------------------------------
80 78
81 'updateViewMode': function() { 79 'updateViewMode': function() {
82 this.element().update(""); 80 this.element().update("");
83 if (this.canChangeType()) { 81 if (this.canChangeType()) {
84 varwidth; 82 varwidth;
85 var element; 83 var element;
86 84
87 width = this.element().getWidth(true); 85 width = this.element().getWidth(true);
88 element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.recordField().typeShortDescription()}, true); 86 element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.recordField().typeShortDescription()}, true);
89 element.setWidth(width-1); 87 element.setWidth(width-1);
90 } 88 }
91 }, 89 },
92 90
93 //------------------------------------------------------------------------- 91 //-------------------------------------------------------------------------
94 92
95 'updateEditMode': function() { 93 'updateEditMode': function() {
96 this.element().update(""); 94 this.element().update("");
97 95
98 if (this.canChangeType()) { 96 if (this.canChangeType()) {
99 varwidth; 97 varwidth;
100 98
101 width = this.element().getWidth(true); 99 width = this.element().getWidth(true);
102 this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'select', children:[ 100 this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'select', children:[
103 {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, 101 {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']},
104 {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, 102 {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']},
105 {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, 103 {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']},
106 {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, 104 {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']},
107 {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} 105 {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']}
108 106
109 // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['CHECK']['shortDescription']}, 107 // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['CHECK']['shortDescription']},
110 // {tag:'option', value:'RADIO', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['RADIO']['shortDescription']}, 108 // {tag:'option', value:'RADIO', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['RADIO']['shortDescription']},
111 // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['SELECT']['shortDescription']} 109 // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['SELECT']['shortDescription']}
112 // {tag:'option', value:'NOTE', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['NOTE']['shortDescription']} 110 // {tag:'option', value:'NOTE', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['NOTE']['shortDescription']}
113 ]}, true)); 111 ]}, true));
114 this.inputElement().setWidth(width-1); 112 this.inputElement().setWidth(width-1);
115 this.inputElement().addHandler('change', true, this.onChange, this, true); 113 this.inputElement().addHandler('change', true, this.onChange, this, true);
116 // this.selectCorrectOption(); 114 // this.selectCorrectOption();
117 Clipperz.DOM.selectOptionMatchingValue(this.inputElement().dom, this.value()); 115 Clipperz.DOM.selectOptionMatchingValue(this.inputElement().dom, this.value());
118 } 116 }
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
index 8621397..f2c70aa 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
@@ -1,118 +1,116 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.FieldValueComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.FieldValueComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.FieldValueComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.FieldValueComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this._inputElement = null; 36 this._inputElement = null;
39 this._scrambledStatus = 'SCRAMBLED'; //'UNSCRAMBLED' 37 this._scrambledStatus = 'SCRAMBLED'; //'UNSCRAMBLED'
40 38
41 this.render(); 39 this.render();
42 40
43 return this; 41 return this;
44} 42}
45 43
46//============================================================================= 44//=============================================================================
47 45
48YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 46YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
49 47
50 'toString': function() { 48 'toString': function() {
51 return "Clipperz.PM.Components.RecordDetail.FieldValueComponent component"; 49 return "Clipperz.PM.Components.RecordDetail.FieldValueComponent component";
52 }, 50 },
53 51
54 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
55 53
56 'value': function() { 54 'value': function() {
57 return this.recordField().value(); 55 return this.recordField().value();
58 }, 56 },
59 57
60 'setValue': function(aValue) { 58 'setValue': function(aValue) {
61 this.recordField().setValue(aValue); 59 this.recordField().setValue(aValue);
62 }, 60 },
63 61
64 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
65 63
66 'inputElement': function() { 64 'inputElement': function() {
67 return this._inputElement; 65 return this._inputElement;
68 }, 66 },
69 67
70 'setInputElement': function(aValue) { 68 'setInputElement': function(aValue) {
71 this._inputElement = aValue; 69 this._inputElement = aValue;
72 }, 70 },
73 71
74 //------------------------------------------------------------------------- 72 //-------------------------------------------------------------------------
75 73
76 'scrambledStatus': function() { 74 'scrambledStatus': function() {
77 return this._scrambledStatus; 75 return this._scrambledStatus;
78 }, 76 },
79 77
80 'setScrambledStatus': function(aValue) { 78 'setScrambledStatus': function(aValue) {
81 this._scrambledStatus = aValue; 79 this._scrambledStatus = aValue;
82 }, 80 },
83 81
84 //------------------------------------------------------------------------- 82 //-------------------------------------------------------------------------
85 83
86 'handleTypeChange': function() { 84 'handleTypeChange': function() {
87//MochiKit.Logging.logDebug(">>> handling type change - " + this.recordField().type()); 85//MochiKit.Logging.logDebug(">>> handling type change - " + this.recordField().type());
88 this.synchronizeComponentValues(); 86 this.synchronizeComponentValues();
89 this.update(); 87 this.update();
90 }, 88 },
91 89
92 //------------------------------------------------------------------------- 90 //-------------------------------------------------------------------------
93 91
94 'addrUrl': function() { 92 'addrUrl': function() {
95 var result; 93 var result;
96 94
97 result = "http://maps.google.com/maps?q=" + this.value().split(' ').join('+'); 95 result = "http://maps.google.com/maps?q=" + this.value().split(' ').join('+');
98 96
99 return result; 97 return result;
100 }, 98 },
101 99
102 //------------------------------------------------------------------------- 100 //-------------------------------------------------------------------------
103 101
104 'updateViewMode': function() { 102 'updateViewMode': function() {
105 var scarmbledStatus; 103 var scarmbledStatus;
106 104
107 scrambledStatus = this.scrambledStatus() || 'SCRAMBLED'; 105 scrambledStatus = this.scrambledStatus() || 'SCRAMBLED';
108 106
109 this.element().update(""); 107 this.element().update("");
110 if (this.recordField().hidden() == false) { 108 if (this.recordField().hidden() == false) {
111 switch(this.recordField().type()) { 109 switch(this.recordField().type()) {
112 case 'TXT': 110 case 'TXT':
113 case 'PWD': 111 case 'PWD':
114 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()}); 112 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()});
115 break; 113 break;
116 case 'URL': 114 case 'URL':
117 varurlLocation; 115 varurlLocation;
118 116
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js
index 46f456b..4f12c88 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js
@@ -1,118 +1,116 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.HeaderComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.HeaderComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.HeaderComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.HeaderComponent.superclass.constructor.call(this, anElement, args);
37 this.mainComponent().addEditComponent(this); 35 this.mainComponent().addEditComponent(this);
38 36
39 this._saveButton = null; 37 this._saveButton = null;
40 38
41 this.render(); 39 this.render();
42 40
43 return this; 41 return this;
44} 42}
45 43
46//============================================================================= 44//=============================================================================
47 45
48YAHOO.extendX(Clipperz.PM.Components.RecordDetail.HeaderComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 46YAHOO.extendX(Clipperz.PM.Components.RecordDetail.HeaderComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
49 47
50 'toString': function() { 48 'toString': function() {
51 return "Clipperz.PM.Components.RecordDetail.HeaderComponent component"; 49 return "Clipperz.PM.Components.RecordDetail.HeaderComponent component";
52 }, 50 },
53 51
54 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
55 53
56 'render': function() { 54 'render': function() {
57 var editButton; 55 var editButton;
58 56
59//MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.appendTo"); 57//MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.appendTo");
60 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'recordDetailButtonsBox', children:[ 58 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'recordDetailButtonsBox', children:[
61 {tag:'div', id:this.getId('editButtonBox'), children:[ 59 {tag:'div', id:this.getId('editButtonBox'), children:[
62 {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ 60 {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[
63 {tag:'tbody', children:[ 61 {tag:'tbody', children:[
64 {tag:'tr', children:[ 62 {tag:'tr', children:[
65 {tag:'td', align:'center', children:[ 63 {tag:'td', align:'center', children:[
66 {tag:'div', id:this.getId('editButton')} 64 {tag:'div', id:this.getId('editButton')}
67 ]} 65 ]}
68 ]} 66 ]}
69 ]} 67 ]}
70 ]} 68 ]}
71 ]}, 69 ]},
72 {tag:'div', id:this.getId('saveCancelButtonBox'), children:[ 70 {tag:'div', id:this.getId('saveCancelButtonBox'), children:[
73 {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ 71 {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[
74 {tag:'tbody', children:[ 72 {tag:'tbody', children:[
75 {tag:'tr', children:[ 73 {tag:'tr', children:[
76 {tag:'td', width:'49%', align:'right', children:[ 74 {tag:'td', width:'49%', align:'right', children:[
77 {tag:'div', id:this.getId('saveButton')} 75 {tag:'div', id:this.getId('saveButton')}
78 ]}, 76 ]},
79 {tag:'td', html:'&nbsp'}, 77 {tag:'td', html:'&nbsp'},
80 {tag:'td', width:'49%', align:'left', children:[ 78 {tag:'td', width:'49%', align:'left', children:[
81 {tag:'div', id:this.getId('cancelButton')} 79 {tag:'div', id:this.getId('cancelButton')}
82 ]} 80 ]}
83 ]} 81 ]}
84 ]} 82 ]}
85 ]} 83 ]}
86 ]} 84 ]}
87 ]}); 85 ]});
88 86
89 this.getElement('editButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 87 this.getElement('editButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
90 this.getElement('saveCancelButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 88 this.getElement('saveCancelButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
91 89
92 editButton = new YAHOO.ext.Button(this.getDom('editButton'), {text:Clipperz.PM.Strings['recordDetailEditButtonLabel'], handler:this.editButtonHandler, scope:this}); 90 editButton = new YAHOO.ext.Button(this.getDom('editButton'), {text:Clipperz.PM.Strings['recordDetailEditButtonLabel'], handler:this.editButtonHandler, scope:this});
93 this.setSaveButton(new YAHOO.ext.Button(this.getDom('saveButton'), {text:Clipperz.PM.Strings['recordDetailSaveButtonLabel'], handler:this.saveButtonHandler, scope:this})); 91 this.setSaveButton(new YAHOO.ext.Button(this.getDom('saveButton'), {text:Clipperz.PM.Strings['recordDetailSaveButtonLabel'], handler:this.saveButtonHandler, scope:this}));
94 new YAHOO.ext.Button(this.getDom('cancelButton'), {text:Clipperz.PM.Strings['recordDetailCancelButtonLabel'], handler:this.cancelButtonHandler, scope:this}); 92 new YAHOO.ext.Button(this.getDom('cancelButton'), {text:Clipperz.PM.Strings['recordDetailCancelButtonLabel'], handler:this.cancelButtonHandler, scope:this});
95 93
96 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 94 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
97 editButton.disable(); 95 editButton.disable();
98 } 96 }
99 97
100 this.update(); 98 this.update();
101//MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.appendTo"); 99//MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.appendTo");
102 }, 100 },
103 101
104 //------------------------------------------------------------------------- 102 //-------------------------------------------------------------------------
105 103
106 'updateViewMode': function() { 104 'updateViewMode': function() {
107//MochiKit.Logging.logDebug(">>> HeaderComponent.updateViewMode"); 105//MochiKit.Logging.logDebug(">>> HeaderComponent.updateViewMode");
108 this.getElement('editButtonBox').show(); 106 this.getElement('editButtonBox').show();
109 this.getElement('saveCancelButtonBox').hide(); 107 this.getElement('saveCancelButtonBox').hide();
110//MochiKit.Logging.logDebug("<<< HeaderComponent.updateViewMode"); 108//MochiKit.Logging.logDebug("<<< HeaderComponent.updateViewMode");
111 }, 109 },
112 110
113 //------------------------------------------------------------------------- 111 //-------------------------------------------------------------------------
114 112
115 'updateEditMode': function() { 113 'updateEditMode': function() {
116 this.getElement('editButtonBox').hide(); 114 this.getElement('editButtonBox').hide();
117 this.getElement('saveCancelButtonBox').show(); 115 this.getElement('saveCancelButtonBox').show();
118 if (this.mainComponent().enableSaveButton() == true) { 116 if (this.mainComponent().enableSaveButton() == true) {
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js
index d6a03d7..47ed3e6 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js
@@ -1,118 +1,116 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.MainComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.MainComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.MainComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.MainComponent.superclass.constructor.call(this, anElement, args);
37 35
38 //this._element = args.element; 36 //this._element = args.element;
39 this._user = args.user; 37 this._user = args.user;
40 this._editMode = args.editMode || 'VIEW'; //[ 'VIEW' | 'EDIT' ] 38 this._editMode = args.editMode || 'VIEW'; //[ 'VIEW' | 'EDIT' ]
41 this._mainPanel = args.mainPanel; 39 this._mainPanel = args.mainPanel;
42 40
43 this._record = null; 41 this._record = null;
44 this._editComponents = []; 42 this._editComponents = [];
45 this._addFieldButton = null; 43 this._addFieldButton = null;
46 44
47 this._enableSaveButton = true; 45 this._enableSaveButton = true;
48 this._shouldShowLoginInfo = (Clipperz.PM.Proxy.defaultProxy.isReadOnly() ? false : true); 46 this._shouldShowLoginInfo = (Clipperz.PM.Proxy.defaultProxy.isReadOnly() ? false : true);
49 47
50 //this._mainLayoutManager = null; 48 //this._mainLayoutManager = null;
51 //this._layoutRegion = null; 49 //this._layoutRegion = null;
52 50
53 Clipperz.NotificationCenter.register(null, 'loadingRecordData', this, 'render'); 51 Clipperz.NotificationCenter.register(null, 'loadingRecordData', this, 'render');
54 Clipperz.NotificationCenter.register(null, 'decryptingRecordData', this, 'render'); 52 Clipperz.NotificationCenter.register(null, 'decryptingRecordData', this, 'render');
55 Clipperz.NotificationCenter.register(null, 'loadingRecordVersionData', this, 'render'); 53 Clipperz.NotificationCenter.register(null, 'loadingRecordVersionData', this, 'render');
56 Clipperz.NotificationCenter.register(null, 'decryptingRecordVersionData', this, 'render'); 54 Clipperz.NotificationCenter.register(null, 'decryptingRecordVersionData', this, 'render');
57 Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); 55 Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render');
58 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'render'); 56 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'render');
59 57
60 this.render(); 58 this.render();
61 59
62 return this; 60 return this;
63} 61}
64 62
65//============================================================================= 63//=============================================================================
66 64
67YAHOO.extendX(Clipperz.PM.Components.RecordDetail.MainComponent, Clipperz.PM.Components.BaseComponent, { 65YAHOO.extendX(Clipperz.PM.Components.RecordDetail.MainComponent, Clipperz.PM.Components.BaseComponent, {
68 66
69 'toString': function() { 67 'toString': function() {
70 return "Clipperz.PM.Components.RecordDetail.MainComponent component"; 68 return "Clipperz.PM.Components.RecordDetail.MainComponent component";
71 }, 69 },
72 70
73 //------------------------------------------------------------------------- 71 //-------------------------------------------------------------------------
74 72
75 'editMode': function() { 73 'editMode': function() {
76 return this._editMode; 74 return this._editMode;
77 }, 75 },
78 76
79 'setEditMode': function(aValue, aButtonElement, shouldSkipComponentSynchronization) { 77 'setEditMode': function(aValue, aButtonElement, shouldSkipComponentSynchronization) {
80//MochiKit.Logging.logDebug(">>> MainComponent.setEditingMode"); 78//MochiKit.Logging.logDebug(">>> MainComponent.setEditingMode");
81 this.scrollToTop(); 79 this.scrollToTop();
82 80
83 if (aValue == 'VIEW') { 81 if (aValue == 'VIEW') {
84 if (shouldSkipComponentSynchronization == true) { 82 if (shouldSkipComponentSynchronization == true) {
85 this.exitModalView(); 83 this.exitModalView();
86 } else { 84 } else {
87 this.synchronizeComponentValues(); 85 this.synchronizeComponentValues();
88 if (this.record().hasPendingChanges()) { 86 if (this.record().hasPendingChanges()) {
89 if (this.record().isBrandNew()) { 87 if (this.record().isBrandNew()) {
90 this.record().removeEmptyFields(); 88 this.record().removeEmptyFields();
91 } 89 }
92 this.saveCurrentRecordChanges(aButtonElement); 90 this.saveCurrentRecordChanges(aButtonElement);
93 } else { 91 } else {
94 if (this.record().isBrandNew()) { 92 if (this.record().isBrandNew()) {
95 this.record().user().removeRecord(this.record()); 93 this.record().user().removeRecord(this.record());
96 } 94 }
97 this.exitModalView(); 95 this.exitModalView();
98 } 96 }
99 } 97 }
100 } else if (aValue == 'EDIT') { 98 } else if (aValue == 'EDIT') {
101 this.enterModalView(); 99 this.enterModalView();
102 } else { 100 } else {
103 //???? 101 //????
104 } 102 }
105 103
106 this._editMode = aValue; 104 this._editMode = aValue;
107 this.render(); 105 this.render();
108 }, 106 },
109 107
110 //------------------------------------------------------------------------- 108 //-------------------------------------------------------------------------
111 109
112 'user': function() { 110 'user': function() {
113 return this._user; 111 return this._user;
114 }, 112 },
115 113
116 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
117 115
118 'mainPanel': function() { 116 'mainPanel': function() {
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js
index 2066543..bb23e8d 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js
@@ -1,118 +1,116 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33 31
34 32
35Clipperz.PM.Components.RecordDetail.NotesComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.NotesComponent = function(anElement, args) {
36//MochiKit.Logging.logDebug(">>> new NotesComponent"); 34//MochiKit.Logging.logDebug(">>> new NotesComponent");
37 args = args || {}; 35 args = args || {};
38 36
39 Clipperz.PM.Components.RecordDetail.NotesComponent.superclass.constructor.call(this, anElement, args); 37 Clipperz.PM.Components.RecordDetail.NotesComponent.superclass.constructor.call(this, anElement, args);
40 38
41 this.mainComponent().addEditComponent(this); 39 this.mainComponent().addEditComponent(this);
42 40
43 this._staticOffset = null; 41 this._staticOffset = null;
44 this._componentHeight = 50; 42 this._componentHeight = 50;
45 this._mouseMoveIdentifier = null; 43 this._mouseMoveIdentifier = null;
46 this._mouseUpIdentifier = null; 44 this._mouseUpIdentifier = null;
47 45
48 this.element().setVisibilityMode(YAHOO.ext.Element.DISPLAY); 46 this.element().setVisibilityMode(YAHOO.ext.Element.DISPLAY);
49 47
50 this.render(); 48 this.render();
51//MochiKit.Logging.logDebug("<<< new NotesComponent"); 49//MochiKit.Logging.logDebug("<<< new NotesComponent");
52 50
53 return this; 51 return this;
54} 52}
55 53
56//============================================================================= 54//=============================================================================
57 55
58YAHOO.extendX(Clipperz.PM.Components.RecordDetail.NotesComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 56YAHOO.extendX(Clipperz.PM.Components.RecordDetail.NotesComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
59 57
60 'toString': function() { 58 'toString': function() {
61 return "Clipperz.PM.Components.RecordDetail.NotesComponent component"; 59 return "Clipperz.PM.Components.RecordDetail.NotesComponent component";
62 }, 60 },
63 61
64 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
65 63
66 'value': function() { 64 'value': function() {
67 return this.record().notes(); 65 return this.record().notes();
68 }, 66 },
69 67
70 'setValue': function(aValue) { 68 'setValue': function(aValue) {
71 this.record().setNotes(aValue); 69 this.record().setNotes(aValue);
72 }, 70 },
73 71
74 //------------------------------------------------------------------------- 72 //-------------------------------------------------------------------------
75 73
76 'render': function() { 74 'render': function() {
77//MochiKit.Logging.logDebug(">>> NotesComponent.render"); 75//MochiKit.Logging.logDebug(">>> NotesComponent.render");
78/* 76/*
79 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:'5', children:[ 77 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:'5', children:[
80 {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}, 78 {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']},
81 {tag:'div', cls:'noteFieldContent', id:this.getId('notes')} 79 {tag:'div', cls:'noteFieldContent', id:this.getId('notes')}
82 ]}); 80 ]});
83 */ 81 */
84 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}); 82 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']});
85 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'noteFieldContent', id:this.getId('notes'), children:[ 83 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'noteFieldContent', id:this.getId('notes'), children:[
86 {tag:'div', id:this.getId('resizableDiv'), cls:'resizable-textarea', children:[ 84 {tag:'div', id:this.getId('resizableDiv'), cls:'resizable-textarea', children:[
87 {tag:'div', id:this.getId('contentView'), cls:'viewMode', html:""}, 85 {tag:'div', id:this.getId('contentView'), cls:'viewMode', html:""},
88 {tag:'div', id:this.getId('contentEdit'), children:[ 86 {tag:'div', id:this.getId('contentEdit'), children:[
89 {tag:'span', children:[ 87 {tag:'span', children:[
90 {tag:'textarea', id:this.getId('textarea'), html:""} 88 {tag:'textarea', id:this.getId('textarea'), html:""}
91 ]} 89 ]}
92 ]}, 90 ]},
93 {tag:'div', id:this.getId('grippie'), cls:'grippie'} 91 {tag:'div', id:this.getId('grippie'), cls:'grippie'}
94 ]} 92 ]}
95 ]}); 93 ]});
96 94
97 this.getElement('contentView').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 95 this.getElement('contentView').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
98 this.getElement('contentEdit').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 96 this.getElement('contentEdit').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
99 97
100 MochiKit.Signal.connect(this.getId('grippie'), 'onmousedown', this, 'startResize'); 98 MochiKit.Signal.connect(this.getId('grippie'), 'onmousedown', this, 'startResize');
101 99
102 this.update(); 100 this.update();
103//MochiKit.Logging.logDebug("<<< NotesComponent.render"); 101//MochiKit.Logging.logDebug("<<< NotesComponent.render");
104 }, 102 },
105 103
106 //------------------------------------------------------------------------- 104 //-------------------------------------------------------------------------
107 105
108 'updateViewMode': function() { 106 'updateViewMode': function() {
109//MochiKit.Logging.logDebug(">>> NotesComponent.updateViewMode"); 107//MochiKit.Logging.logDebug(">>> NotesComponent.updateViewMode");
110 // this.getElement('notes').update(this.value().replace(/\n/g, '<br>')); 108 // this.getElement('notes').update(this.value().replace(/\n/g, '<br>'));
111 109
112 this.getElement('contentView').update(Clipperz.Base.sanitizeString(this.value()).replace(/\n/g, '<br>')); 110 this.getElement('contentView').update(Clipperz.Base.sanitizeString(this.value()).replace(/\n/g, '<br>'));
113 111
114 if (this.isNoteEmpty()) { 112 if (this.isNoteEmpty()) {
115 this.element().hide(); 113 this.element().hide();
116 } else { 114 } else {
117 this.getElement('contentView').show(); 115 this.getElement('contentView').show();
118 this.getElement('contentView').setHeight(this.componentHeight()); 116 this.getElement('contentView').setHeight(this.componentHeight());
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js
index 29fe972..d114eaa 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js
@@ -1,118 +1,116 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.TitleComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.TitleComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.TitleComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.TitleComponent.superclass.constructor.call(this, anElement, args);
37 35
38 //this._inputElement = null; 36 //this._inputElement = null;
39 37
40 this.mainComponent().addEditComponent(this); 38 this.mainComponent().addEditComponent(this);
41 39
42 this.render(); 40 this.render();
43 41
44 return this; 42 return this;
45} 43}
46 44
47//============================================================================= 45//=============================================================================
48 46
49YAHOO.extendX(Clipperz.PM.Components.RecordDetail.TitleComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.TitleComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
50 48
51 'toString': function() { 49 'toString': function() {
52 return "Clipperz.PM.Components.RecordDetail.TitleComponent component"; 50 return "Clipperz.PM.Components.RecordDetail.TitleComponent component";
53 }, 51 },
54 52
55 //------------------------------------------------------------------------- 53 //-------------------------------------------------------------------------
56 54
57 'value': function() { 55 'value': function() {
58 return this.record().label(); 56 return this.record().label();
59 }, 57 },
60 58
61 'setValue': function(aValue) { 59 'setValue': function(aValue) {
62 this.record().setLabel(aValue); 60 this.record().setLabel(aValue);
63 }, 61 },
64 62
65 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
66/* 64/*
67 'inputElement': function() { 65 'inputElement': function() {
68 return this._inputElement; 66 return this._inputElement;
69 }, 67 },
70 68
71 'setInputElement': function(aValue) { 69 'setInputElement': function(aValue) {
72 this._inputElement = aValue; 70 this._inputElement = aValue;
73 }, 71 },
74*/ 72*/
75 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
76 74
77 'render': function() { 75 'render': function() {
78 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:'&#160'}); 76 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:'&#160'});
79 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:"3", html:'&#160', children:[ 77 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:"3", html:'&#160', children:[
80 // {tag:'div', /*style:'border: 1px solid green;',*/ id:this.getId('title')} 78 // {tag:'div', /*style:'border: 1px solid green;',*/ id:this.getId('title')}
81 // ]}); 79 // ]});
82 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:'&#160'}); 80 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:'&#160'});
83 // 81 //
84 // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), {editMode:this.editMode(), value:this.value()})); 82 // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), {editMode:this.editMode(), value:this.value()}));
85 83
86 this.update(); 84 this.update();
87 }, 85 },
88 86
89 //------------------------------------------------------------------------- 87 //-------------------------------------------------------------------------
90/* 88/*
91 'update': function() { 89 'update': function() {
92 this.inputElement().update({value:this.value(), editMode:this.editMode()}); 90 this.inputElement().update({value:this.value(), editMode:this.editMode()});
93 }, 91 },
94 */ 92 */
95 //------------------------------------------------------------------------- 93 //-------------------------------------------------------------------------
96 94
97 'updateViewMode': function() { 95 'updateViewMode': function() {
98 this.element().update(""); 96 this.element().update("");
99 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'h2', html:this.value()}); 97 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'h2', html:this.value()});
100 }, 98 },
101 99
102 //------------------------------------------------------------------------- 100 //-------------------------------------------------------------------------
103 101
104 'updateEditMode': function() { 102 'updateEditMode': function() {
105//MochiKit.Logging.logDebug(">>> TitleComponent.updateEditMode"); 103//MochiKit.Logging.logDebug(">>> TitleComponent.updateEditMode");
106 // this.getElement('title').update(""); 104 // this.getElement('title').update("");
107 // Clipperz.YUI.DomHelper.append(this.getDom('title'), {tag:'div', id:this.getId('title_input')}); 105 // Clipperz.YUI.DomHelper.append(this.getDom('title'), {tag:'div', id:this.getId('title_input')});
108 // this.setInputElement(Clipperz.YUI.DomHelper.append(this.getDom('title_input'), {tag:'input', type:'text', value:this.value()}, true)); 106 // this.setInputElement(Clipperz.YUI.DomHelper.append(this.getDom('title_input'), {tag:'input', type:'text', value:this.value()}, true));
109 107
110 this.element().update(""); 108 this.element().update("");
111 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', id:this.getId('titleField'), type:'text', value:"this.value()"}); 109 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', id:this.getId('titleField'), type:'text', value:"this.value()"});
112 this.getElement('titleField').dom.value = this.value(); 110 this.getElement('titleField').dom.value = this.value();
113 111
114//MochiKit.Logging.logDebug("<<< TitleComponent.updateEditMode"); 112//MochiKit.Logging.logDebug("<<< TitleComponent.updateEditMode");
115 }, 113 },
116 114
117 //------------------------------------------------------------------------- 115 //-------------------------------------------------------------------------
118 116