aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/edit/GroupsController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-09-20 19:37:14 +1200
committerGitHub <noreply@github.com>2017-09-20 19:37:14 +1200
commitadf79e9bc86bc485ea3fa02c4d25b11d8fffee1f (patch)
tree5879cb06e5b81dcc7570f35754ef443005200cb7 /web/app/view/edit/GroupsController.js
parentd078ef703795ed9c1fb0b6111ee7d12e09143f82 (diff)
parentcf1c138bca946cd354e97cea0c841af1ad0f3e4e (diff)
downloadtrackermap-web-adf79e9bc86bc485ea3fa02c4d25b11d8fffee1f.tar.gz
trackermap-web-adf79e9bc86bc485ea3fa02c4d25b11d8fffee1f.tar.bz2
trackermap-web-adf79e9bc86bc485ea3fa02c4d25b11d8fffee1f.zip
Merge pull request #588 from Abyss777/extended_notifications2
Implement Notifications per device
Diffstat (limited to 'web/app/view/edit/GroupsController.js')
-rw-r--r--web/app/view/edit/GroupsController.js17
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);
}
});