aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/edit/AttributeAliasesController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-07-15 18:01:12 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-07-15 18:01:12 +1200
commit167dec228bf9227fbf1f9fa4a428b8bb309c5f94 (patch)
tree10f00593931a426aacf97a08d105f8dafda0b427 /web/app/view/edit/AttributeAliasesController.js
parentdab4694bcab525bcc26e6af42aacc45901093dc2 (diff)
downloadtrackermap-web-167dec228bf9227fbf1f9fa4a428b8bb309c5f94.tar.gz
trackermap-web-167dec228bf9227fbf1f9fa4a428b8bb309c5f94.tar.bz2
trackermap-web-167dec228bf9227fbf1f9fa4a428b8bb309c5f94.zip
Improvement to events panel
Diffstat (limited to 'web/app/view/edit/AttributeAliasesController.js')
-rw-r--r--web/app/view/edit/AttributeAliasesController.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/app/view/edit/AttributeAliasesController.js b/web/app/view/edit/AttributeAliasesController.js
index fc2b57f2..d1beb135 100644
--- a/web/app/view/edit/AttributeAliasesController.js
+++ b/web/app/view/edit/AttributeAliasesController.js
@@ -53,17 +53,17 @@ Ext.define('Traccar.view.edit.AttributeAliasesController', {
dialog.show();
},
- onSelectionChange: function (selected) {
+ onSelectionChange: function (selection, selected) {
var disabled = !this.lookupReference('deviceField').getValue();
this.lookupReference('toolbarAddButton').setDisabled(disabled);
- disabled = selected.length === 0 || !this.lookupReference('deviceField').getValue();
+ disabled = !selected || selected.length === 0 || !this.lookupReference('deviceField').getValue();
this.lookupReference('toolbarEditButton').setDisabled(disabled);
this.lookupReference('toolbarRemoveButton').setDisabled(disabled);
},
onDeviceChange: function (combobox, newValue, oldValue) {
var manager = Traccar.app.getUser().get('admin') || Traccar.app.getUser().get('userLimit') > 0;
- this.onSelectionChange('');
+ this.onSelectionChange();
if (newValue !== null) {
this.getView().getStore().filter('deviceId', newValue);
if (manager && this.getView().getStore().getCount() === 0) {