aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/Login.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-03 21:01:45 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-03 21:01:45 +1300
commit48f981a2a9755fb0af6497020e499bb0883e0e1f (patch)
treeac960f950e4f37aec2614a97a706aed34a1fb2db /web/app/view/Login.js
parentd16121684ecae7646aa87616a64d60978d087bc0 (diff)
downloadtrackermap-server-48f981a2a9755fb0af6497020e499bb0883e0e1f.tar.gz
trackermap-server-48f981a2a9755fb0af6497020e499bb0883e0e1f.tar.bz2
trackermap-server-48f981a2a9755fb0af6497020e499bb0883e0e1f.zip
Enable JavaScript strict mode
Diffstat (limited to 'web/app/view/Login.js')
-rw-r--r--web/app/view/Login.js138
1 files changed, 71 insertions, 67 deletions
diff --git a/web/app/view/Login.js b/web/app/view/Login.js
index 23f813c66..b68f80b07 100644
--- a/web/app/view/Login.js
+++ b/web/app/view/Login.js
@@ -13,79 +13,83 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+(function () {
+ 'use strict';
-Ext.define('Traccar.view.Login', {
- extend: 'Traccar.view.BaseDialog',
- alias: 'widget.login',
-
- requires: [
- 'Traccar.view.LoginController'
- ],
-
- controller: 'login',
+ Ext.define('Traccar.view.Login', {
+ extend: 'Traccar.view.BaseDialog',
+ alias: 'widget.login',
- closable: false,
+ requires: [
+ 'Traccar.view.LoginController'
+ ],
- items: {
- xtype: 'form',
- reference: 'form',
+ controller: 'login',
- autoEl: {
- tag: 'form',
- method: 'POST',
- action: 'blank',
- target: 'submitTarget'
- },
+ closable: false,
- items: [{
- xtype: 'combobox',
- name: 'language',
- fieldLabel: strings.loginLanguage,
- store: 'Languages',
- displayField: 'name',
- valueField: 'code',
- submitValue: false,
- listeners: {
- select: 'onSelectLanguage'
- },
- reference: 'languageField'
- }, {
- xtype: 'textfield',
- name: 'email',
- fieldLabel: strings.userEmail,
- allowBlank: false,
- enableKeyEvents: true,
- listeners: {
- specialKey: 'onSpecialKey',
- afterrender: 'onAfterRender'
- },
- inputAttrTpl: ['autocomplete="on"']
- }, {
- xtype: 'textfield',
- name: 'password',
- fieldLabel: strings.userPassword,
- inputType: 'password',
- allowBlank: false,
- enableKeyEvents: true,
- listeners: {
- specialKey: 'onSpecialKey'
+ items: {
+ xtype: 'form',
+ reference: 'form',
+
+ autoEl: {
+ tag: 'form',
+ method: 'POST',
+ action: 'blank',
+ target: 'submitTarget'
},
- inputAttrTpl: ['autocomplete="on"']
- }, {
- xtype: 'component',
- html: '<iframe id="submitTarget" name="submitTarget" style="display:none"></iframe>'
+
+ items: [{
+ xtype: 'combobox',
+ name: 'language',
+ fieldLabel: strings.loginLanguage,
+ store: 'Languages',
+ displayField: 'name',
+ valueField: 'code',
+ submitValue: false,
+ listeners: {
+ select: 'onSelectLanguage'
+ },
+ reference: 'languageField'
+ }, {
+ xtype: 'textfield',
+ name: 'email',
+ fieldLabel: strings.userEmail,
+ allowBlank: false,
+ enableKeyEvents: true,
+ listeners: {
+ specialKey: 'onSpecialKey',
+ afterrender: 'onAfterRender'
+ },
+ inputAttrTpl: ['autocomplete="on"']
+ }, {
+ xtype: 'textfield',
+ name: 'password',
+ fieldLabel: strings.userPassword,
+ inputType: 'password',
+ allowBlank: false,
+ enableKeyEvents: true,
+ listeners: {
+ specialKey: 'onSpecialKey'
+ },
+ inputAttrTpl: ['autocomplete="on"']
+ }, {
+ xtype: 'component',
+ html: '<iframe id="submitTarget" name="submitTarget" style="display:none"></iframe>'
+ }, {
+ xtype: 'component',
+ html: '<input type="submit" id="submitButton" style="display:none">'
+ }]
+ },
+
+ buttons: [{
+ text: strings.loginRegister,
+ handler: 'onRegisterClick',
+ reference: 'registerButton'
}, {
- xtype: 'component',
- html: '<input type="submit" id="submitButton" style="display:none">'
+ text: strings.loginLogin,
+ handler: 'onLoginClick'
}]
- },
+ });
- buttons: [{
- text: strings.loginRegister,
- handler: 'onRegisterClick',
- reference: 'registerButton'
- }, {
- text: strings.loginLogin,
- handler: 'onLoginClick'
- }]
-});
+})();