diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-03 21:57:33 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-03 21:57:33 +1300 |
commit | 4aabd4f6256ffca913f9718399b5d6aa778868b8 (patch) | |
tree | 3d7233ee35c21952cbdfb2324a24566128b0bb2b /web/app | |
parent | a7a2174c927d27eead9139eb9ff65dc87d7eefbc (diff) | |
download | trackermap-server-4aabd4f6256ffca913f9718399b5d6aa778868b8.tar.gz trackermap-server-4aabd4f6256ffca913f9718399b5d6aa778868b8.tar.bz2 trackermap-server-4aabd4f6256ffca913f9718399b5d6aa778868b8.zip |
Fix some more check style issues
Diffstat (limited to 'web/app')
-rw-r--r-- | web/app/LoginManager.js | 3 | ||||
-rw-r--r-- | web/app/view/LoginController.js | 3 | ||||
-rw-r--r-- | web/app/view/StateController.js | 2 | ||||
-rw-r--r-- | web/app/view/UserController.js | 10 | ||||
-rw-r--r-- | web/app/view/UserDialogController.js | 7 |
5 files changed, 15 insertions, 10 deletions
diff --git a/web/app/LoginManager.js b/web/app/LoginManager.js index 02e6e835b..c18d6cb44 100644 --- a/web/app/LoginManager.js +++ b/web/app/LoginManager.js @@ -29,9 +29,10 @@ }, onServerReturn: function (options, success, response) { + var result; options = options.original; if (Traccar.ErrorManager.check(success, response)) { - var result = Ext.decode(response.responseText); + result = Ext.decode(response.responseText); if (result.success) { Traccar.app.setServer(result.data); } diff --git a/web/app/view/LoginController.js b/web/app/view/LoginController.js index dfff6b253..141905da8 100644 --- a/web/app/view/LoginController.js +++ b/web/app/view/LoginController.js @@ -39,9 +39,10 @@ url: '/api/login', params: form.getValues(), callback: function (options, success, response) { + var result; Ext.getBody().unmask(); if (Traccar.ErrorManager.check(success, response)) { - var result = Ext.decode(response.responseText); + result = Ext.decode(response.responseText); if (result.success) { Traccar.app.setUser(result.data); this.fireViewEvent('login'); diff --git a/web/app/view/StateController.js b/web/app/view/StateController.js index ad44d7ac7..9aa23de64 100644 --- a/web/app/view/StateController.js +++ b/web/app/view/StateController.js @@ -76,7 +76,7 @@ }, formatValue: function (value) { - if (typeof(id) === 'number') { + if (typeof (id) === 'number') { return value.toFixed(2); } else { return value; diff --git a/web/app/view/UserController.js b/web/app/view/UserController.js index d5535bce3..0a6e4f553 100644 --- a/web/app/view/UserController.js +++ b/web/app/view/UserController.js @@ -29,15 +29,17 @@ }, onAddClick: function () { - var user = Ext.create('Traccar.model.User'); - var dialog = Ext.create('Traccar.view.UserDialog'); + var user, dialog; + user = Ext.create('Traccar.model.User'), + dialog = Ext.create('Traccar.view.UserDialog'); dialog.down('form').loadRecord(user); dialog.show(); }, onEditClick: function () { - var user = this.getView().getSelectionModel().getSelection()[0]; - var dialog = Ext.create('Traccar.view.UserDialog'); + var user, dialog; + user = this.getView().getSelectionModel().getSelection()[0]; + dialog = Ext.create('Traccar.view.UserDialog'); dialog.down('form').loadRecord(user); dialog.show(); }, diff --git a/web/app/view/UserDialogController.js b/web/app/view/UserDialogController.js index 6dbd44fa7..40c88a8b4 100644 --- a/web/app/view/UserDialogController.js +++ b/web/app/view/UserDialogController.js @@ -27,13 +27,14 @@ }, onSaveClick: function (button) { - var dialog = button.up('window').down('form'); + var dialog, record, store; + dialog = button.up('window').down('form'); dialog.updateRecord(); - var record = dialog.getRecord(); + record = dialog.getRecord(); if (record === Traccar.app.getUser()) { record.save(); } else { - var store = Ext.getStore('Users'); + store = Ext.getStore('Users'); if (record.phantom) { store.add(record); } |