From 804421836ad9c4c8ab34415a3f00c3e7ad0af524 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 9 Sep 2015 22:55:32 +1200 Subject: Add user devices button --- web/app/view/user/User.js | 5 +++++ web/app/view/user/UserController.js | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/web/app/view/user/User.js b/web/app/view/user/User.js index 69498310f..b5d216aea 100644 --- a/web/app/view/user/User.js +++ b/web/app/view/user/User.js @@ -41,6 +41,11 @@ Ext.define('Traccar.view.user.User', { disabled: true, handler: 'onRemoveClick', reference: 'userRemoveButton' + }, { + text: strings.deviceTitle, + disabled: true, + handler: 'onDevicesClick', + reference: 'userDevicesButton' }], listeners: { diff --git a/web/app/view/user/UserController.js b/web/app/view/user/UserController.js index c4fa04ff3..041c70166 100644 --- a/web/app/view/user/UserController.js +++ b/web/app/view/user/UserController.js @@ -63,11 +63,26 @@ Ext.define('Traccar.view.user.UserController', { } }); }, + + onDevicesClick: function() { + // TODO show devices + /*Ext.create('Ext.window.Window', { + title: strings.settingsUsers, + width: styles.windowWidth, + height: styles.windowHeight, + layout: 'fit', + modal: true, + items: { + xtype: 'userView' + } + }).show();*/ + }, onSelectionChange: function(selected) { var disabled = selected.length > 0; this.lookupReference('userEditButton').setDisabled(disabled); this.lookupReference('userRemoveButton').setDisabled(disabled); + this.lookupReference('userDevicesButton').setDisabled(disabled); } }); -- cgit v1.2.3