diff options
author | Abyss777 <abyss@fox5.ru> | 2017-08-18 11:52:06 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-08-18 11:52:06 +0500 |
commit | 65116928b2b7a8e5e2b70bf490b3225896cf2c71 (patch) | |
tree | af24b231822fb045a7ae4d03e533775285d41e47 /web/app/view/edit | |
parent | 01af5f520e24a33d7e22523d8ed11e9f14a19516 (diff) | |
parent | b3d3c720f34e12e7af83e6be3bd87e304931bbe1 (diff) | |
download | etbsa-traccar-web-65116928b2b7a8e5e2b70bf490b3225896cf2c71.tar.gz etbsa-traccar-web-65116928b2b7a8e5e2b70bf490b3225896cf2c71.tar.bz2 etbsa-traccar-web-65116928b2b7a8e5e2b70bf490b3225896cf2c71.zip |
Merge branch 'master' into disable_vehicle_features
Diffstat (limited to 'web/app/view/edit')
-rw-r--r-- | web/app/view/edit/AttributeAliasesController.js | 8 | ||||
-rw-r--r-- | web/app/view/edit/Attributes.js | 2 | ||||
-rw-r--r-- | web/app/view/edit/Devices.js | 4 | ||||
-rw-r--r-- | web/app/view/edit/DevicesController.js | 4 |
4 files changed, 10 insertions, 8 deletions
diff --git a/web/app/view/edit/AttributeAliasesController.js b/web/app/view/edit/AttributeAliasesController.js index d1beb13..8ac68bc 100644 --- a/web/app/view/edit/AttributeAliasesController.js +++ b/web/app/view/edit/AttributeAliasesController.js @@ -61,13 +61,13 @@ Ext.define('Traccar.view.edit.AttributeAliasesController', { this.lookupReference('toolbarRemoveButton').setDisabled(disabled); }, - onDeviceChange: function (combobox, newValue, oldValue) { + onDeviceChange: function (combobox, value) { var manager = Traccar.app.getUser().get('admin') || Traccar.app.getUser().get('userLimit') > 0; this.onSelectionChange(); - if (newValue !== null) { - this.getView().getStore().filter('deviceId', newValue); + if (value !== null) { + this.getView().getStore().filter('deviceId', value); if (manager && this.getView().getStore().getCount() === 0) { - Ext.getStore('AttributeAliases').getProxy().setExtraParam('deviceId', newValue); + Ext.getStore('AttributeAliases').getProxy().setExtraParam('deviceId', value); Ext.getStore('AttributeAliases').load({ addRecords: true }); diff --git a/web/app/view/edit/Attributes.js b/web/app/view/edit/Attributes.js index 84cadea..a76223b 100644 --- a/web/app/view/edit/Attributes.js +++ b/web/app/view/edit/Attributes.js @@ -46,7 +46,7 @@ Ext.define('Traccar.view.edit.Attributes', { text: Strings.sharedName, dataIndex: 'name', filter: 'string', - renderer: function (value, metaData) { + renderer: function (value) { var attribute; if (this.attributesStore) { attribute = Ext.getStore(this.attributesStore).getById(value); diff --git a/web/app/view/edit/Devices.js b/web/app/view/edit/Devices.js index c9538c8..4fdcab0 100644 --- a/web/app/view/edit/Devices.js +++ b/web/app/view/edit/Devices.js @@ -111,6 +111,7 @@ Ext.define('Traccar.view.edit.Devices', { if (status) { return Ext.getStore('DeviceStatuses').getById(status).get('color'); } + return null; } }, @@ -165,7 +166,7 @@ Ext.define('Traccar.view.edit.Devices', { for (i = 0; i < value.length; i++) { name = Traccar.AttributeFormatter.geofenceIdFormatter(value[i]); if (name) { - result += name + ((i < value.length - 1) ? ', ' : ''); + result += name + (i < value.length - 1 ? ', ' : ''); } } } @@ -187,6 +188,7 @@ Ext.define('Traccar.view.edit.Devices', { return status.get('name'); } } + return null; } }, { text: Strings.deviceLastUpdate, diff --git a/web/app/view/edit/DevicesController.js b/web/app/view/edit/DevicesController.js index 59a10bb..ffe9c9a 100644 --- a/web/app/view/edit/DevicesController.js +++ b/web/app/view/edit/DevicesController.js @@ -155,7 +155,7 @@ Ext.define('Traccar.view.edit.DevicesController', { } }, - selectDevice: function (device, center) { + selectDevice: function (device) { this.getView().getSelectionModel().select([device], false, true); this.updateButtons(this.getView().getSelectionModel()); this.getView().getView().focusRow(device); @@ -167,7 +167,7 @@ Ext.define('Traccar.view.edit.DevicesController', { } }, - onUpdateDevice: function (store, data) { + onUpdateDevice: function () { this.updateButtons(this.getView().getSelectionModel()); }, |