Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js index 54813bc..05baf46 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.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.MainComponent = function(anElement, args) { | 33 | Clipperz.PM.Components.Import.MainComponent = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.Import.MainComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Import.MainComponent.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._user = args.user; | 38 | this._user = args.user; |
42 | this._wizardComponent = null; | 39 | this._wizardComponent = null; |
43 | 40 | ||
44 | this._backButton = null; | 41 | this._backButton = null; |
45 | this._nextButton = null; | 42 | this._nextButton = null; |
46 | 43 | ||
47 | this._selectedComponent = null; | 44 | this._selectedComponent = null; |
48 | 45 | ||
49 | this.render(); | 46 | this.render(); |
50 | 47 | ||
51 | return this; | 48 | return this; |
52 | } | 49 | } |
53 | 50 | ||
54 | //============================================================================= | 51 | //============================================================================= |
55 | 52 | ||
56 | YAHOO.extendX(Clipperz.PM.Components.Import.MainComponent, Clipperz.PM.Components.BaseComponent, { | 53 | YAHOO.extendX(Clipperz.PM.Components.Import.MainComponent, Clipperz.PM.Components.BaseComponent, { |
57 | 54 | ||
58 | 'toString': function() { | 55 | 'toString': function() { |
59 | return "Clipperz.PM.Components.Import.MainComponent component"; | 56 | return "Clipperz.PM.Components.Import.MainComponent component"; |
60 | }, | 57 | }, |
61 | 58 | ||
62 | //------------------------------------------------------------------------- | 59 | //------------------------------------------------------------------------- |
63 | 60 | ||
64 | 'user': function() { | 61 | 'user': function() { |
65 | return this._user; | 62 | return this._user; |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | 66 | ||
70 | 'wizardComponent': function() { | 67 | 'wizardComponent': function() { |
71 | return this._wizardComponent; | 68 | return this._wizardComponent; |
72 | }, | 69 | }, |
73 | 70 | ||
74 | 'setWizardComponent': function(aValue) { | 71 | 'setWizardComponent': function(aValue) { |
75 | if (this._wizardComponent != null) { | 72 | if (this._wizardComponent != null) { |
76 | this._wizardComponent.remove(); | 73 | this._wizardComponent.remove(); |
77 | } | 74 | } |
78 | 75 | ||
79 | if (aValue != null) { | 76 | if (aValue != null) { |
80 | this.getElement('importCover').hide(); | 77 | this.getElement('importCover').hide(); |
81 | this.getElement('importWizard').show(); | 78 | this.getElement('importWizard').show(); |
82 | } | 79 | } |
83 | this._wizardComponent = aValue; | 80 | this._wizardComponent = aValue; |
84 | }, | 81 | }, |
85 | 82 | ||
86 | 'resetImportComponent': function() { | 83 | 'resetImportComponent': function() { |
87 | //MochiKit.Logging.logDebug(">>> resetImportComponent"); | 84 | //MochiKit.Logging.logDebug(">>> resetImportComponent"); |
88 | this.setWizardComponent(null); | 85 | this.setWizardComponent(null); |
89 | this.getElement('wizardComponent').update(""); | 86 | this.getElement('wizardComponent').update(""); |
90 | 87 | ||
91 | this.getElement('importCover').show(); | 88 | this.getElement('importCover').show(); |
92 | this.getElement('importWizard').hide(); | 89 | this.getElement('importWizard').hide(); |
93 | //MochiKit.Logging.logDebug("<<< resetImportComponent"); | 90 | //MochiKit.Logging.logDebug("<<< resetImportComponent"); |
94 | }, | 91 | }, |
95 | 92 | ||
96 | //------------------------------------------------------------------------- | 93 | //------------------------------------------------------------------------- |
97 | 94 | ||
98 | 'backButton': function() { | 95 | 'backButton': function() { |
99 | return this._backButton; | 96 | return this._backButton; |
100 | }, | 97 | }, |
101 | 98 | ||
102 | 'setBackButton': function(aValue) { | 99 | 'setBackButton': function(aValue) { |
103 | this._backButton = aValue; | 100 | this._backButton = aValue; |
104 | }, | 101 | }, |
105 | 102 | ||
106 | 'nextButton': function() { | 103 | 'nextButton': function() { |
107 | return this._nextButton; | 104 | return this._nextButton; |
108 | }, | 105 | }, |
109 | 106 | ||
110 | 'setNextButton': function(aValue) { | 107 | 'setNextButton': function(aValue) { |
111 | this._nextButton = aValue; | 108 | this._nextButton = aValue; |
112 | }, | 109 | }, |
113 | 110 | ||
114 | //------------------------------------------------------------------------- | 111 | //------------------------------------------------------------------------- |
115 | 112 | ||
116 | 'render': function() { | 113 | 'render': function() { |
117 | //MochiKit.Logging.logDebug(">>> Import.MainComponent.render"); | 114 | //MochiKit.Logging.logDebug(">>> Import.MainComponent.render"); |
118 | Clipperz.NotificationCenter.unregister(this); | 115 | Clipperz.NotificationCenter.unregister(this); |
119 | MochiKit.Signal.disconnectAllTo(this); | 116 | MochiKit.Signal.disconnectAllTo(this); |
120 | 117 | ||