Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js index 4f6b1e4..a55455a 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } | 29 | if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Import.GenericImportComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.Import.GenericImportComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | this._steps = this._steps || ['EDIT', 'PREVIEW', 'IMPORT']; | 36 | this._steps = this._steps || ['EDIT', 'PREVIEW', 'IMPORT']; |
40 | 37 | ||
41 | Clipperz.PM.Components.Import.GenericImportComponent.superclass.constructor.call(this, anElement, args); | 38 | Clipperz.PM.Components.Import.GenericImportComponent.superclass.constructor.call(this, anElement, args); |
42 | 39 | ||
43 | this._user = args['user']; | 40 | this._user = args['user']; |
44 | 41 | ||
45 | this._currentStep = 0; | 42 | this._currentStep = 0; |
46 | this._currentStatus = 'IDLE'; //'PROCESSING' | 43 | this._currentStatus = 'IDLE'; //'PROCESSING' |
47 | 44 | ||
48 | this._parsedValues = null; | 45 | this._parsedValues = null; |
49 | this._processedValues = null; | 46 | this._processedValues = null; |
50 | 47 | ||
51 | this._backButton = null; | 48 | this._backButton = null; |
52 | this._nextButton = null; | 49 | this._nextButton = null; |
53 | 50 | ||
54 | Clipperz.NotificationCenter.register(null, 'importProcessorProgressUpdate', this, 'updateProgressDialogStatus'); | 51 | Clipperz.NotificationCenter.register(null, 'importProcessorProgressUpdate', this, 'updateProgressDialogStatus'); |
55 | 52 | ||
56 | return this; | 53 | return this; |
57 | } | 54 | } |
58 | 55 | ||
59 | //============================================================================= | 56 | //============================================================================= |
60 | 57 | ||
61 | YAHOO.extendX(Clipperz.PM.Components.Import.GenericImportComponent, Clipperz.PM.Components.BaseComponent, { | 58 | YAHOO.extendX(Clipperz.PM.Components.Import.GenericImportComponent, Clipperz.PM.Components.BaseComponent, { |
62 | 59 | ||
63 | 'toString': function() { | 60 | 'toString': function() { |
64 | return "Clipperz.PM.Components.Import.GenericImportComponent component"; | 61 | return "Clipperz.PM.Components.Import.GenericImportComponent component"; |
65 | }, | 62 | }, |
66 | 63 | ||
67 | //------------------------------------------------------------------------- | 64 | //------------------------------------------------------------------------- |
68 | 65 | ||
69 | 'user': function() { | 66 | 'user': function() { |
70 | return this._user; | 67 | return this._user; |
71 | }, | 68 | }, |
72 | 69 | ||
73 | //------------------------------------------------------------------------- | 70 | //------------------------------------------------------------------------- |
74 | 71 | ||
75 | 'textAreaConfig': function() { | 72 | 'textAreaConfig': function() { |
76 | return {tag:'textarea', name:this.getId('importTextArea'), cls:'importTextArea', id:this.getId('importTextArea'), cols:60, rows:15, html:""}; | 73 | return {tag:'textarea', name:this.getId('importTextArea'), cls:'importTextArea', id:this.getId('importTextArea'), cols:60, rows:15, html:""}; |
77 | }, | 74 | }, |
78 | 75 | ||
79 | 'textAreaContent': function() { | 76 | 'textAreaContent': function() { |
80 | return this.getDom('importTextArea').value | 77 | return this.getDom('importTextArea').value |
81 | }, | 78 | }, |
82 | 79 | ||
83 | //------------------------------------------------------------------------- | 80 | //------------------------------------------------------------------------- |
84 | 81 | ||
85 | 'steps': function() { | 82 | 'steps': function() { |
86 | return this._steps; | 83 | return this._steps; |
87 | }, | 84 | }, |
88 | 85 | ||
89 | 'currentStep': function() { | 86 | 'currentStep': function() { |
90 | return this._currentStep; | 87 | return this._currentStep; |
91 | }, | 88 | }, |
92 | 89 | ||
93 | 'setCurrentStep': function(aValue) { | 90 | 'setCurrentStep': function(aValue) { |
94 | this._currentStep = aValue; | 91 | this._currentStep = aValue; |
95 | this.updateSteps(); | 92 | this.updateSteps(); |
96 | }, | 93 | }, |
97 | 94 | ||
98 | //------------------------------------------------------------------------- | 95 | //------------------------------------------------------------------------- |
99 | 96 | ||
100 | 'currentStatus': function() { | 97 | 'currentStatus': function() { |
101 | return this._currentStatus; | 98 | return this._currentStatus; |
102 | }, | 99 | }, |
103 | 100 | ||
104 | 'startProcessing': function() { | 101 | 'startProcessing': function() { |
105 | this._currentStatus = 'PROCESSING'; | 102 | this._currentStatus = 'PROCESSING'; |
106 | this.updateSteps(); | 103 | this.updateSteps(); |
107 | }, | 104 | }, |
108 | 105 | ||
109 | 'processingDone': function() { | 106 | 'processingDone': function() { |
110 | this._currentStatus = 'IDLE'; | 107 | this._currentStatus = 'IDLE'; |
111 | this.setCurrentStep(this.currentStep() + 1); | 108 | this.setCurrentStep(this.currentStep() + 1); |
112 | }, | 109 | }, |
113 | 110 | ||
114 | 'processingAborted': function() { | 111 | 'processingAborted': function() { |
115 | this._currentStatus = 'IDLE'; | 112 | this._currentStatus = 'IDLE'; |
116 | this.updateSteps(); | 113 | this.updateSteps(); |
117 | }, | 114 | }, |
118 | 115 | ||
119 | //------------------------------------------------------------------------- | 116 | //------------------------------------------------------------------------- |
120 | 117 | ||