diff options
author | Abyss777 <abyss@fox5.ru> | 2017-09-19 09:36:16 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-09-19 16:38:28 +0500 |
commit | 3a5e334b50bf35d11743d937c9fae2fb8c7829ec (patch) | |
tree | f66c5d8ddcbe861b045e20d0390e8987ac329d7b /web/app/view/edit/GroupsController.js | |
parent | d078ef703795ed9c1fb0b6111ee7d12e09143f82 (diff) | |
download | trackermap-web-3a5e334b50bf35d11743d937c9fae2fb8c7829ec.tar.gz trackermap-web-3a5e334b50bf35d11743d937c9fae2fb8c7829ec.tar.bz2 trackermap-web-3a5e334b50bf35d11743d937c9fae2fb8c7829ec.zip |
Implement Notifications per device
Diffstat (limited to 'web/app/view/edit/GroupsController.js')
-rw-r--r-- | web/app/view/edit/GroupsController.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/web/app/view/edit/GroupsController.js b/web/app/view/edit/GroupsController.js index 872fea4a..a4ced617 100644 --- a/web/app/view/edit/GroupsController.js +++ b/web/app/view/edit/GroupsController.js @@ -105,12 +105,29 @@ Ext.define('Traccar.view.edit.GroupsController', { }).show(); }, + onNotificationsClick: function () { + var admin, group; + admin = Traccar.app.getUser().get('admin'); + group = this.getView().getSelectionModel().getSelection()[0]; + Ext.create('Traccar.view.BaseWindow', { + title: Strings.sharedSavedCommands, + items: { + xtype: 'linkNotificationsView', + baseObjectName: 'groupId', + linkObjectName: 'notificationId', + storeName: admin ? 'AllNotifications' : 'Notifications', + baseObject: group.getId() + } + }).show(); + }, + onSelectionChange: function (selection, selected) { var disabled = selected.length === 0; this.lookupReference('toolbarGeofencesButton').setDisabled(disabled); this.lookupReference('toolbarAttributesButton').setDisabled(disabled); this.lookupReference('toolbarDriversButton').setDisabled(disabled); this.lookupReference('toolbarCommandsButton').setDisabled(disabled); + this.lookupReference('toolbarNotificationsButton').setDisabled(disabled); this.callParent(arguments); } }); |