diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-05-23 22:43:48 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-23 22:43:48 +1200 |
commit | 4152d5749c9a2030edc4c7548a04ffa0ef851cd9 (patch) | |
tree | e742b51bd3e1490dac798af9cd6c152087decdac /web/app/view/dialog/ComputedAttributeController.js | |
parent | f4b6d4d46dd8378c2d50d82a6a6c2293fcb796ec (diff) | |
parent | dbf31c907fb261dbc02463e2582a1c1a05ab3657 (diff) | |
download | trackermap-web-4152d5749c9a2030edc4c7548a04ffa0ef851cd9.tar.gz trackermap-web-4152d5749c9a2030edc4c7548a04ffa0ef851cd9.tar.bz2 trackermap-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.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/web/app/view/dialog/ComputedAttributeController.js b/web/app/view/dialog/ComputedAttributeController.js index 807653a6..f680b1b5 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(); } }); |