diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-03-22 22:58:18 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-03-22 22:58:18 -0700 |
commit | ba9cc86f667486a09edb323402c2d63ada5ea639 (patch) | |
tree | 8df80eca54f9dd39664f63365ffcc2ec248fb3df /web/app/view/edit | |
parent | 990d485a21c945e7d57b85378650a65f3e79eed3 (diff) | |
parent | f5165c8e897e8d9cf4219d943e2d34b61adb48b5 (diff) | |
download | trackermap-web-ba9cc86f667486a09edb323402c2d63ada5ea639.tar.gz trackermap-web-ba9cc86f667486a09edb323402c2d63ada5ea639.tar.bz2 trackermap-web-ba9cc86f667486a09edb323402c2d63ada5ea639.zip |
Merge branch 'master' into modern
Diffstat (limited to 'web/app/view/edit')
-rw-r--r-- | web/app/view/edit/DevicesController.js | 17 | ||||
-rw-r--r-- | web/app/view/edit/Drivers.js | 2 | ||||
-rw-r--r-- | web/app/view/edit/Groups.js | 2 | ||||
-rw-r--r-- | web/app/view/edit/GroupsController.js | 4 | ||||
-rw-r--r-- | web/app/view/edit/Notifications.js | 17 | ||||
-rw-r--r-- | web/app/view/edit/SavedCommands.js | 2 | ||||
-rw-r--r-- | web/app/view/edit/Users.js | 2 | ||||
-rw-r--r-- | web/app/view/edit/UsersController.js | 4 |
8 files changed, 33 insertions, 17 deletions
diff --git a/web/app/view/edit/DevicesController.js b/web/app/view/edit/DevicesController.js index 2b4ff14f..16e54b21 100644 --- a/web/app/view/edit/DevicesController.js +++ b/web/app/view/edit/DevicesController.js @@ -35,7 +35,8 @@ Ext.define('Traccar.view.edit.DevicesController', { listen: { controller: { '*': { - selectreport: 'selectReport' + selectreport: 'deselectDevice', + selectevent: 'deselectDevice' }, 'root': { selectdevice: 'selectDevice' @@ -109,12 +110,10 @@ Ext.define('Traccar.view.edit.DevicesController', { this.lookupReference('deviceCommandButton').setDisabled(empty || readonly); }, - onSelectionChange: function (selection, selected) { - this.updateButtons(selected); - if (selected.length > 0) { - this.fireEvent('selectdevice', selected[0], true); - } else { - this.fireEvent('deselectfeature'); + onSelectionChange: function (el, records) { + if (records && records.length) { + this.updateButtons(records); + this.fireEvent('selectdevice', records[0], true); } }, @@ -124,8 +123,8 @@ Ext.define('Traccar.view.edit.DevicesController', { this.getView().getView().focusRow(device); }, - selectReport: function (position) { - if (position !== undefined) { + deselectDevice: function (object) { + if (object) { this.deselectFeature(); } }, diff --git a/web/app/view/edit/Drivers.js b/web/app/view/edit/Drivers.js index 9aac8cd6..7bd10a68 100644 --- a/web/app/view/edit/Drivers.js +++ b/web/app/view/edit/Drivers.js @@ -46,7 +46,7 @@ Ext.define('Traccar.view.edit.Drivers', { dataIndex: 'name', filter: 'string' }, { - text: Strings.sharedDescription, + text: Strings.deviceIdentifier, dataIndex: 'uniqueId', filter: 'string' }] diff --git a/web/app/view/edit/Groups.js b/web/app/view/edit/Groups.js index 06974201..8b09316c 100644 --- a/web/app/view/edit/Groups.js +++ b/web/app/view/edit/Groups.js @@ -76,7 +76,7 @@ Ext.define('Traccar.view.edit.Groups', { handler: 'onMaintenancesClick', reference: 'toolbarMaintenancesButton', glyph: 'xf0ad@FontAwesome', - tooltip: Strings.sharedMaintenances, + tooltip: Strings.sharedMaintenance, tooltipType: 'title' }] }, diff --git a/web/app/view/edit/GroupsController.js b/web/app/view/edit/GroupsController.js index 2e62a283..ae96a248 100644 --- a/web/app/view/edit/GroupsController.js +++ b/web/app/view/edit/GroupsController.js @@ -41,7 +41,7 @@ Ext.define('Traccar.view.edit.GroupsController', { Traccar.app.getBooleanAttributePreference('ui.disableComputedAttributes')); this.lookupReference('toolbarCommandsButton').setHidden(Traccar.app.getPreference('limitCommands', false)); this.lookupReference('toolbarMaintenancesButton').setHidden( - Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableMaintenances')); + Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableMaintenance')); }, onGeofencesClick: function () { @@ -117,7 +117,7 @@ Ext.define('Traccar.view.edit.GroupsController', { onMaintenancesClick: function () { var group = this.getView().getSelectionModel().getSelection()[0]; Ext.create('Traccar.view.BaseWindow', { - title: Strings.sharedMaintenances, + title: Strings.sharedMaintenance, items: { xtype: 'linkMaintenancesView', baseObjectName: 'groupId', diff --git a/web/app/view/edit/Notifications.js b/web/app/view/edit/Notifications.js index 9e24d3d0..9cf97b19 100644 --- a/web/app/view/edit/Notifications.js +++ b/web/app/view/edit/Notifications.js @@ -60,6 +60,23 @@ Ext.define('Traccar.view.edit.Notifications', { renderer: Traccar.AttributeFormatter.getFormatter('always'), filter: 'boolean' }, { + text: Strings.sharedAlarms, + dataIndex: 'attributes', + renderer: function (value) { + var i, key, result = '', alarms = value && value['alarms']; + if (alarms) { + alarms = alarms.split(','); + for (i = 0; i < alarms.length; i++) { + key = 'alarm' + alarms[i].charAt(0).toUpperCase() + alarms[i].slice(1); + if (result) { + result += ', '; + } + result += Strings[key] || key; + } + } + return result; + } + }, { text: Strings.notificationNotificators, dataIndex: 'notificators', flex: 2, diff --git a/web/app/view/edit/SavedCommands.js b/web/app/view/edit/SavedCommands.js index 794e95e4..9e5f4869 100644 --- a/web/app/view/edit/SavedCommands.js +++ b/web/app/view/edit/SavedCommands.js @@ -56,7 +56,7 @@ Ext.define('Traccar.view.edit.SavedCommands', { }, renderer: Traccar.AttributeFormatter.getFormatter('commandType') }, { - text: Strings.notificationSms, + text: Strings.commandSendSms, dataIndex: 'textChannel', renderer: Traccar.AttributeFormatter.getFormatter('textChannel'), filter: 'boolean' diff --git a/web/app/view/edit/Users.js b/web/app/view/edit/Users.js index 2bcaefad..5d9a14f0 100644 --- a/web/app/view/edit/Users.js +++ b/web/app/view/edit/Users.js @@ -101,7 +101,7 @@ Ext.define('Traccar.view.edit.Users', { handler: 'onMaintenancesClick', reference: 'userMaintenancesButton', glyph: 'xf0ad@FontAwesome', - tooltip: Strings.sharedMaintenances, + tooltip: Strings.sharedMaintenance, tooltipType: 'title' }] }, diff --git a/web/app/view/edit/UsersController.js b/web/app/view/edit/UsersController.js index 9d998162..9e810435 100644 --- a/web/app/view/edit/UsersController.js +++ b/web/app/view/edit/UsersController.js @@ -51,7 +51,7 @@ Ext.define('Traccar.view.edit.UsersController', { Traccar.app.getBooleanAttributePreference('ui.disableCalendars')); this.lookupReference('userCommandsButton').setHidden(Traccar.app.getPreference('limitCommands', false)); this.lookupReference('userMaintenancesButton').setHidden( - Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableMaintenances')); + Traccar.app.getVehicleFeaturesDisabled() || Traccar.app.getBooleanAttributePreference('ui.disableMaintenance')); }, onEditClick: function () { @@ -215,7 +215,7 @@ Ext.define('Traccar.view.edit.UsersController', { onMaintenancesClick: function () { var user = this.getView().getSelectionModel().getSelection()[0]; Ext.create('Traccar.view.BaseWindow', { - title: Strings.sharedMaintenances, + title: Strings.sharedMaintenance, items: { xtype: 'linkMaintenancesView', baseObjectName: 'userId', |