|
Lines 33-39
Link Here
|
| 33 |
"dojo/_base/lang", |
33 |
"dojo/_base/lang", |
| 34 |
"dojo/_base/array", |
34 |
"dojo/_base/array", |
| 35 |
"dojo/topic", |
35 |
"dojo/topic", |
|
|
36 |
"dojo/Deferred", |
| 36 |
"umc/tools", |
37 |
"umc/tools", |
|
|
38 |
"umc/dialog", |
| 37 |
"umc/widgets/Module", |
39 |
"umc/widgets/Module", |
| 38 |
"umc/widgets/Wizard", |
40 |
"umc/widgets/Wizard", |
| 39 |
"umc/widgets/StandbyMixin", |
41 |
"umc/widgets/StandbyMixin", |
|
Lines 43-49
Link Here
|
| 43 |
"umc/widgets/TextArea", |
45 |
"umc/widgets/TextArea", |
| 44 |
"umc/widgets/CheckBox", |
46 |
"umc/widgets/CheckBox", |
| 45 |
"umc/i18n!umc/modules/sysinfo" |
47 |
"umc/i18n!umc/modules/sysinfo" |
| 46 |
], function(declare, lang, array, topic, tools, Module, Wizard, StandbyMixin, ComboBox, TextBox, Text, TextArea, CheckBox, _) { |
48 |
], function(declare, lang, array, topic, Deferred, tools, dialog, Module, Wizard, StandbyMixin, ComboBox, TextBox, Text, TextArea, CheckBox, _) { |
| 47 |
|
49 |
|
| 48 |
var SysinfoWizard = declare("umc.modules.sysinfo.Wizard", [ Wizard, StandbyMixin ], { |
50 |
var SysinfoWizard = declare("umc.modules.sysinfo.Wizard", [ Wizard, StandbyMixin ], { |
| 49 |
|
51 |
|
|
Lines 86-92
Link Here
|
| 86 |
}, { |
88 |
}, { |
| 87 |
name: 'support', |
89 |
name: 'support', |
| 88 |
headerText: _('Support information'), |
90 |
headerText: _('Support information'), |
| 89 |
helpText: _(''), |
91 |
helpText: '', |
| 90 |
widgets: [{ |
92 |
widgets: [{ |
| 91 |
type: Text, |
93 |
type: Text, |
| 92 |
name: 'firstText', |
94 |
name: 'firstText', |
|
Lines 107-113
Link Here
|
| 107 |
}, { |
109 |
}, { |
| 108 |
name: 'collect', |
110 |
name: 'collect', |
| 109 |
headerText: _('Collected data'), |
111 |
headerText: _('Collected data'), |
| 110 |
helpText: _(''), |
112 |
helpText: '', |
| 111 |
widgets: [{ |
113 |
widgets: [{ |
| 112 |
type: Text, |
114 |
type: Text, |
| 113 |
name: 'firstText', |
115 |
name: 'firstText', |
|
Lines 161-167
Link Here
|
| 161 |
}, { |
163 |
}, { |
| 162 |
name: 'transfer', |
164 |
name: 'transfer', |
| 163 |
headerText: _('Transfer the information'), |
165 |
headerText: _('Transfer the information'), |
| 164 |
helpText: _(''), |
166 |
helpText: '', |
| 165 |
widgets: [{ |
167 |
widgets: [{ |
| 166 |
type: Text, |
168 |
type: Text, |
| 167 |
name: 'firstText', |
169 |
name: 'firstText', |
|
Lines 181-187
Link Here
|
| 181 |
}, { |
183 |
}, { |
| 182 |
name: 'uploaded', |
184 |
name: 'uploaded', |
| 183 |
headerText: _('Transfered successfully'), |
185 |
headerText: _('Transfered successfully'), |
| 184 |
helpText: _(''), |
186 |
helpText: '', |
| 185 |
widgets: [{ |
187 |
widgets: [{ |
| 186 |
type: Text, |
188 |
type: Text, |
| 187 |
name: 'firstText', |
189 |
name: 'firstText', |
|
Lines 191-197
Link Here
|
| 191 |
}, { |
193 |
}, { |
| 192 |
name: 'mail', |
194 |
name: 'mail', |
| 193 |
headerText: _('Transfer via mail'), |
195 |
headerText: _('Transfer via mail'), |
| 194 |
helpText: _(''), |
196 |
helpText: '', |
| 195 |
widgets: [{ |
197 |
widgets: [{ |
| 196 |
type: Text, |
198 |
type: Text, |
| 197 |
name: 'firstText', |
199 |
name: 'firstText', |
|
Lines 208-213
Link Here
|
| 208 |
layout: [['firstText'], |
210 |
layout: [['firstText'], |
| 209 |
['download'], |
211 |
['download'], |
| 210 |
['mail']] |
212 |
['mail']] |
|
|
213 |
}, { |
| 214 |
name: 'uploaded_failed', |
| 215 |
headerText: _('Error during transfer'), |
| 216 |
helpText: '', |
| 217 |
widgets: [{ |
| 218 |
type: Text, |
| 219 |
name: 'firstText', |
| 220 |
content: '<p>' + _('The automatic upload of the archive failed. Please go back and send the archive via e-mail. We apologize for the inconvenience.') + '</p>' |
| 221 |
}], |
| 222 |
layout: [['firstText']] |
| 211 |
}]; |
223 |
}]; |
| 212 |
}, |
224 |
}, |
| 213 |
|
225 |
|
|
Lines 232-238
Link Here
|
| 232 |
}, |
244 |
}, |
| 233 |
|
245 |
|
| 234 |
hasNext: function(pageName) { |
246 |
hasNext: function(pageName) { |
| 235 |
if (pageName == 'uploaded') { |
247 |
if (pageName == 'uploaded' || pageName == 'mail') { |
| 236 |
return false; |
248 |
return false; |
| 237 |
} else { |
249 |
} else { |
| 238 |
return this.inherited(arguments); |
250 |
return this.inherited(arguments); |
|
Lines 266-275
Link Here
|
| 266 |
if (this.getWidget('transfer', 'method') == 'mail') { |
278 |
if (this.getWidget('transfer', 'method') == 'mail') { |
| 267 |
nextPage = 'mail'; |
279 |
nextPage = 'mail'; |
| 268 |
} else { |
280 |
} else { |
|
|
281 |
nextPage = new Deferred(); |
| 269 |
this.standby(true); |
282 |
this.standby(true); |
| 270 |
this.uploadArchive().then( |
283 |
this.uploadArchive().then( |
| 271 |
lang.hitch(this, function() { |
284 |
lang.hitch(this, function() { |
| 272 |
this.standby(false); |
285 |
this.standby(false); |
|
|
286 |
nextPage.resolve('upload'); |
| 287 |
}), |
| 288 |
lang.hitch(this, function() { |
| 289 |
this.standby(false); |
| 290 |
nextPage.resolve('uploaded_failed'); |
| 291 |
dialog.alert(_('The automatic upload of the archive failed. Please go back and send the archive via e-mail. We apologize for the inconvenience.')); |
| 273 |
}) |
292 |
}) |
| 274 |
); |
293 |
); |
| 275 |
} |
294 |
} |
|
Lines 305-310
Link Here
|
| 305 |
return 'transfer'; |
324 |
return 'transfer'; |
| 306 |
} |
325 |
} |
| 307 |
} |
326 |
} |
|
|
327 |
if (previousPage == 'mail') { |
| 328 |
return 'transfer'; |
| 329 |
} |
| 308 |
return previousPage; |
330 |
return previousPage; |
| 309 |
}, |
331 |
}, |
| 310 |
|
332 |
|