aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/device
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-06 23:18:49 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-06 23:18:49 +1200
commiteaa0044002aeaff0b5df11f8463a068a6ff2284d (patch)
treefb9cec4ad52ac09f0b75061a41947dbc89b2cf81 /web/app/view/device
parent40107a7886412c4582ea9a9ee946f454e28a1178 (diff)
downloadtrackermap-server-eaa0044002aeaff0b5df11f8463a068a6ff2284d.tar.gz
trackermap-server-eaa0044002aeaff0b5df11f8463a068a6ff2284d.tar.bz2
trackermap-server-eaa0044002aeaff0b5df11f8463a068a6ff2284d.zip
Add user management window
Diffstat (limited to 'web/app/view/device')
-rw-r--r--web/app/view/device/Device.js5
-rw-r--r--web/app/view/device/DeviceController.js17
2 files changed, 21 insertions, 1 deletions
diff --git a/web/app/view/device/Device.js b/web/app/view/device/Device.js
index a166cb573..25c067242 100644
--- a/web/app/view/device/Device.js
+++ b/web/app/view/device/Device.js
@@ -54,6 +54,11 @@ Ext.define('Traccar.view.device.Device', {
disabled: true,
handler: 'onServerClick',
reference: 'settingsServerButton'
+ }, {
+ text: strings.device_settings_users,
+ disabled: true,
+ handler: 'onUsersClick',
+ reference: 'settingsUsersButton'
}]
}, {
text: strings.device_logout,
diff --git a/web/app/view/device/DeviceController.js b/web/app/view/device/DeviceController.js
index 451b6bbf3..f45f348b6 100644
--- a/web/app/view/device/DeviceController.js
+++ b/web/app/view/device/DeviceController.js
@@ -21,12 +21,14 @@ Ext.define('Traccar.view.device.DeviceController', {
requires: [
'Traccar.view.device.DeviceDialog',
'Traccar.view.user.UserDialog',
- 'Traccar.view.admin.ServerDialog'
+ 'Traccar.view.admin.ServerDialog',
+ 'Traccar.view.user.User'
],
init: function() {
if (Traccar.getApplication().getUser().get('admin')) {
this.lookupReference('settingsServerButton').setDisabled(false);
+ this.lookupReference('settingsUsersButton').setDisabled(false);
}
},
@@ -86,6 +88,19 @@ Ext.define('Traccar.view.device.DeviceController', {
var dialog = Ext.create('Traccar.view.admin.ServerDialog');
dialog.down('form').loadRecord(server);
dialog.show();
+ },
+
+ onUsersClick: function() {
+ Ext.create('Ext.window.Window', {
+ title: strings.login_users_title,
+ width: styles.window_width,
+ height: styles.window_height,
+ layout: 'fit',
+ modal: true,
+ items: {
+ xtype: 'user-view'
+ }
+ }).show();
}
});