aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/UserDialogController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-06-29 14:35:42 +1200
committerGitHub <noreply@github.com>2016-06-29 14:35:42 +1200
commit20d9e6d46fb692f42c9f2a73bcd354691bdd9385 (patch)
treeae1da444cd0fd5735d95078270f3705a05511cf6 /web/app/view/UserDialogController.js
parenta44f390edb30ca65d5dabcd98c5bbd6b66f7dd8c (diff)
parent36ec2ef7afb334d3b34a6bf0f1df13c5f27456c1 (diff)
downloadtrackermap-server-20d9e6d46fb692f42c9f2a73bcd354691bdd9385.tar.gz
trackermap-server-20d9e6d46fb692f42c9f2a73bcd354691bdd9385.tar.bz2
trackermap-server-20d9e6d46fb692f42c9f2a73bcd354691bdd9385.zip
Merge pull request #2060 from Abyss777/master
Added attributes editor
Diffstat (limited to 'web/app/view/UserDialogController.js')
-rw-r--r--web/app/view/UserDialogController.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/web/app/view/UserDialogController.js b/web/app/view/UserDialogController.js
index 11f8c2f46..db495b8ff 100644
--- a/web/app/view/UserDialogController.js
+++ b/web/app/view/UserDialogController.js
@@ -18,6 +18,10 @@ Ext.define('Traccar.view.UserDialogController', {
extend: 'Ext.app.ViewController',
alias: 'controller.userDialog',
+ requires: [
+ 'Traccar.view.Attributes'
+ ],
+
init: function () {
if (Traccar.app.getUser().get('admin')) {
this.lookupReference('adminField').setDisabled(false);
@@ -44,5 +48,19 @@ Ext.define('Traccar.view.UserDialogController', {
});
}
button.up('window').close();
+ },
+
+ showAttributesView: function (button) {
+ var dialog, record;
+ dialog = button.up('window').down('form');
+ record = dialog.getRecord();
+ Ext.create('Traccar.view.BaseWindow', {
+ title: Strings.sharedAttributes,
+ modal: false,
+ items: {
+ xtype: 'attributesView',
+ attributes: record.get('attributes')
+ }
+ }).show();
}
});