aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-03-06 09:11:49 +0500
committerAbyss777 <abyss@fox5.ru>2018-03-06 09:11:49 +0500
commit89f69d221030f12f2986b1e5ae335a44cd3e3948 (patch)
tree18ba519bc132826ba31c2c1f5defb05ade84b478 /web
parent482713b35cd4bd65ca161a27f68bd444c119fffc (diff)
downloadtrackermap-web-89f69d221030f12f2986b1e5ae335a44cd3e3948.tar.gz
trackermap-web-89f69d221030f12f2986b1e5ae335a44cd3e3948.tar.bz2
trackermap-web-89f69d221030f12f2986b1e5ae335a44cd3e3948.zip
List only admin objects in groups linking
Diffstat (limited to 'web')
-rw-r--r--web/app/view/edit/GroupsController.js32
1 files changed, 11 insertions, 21 deletions
diff --git a/web/app/view/edit/GroupsController.js b/web/app/view/edit/GroupsController.js
index 05b4ba73..04c9692f 100644
--- a/web/app/view/edit/GroupsController.js
+++ b/web/app/view/edit/GroupsController.js
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 - 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 - 2018 Anton Tananaev (anton@traccar.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -42,80 +42,70 @@ Ext.define('Traccar.view.edit.GroupsController', {
},
onGeofencesClick: function () {
- var admin, group;
- admin = Traccar.app.getUser().get('admin');
- group = this.getView().getSelectionModel().getSelection()[0];
+ var group = this.getView().getSelectionModel().getSelection()[0];
Ext.create('Traccar.view.BaseWindow', {
title: Strings.sharedGeofences,
items: {
xtype: 'linkGeofencesView',
baseObjectName: 'groupId',
linkObjectName: 'geofenceId',
- storeName: admin ? 'AllGeofences' : 'Geofences',
+ storeName: 'Geofences',
baseObject: group.getId()
}
}).show();
},
onAttributesClick: function () {
- var admin, group;
- admin = Traccar.app.getUser().get('admin');
- group = this.getView().getSelectionModel().getSelection()[0];
+ var group = this.getView().getSelectionModel().getSelection()[0];
Ext.create('Traccar.view.BaseWindow', {
title: Strings.sharedComputedAttributes,
items: {
xtype: 'linkComputedAttributesView',
baseObjectName: 'groupId',
linkObjectName: 'attributeId',
- storeName: admin ? 'AllComputedAttributes' : 'ComputedAttributes',
+ storeName: 'ComputedAttributes',
baseObject: group.getId()
}
}).show();
},
onDriversClick: function () {
- var admin, group;
- admin = Traccar.app.getUser().get('admin');
- group = this.getView().getSelectionModel().getSelection()[0];
+ var group = this.getView().getSelectionModel().getSelection()[0];
Ext.create('Traccar.view.BaseWindow', {
title: Strings.sharedDrivers,
items: {
xtype: 'linkDriversView',
baseObjectName: 'groupId',
linkObjectName: 'driverId',
- storeName: admin ? 'AllDrivers' : 'Drivers',
+ storeName: 'Drivers',
baseObject: group.getId()
}
}).show();
},
onCommandsClick: function () {
- var admin, group;
- admin = Traccar.app.getUser().get('admin');
- group = this.getView().getSelectionModel().getSelection()[0];
+ var group = this.getView().getSelectionModel().getSelection()[0];
Ext.create('Traccar.view.BaseWindow', {
title: Strings.sharedSavedCommands,
items: {
xtype: 'linkSavedCommandsView',
baseObjectName: 'groupId',
linkObjectName: 'commandId',
- storeName: admin ? 'AllCommands' : 'Commands',
+ storeName: 'Commands',
baseObject: group.getId()
}
}).show();
},
onNotificationsClick: function () {
- var admin, group;
- admin = Traccar.app.getUser().get('admin');
- group = this.getView().getSelectionModel().getSelection()[0];
+ var group = this.getView().getSelectionModel().getSelection()[0];
Ext.create('Traccar.view.BaseWindow', {
title: Strings.sharedNotifications,
items: {
xtype: 'linkNotificationsView',
baseObjectName: 'groupId',
linkObjectName: 'notificationId',
- storeName: admin ? 'AllNotifications' : 'Notifications',
+ storeName: 'Notifications',
baseObject: group.getId()
}
}).show();