From d243caa095ece5c130250d02e4f3ae7632a9db36 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Tue, 23 May 2017 14:45:18 +0500 Subject: Implement testing computedAttribute --- web/app/view/dialog/ComputedAttributeController.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'web/app/view/dialog/ComputedAttributeController.js') 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(); } }); -- cgit v1.2.3