diff options
Diffstat (limited to 'web/app/view/user')
-rw-r--r-- | web/app/view/user/UserController.js | 14 | ||||
-rw-r--r-- | web/app/view/user/UserDialogController.js | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/web/app/view/user/UserController.js b/web/app/view/user/UserController.js index 156d33a86..507fd5a5c 100644 --- a/web/app/view/user/UserController.js +++ b/web/app/view/user/UserController.js @@ -22,25 +22,25 @@ Ext.define('Traccar.view.user.UserController', { 'Traccar.view.user.UserDialog' ], - init: function() { + init: function () { Ext.getStore('Users').load(); }, - onAddClick: function() { + onAddClick: function () { var user = Ext.create('Traccar.model.User'); var dialog = Ext.create('Traccar.view.user.UserDialog'); dialog.down('form').loadRecord(user); dialog.show(); }, - onEditClick: function() { + onEditClick: function () { var user = this.getView().getSelectionModel().getSelection()[0]; var dialog = Ext.create('Traccar.view.user.UserDialog'); dialog.down('form').loadRecord(user); dialog.show(); }, - onRemoveClick: function() { + onRemoveClick: function () { var user = this.getView().getSelectionModel().getSelection()[0]; Ext.Msg.show({ title: strings.settingsUser, @@ -50,7 +50,7 @@ Ext.define('Traccar.view.user.UserController', { yes: strings.sharedRemove, no: strings.sharedCancel }, - fn: function(btn) { + fn: function (btn) { if (btn === 'yes') { var store = Ext.getStore('Users'); store.remove(user); @@ -60,7 +60,7 @@ Ext.define('Traccar.view.user.UserController', { }); }, - onDevicesClick: function() { + onDevicesClick: function () { // TODO show devices /*Ext.create('Ext.window.Window', { title: strings.settingsUsers, @@ -74,7 +74,7 @@ Ext.define('Traccar.view.user.UserController', { }).show();*/ }, - onSelectionChange: function(selected) { + onSelectionChange: function (selected) { var disabled = selected.length > 0; this.lookupReference('userEditButton').setDisabled(disabled); this.lookupReference('userRemoveButton').setDisabled(disabled); diff --git a/web/app/view/user/UserDialogController.js b/web/app/view/user/UserDialogController.js index dd3109d37..40f938b5c 100644 --- a/web/app/view/user/UserDialogController.js +++ b/web/app/view/user/UserDialogController.js @@ -18,13 +18,13 @@ Ext.define('Traccar.view.user.UserDialogController', { extend: 'Ext.app.ViewController', alias: 'controller.userDialog', - init: function() { + init: function () { if (Traccar.app.getUser().get('admin')) { this.lookupReference('adminField').setDisabled(false); } }, - onSaveClick: function(button) { + onSaveClick: function (button) { var dialog = button.up('window').down('form'); dialog.updateRecord(); var record = dialog.getRecord(); @@ -36,7 +36,7 @@ Ext.define('Traccar.view.user.UserDialogController', { store.add(record); } store.sync({ - failure: function(batch) { + failure: function (batch) { store.rejectChanges(); // TODO Traccar.ErrorManager.check(true, batch.exceptions[0].getResponse()); } @@ -45,7 +45,7 @@ Ext.define('Traccar.view.user.UserDialogController', { button.up('window').close(); }, - onCancelClick: function(button) { + onCancelClick: function (button) { button.up('window').close(); } |