Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Components/Import') (more/less context) (ignore whitespace changes)
13 files changed, 130 insertions, 156 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js index 3f4952d..fef8e9e 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js | |||
@@ -1,118 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 28 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
31 | 29 | ||
32 | //############################################################################# | 30 | //############################################################################# |
33 | 31 | ||
34 | Clipperz.PM.Components.Import.CSVImport.CSVImportColumns = function(anElement, args) { | 32 | Clipperz.PM.Components.Import.CSVImport.CSVImportColumns = function(anElement, args) { |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportColumns.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.Import.CSVImport.CSVImportColumns.superclass.constructor.call(this, anElement, args); |
38 | this._mainComponent = args.mainComponent; | 36 | this._mainComponent = args.mainComponent; |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportColumns, Clipperz.PM.Components.BaseComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportColumns, Clipperz.PM.Components.BaseComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportColumns component"; | 46 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportColumns component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'mainComponent': function() { | 51 | 'mainComponent': function() { |
54 | return this._mainComponent; | 52 | return this._mainComponent; |
55 | }, | 53 | }, |
56 | 54 | ||
57 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
58 | 56 | ||
59 | 'render': function() { | 57 | 'render': function() { |
60 | var i,c; | 58 | var i,c; |
61 | var columnSelectorCheckboxCells; | 59 | var columnSelectorCheckboxCells; |
62 | var checkboxes; | 60 | var checkboxes; |
63 | var data; | 61 | var data; |
64 | 62 | ||
65 | //MochiKit.Logging.logDebug(">>> CSVImportColumns.render"); | 63 | //MochiKit.Logging.logDebug(">>> CSVImportColumns.render"); |
66 | Clipperz.NotificationCenter.unregister(this); | 64 | Clipperz.NotificationCenter.unregister(this); |
67 | MochiKit.Signal.disconnectAllTo(this); | 65 | MochiKit.Signal.disconnectAllTo(this); |
68 | 66 | ||
69 | this.element().update(""); | 67 | this.element().update(""); |
70 | 68 | ||
71 | data = this.mainComponent().parsedValues(); | 69 | data = this.mainComponent().parsedValues(); |
72 | columnSelectorCheckboxCells = []; | 70 | columnSelectorCheckboxCells = []; |
73 | 71 | ||
74 | c =data[0].length; | 72 | c =data[0].length; |
75 | for (i=0; i<c; i++) { | 73 | for (i=0; i<c; i++) { |
76 | columnSelectorCheckboxCells.push({tag:'th', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), children:[ | 74 | columnSelectorCheckboxCells.push({tag:'th', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), children:[ |
77 | {tag:'input', type:'checkbox', id:this.getId('columnCheckbox_' + i), value:i} | 75 | {tag:'input', type:'checkbox', id:this.getId('columnCheckbox_' + i), value:i} |
78 | ]}) | 76 | ]}) |
79 | } | 77 | } |
80 | 78 | ||
81 | this.domHelper().append(this.element(), {tag:'div', children:[ | 79 | this.domHelper().append(this.element(), {tag:'div', children:[ |
82 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Columns']}, | 80 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Columns']}, |
83 | {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ | 81 | {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ |
84 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview columns', cellspacing:'0', children:[ | 82 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview columns', cellspacing:'0', children:[ |
85 | {tag:'thead', id:this.getId('previewData_thead'), children:[ | 83 | {tag:'thead', id:this.getId('previewData_thead'), children:[ |
86 | {tag:'tr', children:columnSelectorCheckboxCells} | 84 | {tag:'tr', children:columnSelectorCheckboxCells} |
87 | ]}, | 85 | ]}, |
88 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} | 86 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} |
89 | ]} | 87 | ]} |
90 | ]} | 88 | ]} |
91 | ]}); | 89 | ]}); |
92 | 90 | ||
93 | c =data[0].length; | 91 | c =data[0].length; |
94 | for (i=0; i<c; i++) { | 92 | for (i=0; i<c; i++) { |
95 | if (this.mainComponent().isColumnSelected(i)) { | 93 | if (this.mainComponent().isColumnSelected(i)) { |
96 | this.getDom('columnCheckbox_' + i).checked = true; | 94 | this.getDom('columnCheckbox_' + i).checked = true; |
97 | } | 95 | } |
98 | } | 96 | } |
99 | 97 | ||
100 | this.renderData(this.getElement('previewData_tbody'), data); | 98 | this.renderData(this.getElement('previewData_tbody'), data); |
101 | 99 | ||
102 | checkboxes = MochiKit.DOM.getElementsByTagAndClassName('input', null, this.getDom('previewData_thead')); | 100 | checkboxes = MochiKit.DOM.getElementsByTagAndClassName('input', null, this.getDom('previewData_thead')); |
103 | c = checkboxes.length; | 101 | c = checkboxes.length; |
104 | for (i=0; i<c; i++) { | 102 | for (i=0; i<c; i++) { |
105 | MochiKit.Signal.connect(checkboxes[i], 'onclick', this, 'renderDataHandler'); | 103 | MochiKit.Signal.connect(checkboxes[i], 'onclick', this, 'renderDataHandler'); |
106 | } | 104 | } |
107 | //MochiKit.Logging.logDebug("<<< CSVImportColumns.render"); | 105 | //MochiKit.Logging.logDebug("<<< CSVImportColumns.render"); |
108 | }, | 106 | }, |
109 | 107 | ||
110 | //------------------------------------------------------------------------- | 108 | //------------------------------------------------------------------------- |
111 | 109 | ||
112 | 'renderData': function(anElement, someData) { | 110 | 'renderData': function(anElement, someData) { |
113 | var config; | 111 | var config; |
114 | var i,c; | 112 | var i,c; |
115 | 113 | ||
116 | //MochiKit.Logging.logDebug(">>> CSVImportColumns.renderData"); | 114 | //MochiKit.Logging.logDebug(">>> CSVImportColumns.renderData"); |
117 | // anElement.update(""); | 115 | // anElement.update(""); |
118 | MochiKit.DOM.replaceChildNodes(anElement.dom); | 116 | MochiKit.DOM.replaceChildNodes(anElement.dom); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js index f7dbd5d..e816380 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js | |||
@@ -1,118 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 28 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
31 | 29 | ||
32 | //############################################################################# | 30 | //############################################################################# |
33 | 31 | ||
34 | Clipperz.PM.Components.Import.CSVImport.CSVImportFields = function(anElement, args) { | 32 | Clipperz.PM.Components.Import.CSVImport.CSVImportFields = function(anElement, args) { |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportFields.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.Import.CSVImport.CSVImportFields.superclass.constructor.call(this, anElement, args); |
38 | this._mainComponent = args.mainComponent; | 36 | this._mainComponent = args.mainComponent; |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportFields, Clipperz.PM.Components.BaseComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportFields, Clipperz.PM.Components.BaseComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportFields component"; | 46 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportFields component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'mainComponent': function() { | 51 | 'mainComponent': function() { |
54 | return this._mainComponent; | 52 | return this._mainComponent; |
55 | }, | 53 | }, |
56 | 54 | ||
57 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
58 | 56 | ||
59 | 'render': function() { | 57 | 'render': function() { |
60 | varfieldsHeaderCells; | 58 | varfieldsHeaderCells; |
61 | var titleColumnIndex; | 59 | var titleColumnIndex; |
62 | var notesColumnIndex; | 60 | var notesColumnIndex; |
63 | var i,c; | 61 | var i,c; |
64 | 62 | ||
65 | Clipperz.NotificationCenter.unregister(this); | 63 | Clipperz.NotificationCenter.unregister(this); |
66 | MochiKit.Signal.disconnectAllTo(this); | 64 | MochiKit.Signal.disconnectAllTo(this); |
67 | 65 | ||
68 | this.element().update(""); | 66 | this.element().update(""); |
69 | 67 | ||
70 | titleColumnIndex = this.mainComponent().titleColumnIndex() | 68 | titleColumnIndex = this.mainComponent().titleColumnIndex() |
71 | notesColumnIndex = this.mainComponent().notesColumnIndex() | 69 | notesColumnIndex = this.mainComponent().notesColumnIndex() |
72 | 70 | ||
73 | fieldsHeaderCells = []; | 71 | fieldsHeaderCells = []; |
74 | fieldsHeaderCells.push({tag:'td', valign:'top', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}); | 72 | fieldsHeaderCells.push({tag:'td', valign:'top', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}); |
75 | 73 | ||
76 | c =this.mainComponent().parsedValues()[0].length; | 74 | c =this.mainComponent().parsedValues()[0].length; |
77 | for (i=0; i<c; i++) { | 75 | for (i=0; i<c; i++) { |
78 | if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { | 76 | if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { |
79 | var trimmedLabel; | 77 | var trimmedLabel; |
80 | 78 | ||
81 | trimmedLabel = Clipperz.Base.trim(this.mainComponent().labelForColumn(i)); | 79 | trimmedLabel = Clipperz.Base.trim(this.mainComponent().labelForColumn(i)); |
82 | fieldsHeaderCells.push({tag:'td', valign:'top', id:this.getId('fieldHeaderTD_' + i), cls:((trimmedLabel == "") ? 'missingLabelWarning' : (this.isColumnSetup(i) ? 'configuredColumn': 'unconfiguredColumn')), children:[ | 80 | fieldsHeaderCells.push({tag:'td', valign:'top', id:this.getId('fieldHeaderTD_' + i), cls:((trimmedLabel == "") ? 'missingLabelWarning' : (this.isColumnSetup(i) ? 'configuredColumn': 'unconfiguredColumn')), children:[ |
83 | {tag:'span', html:((trimmedLabel == "") ? Clipperz.PM.Strings['CSV_ImportWizard_Fields_MissingLabelWarning'] : trimmedLabel)/*, cls:((trimmedLabel == "") ? 'missingLabelWarning' : '')*/}, | 81 | {tag:'span', html:((trimmedLabel == "") ? Clipperz.PM.Strings['CSV_ImportWizard_Fields_MissingLabelWarning'] : trimmedLabel)/*, cls:((trimmedLabel == "") ? 'missingLabelWarning' : '')*/}, |
84 | {tag:'select', id:this.getId('select_' + i), name:i, children:[ | 82 | {tag:'select', id:this.getId('select_' + i), name:i, children:[ |
85 | {tag:'option', value:'UNDEFINED', html:"select data type", cls:'disabledOption'}, | 83 | {tag:'option', value:'UNDEFINED', html:"select data type", cls:'disabledOption'}, |
86 | {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, | 84 | {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, |
87 | {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, | 85 | {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, |
88 | {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, | 86 | {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, |
89 | {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, | 87 | {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, |
90 | {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} | 88 | {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} |
91 | ]} | 89 | ]} |
92 | ]}) | 90 | ]}) |
93 | } | 91 | } |
94 | } | 92 | } |
95 | 93 | ||
96 | if (notesColumnIndex != -1) { | 94 | if (notesColumnIndex != -1) { |
97 | fieldsHeaderCells.push({tag:'td', valign:'top', cls:'notes', html:this.mainComponent().labelForColumn(notesColumnIndex)}); | 95 | fieldsHeaderCells.push({tag:'td', valign:'top', cls:'notes', html:this.mainComponent().labelForColumn(notesColumnIndex)}); |
98 | } | 96 | } |
99 | 97 | ||
100 | this.domHelper().append(this.element(), {tag:'div', children:[ | 98 | this.domHelper().append(this.element(), {tag:'div', children:[ |
101 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Fields']}, | 99 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Fields']}, |
102 | {tag:'div', id:this.getId('dataDiv'), children:[ | 100 | {tag:'div', id:this.getId('dataDiv'), children:[ |
103 | {tag:'div', children:[ | 101 | {tag:'div', children:[ |
104 | ]}, | 102 | ]}, |
105 | {tag:'div', cls:'csvImportPreview', children:[ | 103 | {tag:'div', cls:'csvImportPreview', children:[ |
106 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ | 104 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ |
107 | {tag:'thead', id:this.getId('previewData_thead'), children:[ | 105 | {tag:'thead', id:this.getId('previewData_thead'), children:[ |
108 | {tag:'tr', cls:'CSV_previewData_header', children:fieldsHeaderCells} | 106 | {tag:'tr', cls:'CSV_previewData_header', children:fieldsHeaderCells} |
109 | ]}, | 107 | ]}, |
110 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} | 108 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} |
111 | ]} | 109 | ]} |
112 | ]} | 110 | ]} |
113 | ]} | 111 | ]} |
114 | ]}); | 112 | ]}); |
115 | 113 | ||
116 | for (i=0; i<c; i++) { | 114 | for (i=0; i<c; i++) { |
117 | if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { | 115 | if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { |
118 | Clipperz.DOM.selectOptionMatchingValue(this.getDom('select_' + i), this.mainComponent().typeForColumn(i)); | 116 | Clipperz.DOM.selectOptionMatchingValue(this.getDom('select_' + i), this.mainComponent().typeForColumn(i)); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js index 5cb8679..dbde138 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js | |||
@@ -1,118 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 28 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
31 | 29 | ||
32 | //############################################################################# | 30 | //############################################################################# |
33 | 31 | ||
34 | Clipperz.PM.Components.Import.CSVImport.CSVImportHeader = function(anElement, args) { | 32 | Clipperz.PM.Components.Import.CSVImport.CSVImportHeader = function(anElement, args) { |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportHeader.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.Import.CSVImport.CSVImportHeader.superclass.constructor.call(this, anElement, args); |
38 | this._mainComponent = args.mainComponent; | 36 | this._mainComponent = args.mainComponent; |
39 | 37 | ||
40 | this._pendingDeferredLabelFieldHandlerEvents = 0; | 38 | this._pendingDeferredLabelFieldHandlerEvents = 0; |
41 | 39 | ||
42 | return this; | 40 | return this; |
43 | } | 41 | } |
44 | 42 | ||
45 | //============================================================================= | 43 | //============================================================================= |
46 | 44 | ||
47 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportHeader, Clipperz.PM.Components.BaseComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportHeader, Clipperz.PM.Components.BaseComponent, { |
48 | 46 | ||
49 | 'toString': function() { | 47 | 'toString': function() { |
50 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportHeader component"; | 48 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportHeader component"; |
51 | }, | 49 | }, |
52 | 50 | ||
53 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
54 | 52 | ||
55 | 'mainComponent': function() { | 53 | 'mainComponent': function() { |
56 | return this._mainComponent; | 54 | return this._mainComponent; |
57 | }, | 55 | }, |
58 | 56 | ||
59 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
60 | 58 | ||
61 | 'render': function() { | 59 | 'render': function() { |
62 | var thConfigs; | 60 | var thConfigs; |
63 | var i,c; | 61 | var i,c; |
64 | 62 | ||
65 | //MochiKit.Logging.logDebug(">>> CSVImportHeader.render"); | 63 | //MochiKit.Logging.logDebug(">>> CSVImportHeader.render"); |
66 | Clipperz.NotificationCenter.unregister(this); | 64 | Clipperz.NotificationCenter.unregister(this); |
67 | MochiKit.Signal.disconnectAllTo(this); | 65 | MochiKit.Signal.disconnectAllTo(this); |
68 | 66 | ||
69 | thConfigs = []; | 67 | thConfigs = []; |
70 | c = this.mainComponent().parsedValues()[0].length; | 68 | c = this.mainComponent().parsedValues()[0].length; |
71 | for (i=0; i<c; i++) { | 69 | for (i=0; i<c; i++) { |
72 | if (this.mainComponent().isColumnSelected(i)) { | 70 | if (this.mainComponent().isColumnSelected(i)) { |
73 | // thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:this.mainComponent().labelForColumn(i)}]}); | 71 | // thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:this.mainComponent().labelForColumn(i)}]}); |
74 | thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:""}]}); | 72 | thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:""}]}); |
75 | } | 73 | } |
76 | } | 74 | } |
77 | 75 | ||
78 | this.element().update(""); | 76 | this.element().update(""); |
79 | this.domHelper().append(this.element(), {tag:'div', children:[ | 77 | this.domHelper().append(this.element(), {tag:'div', children:[ |
80 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header']}, | 78 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header']}, |
81 | {tag:'div', cls:'importStepParameters', children:[ | 79 | {tag:'div', cls:'importStepParameters', children:[ |
82 | {tag:'input', type:'checkbox', name:'isFistRowHeader', id:this.getId('isFirstRowHeader_checkbox')}, | 80 | {tag:'input', type:'checkbox', name:'isFistRowHeader', id:this.getId('isFirstRowHeader_checkbox')}, |
83 | {tag:'span', id:this.getId('isFirstRowHeader_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header_Settings_firstRowHeaderLabel']} | 81 | {tag:'span', id:this.getId('isFirstRowHeader_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header_Settings_firstRowHeaderLabel']} |
84 | ]}, | 82 | ]}, |
85 | {tag:'div', id:this.getId('dataDiv'), children:[ | 83 | {tag:'div', id:this.getId('dataDiv'), children:[ |
86 | {tag:'div', cls:'csvImportPreview', children:[ | 84 | {tag:'div', cls:'csvImportPreview', children:[ |
87 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview header', cellspacing:'0', children:[ | 85 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview header', cellspacing:'0', children:[ |
88 | {tag:'thead', children:[{tag:'tr', children:thConfigs}]}, | 86 | {tag:'thead', children:[{tag:'tr', children:thConfigs}]}, |
89 | {tag:'tbody', id:this.getId('previewData_tbody')} | 87 | {tag:'tbody', id:this.getId('previewData_tbody')} |
90 | ]} | 88 | ]} |
91 | ]} | 89 | ]} |
92 | ]} | 90 | ]} |
93 | ]}); | 91 | ]}); |
94 | 92 | ||
95 | for (i=0; i<c; i++) { | 93 | for (i=0; i<c; i++) { |
96 | if (this.mainComponent().isColumnSelected(i)) { | 94 | if (this.mainComponent().isColumnSelected(i)) { |
97 | this.getElement('headerTextField_' + i).dom.value = this.mainComponent().labelForColumn(i); | 95 | this.getElement('headerTextField_' + i).dom.value = this.mainComponent().labelForColumn(i); |
98 | } | 96 | } |
99 | } | 97 | } |
100 | 98 | ||
101 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); | 99 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); |
102 | 100 | ||
103 | if (this.mainComponent().isFirstRowHeader()) { | 101 | if (this.mainComponent().isFirstRowHeader()) { |
104 | this.getDom('isFirstRowHeader_checkbox').click(); | 102 | this.getDom('isFirstRowHeader_checkbox').click(); |
105 | } | 103 | } |
106 | 104 | ||
107 | c = this.mainComponent().parsedValues()[0].length; | 105 | c = this.mainComponent().parsedValues()[0].length; |
108 | for (i=0; i<c; i++) { | 106 | for (i=0; i<c; i++) { |
109 | if (this.mainComponent().isColumnSelected(i)) { | 107 | if (this.mainComponent().isColumnSelected(i)) { |
110 | MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onchange', MochiKit.Base.partial(MochiKit.Base.method(this, 'labelFieldHandler'), i)); | 108 | MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onchange', MochiKit.Base.partial(MochiKit.Base.method(this, 'labelFieldHandler'), i)); |
111 | MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onkeypress', MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandler'), i)); | 109 | MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onkeypress', MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandler'), i)); |
112 | } | 110 | } |
113 | } | 111 | } |
114 | 112 | ||
115 | MochiKit.Signal.connect(this.getDom('isFirstRowHeader_checkbox'), 'onclick', this, 'toggleFirstRowHeaderCheckboxHandler'); | 113 | MochiKit.Signal.connect(this.getDom('isFirstRowHeader_checkbox'), 'onclick', this, 'toggleFirstRowHeaderCheckboxHandler'); |
116 | if (Clipperz_IEisBroken != true) { | 114 | if (Clipperz_IEisBroken != true) { |
117 | MochiKit.Signal.connect(this.getDom('isFirstRowHeader_span'), 'onclick', this.getDom('isFirstRowHeader_checkbox'), 'click'); | 115 | MochiKit.Signal.connect(this.getDom('isFirstRowHeader_span'), 'onclick', this.getDom('isFirstRowHeader_checkbox'), 'click'); |
118 | } | 116 | } |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js index 6344e06..ccfdeca 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js | |||
@@ -1,118 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 28 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
31 | 29 | ||
32 | //############################################################################# | 30 | //############################################################################# |
33 | 31 | ||
34 | Clipperz.PM.Components.Import.CSVImport.CSVImportNotes = function(anElement, args) { | 32 | Clipperz.PM.Components.Import.CSVImport.CSVImportNotes = function(anElement, args) { |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportNotes.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.Import.CSVImport.CSVImportNotes.superclass.constructor.call(this, anElement, args); |
38 | this._mainComponent = args.mainComponent; | 36 | this._mainComponent = args.mainComponent; |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportNotes, Clipperz.PM.Components.BaseComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportNotes, Clipperz.PM.Components.BaseComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportNotes component"; | 46 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportNotes component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'mainComponent': function() { | 51 | 'mainComponent': function() { |
54 | return this._mainComponent; | 52 | return this._mainComponent; |
55 | }, | 53 | }, |
56 | 54 | ||
57 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
58 | 56 | ||
59 | 'render': function() { | 57 | 'render': function() { |
60 | varnotesSelectorCheckboxCells; | 58 | varnotesSelectorCheckboxCells; |
61 | var totalNumberOfColumns; | 59 | var totalNumberOfColumns; |
62 | var titleColumnIndex; | 60 | var titleColumnIndex; |
63 | var notesColumnIndex; | 61 | var notesColumnIndex; |
64 | var i,c; | 62 | var i,c; |
65 | 63 | ||
66 | Clipperz.NotificationCenter.unregister(this); | 64 | Clipperz.NotificationCenter.unregister(this); |
67 | MochiKit.Signal.disconnectAllTo(this); | 65 | MochiKit.Signal.disconnectAllTo(this); |
68 | 66 | ||
69 | this.element().update(""); | 67 | this.element().update(""); |
70 | 68 | ||
71 | titleColumnIndex = this.mainComponent().titleColumnIndex() | 69 | titleColumnIndex = this.mainComponent().titleColumnIndex() |
72 | notesColumnIndex = this.mainComponent().notesColumnIndex() | 70 | notesColumnIndex = this.mainComponent().notesColumnIndex() |
73 | 71 | ||
74 | totalNumberOfColumns = this.mainComponent().parsedValues()[0].length; | 72 | totalNumberOfColumns = this.mainComponent().parsedValues()[0].length; |
75 | 73 | ||
76 | notesSelectorCheckboxCells = [{tag:'th', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}]; | 74 | notesSelectorCheckboxCells = [{tag:'th', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}]; |
77 | c =totalNumberOfColumns; | 75 | c =totalNumberOfColumns; |
78 | for (i=0; i<c; i++) { | 76 | for (i=0; i<c; i++) { |
79 | if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { | 77 | if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { |
80 | notesSelectorCheckboxCells.push({tag:'th', id:this.getId('th_' + i), valign:'top', children:[ | 78 | notesSelectorCheckboxCells.push({tag:'th', id:this.getId('th_' + i), valign:'top', children:[ |
81 | {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportNotesColumn', value:i}, | 79 | {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportNotesColumn', value:i}, |
82 | {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} | 80 | {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} |
83 | ]}) | 81 | ]}) |
84 | } | 82 | } |
85 | } | 83 | } |
86 | 84 | ||
87 | this.domHelper().append(this.element(), {tag:'div', children:[ | 85 | this.domHelper().append(this.element(), {tag:'div', children:[ |
88 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes']}, | 86 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes']}, |
89 | {tag:'div', id:this.getId('dataDiv'), children:[ | 87 | {tag:'div', id:this.getId('dataDiv'), children:[ |
90 | {tag:'div', cls:'importStepParameters', children:[ | 88 | {tag:'div', cls:'importStepParameters', children:[ |
91 | {tag:'input', id:this.getId('doNotSetNotes_radio'), type:'radio', name:'CSVImportNotesColumn', value:-1}, | 89 | {tag:'input', id:this.getId('doNotSetNotes_radio'), type:'radio', name:'CSVImportNotesColumn', value:-1}, |
92 | {tag:'span', id:this.getId('doNotSetNotes_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes_Settings_noSelectionLabel']} | 90 | {tag:'span', id:this.getId('doNotSetNotes_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes_Settings_noSelectionLabel']} |
93 | ]}, | 91 | ]}, |
94 | {tag:'div', cls:'csvImportPreview', children:[ | 92 | {tag:'div', cls:'csvImportPreview', children:[ |
95 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ | 93 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ |
96 | {tag:'thead', id:this.getId('previewData_thead'), children:[ | 94 | {tag:'thead', id:this.getId('previewData_thead'), children:[ |
97 | {tag:'tr', children:notesSelectorCheckboxCells} | 95 | {tag:'tr', children:notesSelectorCheckboxCells} |
98 | ]}, | 96 | ]}, |
99 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} | 97 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} |
100 | ]} | 98 | ]} |
101 | ]} | 99 | ]} |
102 | ]} | 100 | ]} |
103 | ]}); | 101 | ]}); |
104 | 102 | ||
105 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); | 103 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); |
106 | 104 | ||
107 | if ((notesColumnIndex >= totalNumberOfColumns) || (notesColumnIndex == titleColumnIndex) || !(this.mainComponent().isColumnSelected(notesColumnIndex))) { | 105 | if ((notesColumnIndex >= totalNumberOfColumns) || (notesColumnIndex == titleColumnIndex) || !(this.mainComponent().isColumnSelected(notesColumnIndex))) { |
108 | this.mainComponent().setNotesColumnIndex(-1); | 106 | this.mainComponent().setNotesColumnIndex(-1); |
109 | notesColumnIndex = -1; | 107 | notesColumnIndex = -1; |
110 | } | 108 | } |
111 | 109 | ||
112 | c =totalNumberOfColumns; | 110 | c =totalNumberOfColumns; |
113 | for (i=0; i<c; i++) { | 111 | for (i=0; i<c; i++) { |
114 | if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { | 112 | if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { |
115 | MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); | 113 | MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); |
116 | if (Clipperz_IEisBroken != true) { | 114 | if (Clipperz_IEisBroken != true) { |
117 | MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); | 115 | MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); |
118 | } | 116 | } |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js index aa57580..4b2149a 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js | |||
@@ -1,118 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } | 28 | if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } |
31 | 29 | ||
32 | //############################################################################# | 30 | //############################################################################# |
33 | 31 | ||
34 | Clipperz.PM.Components.Import.CSVImport.CSVImportTitle = function(anElement, args) { | 32 | Clipperz.PM.Components.Import.CSVImport.CSVImportTitle = function(anElement, args) { |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | Clipperz.PM.Components.Import.CSVImport.CSVImportTitle.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.Import.CSVImport.CSVImportTitle.superclass.constructor.call(this, anElement, args); |
38 | this._mainComponent = args.mainComponent; | 36 | this._mainComponent = args.mainComponent; |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportTitle, Clipperz.PM.Components.BaseComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportTitle, Clipperz.PM.Components.BaseComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportTitle component"; | 46 | return "Clipperz.PM.Components.Import.CSVImport.CSVImportTitle component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'mainComponent': function() { | 51 | 'mainComponent': function() { |
54 | return this._mainComponent; | 52 | return this._mainComponent; |
55 | }, | 53 | }, |
56 | 54 | ||
57 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
58 | 56 | ||
59 | 'render': function() { | 57 | 'render': function() { |
60 | vartitleSelectorCheckboxCells; | 58 | vartitleSelectorCheckboxCells; |
61 | var titleColumnIndex; | 59 | var titleColumnIndex; |
62 | var i,c; | 60 | var i,c; |
63 | 61 | ||
64 | Clipperz.NotificationCenter.unregister(this); | 62 | Clipperz.NotificationCenter.unregister(this); |
65 | MochiKit.Signal.disconnectAllTo(this); | 63 | MochiKit.Signal.disconnectAllTo(this); |
66 | 64 | ||
67 | this.element().update(""); | 65 | this.element().update(""); |
68 | 66 | ||
69 | titleColumnIndex = this.mainComponent().titleColumnIndex() | 67 | titleColumnIndex = this.mainComponent().titleColumnIndex() |
70 | titleSelectorCheckboxCells = []; | 68 | titleSelectorCheckboxCells = []; |
71 | c =this.mainComponent().parsedValues()[0].length; | 69 | c =this.mainComponent().parsedValues()[0].length; |
72 | for (i=0; i<c; i++) { | 70 | for (i=0; i<c; i++) { |
73 | if (this.mainComponent().isColumnSelected(i)) { | 71 | if (this.mainComponent().isColumnSelected(i)) { |
74 | titleSelectorCheckboxCells.push({tag:'th', valign:'top', id:this.getId('th_' + i), children:[ | 72 | titleSelectorCheckboxCells.push({tag:'th', valign:'top', id:this.getId('th_' + i), children:[ |
75 | {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportTitleColumn', value:i}, | 73 | {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportTitleColumn', value:i}, |
76 | {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} | 74 | {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} |
77 | ]}) | 75 | ]}) |
78 | } | 76 | } |
79 | } | 77 | } |
80 | 78 | ||
81 | if (titleColumnIndex >= titleSelectorCheckboxCells.length) { | 79 | if (titleColumnIndex >= titleSelectorCheckboxCells.length) { |
82 | this.mainComponent().setTitleColumnIndex(-1); | 80 | this.mainComponent().setTitleColumnIndex(-1); |
83 | } | 81 | } |
84 | 82 | ||
85 | this.domHelper().append(this.element(), {tag:'div', children:[ | 83 | this.domHelper().append(this.element(), {tag:'div', children:[ |
86 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, | 84 | {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, |
87 | {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ | 85 | {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ |
88 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ | 86 | {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ |
89 | {tag:'thead', id:this.getId('previewData_thead'), children:[ | 87 | {tag:'thead', id:this.getId('previewData_thead'), children:[ |
90 | {tag:'tr', children:titleSelectorCheckboxCells} | 88 | {tag:'tr', children:titleSelectorCheckboxCells} |
91 | ]}, | 89 | ]}, |
92 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} | 90 | {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} |
93 | ]} | 91 | ]} |
94 | ]} | 92 | ]} |
95 | ]}); | 93 | ]}); |
96 | 94 | ||
97 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); | 95 | this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); |
98 | 96 | ||
99 | c =this.mainComponent().parsedValues()[0].length; | 97 | c =this.mainComponent().parsedValues()[0].length; |
100 | for (i=0; i<c; i++) { | 98 | for (i=0; i<c; i++) { |
101 | if (this.mainComponent().isColumnSelected(i)) { | 99 | if (this.mainComponent().isColumnSelected(i)) { |
102 | MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); | 100 | MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); |
103 | if (Clipperz_IEisBroken != true) { | 101 | if (Clipperz_IEisBroken != true) { |
104 | MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); | 102 | MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); |
105 | } | 103 | } |
106 | } | 104 | } |
107 | } | 105 | } |
108 | 106 | ||
109 | if (titleColumnIndex != -1) { | 107 | if (titleColumnIndex != -1) { |
110 | this.getDom('radio_' + titleColumnIndex).click(); | 108 | this.getDom('radio_' + titleColumnIndex).click(); |
111 | } else { | 109 | } else { |
112 | this.mainComponent().nextButton().disable(); | 110 | this.mainComponent().nextButton().disable(); |
113 | } | 111 | } |
114 | 112 | ||
115 | }, | 113 | }, |
116 | 114 | ||
117 | //------------------------------------------------------------------------- | 115 | //------------------------------------------------------------------------- |
118 | 116 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js index c1dd1a9..bd305c3 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js | |||
@@ -1,118 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.CSVImportComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.CSVImportComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | this._steps = this._steps || ['CSV_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; | 34 | this._steps = this._steps || ['CSV_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; |
37 | 35 | ||
38 | Clipperz.PM.Components.Import.CSVImportComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Import.CSVImportComponent.superclass.constructor.call(this, anElement, args); |
39 | 37 | ||
40 | this._step1Component = null; | 38 | this._step1Component = null; |
41 | this._step2Component = null; | 39 | this._step2Component = null; |
42 | this._step3Component = null; | 40 | this._step3Component = null; |
43 | this._step4Component = null; | 41 | this._step4Component = null; |
44 | this._step5Component = null; | 42 | this._step5Component = null; |
45 | 43 | ||
46 | this._isFirstRowHeader = false; | 44 | this._isFirstRowHeader = false; |
47 | this._titleColumnIndex = -1; | 45 | this._titleColumnIndex = -1; |
48 | this._notesColumnIndex = -1; | 46 | this._notesColumnIndex = -1; |
49 | this._fieldSettings = {}; | 47 | this._fieldSettings = {}; |
50 | this._skippedColumns = new Clipperz.Set(); | 48 | this._skippedColumns = new Clipperz.Set(); |
51 | 49 | ||
52 | this.render(); | 50 | this.render(); |
53 | 51 | ||
54 | return this; | 52 | return this; |
55 | } | 53 | } |
56 | 54 | ||
57 | //============================================================================= | 55 | //============================================================================= |
58 | 56 | ||
59 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 57 | YAHOO.extendX(Clipperz.PM.Components.Import.CSVImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
60 | 58 | ||
61 | 'toString': function() { | 59 | 'toString': function() { |
62 | return "Clipperz.PM.Components.Import.CSVImportComponent component"; | 60 | return "Clipperz.PM.Components.Import.CSVImportComponent component"; |
63 | }, | 61 | }, |
64 | 62 | ||
65 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
66 | 64 | ||
67 | 'render': function() { | 65 | 'render': function() { |
68 | this.domHelper().append(this.element(), {tag:'div', cls:'csvImportWizard', children:[ | 66 | this.domHelper().append(this.element(), {tag:'div', cls:'csvImportWizard', children:[ |
69 | {tag:'h3', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, | 67 | {tag:'h3', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, |
70 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 68 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
71 | {tag:'div', cls:'importStepBlocks', children:[ | 69 | {tag:'div', cls:'importStepBlocks', children:[ |
72 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 70 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
73 | {tag:'div', children:[ | 71 | {tag:'div', children:[ |
74 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_csv_description']}, | 72 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_csv_description']}, |
75 | {tag:'div', cls:'importOptionsParameters', children:[ | 73 | {tag:'div', cls:'importOptionsParameters', children:[ |
76 | {tag:'div', cls:'CSVImportOptionsParameters', children:[ | 74 | {tag:'div', cls:'CSVImportOptionsParameters', children:[ |
77 | {tag:'ul', children:[ | 75 | {tag:'ul', children:[ |
78 | {tag:'li', children:[ | 76 | {tag:'li', children:[ |
79 | {tag:'label', 'for':this.getId('CSV_inputOptions_separator'), html:"separator"}, | 77 | {tag:'label', 'for':this.getId('CSV_inputOptions_separator'), html:"separator"}, |
80 | {tag:'select', name:this.getId('CSV_inputOptions_separator'), id:this.getId('CSV_inputOptions_separator'), children:[ | 78 | {tag:'select', name:this.getId('CSV_inputOptions_separator'), id:this.getId('CSV_inputOptions_separator'), children:[ |
81 | {tag:'option', name:'comma', value:',', html:"comma (,)", selected:true}, | 79 | {tag:'option', name:'comma', value:',', html:"comma (,)", selected:true}, |
82 | {tag:'option', name:'tab', value:'\t', html:"tab"} | 80 | {tag:'option', name:'tab', value:'\t', html:"tab"} |
83 | ]} | 81 | ]} |
84 | ]}, | 82 | ]}, |
85 | 83 | ||
86 | {tag:'li', children:[ | 84 | {tag:'li', children:[ |
87 | {tag:'label', 'for':this.getId('CSV_inputOptions_quote'), html:"quote"}, | 85 | {tag:'label', 'for':this.getId('CSV_inputOptions_quote'), html:"quote"}, |
88 | {tag:'select', name:this.getId('CSV_inputOptions_quote'), id:this.getId('CSV_inputOptions_quote'), children:[ | 86 | {tag:'select', name:this.getId('CSV_inputOptions_quote'), id:this.getId('CSV_inputOptions_quote'), children:[ |
89 | {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, | 87 | {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, |
90 | {tag:'option', name:'singleQuote', value:'\'', html:"single quote (\')"} | 88 | {tag:'option', name:'singleQuote', value:'\'', html:"single quote (\')"} |
91 | ]} | 89 | ]} |
92 | ]}, | 90 | ]}, |
93 | 91 | ||
94 | {tag:'li', children:[ | 92 | {tag:'li', children:[ |
95 | {tag:'label', 'for':this.getId('CSV_inputOptions_escape'), html:"escape"}, | 93 | {tag:'label', 'for':this.getId('CSV_inputOptions_escape'), html:"escape"}, |
96 | {tag:'select', name:this.getId('CSV_inputOptions_escape'), id:this.getId('CSV_inputOptions_escape'), children:[ | 94 | {tag:'select', name:this.getId('CSV_inputOptions_escape'), id:this.getId('CSV_inputOptions_escape'), children:[ |
97 | {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, | 95 | {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, |
98 | {tag:'option', name:'slash', value:'\/', html:"slash (\/)"}, | 96 | {tag:'option', name:'slash', value:'\/', html:"slash (\/)"}, |
99 | {tag:'option', name:'backslash', value:'\\', html:"backslash (\\)"} | 97 | {tag:'option', name:'backslash', value:'\\', html:"backslash (\\)"} |
100 | ]} | 98 | ]} |
101 | ]} | 99 | ]} |
102 | ]} | 100 | ]} |
103 | ]} | 101 | ]} |
104 | ]}, | 102 | ]}, |
105 | this.textAreaConfig() | 103 | this.textAreaConfig() |
106 | ]} | 104 | ]} |
107 | ]}, | 105 | ]}, |
108 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, | 106 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, |
109 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, | 107 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, |
110 | {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, | 108 | {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, |
111 | {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, | 109 | {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, |
112 | {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, | 110 | {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, |
113 | {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ | 111 | {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ |
114 | {tag:'div', children:[ | 112 | {tag:'div', children:[ |
115 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 113 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
116 | ]} | 114 | ]} |
117 | ]}, | 115 | ]}, |
118 | {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ | 116 | {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js index c3d2fac..d74961b 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js | |||
@@ -1,118 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.ClipperzImportComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.ClipperzImportComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Import.ClipperzImportComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.Import.ClipperzImportComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this.render(); | 36 | this.render(); |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.ClipperzImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.ClipperzImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.ClipperzImportComponent component"; | 46 | return "Clipperz.PM.Components.Import.ClipperzImportComponent component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'render': function() { | 51 | 'render': function() { |
54 | //MochiKit.Logging.logDebug(">>> Import.ClipperzImportComponent.render"); | 52 | //MochiKit.Logging.logDebug(">>> Import.ClipperzImportComponent.render"); |
55 | this.domHelper().append(this.element(), {tag:'div', cls:'clipperzImportWizard', children:[ | 53 | this.domHelper().append(this.element(), {tag:'div', cls:'clipperzImportWizard', children:[ |
56 | {tag:'h3', htmlString:Clipperz.PM.Strings['Clipperz_ImportWizard_Title']}, | 54 | {tag:'h3', htmlString:Clipperz.PM.Strings['Clipperz_ImportWizard_Title']}, |
57 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 55 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
58 | {tag:'div', cls:'importStepBlocks', children:[ | 56 | {tag:'div', cls:'importStepBlocks', children:[ |
59 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 57 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
60 | {tag:'div', children:[ | 58 | {tag:'div', children:[ |
61 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_clipperz_description']}, | 59 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_clipperz_description']}, |
62 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 60 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
63 | this.textAreaConfig() | 61 | this.textAreaConfig() |
64 | ]} | 62 | ]} |
65 | ]}, | 63 | ]}, |
66 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ | 64 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ |
67 | {tag:'div', children:[ | 65 | {tag:'div', children:[ |
68 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 66 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
69 | ]} | 67 | ]} |
70 | ]}, | 68 | ]}, |
71 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ | 69 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ |
72 | {tag:'div', children:[ | 70 | {tag:'div', children:[ |
73 | {tag:'h4', html:"done"} | 71 | {tag:'h4', html:"done"} |
74 | ]} | 72 | ]} |
75 | ]} | 73 | ]} |
76 | ]}, | 74 | ]}, |
77 | {tag:'div', cls:'importOptionsButtons', children:[ | 75 | {tag:'div', cls:'importOptionsButtons', children:[ |
78 | {tag:'table', children:[ | 76 | {tag:'table', children:[ |
79 | {tag:'tbody', children:[ | 77 | {tag:'tbody', children:[ |
80 | {tag:'tr', children:[ | 78 | {tag:'tr', children:[ |
81 | {tag:'td', html:' '}, | 79 | {tag:'td', html:' '}, |
82 | {tag:'td', children:[ | 80 | {tag:'td', children:[ |
83 | {tag:'div', id:this.getId('backActionButton')} | 81 | {tag:'div', id:this.getId('backActionButton')} |
84 | ]}, | 82 | ]}, |
85 | {tag:'td', html:' '}, | 83 | {tag:'td', html:' '}, |
86 | {tag:'td', children:[ | 84 | {tag:'td', children:[ |
87 | {tag:'div', id:this.getId('nextActionButton')} | 85 | {tag:'div', id:this.getId('nextActionButton')} |
88 | ]}, | 86 | ]}, |
89 | {tag:'td', html:' '} | 87 | {tag:'td', html:' '} |
90 | ]} | 88 | ]} |
91 | ]} | 89 | ]} |
92 | ]} | 90 | ]} |
93 | ]} | 91 | ]} |
94 | ]}); | 92 | ]}); |
95 | 93 | ||
96 | this.updateSteps(); | 94 | this.updateSteps(); |
97 | 95 | ||
98 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); | 96 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); |
99 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); | 97 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); |
100 | 98 | ||
101 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() | 99 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() |
102 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 100 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
103 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 101 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
104 | //MochiKit.Logging.logDebug("<<< Import.ClipperzImportComponent.render"); | 102 | //MochiKit.Logging.logDebug("<<< Import.ClipperzImportComponent.render"); |
105 | }, | 103 | }, |
106 | 104 | ||
107 | //------------------------------------------------------------------------- | 105 | //------------------------------------------------------------------------- |
108 | 106 | ||
109 | 'nextAction': function() { | 107 | 'nextAction': function() { |
110 | switch (this.currentStep()) { | 108 | switch (this.currentStep()) { |
111 | case 0: //-> 1 | 109 | case 0: //-> 1 |
112 | this.previewValues(); | 110 | this.previewValues(); |
113 | break; | 111 | break; |
114 | case 1: //-> 2 | 112 | case 1: //-> 2 |
115 | this.importValues(); | 113 | this.importValues(); |
116 | break; | 114 | break; |
117 | } | 115 | } |
118 | }, | 116 | }, |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js index ad0d985..859c190 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js | |||
@@ -1,118 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.ExcelImportComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.ExcelImportComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | this._steps = ['EXCEL_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; | 34 | this._steps = ['EXCEL_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; |
37 | 35 | ||
38 | Clipperz.PM.Components.Import.ExcelImportComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Import.ExcelImportComponent.superclass.constructor.call(this, anElement, args); |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.ExcelImportComponent, Clipperz.PM.Components.Import.CSVImportComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.ExcelImportComponent, Clipperz.PM.Components.Import.CSVImportComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.ExcelImportComponent component"; | 46 | return "Clipperz.PM.Components.Import.ExcelImportComponent component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'render': function() { | 51 | 'render': function() { |
54 | //MochiKit.Logging.logDebug(">>> Import.ExcelImportComponent.render"); | 52 | //MochiKit.Logging.logDebug(">>> Import.ExcelImportComponent.render"); |
55 | this.domHelper().append(this.element(), {tag:'div', cls:'excelImportWizard', children:[ | 53 | this.domHelper().append(this.element(), {tag:'div', cls:'excelImportWizard', children:[ |
56 | {tag:'h3', htmlString:Clipperz.PM.Strings['Excel_ImportWizard_Title']}, | 54 | {tag:'h3', htmlString:Clipperz.PM.Strings['Excel_ImportWizard_Title']}, |
57 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 55 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
58 | {tag:'div', cls:'importStepBlocks', children:[ | 56 | {tag:'div', cls:'importStepBlocks', children:[ |
59 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 57 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
60 | {tag:'div', children:[ | 58 | {tag:'div', children:[ |
61 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_excel_description']}, | 59 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_excel_description']}, |
62 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 60 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
63 | this.textAreaConfig() | 61 | this.textAreaConfig() |
64 | ]} | 62 | ]} |
65 | ]}, | 63 | ]}, |
66 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, | 64 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, |
67 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, | 65 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, |
68 | {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, | 66 | {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, |
69 | {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, | 67 | {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, |
70 | {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, | 68 | {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, |
71 | {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ | 69 | {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ |
72 | {tag:'div', children:[ | 70 | {tag:'div', children:[ |
73 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 71 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
74 | ]} | 72 | ]} |
75 | ]}, | 73 | ]}, |
76 | {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ | 74 | {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ |
77 | {tag:'div', children:[ | 75 | {tag:'div', children:[ |
78 | {tag:'h4', html:"done"} | 76 | {tag:'h4', html:"done"} |
79 | ]} | 77 | ]} |
80 | ]} | 78 | ]} |
81 | ]}, | 79 | ]}, |
82 | {tag:'div', cls:'importOptionsButtons', children:[ | 80 | {tag:'div', cls:'importOptionsButtons', children:[ |
83 | {tag:'table', children:[ | 81 | {tag:'table', children:[ |
84 | {tag:'tbody', children:[ | 82 | {tag:'tbody', children:[ |
85 | {tag:'tr', children:[ | 83 | {tag:'tr', children:[ |
86 | {tag:'td', html:' '}, | 84 | {tag:'td', html:' '}, |
87 | {tag:'td', children:[ | 85 | {tag:'td', children:[ |
88 | {tag:'div', id:this.getId('backActionButton')} | 86 | {tag:'div', id:this.getId('backActionButton')} |
89 | ]}, | 87 | ]}, |
90 | {tag:'td', html:' '}, | 88 | {tag:'td', html:' '}, |
91 | {tag:'td', children:[ | 89 | {tag:'td', children:[ |
92 | {tag:'div', id:this.getId('nextActionButton')} | 90 | {tag:'div', id:this.getId('nextActionButton')} |
93 | ]}, | 91 | ]}, |
94 | {tag:'td', html:' '} | 92 | {tag:'td', html:' '} |
95 | ]} | 93 | ]} |
96 | ]} | 94 | ]} |
97 | ]} | 95 | ]} |
98 | ]} | 96 | ]} |
99 | ]}); | 97 | ]}); |
100 | 98 | ||
101 | this.updateSteps(); | 99 | this.updateSteps(); |
102 | 100 | ||
103 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); | 101 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); |
104 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); | 102 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); |
105 | 103 | ||
106 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() | 104 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() |
107 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 105 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
108 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 106 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
109 | this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 107 | this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
110 | this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 108 | this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
111 | this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 109 | this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
112 | this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 110 | this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
113 | this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 111 | this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
114 | //MochiKit.Logging.logDebug("<<< Import.ExcelImportComponent.render"); | 112 | //MochiKit.Logging.logDebug("<<< Import.ExcelImportComponent.render"); |
115 | }, | 113 | }, |
116 | 114 | ||
117 | //------------------------------------------------------------------------- | 115 | //------------------------------------------------------------------------- |
118 | 116 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js index a55455a..3c23b1c 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js | |||
@@ -1,118 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.GenericImportComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.GenericImportComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | this._steps = this._steps || ['EDIT', 'PREVIEW', 'IMPORT']; | 34 | this._steps = this._steps || ['EDIT', 'PREVIEW', 'IMPORT']; |
37 | 35 | ||
38 | Clipperz.PM.Components.Import.GenericImportComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Import.GenericImportComponent.superclass.constructor.call(this, anElement, args); |
39 | 37 | ||
40 | this._user = args['user']; | 38 | this._user = args['user']; |
41 | 39 | ||
42 | this._currentStep = 0; | 40 | this._currentStep = 0; |
43 | this._currentStatus = 'IDLE'; //'PROCESSING' | 41 | this._currentStatus = 'IDLE'; //'PROCESSING' |
44 | 42 | ||
45 | this._parsedValues = null; | 43 | this._parsedValues = null; |
46 | this._processedValues = null; | 44 | this._processedValues = null; |
47 | 45 | ||
48 | this._backButton = null; | 46 | this._backButton = null; |
49 | this._nextButton = null; | 47 | this._nextButton = null; |
50 | 48 | ||
51 | Clipperz.NotificationCenter.register(null, 'importProcessorProgressUpdate', this, 'updateProgressDialogStatus'); | 49 | Clipperz.NotificationCenter.register(null, 'importProcessorProgressUpdate', this, 'updateProgressDialogStatus'); |
52 | 50 | ||
53 | return this; | 51 | return this; |
54 | } | 52 | } |
55 | 53 | ||
56 | //============================================================================= | 54 | //============================================================================= |
57 | 55 | ||
58 | YAHOO.extendX(Clipperz.PM.Components.Import.GenericImportComponent, Clipperz.PM.Components.BaseComponent, { | 56 | YAHOO.extendX(Clipperz.PM.Components.Import.GenericImportComponent, Clipperz.PM.Components.BaseComponent, { |
59 | 57 | ||
60 | 'toString': function() { | 58 | 'toString': function() { |
61 | return "Clipperz.PM.Components.Import.GenericImportComponent component"; | 59 | return "Clipperz.PM.Components.Import.GenericImportComponent component"; |
62 | }, | 60 | }, |
63 | 61 | ||
64 | //------------------------------------------------------------------------- | 62 | //------------------------------------------------------------------------- |
65 | 63 | ||
66 | 'user': function() { | 64 | 'user': function() { |
67 | return this._user; | 65 | return this._user; |
68 | }, | 66 | }, |
69 | 67 | ||
70 | //------------------------------------------------------------------------- | 68 | //------------------------------------------------------------------------- |
71 | 69 | ||
72 | 'textAreaConfig': function() { | 70 | 'textAreaConfig': function() { |
73 | return {tag:'textarea', name:this.getId('importTextArea'), cls:'importTextArea', id:this.getId('importTextArea'), cols:60, rows:15, html:""}; | 71 | return {tag:'textarea', name:this.getId('importTextArea'), cls:'importTextArea', id:this.getId('importTextArea'), cols:60, rows:15, html:""}; |
74 | }, | 72 | }, |
75 | 73 | ||
76 | 'textAreaContent': function() { | 74 | 'textAreaContent': function() { |
77 | return this.getDom('importTextArea').value | 75 | return this.getDom('importTextArea').value |
78 | }, | 76 | }, |
79 | 77 | ||
80 | //------------------------------------------------------------------------- | 78 | //------------------------------------------------------------------------- |
81 | 79 | ||
82 | 'steps': function() { | 80 | 'steps': function() { |
83 | return this._steps; | 81 | return this._steps; |
84 | }, | 82 | }, |
85 | 83 | ||
86 | 'currentStep': function() { | 84 | 'currentStep': function() { |
87 | return this._currentStep; | 85 | return this._currentStep; |
88 | }, | 86 | }, |
89 | 87 | ||
90 | 'setCurrentStep': function(aValue) { | 88 | 'setCurrentStep': function(aValue) { |
91 | this._currentStep = aValue; | 89 | this._currentStep = aValue; |
92 | this.updateSteps(); | 90 | this.updateSteps(); |
93 | }, | 91 | }, |
94 | 92 | ||
95 | //------------------------------------------------------------------------- | 93 | //------------------------------------------------------------------------- |
96 | 94 | ||
97 | 'currentStatus': function() { | 95 | 'currentStatus': function() { |
98 | return this._currentStatus; | 96 | return this._currentStatus; |
99 | }, | 97 | }, |
100 | 98 | ||
101 | 'startProcessing': function() { | 99 | 'startProcessing': function() { |
102 | this._currentStatus = 'PROCESSING'; | 100 | this._currentStatus = 'PROCESSING'; |
103 | this.updateSteps(); | 101 | this.updateSteps(); |
104 | }, | 102 | }, |
105 | 103 | ||
106 | 'processingDone': function() { | 104 | 'processingDone': function() { |
107 | this._currentStatus = 'IDLE'; | 105 | this._currentStatus = 'IDLE'; |
108 | this.setCurrentStep(this.currentStep() + 1); | 106 | this.setCurrentStep(this.currentStep() + 1); |
109 | }, | 107 | }, |
110 | 108 | ||
111 | 'processingAborted': function() { | 109 | 'processingAborted': function() { |
112 | this._currentStatus = 'IDLE'; | 110 | this._currentStatus = 'IDLE'; |
113 | this.updateSteps(); | 111 | this.updateSteps(); |
114 | }, | 112 | }, |
115 | 113 | ||
116 | //------------------------------------------------------------------------- | 114 | //------------------------------------------------------------------------- |
117 | 115 | ||
118 | 'stepsConfig': function() { | 116 | 'stepsConfig': function() { |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js index 5f4fe33..0570704 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js | |||
@@ -1,118 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.KeePassImportComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.KeePassImportComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Import.KeePassImportComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.Import.KeePassImportComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._steps = ['EDIT', 'KEEPASS_SETTINGS', 'PREVIEW', 'IMPORT']; | 36 | this._steps = ['EDIT', 'KEEPASS_SETTINGS', 'PREVIEW', 'IMPORT']; |
39 | this._definedFields = ['Group', 'Group Tree', 'UserName', 'URL', 'Password', 'Notes', 'UUID', 'Icon', 'Creation Time', 'Last Access', 'Last Modification', 'Expires', 'Attachment Description', 'Attachment']; | 37 | this._definedFields = ['Group', 'Group Tree', 'UserName', 'URL', 'Password', 'Notes', 'UUID', 'Icon', 'Creation Time', 'Last Access', 'Last Modification', 'Expires', 'Attachment Description', 'Attachment']; |
40 | 38 | ||
41 | this.render(); | 39 | this.render(); |
42 | 40 | ||
43 | return this; | 41 | return this; |
44 | } | 42 | } |
45 | 43 | ||
46 | //============================================================================= | 44 | //============================================================================= |
47 | 45 | ||
48 | YAHOO.extendX(Clipperz.PM.Components.Import.KeePassImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 46 | YAHOO.extendX(Clipperz.PM.Components.Import.KeePassImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
49 | 47 | ||
50 | 'toString': function() { | 48 | 'toString': function() { |
51 | return "Clipperz.PM.Components.Import.KeePassImportComponent component"; | 49 | return "Clipperz.PM.Components.Import.KeePassImportComponent component"; |
52 | }, | 50 | }, |
53 | 51 | ||
54 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
55 | 53 | ||
56 | 'render': function() { | 54 | 'render': function() { |
57 | //MochiKit.Logging.logDebug(">>> Import.KeePassImportComponent.render"); | 55 | //MochiKit.Logging.logDebug(">>> Import.KeePassImportComponent.render"); |
58 | this.domHelper().append(this.element(), {tag:'div', cls:'keePassImportWizard', children:[ | 56 | this.domHelper().append(this.element(), {tag:'div', cls:'keePassImportWizard', children:[ |
59 | {tag:'h3', htmlString:Clipperz.PM.Strings['KeePass_ImportWizard_Title']}, | 57 | {tag:'h3', htmlString:Clipperz.PM.Strings['KeePass_ImportWizard_Title']}, |
60 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 58 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
61 | {tag:'div', cls:'importStepBlocks', children:[ | 59 | {tag:'div', cls:'importStepBlocks', children:[ |
62 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 60 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
63 | {tag:'div', children:[ | 61 | {tag:'div', children:[ |
64 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_keePass_description']}, | 62 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_keePass_description']}, |
65 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 63 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
66 | this.textAreaConfig() | 64 | this.textAreaConfig() |
67 | ]} | 65 | ]} |
68 | ]}, | 66 | ]}, |
69 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ | 67 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ |
70 | {tag:'div', children:[ | 68 | {tag:'div', children:[ |
71 | {tag:'div', id:this.getId('settingsDiv'), children:[ | 69 | {tag:'div', id:this.getId('settingsDiv'), children:[ |
72 | {tag:'table', id:'KeePassSettings', children:[ | 70 | {tag:'table', id:'KeePassSettings', children:[ |
73 | {tag:'tbody', children:[ | 71 | {tag:'tbody', children:[ |
74 | {tag:'tr', children:[ | 72 | {tag:'tr', children:[ |
75 | {tag:'td', width:'50%', valign:'top', children:[ | 73 | {tag:'td', width:'50%', valign:'top', children:[ |
76 | {tag:'table', children:[ | 74 | {tag:'table', children:[ |
77 | {tag:'tbody', children:[ | 75 | {tag:'tbody', children:[ |
78 | {tag:'tr', children:[ | 76 | {tag:'tr', children:[ |
79 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group_checkbox'), name:'Group'/*, checked:true*/}]}, | 77 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group_checkbox'), name:'Group'/*, checked:true*/}]}, |
80 | {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group_label'), html:"Group"}]} | 78 | {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group_label'), html:"Group"}]} |
81 | ]}, | 79 | ]}, |
82 | {tag:'tr', children:[ | 80 | {tag:'tr', children:[ |
83 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group Tree_checkbox'), name:'Group Tree'/*, checked:true*/}]}, | 81 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group Tree_checkbox'), name:'Group Tree'/*, checked:true*/}]}, |
84 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group Tree_label'), html:"Group Tree"}]} | 82 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group Tree_label'), html:"Group Tree"}]} |
85 | ]}, | 83 | ]}, |
86 | {tag:'tr', children:[ | 84 | {tag:'tr', children:[ |
87 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UserName_checkbox'), name:'UserName', checked:true}]}, | 85 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UserName_checkbox'), name:'UserName', checked:true}]}, |
88 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UserName_label'), html:"UserName"}]} | 86 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UserName_label'), html:"UserName"}]} |
89 | ]}, | 87 | ]}, |
90 | {tag:'tr', children:[ | 88 | {tag:'tr', children:[ |
91 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('URL_checkbox'), name:'URL', checked:true}]}, | 89 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('URL_checkbox'), name:'URL', checked:true}]}, |
92 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('URL_label'), html:"URL"}]} | 90 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('URL_label'), html:"URL"}]} |
93 | ]}, | 91 | ]}, |
94 | {tag:'tr', children:[ | 92 | {tag:'tr', children:[ |
95 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Password_checkbox'), name:'Password', checked:true}]}, | 93 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Password_checkbox'), name:'Password', checked:true}]}, |
96 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Password_label'), html:"Password"}]} | 94 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Password_label'), html:"Password"}]} |
97 | ]}, | 95 | ]}, |
98 | {tag:'tr', children:[ | 96 | {tag:'tr', children:[ |
99 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Notes_checkbox'), name:'Notes', checked:true}]}, | 97 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Notes_checkbox'), name:'Notes', checked:true}]}, |
100 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Notes_label'), html:"Notes"}]} | 98 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Notes_label'), html:"Notes"}]} |
101 | ]}, | 99 | ]}, |
102 | {tag:'tr', children:[ | 100 | {tag:'tr', children:[ |
103 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UUID_checkbox'), name:'UUID'/*, checked:true*/}]}, | 101 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UUID_checkbox'), name:'UUID'/*, checked:true*/}]}, |
104 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UUID_label'), html:"UUID"}]} | 102 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UUID_label'), html:"UUID"}]} |
105 | ]} | 103 | ]} |
106 | ]} | 104 | ]} |
107 | ]} | 105 | ]} |
108 | ]}, | 106 | ]}, |
109 | {tag:'td', width:'50%', valign:'top', children:[ | 107 | {tag:'td', width:'50%', valign:'top', children:[ |
110 | {tag:'table', children:[ | 108 | {tag:'table', children:[ |
111 | {tag:'tbody', children:[ | 109 | {tag:'tbody', children:[ |
112 | {tag:'tr', children:[ | 110 | {tag:'tr', children:[ |
113 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Icon_checkbox'), name:'Icon'/*, checked:true*/}]}, | 111 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Icon_checkbox'), name:'Icon'/*, checked:true*/}]}, |
114 | {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Icon_label'), html:"Icon"}]} | 112 | {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Icon_label'), html:"Icon"}]} |
115 | ]}, | 113 | ]}, |
116 | {tag:'tr', children:[ | 114 | {tag:'tr', children:[ |
117 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Creation Time_checkbox'), name:'Creation Time'/*, checked:true*/}]}, | 115 | {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Creation Time_checkbox'), name:'Creation Time'/*, checked:true*/}]}, |
118 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Creation Time_label'), html:"Creation Time"}]} | 116 | {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Creation Time_label'), html:"Creation Time"}]} |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js index 05baf46..f97ce78 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js | |||
@@ -1,118 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.MainComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.MainComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Import.MainComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.Import.MainComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this._user = args.user; | 36 | this._user = args.user; |
39 | this._wizardComponent = null; | 37 | this._wizardComponent = null; |
40 | 38 | ||
41 | this._backButton = null; | 39 | this._backButton = null; |
42 | this._nextButton = null; | 40 | this._nextButton = null; |
43 | 41 | ||
44 | this._selectedComponent = null; | 42 | this._selectedComponent = null; |
45 | 43 | ||
46 | this.render(); | 44 | this.render(); |
47 | 45 | ||
48 | return this; | 46 | return this; |
49 | } | 47 | } |
50 | 48 | ||
51 | //============================================================================= | 49 | //============================================================================= |
52 | 50 | ||
53 | YAHOO.extendX(Clipperz.PM.Components.Import.MainComponent, Clipperz.PM.Components.BaseComponent, { | 51 | YAHOO.extendX(Clipperz.PM.Components.Import.MainComponent, Clipperz.PM.Components.BaseComponent, { |
54 | 52 | ||
55 | 'toString': function() { | 53 | 'toString': function() { |
56 | return "Clipperz.PM.Components.Import.MainComponent component"; | 54 | return "Clipperz.PM.Components.Import.MainComponent component"; |
57 | }, | 55 | }, |
58 | 56 | ||
59 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
60 | 58 | ||
61 | 'user': function() { | 59 | 'user': function() { |
62 | return this._user; | 60 | return this._user; |
63 | }, | 61 | }, |
64 | 62 | ||
65 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
66 | 64 | ||
67 | 'wizardComponent': function() { | 65 | 'wizardComponent': function() { |
68 | return this._wizardComponent; | 66 | return this._wizardComponent; |
69 | }, | 67 | }, |
70 | 68 | ||
71 | 'setWizardComponent': function(aValue) { | 69 | 'setWizardComponent': function(aValue) { |
72 | if (this._wizardComponent != null) { | 70 | if (this._wizardComponent != null) { |
73 | this._wizardComponent.remove(); | 71 | this._wizardComponent.remove(); |
74 | } | 72 | } |
75 | 73 | ||
76 | if (aValue != null) { | 74 | if (aValue != null) { |
77 | this.getElement('importCover').hide(); | 75 | this.getElement('importCover').hide(); |
78 | this.getElement('importWizard').show(); | 76 | this.getElement('importWizard').show(); |
79 | } | 77 | } |
80 | this._wizardComponent = aValue; | 78 | this._wizardComponent = aValue; |
81 | }, | 79 | }, |
82 | 80 | ||
83 | 'resetImportComponent': function() { | 81 | 'resetImportComponent': function() { |
84 | //MochiKit.Logging.logDebug(">>> resetImportComponent"); | 82 | //MochiKit.Logging.logDebug(">>> resetImportComponent"); |
85 | this.setWizardComponent(null); | 83 | this.setWizardComponent(null); |
86 | this.getElement('wizardComponent').update(""); | 84 | this.getElement('wizardComponent').update(""); |
87 | 85 | ||
88 | this.getElement('importCover').show(); | 86 | this.getElement('importCover').show(); |
89 | this.getElement('importWizard').hide(); | 87 | this.getElement('importWizard').hide(); |
90 | //MochiKit.Logging.logDebug("<<< resetImportComponent"); | 88 | //MochiKit.Logging.logDebug("<<< resetImportComponent"); |
91 | }, | 89 | }, |
92 | 90 | ||
93 | //------------------------------------------------------------------------- | 91 | //------------------------------------------------------------------------- |
94 | 92 | ||
95 | 'backButton': function() { | 93 | 'backButton': function() { |
96 | return this._backButton; | 94 | return this._backButton; |
97 | }, | 95 | }, |
98 | 96 | ||
99 | 'setBackButton': function(aValue) { | 97 | 'setBackButton': function(aValue) { |
100 | this._backButton = aValue; | 98 | this._backButton = aValue; |
101 | }, | 99 | }, |
102 | 100 | ||
103 | 'nextButton': function() { | 101 | 'nextButton': function() { |
104 | return this._nextButton; | 102 | return this._nextButton; |
105 | }, | 103 | }, |
106 | 104 | ||
107 | 'setNextButton': function(aValue) { | 105 | 'setNextButton': function(aValue) { |
108 | this._nextButton = aValue; | 106 | this._nextButton = aValue; |
109 | }, | 107 | }, |
110 | 108 | ||
111 | //------------------------------------------------------------------------- | 109 | //------------------------------------------------------------------------- |
112 | 110 | ||
113 | 'render': function() { | 111 | 'render': function() { |
114 | //MochiKit.Logging.logDebug(">>> Import.MainComponent.render"); | 112 | //MochiKit.Logging.logDebug(">>> Import.MainComponent.render"); |
115 | Clipperz.NotificationCenter.unregister(this); | 113 | Clipperz.NotificationCenter.unregister(this); |
116 | MochiKit.Signal.disconnectAllTo(this); | 114 | MochiKit.Signal.disconnectAllTo(this); |
117 | 115 | ||
118 | this.element().update(""); | 116 | this.element().update(""); |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js index 24dc785..f58d913 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js | |||
@@ -1,118 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.PasswordPlusImportComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.PasswordPlusImportComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Import.PasswordPlusImportComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.Import.PasswordPlusImportComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this.render(); | 36 | this.render(); |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.PasswordPlusImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.PasswordPlusImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.PasswordPlusImportComponent component"; | 46 | return "Clipperz.PM.Components.Import.PasswordPlusImportComponent component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'render': function() { | 51 | 'render': function() { |
54 | //MochiKit.Logging.logDebug(">>> Import.PasswordPlusImportComponent.render"); | 52 | //MochiKit.Logging.logDebug(">>> Import.PasswordPlusImportComponent.render"); |
55 | this.domHelper().append(this.element(), {tag:'div', cls:'passwordPlusImportWizard', children:[ | 53 | this.domHelper().append(this.element(), {tag:'div', cls:'passwordPlusImportWizard', children:[ |
56 | {tag:'h3', htmlString:Clipperz.PM.Strings['PasswordPlus_ImportWizard_Title']}, | 54 | {tag:'h3', htmlString:Clipperz.PM.Strings['PasswordPlus_ImportWizard_Title']}, |
57 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 55 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
58 | {tag:'div', cls:'importStepBlocks', children:[ | 56 | {tag:'div', cls:'importStepBlocks', children:[ |
59 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 57 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
60 | {tag:'div', children:[ | 58 | {tag:'div', children:[ |
61 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_passwordPlus_description']}, | 59 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_passwordPlus_description']}, |
62 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 60 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
63 | this.textAreaConfig() | 61 | this.textAreaConfig() |
64 | ]} | 62 | ]} |
65 | ]}, | 63 | ]}, |
66 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ | 64 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ |
67 | {tag:'div', children:[ | 65 | {tag:'div', children:[ |
68 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 66 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
69 | ]} | 67 | ]} |
70 | ]}, | 68 | ]}, |
71 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ | 69 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ |
72 | {tag:'div', children:[ | 70 | {tag:'div', children:[ |
73 | {tag:'h4', html:"done"} | 71 | {tag:'h4', html:"done"} |
74 | ]} | 72 | ]} |
75 | ]} | 73 | ]} |
76 | ]}, | 74 | ]}, |
77 | {tag:'div', cls:'importOptionsButtons', children:[ | 75 | {tag:'div', cls:'importOptionsButtons', children:[ |
78 | {tag:'table', children:[ | 76 | {tag:'table', children:[ |
79 | {tag:'tbody', children:[ | 77 | {tag:'tbody', children:[ |
80 | {tag:'tr', children:[ | 78 | {tag:'tr', children:[ |
81 | {tag:'td', html:' '}, | 79 | {tag:'td', html:' '}, |
82 | {tag:'td', children:[ | 80 | {tag:'td', children:[ |
83 | {tag:'div', id:this.getId('backActionButton')} | 81 | {tag:'div', id:this.getId('backActionButton')} |
84 | ]}, | 82 | ]}, |
85 | {tag:'td', html:' '}, | 83 | {tag:'td', html:' '}, |
86 | {tag:'td', children:[ | 84 | {tag:'td', children:[ |
87 | {tag:'div', id:this.getId('nextActionButton')} | 85 | {tag:'div', id:this.getId('nextActionButton')} |
88 | ]}, | 86 | ]}, |
89 | {tag:'td', html:' '} | 87 | {tag:'td', html:' '} |
90 | ]} | 88 | ]} |
91 | ]} | 89 | ]} |
92 | ]} | 90 | ]} |
93 | ]} | 91 | ]} |
94 | ]}); | 92 | ]}); |
95 | 93 | ||
96 | this.updateSteps(); | 94 | this.updateSteps(); |
97 | 95 | ||
98 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); | 96 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); |
99 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); | 97 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); |
100 | 98 | ||
101 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() | 99 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() |
102 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 100 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
103 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 101 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
104 | //MochiKit.Logging.logDebug("<<< Import.PasswordPlusImportComponent.render"); | 102 | //MochiKit.Logging.logDebug("<<< Import.PasswordPlusImportComponent.render"); |
105 | }, | 103 | }, |
106 | 104 | ||
107 | //------------------------------------------------------------------------- | 105 | //------------------------------------------------------------------------- |
108 | /* | 106 | /* |
109 | 'backAction': function() { | 107 | 'backAction': function() { |
110 | switch (this.currentStep()) { | 108 | switch (this.currentStep()) { |
111 | case 1: //-> 0 | 109 | case 1: //-> 0 |
112 | this.backButton().disable(); | 110 | this.backButton().disable(); |
113 | this.getElement('step_1').hide(); | 111 | this.getElement('step_1').hide(); |
114 | this.setCurrentStep(0); | 112 | this.setCurrentStep(0); |
115 | this.getElement('step_0').show(); | 113 | this.getElement('step_0').show(); |
116 | break; | 114 | break; |
117 | } | 115 | } |
118 | }, | 116 | }, |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js index fe4d45c..443ee17 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js | |||
@@ -1,118 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 27 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.Import.RoboFormImportComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.Import.RoboFormImportComponent = function(anElement, args) { |
34 | args = args || {}; | 32 | args = args || {}; |
35 | 33 | ||
36 | Clipperz.PM.Components.Import.RoboFormImportComponent.superclass.constructor.call(this, anElement, args); | 34 | Clipperz.PM.Components.Import.RoboFormImportComponent.superclass.constructor.call(this, anElement, args); |
37 | 35 | ||
38 | this.render(); | 36 | this.render(); |
39 | 37 | ||
40 | return this; | 38 | return this; |
41 | } | 39 | } |
42 | 40 | ||
43 | //============================================================================= | 41 | //============================================================================= |
44 | 42 | ||
45 | YAHOO.extendX(Clipperz.PM.Components.Import.RoboFormImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { | 43 | YAHOO.extendX(Clipperz.PM.Components.Import.RoboFormImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { |
46 | 44 | ||
47 | 'toString': function() { | 45 | 'toString': function() { |
48 | return "Clipperz.PM.Components.Import.RoboFormImportComponent component"; | 46 | return "Clipperz.PM.Components.Import.RoboFormImportComponent component"; |
49 | }, | 47 | }, |
50 | 48 | ||
51 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
52 | 50 | ||
53 | 'render': function() { | 51 | 'render': function() { |
54 | //MochiKit.Logging.logDebug(">>> Import.RoboFormImportComponent.render"); | 52 | //MochiKit.Logging.logDebug(">>> Import.RoboFormImportComponent.render"); |
55 | this.domHelper().append(this.element(), {tag:'div', cls:'roboFormImportWizard', children:[ | 53 | this.domHelper().append(this.element(), {tag:'div', cls:'roboFormImportWizard', children:[ |
56 | {tag:'h3', htmlString:Clipperz.PM.Strings['RoboForm_ImportWizard_Title']}, | 54 | {tag:'h3', htmlString:Clipperz.PM.Strings['RoboForm_ImportWizard_Title']}, |
57 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, | 55 | {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, |
58 | {tag:'div', cls:'importStepBlocks', children:[ | 56 | {tag:'div', cls:'importStepBlocks', children:[ |
59 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ | 57 | {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ |
60 | {tag:'div', children:[ | 58 | {tag:'div', children:[ |
61 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_roboForm_description']}, | 59 | {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_roboForm_description']}, |
62 | {tag:'div', cls:'importOptionsParameters', children:[]}, | 60 | {tag:'div', cls:'importOptionsParameters', children:[]}, |
63 | this.textAreaConfig() | 61 | this.textAreaConfig() |
64 | ]} | 62 | ]} |
65 | ]}, | 63 | ]}, |
66 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ | 64 | {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ |
67 | {tag:'div', children:[ | 65 | {tag:'div', children:[ |
68 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} | 66 | {tag:'div', id:this.getId('previewDiv'), html:"preview"} |
69 | ]} | 67 | ]} |
70 | ]}, | 68 | ]}, |
71 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ | 69 | {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ |
72 | {tag:'div', children:[ | 70 | {tag:'div', children:[ |
73 | {tag:'h4', html:"done"} | 71 | {tag:'h4', html:"done"} |
74 | ]} | 72 | ]} |
75 | ]} | 73 | ]} |
76 | ]}, | 74 | ]}, |
77 | {tag:'div', cls:'importOptionsButtons', children:[ | 75 | {tag:'div', cls:'importOptionsButtons', children:[ |
78 | {tag:'table', children:[ | 76 | {tag:'table', children:[ |
79 | {tag:'tbody', children:[ | 77 | {tag:'tbody', children:[ |
80 | {tag:'tr', children:[ | 78 | {tag:'tr', children:[ |
81 | {tag:'td', html:' '}, | 79 | {tag:'td', html:' '}, |
82 | {tag:'td', children:[ | 80 | {tag:'td', children:[ |
83 | {tag:'div', id:this.getId('backActionButton')} | 81 | {tag:'div', id:this.getId('backActionButton')} |
84 | ]}, | 82 | ]}, |
85 | {tag:'td', html:' '}, | 83 | {tag:'td', html:' '}, |
86 | {tag:'td', children:[ | 84 | {tag:'td', children:[ |
87 | {tag:'div', id:this.getId('nextActionButton')} | 85 | {tag:'div', id:this.getId('nextActionButton')} |
88 | ]}, | 86 | ]}, |
89 | {tag:'td', html:' '} | 87 | {tag:'td', html:' '} |
90 | ]} | 88 | ]} |
91 | ]} | 89 | ]} |
92 | ]} | 90 | ]} |
93 | ]} | 91 | ]} |
94 | ]}); | 92 | ]}); |
95 | 93 | ||
96 | this.updateSteps(); | 94 | this.updateSteps(); |
97 | 95 | ||
98 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); | 96 | this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); |
99 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); | 97 | this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); |
100 | 98 | ||
101 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() | 99 | this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() |
102 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 100 | this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
103 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 101 | this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
104 | //MochiKit.Logging.logDebug("<<< Import.RoboFormImportComponent.render"); | 102 | //MochiKit.Logging.logDebug("<<< Import.RoboFormImportComponent.render"); |
105 | }, | 103 | }, |
106 | 104 | ||
107 | //------------------------------------------------------------------------- | 105 | //------------------------------------------------------------------------- |
108 | 106 | ||
109 | 'nextAction': function() { | 107 | 'nextAction': function() { |
110 | switch (this.currentStep()) { | 108 | switch (this.currentStep()) { |
111 | case 0: //-> 1 | 109 | case 0: //-> 1 |
112 | this.previewValues(); | 110 | this.previewValues(); |
113 | break; | 111 | break; |
114 | case 1: //-> 2 | 112 | case 1: //-> 2 |
115 | this.importValues(); | 113 | this.importValues(); |
116 | break; | 114 | break; |
117 | } | 115 | } |
118 | }, | 116 | }, |