aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/UsersController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-03-11 23:10:50 +1300
committerGitHub <noreply@github.com>2017-03-11 23:10:50 +1300
commitaba34e0e9af2f8bc35a1d3d10380d52aa164a012 (patch)
treeacb2473f07a7cb02f5f7d8cdcd3f06cc2f6abce6 /web/app/view/UsersController.js
parent2eeb2a1bdc6a11a115a6774a49a21d88abb63056 (diff)
parentf8e90b20d08bbd00cd7d5657c91c364b47288ae6 (diff)
downloadtrackermap-web-aba34e0e9af2f8bc35a1d3d10380d52aa164a012.tar.gz
trackermap-web-aba34e0e9af2f8bc35a1d3d10380d52aa164a012.tar.bz2
trackermap-web-aba34e0e9af2f8bc35a1d3d10380d52aa164a012.zip
Merge pull request #432 from Abyss777/fix_userdialog
Use init instead of onShow in UserDialog
Diffstat (limited to 'web/app/view/UsersController.js')
-rw-r--r--web/app/view/UsersController.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/web/app/view/UsersController.js b/web/app/view/UsersController.js
index 2744be74..a79f9586 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');