aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/dialog/ComputedAttributeController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-05-23 22:43:48 +1200
committerGitHub <noreply@github.com>2017-05-23 22:43:48 +1200
commit4152d5749c9a2030edc4c7548a04ffa0ef851cd9 (patch)
treee742b51bd3e1490dac798af9cd6c152087decdac /web/app/view/dialog/ComputedAttributeController.js
parentf4b6d4d46dd8378c2d50d82a6a6c2293fcb796ec (diff)
parentdbf31c907fb261dbc02463e2582a1c1a05ab3657 (diff)
downloadetbsa-traccar-web-4152d5749c9a2030edc4c7548a04ffa0ef851cd9.tar.gz
etbsa-traccar-web-4152d5749c9a2030edc4c7548a04ffa0ef851cd9.tar.bz2
etbsa-traccar-web-4152d5749c9a2030edc4c7548a04ffa0ef851cd9.zip
Merge pull request #493 from Abyss777/test_computed_attribute
Implement testing computedAttribute
Diffstat (limited to 'web/app/view/dialog/ComputedAttributeController.js')
-rw-r--r--web/app/view/dialog/ComputedAttributeController.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/web/app/view/dialog/ComputedAttributeController.js b/web/app/view/dialog/ComputedAttributeController.js
index 807653a..f680b1b 100644
--- a/web/app/view/dialog/ComputedAttributeController.js
+++ b/web/app/view/dialog/ComputedAttributeController.js
@@ -20,6 +20,10 @@ Ext.define('Traccar.view.dialog.ComputedAttributeController', {
extend: 'Traccar.view.dialog.BaseEditController',
alias: 'controller.computedAttribute',
+ requires: [
+ 'Traccar.view.dialog.SelectDevice'
+ ],
+
onAttributeChange: function (combobox, newValue) {
var attribute = Ext.getStore('PositionAttributes').getById(newValue);
if (attribute) {
@@ -28,5 +32,14 @@ Ext.define('Traccar.view.dialog.ComputedAttributeController', {
} else {
this.getView().lookupReference('typeComboField').setReadOnly(false);
}
+ },
+
+ onCheckClick: function (button) {
+ var dialog, form;
+ dialog = Ext.create('Traccar.view.dialog.SelectDevice');
+ form = button.up('window').down('form');
+ form.updateRecord();
+ dialog.record = form.getRecord();
+ dialog.show();
}
});