diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-16 13:02:06 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-16 13:02:06 +1300 |
commit | 1f296157a630a81b0799ece8fa9025b0fbba203b (patch) | |
tree | 5d51c260c74876ef5549ace9aeb633461eb65a05 /web/app/view | |
parent | cb20652e72d37459f13821b3c7b3f8b8a4a09cf8 (diff) | |
download | trackermap-server-1f296157a630a81b0799ece8fa9025b0fbba203b.tar.gz trackermap-server-1f296157a630a81b0799ece8fa9025b0fbba203b.tar.bz2 trackermap-server-1f296157a630a81b0799ece8fa9025b0fbba203b.zip |
Hide edit buttons in readonly mode
Diffstat (limited to 'web/app/view')
-rw-r--r-- | web/app/view/DevicesController.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/web/app/view/DevicesController.js b/web/app/view/DevicesController.js index c29854d12..8c6c72725 100644 --- a/web/app/view/DevicesController.js +++ b/web/app/view/DevicesController.js @@ -33,6 +33,12 @@ Ext.define('Traccar.view.DevicesController', { } } }, + init: function () { + var readonly = Traccar.app.getServer().get('readonly') && !Traccar.app.getUser().get('admin'); + this.lookupReference('toolbarAddButton').setVisible(!readonly); + this.lookupReference('toolbarEditButton').setVisible(!readonly); + this.lookupReference('toolbarRemoveButton').setVisible(!readonly); + }, onAddClick: function () { var device, dialog; |