From 3c2a5c249d2a0cec1d5c371efcd1dfcf7e8c7f2e Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 18 Aug 2017 11:22:48 +1200 Subject: Fix various style issues --- web/app/view/edit/AttributeAliasesController.js | 8 ++++---- web/app/view/edit/Attributes.js | 2 +- web/app/view/edit/Devices.js | 4 +++- web/app/view/edit/DevicesController.js | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) (limited to 'web/app/view/edit') diff --git a/web/app/view/edit/AttributeAliasesController.js b/web/app/view/edit/AttributeAliasesController.js index d1beb135..8ac68bcb 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 84cadea5..a76223b9 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 c9538c8b..4fdcab00 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 ae65fbb1..6de24983 100644 --- a/web/app/view/edit/DevicesController.js +++ b/web/app/view/edit/DevicesController.js @@ -151,7 +151,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); @@ -163,7 +163,7 @@ Ext.define('Traccar.view.edit.DevicesController', { } }, - onUpdateDevice: function (store, data) { + onUpdateDevice: function () { this.updateButtons(this.getView().getSelectionModel()); }, -- cgit v1.2.3