Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js index a92285f..d4c7837 100644 --- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js +++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.RecordDetail.CreationWizard = function(anElement, args) { | 33 | Clipperz.PM.Components.RecordDetail.CreationWizard = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.RecordDetail.CreationWizard.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.RecordDetail.CreationWizard.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._mainComponent = args.mainComponent; | 38 | this._mainComponent = args.mainComponent; |
42 | this._previouslySelectedRecord = args.previouslySelectedRecord; | 39 | this._previouslySelectedRecord = args.previouslySelectedRecord; |
43 | //MochiKit.Logging.logDebug("--- new CreationWizard - previouslySelectedRecord: " + args.previouslySelectedRecord); | 40 | //MochiKit.Logging.logDebug("--- new CreationWizard - previouslySelectedRecord: " + args.previouslySelectedRecord); |
44 | this._createButton_header = null; | 41 | this._createButton_header = null; |
45 | this._createButton_footer = null; | 42 | this._createButton_footer = null; |
46 | 43 | ||
47 | this._cancelButton_header = null; | 44 | this._cancelButton_header = null; |
48 | this._cancelButton_footer = null; | 45 | this._cancelButton_footer = null; |
49 | 46 | ||
50 | this.render(); | 47 | this.render(); |
51 | 48 | ||
52 | return this; | 49 | return this; |
53 | } | 50 | } |
54 | 51 | ||
55 | //============================================================================= | 52 | //============================================================================= |
56 | 53 | ||
57 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.CreationWizard, Clipperz.PM.Components.BaseComponent, { | 54 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.CreationWizard, Clipperz.PM.Components.BaseComponent, { |
58 | 55 | ||
59 | 'toString': function() { | 56 | 'toString': function() { |
60 | return "Clipperz.PM.Components.RecordDetail.CreationWizard component"; | 57 | return "Clipperz.PM.Components.RecordDetail.CreationWizard component"; |
61 | }, | 58 | }, |
62 | 59 | ||
63 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
64 | 61 | ||
65 | 'previouslySelectedRecord': function() { | 62 | 'previouslySelectedRecord': function() { |
66 | return this._previouslySelectedRecord; | 63 | return this._previouslySelectedRecord; |
67 | }, | 64 | }, |
68 | 65 | ||
69 | //------------------------------------------------------------------------- | 66 | //------------------------------------------------------------------------- |
70 | 67 | ||
71 | 'render': function() { | 68 | 'render': function() { |
72 | vartemplateListElement; | 69 | vartemplateListElement; |
73 | vartemplates; | 70 | vartemplates; |
74 | 71 | ||
75 | this.element().update(""); | 72 | this.element().update(""); |
76 | 73 | ||
77 | Clipperz.YUI.DomHelper.append(this.element().dom, | 74 | Clipperz.YUI.DomHelper.append(this.element().dom, |
78 | {tag:'form', cls:'recordDataFORM', id:this.getId('form'), children:[ | 75 | {tag:'form', cls:'recordDataFORM', id:this.getId('form'), children:[ |
79 | {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[ | 76 | {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[ |
80 | {tag:'div', id:this.getId('wizardBox'), cls:'recordCreationWizard', children:[ | 77 | {tag:'div', id:this.getId('wizardBox'), cls:'recordCreationWizard', children:[ |
81 | {tag:'div', id:this.getId('recordCreationWizardTitleBox'), cls:'recordCreationWizardTitleBox', htmlString:Clipperz.PM.Strings['newRecordWizardTitleBox']}, | 78 | {tag:'div', id:this.getId('recordCreationWizardTitleBox'), cls:'recordCreationWizardTitleBox', htmlString:Clipperz.PM.Strings['newRecordWizardTitleBox']}, |
82 | {tag:'ul', id:this.getId('templateList'), cls:'radioList'} | 79 | {tag:'ul', id:this.getId('templateList'), cls:'radioList'} |
83 | ]} | 80 | ]} |
84 | ]} | 81 | ]} |
85 | ]} | 82 | ]} |
86 | ); | 83 | ); |
87 | 84 | ||
88 | Clipperz.YUI.DomHelper.append(this.getDom('recordCreationWizardTitleBox'), {tag:'div', cls:'newRecordWizardHeader', children:[ | 85 | Clipperz.YUI.DomHelper.append(this.getDom('recordCreationWizardTitleBox'), {tag:'div', cls:'newRecordWizardHeader', children:[ |
89 | {tag:'table', width:'100%', cellpadding:'5', children:[ | 86 | {tag:'table', width:'100%', cellpadding:'5', children:[ |
90 | {tag:'tbody', children:[ | 87 | {tag:'tbody', children:[ |
91 | {tag:'tr', children:[ | 88 | {tag:'tr', children:[ |
92 | {tag:'td', width:'49%', align:'right', children:[ | 89 | {tag:'td', width:'49%', align:'right', children:[ |
93 | {tag:'div', id:this.getId('cancelButton_header')} | 90 | {tag:'div', id:this.getId('cancelButton_header')} |
94 | ]}, | 91 | ]}, |
95 | {tag:'td', width:'10', html:' '}, | 92 | {tag:'td', width:'10', html:' '}, |
96 | {tag:'td', width:'49%', align:'left', children:[ | 93 | {tag:'td', width:'49%', align:'left', children:[ |
97 | {tag:'div', id:this.getId('createButton_header')} | 94 | {tag:'div', id:this.getId('createButton_header')} |
98 | ]} | 95 | ]} |
99 | ]} | 96 | ]} |
100 | ]} | 97 | ]} |
101 | ]} | 98 | ]} |
102 | ]}); | 99 | ]}); |
103 | 100 | ||
104 | templateListElement = this.getElement('templateList'); | 101 | templateListElement = this.getElement('templateList'); |
105 | templates = Clipperz.PM.Strings['recordTemplates']; | 102 | templates = Clipperz.PM.Strings['recordTemplates']; |
106 | MochiKit.Iter.forEach(MochiKit.Base.keys(templates), MochiKit.Base.bind(function(aTemplateKey) { | 103 | MochiKit.Iter.forEach(MochiKit.Base.keys(templates), MochiKit.Base.bind(function(aTemplateKey) { |
107 | Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[ | 104 | Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[ |
108 | {tag:'table', children:[ | 105 | {tag:'table', children:[ |
109 | {tag:'tbody', children:[ | 106 | {tag:'tbody', children:[ |
110 | {tag:'tr', children:[ | 107 | {tag:'tr', children:[ |
111 | {tag:'td', valign:'top', children:[ | 108 | {tag:'td', valign:'top', children:[ |
112 | {tag:'input', id:this.getId(aTemplateKey+"_radio"), type:'radio', name:'recordTemplate', value:"aTemplateKey"} | 109 | {tag:'input', id:this.getId(aTemplateKey+"_radio"), type:'radio', name:'recordTemplate', value:"aTemplateKey"} |
113 | ]}, | 110 | ]}, |
114 | {tag:'td', valign:'top', children:[ | 111 | {tag:'td', valign:'top', children:[ |
115 | {tag:'h4', id:this.getId(aTemplateKey+"_title"), html:templates[aTemplateKey]['title']}, | 112 | {tag:'h4', id:this.getId(aTemplateKey+"_title"), html:templates[aTemplateKey]['title']}, |
116 | {tag:'div', cls:'templateDescription', htmlString:templates[aTemplateKey]['description']} | 113 | {tag:'div', cls:'templateDescription', htmlString:templates[aTemplateKey]['description']} |
117 | ]} | 114 | ]} |
118 | ]} | 115 | ]} |
119 | ]} | 116 | ]} |
120 | ]} | 117 | ]} |