diff options
Diffstat (limited to 'web/app/view/UsersController.js')
-rw-r--r-- | web/app/view/UsersController.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/web/app/view/UsersController.js b/web/app/view/UsersController.js index 2744be7..a79f958 100644 --- a/web/app/view/UsersController.js +++ b/web/app/view/UsersController.js @@ -41,6 +41,15 @@ Ext.define('Traccar.view.UsersController', { this.lookupReference('userUsersButton').setHidden(!Traccar.app.getUser().get('admin')); }, + onEditClick: function () { + var dialog, user = this.getView().getSelectionModel().getSelection()[0]; + dialog = Ext.create('Traccar.view.UserDialog', { + selfEdit: user.get('id') === Traccar.app.getUser().get('id') + }); + dialog.down('form').loadRecord(user); + dialog.show(); + }, + onAddClick: function () { var user, dialog; user = Ext.create('Traccar.model.User'); |