diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-05-11 13:24:04 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-05-11 13:24:04 +1200 |
commit | ab3e2b28ade7854ed1df24c1e22abfce57f476c6 (patch) | |
tree | b62a7189224bca40debd20b230b8ebb7d55cf077 /web/app/view/login | |
parent | dd75a13e316173dcc98c5cf73463ac3b5c35976d (diff) | |
download | trackermap-server-ab3e2b28ade7854ed1df24c1e22abfce57f476c6.tar.gz trackermap-server-ab3e2b28ade7854ed1df24c1e22abfce57f476c6.tar.bz2 trackermap-server-ab3e2b28ade7854ed1df24c1e22abfce57f476c6.zip |
Split device controller
Diffstat (limited to 'web/app/view/login')
-rw-r--r-- | web/app/view/login/Login.js | 3 | ||||
-rw-r--r-- | web/app/view/login/LoginController.js | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/web/app/view/login/Login.js b/web/app/view/login/Login.js index 3e23c4838..c56557186 100644 --- a/web/app/view/login/Login.js +++ b/web/app/view/login/Login.js @@ -40,7 +40,8 @@ Ext.define('Traccar.view.login.Login', { allowBlank: false, enableKeyEvents: true, listeners: { - specialKey: 'onSpecialKey' + specialKey: 'onSpecialKey', + afterrender: 'onAfterRender' } }, { xtype: 'textfield', diff --git a/web/app/view/login/LoginController.js b/web/app/view/login/LoginController.js index a88fffc09..c22b0e09a 100644 --- a/web/app/view/login/LoginController.js +++ b/web/app/view/login/LoginController.js @@ -22,6 +22,10 @@ Ext.define('Traccar.view.login.LoginController', { 'Traccar.view.login.Register' ], + onAfterRender: function(field) { + field.focus(); + }, + onSpecialKey: function(field, e) { if (e.getKey() === e.ENTER) { this.doLogin(); |