git_sitools_idoc / flarecast / workspace / client-user-3.0 / app / ResetPasswordApplication.js @ master
1 |
/*******************************************************************************
|
---|---|
2 |
* Copyright 2010-2014 CNES - CENTRE NATIONAL d'ETUDES SPATIALES
|
3 |
*
|
4 |
* This file is part of SITools2.
|
5 |
*
|
6 |
* SITools2 is free software: you can redistribute it and/or modify it under the
|
7 |
* terms of the GNU General Public License as published by the Free Software
|
8 |
* Foundation, either version 3 of the License, or (at your option) any later
|
9 |
* version.
|
10 |
*
|
11 |
* SITools2 is distributed in the hope that it will be useful, but WITHOUT ANY
|
12 |
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
13 |
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License along with
|
16 |
* SITools2. If not, see <http://www.gnu.org/licenses/>.
|
17 |
******************************************************************************/
|
18 |
/*global Ext, i18n, loadUrl, getDesktop, sitools, SitoolsDesk */
|
19 |
Ext.define('sitools.user.ResetPasswordApplication', {
|
20 |
name: 'sitools.user', |
21 |
|
22 |
requires: ['Ext.container.Viewport', |
23 |
|
24 |
/* CORE */
|
25 |
'sitools.public.utils.LoginDef',
|
26 |
'sitools.user.utils.Def',
|
27 |
|
28 |
/* UTILS PUBLIC */
|
29 |
'sitools.public.widget.vtype',
|
30 |
'sitools.public.utils.reference',
|
31 |
'sitools.public.utils.i18n',
|
32 |
'sitools.public.utils.loadUrl',
|
33 |
'sitools.public.utils.sql2ext',
|
34 |
'sitools.public.utils.Locale',
|
35 |
'sitools.public.utils.LoginUtils',
|
36 |
'sitools.public.crypto.Base64',
|
37 |
'sitools.public.utils.PublicStorage',
|
38 |
'sitools.public.utils.PopupMessage',
|
39 |
'sitools.user.utils.I18nRegistry',
|
40 |
|
41 |
/* MODULE LOADER, uncomment if all plugins have to be loaded at startup*/
|
42 |
// 'sitools.user.utils.PluginDependenciesLoader'
|
43 |
], |
44 |
|
45 |
extend: 'Ext.app.Application', |
46 |
|
47 |
isReady: false, |
48 |
modules: null, |
49 |
useQuickTips: true, |
50 |
|
51 |
config: {
|
52 |
ready: false, |
53 |
loaded: false |
54 |
}, |
55 |
|
56 |
init: function () { |
57 |
Ext.Ajax.defaultHeaders = { |
58 |
"Accept" : "application/json", |
59 |
"X-User-Agent" : "Sitools" |
60 |
}; |
61 |
loadUrl.load(appUrl + '/client-admin/siteMap', function () { |
62 |
i18n.load(loadUrl.get("APP_URL") + loadUrl.get("APP_CLIENT_PUBLIC_URL") + '/res/i18n/en/gui.properties', function () { |
63 |
|
64 |
Ext.MessageBox.buttonText.yes = i18n.get('label.yes');
|
65 |
Ext.MessageBox.buttonText.no = i18n.get('label.no');
|
66 |
Ext.QuickTips.init(); |
67 |
|
68 |
var resetPasswordPanel = Ext.create("sitools.public.userProfile.ResetPasswordPanel", { |
69 |
challengeToken : challengeToken,
|
70 |
resourceUrl : resourceUrl
|
71 |
}); |
72 |
|
73 |
var win = Ext.create("Ext.window.Window", { |
74 |
title : i18n.get("title.changePassword"), |
75 |
items : [resetPasswordPanel],
|
76 |
modal : true, |
77 |
width: 500, |
78 |
resizable : false |
79 |
}); |
80 |
|
81 |
win.show(); |
82 |
|
83 |
}); |
84 |
}); |
85 |
|
86 |
} |
87 |
|
88 |
|
89 |
}); |