aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/edit/DevicesController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-07-14 20:46:03 +1200
committerGitHub <noreply@github.com>2017-07-14 20:46:03 +1200
commitdab4694bcab525bcc26e6af42aacc45901093dc2 (patch)
tree77631b518eacf8b9a59d9785068624e5ef52003f /web/app/view/edit/DevicesController.js
parent79f557f7b4bb209876977bba99f8c0a18f672b29 (diff)
parentd40b862b56075e1544d3ed117576e05354b398a1 (diff)
downloadtrackermap-web-dab4694bcab525bcc26e6af42aacc45901093dc2.tar.gz
trackermap-web-dab4694bcab525bcc26e6af42aacc45901093dc2.tar.bz2
trackermap-web-dab4694bcab525bcc26e6af42aacc45901093dc2.zip
Merge pull request #524 from Abyss777/drivers
Drivers implementation
Diffstat (limited to 'web/app/view/edit/DevicesController.js')
-rw-r--r--web/app/view/edit/DevicesController.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/web/app/view/edit/DevicesController.js b/web/app/view/edit/DevicesController.js
index 2457d5cb..0cdf18ac 100644
--- a/web/app/view/edit/DevicesController.js
+++ b/web/app/view/edit/DevicesController.js
@@ -24,6 +24,7 @@ Ext.define('Traccar.view.edit.DevicesController', {
'Traccar.view.dialog.Device',
'Traccar.view.permissions.DeviceGeofences',
'Traccar.view.permissions.DeviceAttributes',
+ 'Traccar.view.permissions.DeviceDrivers',
'Traccar.view.BaseWindow',
'Traccar.model.Device',
'Traccar.model.Command'
@@ -93,6 +94,21 @@ Ext.define('Traccar.view.edit.DevicesController', {
}).show();
},
+ onDriversClick: function () {
+ var device = this.getView().getSelectionModel().getSelection()[0];
+ Ext.create('Traccar.view.BaseWindow', {
+ title: Strings.sharedDrivers,
+ items: {
+ xtype: 'deviceDriversView',
+ baseObjectName: 'deviceId',
+ linkObjectName: 'driverId',
+ storeName: 'Drivers',
+ urlApi: 'api/devices/drivers',
+ baseObject: device.getId()
+ }
+ }).show();
+ },
+
onCommandClick: function () {
var device, deviceId, command, dialog, typesStore, online;
device = this.getView().getSelectionModel().getSelection()[0];
@@ -122,6 +138,7 @@ Ext.define('Traccar.view.edit.DevicesController', {
this.lookupReference('toolbarRemoveButton').setDisabled(empty || readonly || deviceReadonly);
this.lookupReference('toolbarGeofencesButton').setDisabled(empty || readonly);
this.lookupReference('toolbarAttributesButton').setDisabled(empty || readonly);
+ this.lookupReference('toolbarDriversButton').setDisabled(empty || readonly);
this.lookupReference('deviceCommandButton').setDisabled(empty || readonly);
},