Commit 0e07ef6cc0a8bde31af43cd6d694499d3e80d6e5
1 parent
4f728fd9
Exists in
master
and in
29 other branches
Keep going
Showing
2 changed files
with
11 additions
and
11 deletions
Show diff stats
js/app/views/DefaultTreeGrid.js
... | ... | @@ -49,6 +49,9 @@ Ext.define('amdaUI.DefaultTreeGrid', { |
49 | 49 | }); |
50 | 50 | editor.field = colorPicker; |
51 | 51 | } |
52 | + }, | |
53 | + afteredit:function(editor, context,e){ | |
54 | + console.log(context.record.get('default')); | |
52 | 55 | } |
53 | 56 | } |
54 | 57 | }); |
... | ... | @@ -97,7 +100,6 @@ Ext.define('amdaUI.DefaultTreeGrid', { |
97 | 100 | parameter = parentNode.get('parameter')+'.'.concat(parameter); |
98 | 101 | } |
99 | 102 | option = amdaDefaultOptions[parameter+record.get('parameter')]; |
100 | - console.log(record.get('default')); | |
101 | 103 | value = record.get('value'); |
102 | 104 | store = null; |
103 | 105 | if(me.isHexCode(value)){ |
... | ... | @@ -154,11 +156,11 @@ Ext.define('amdaUI.DefaultTreeGrid', { |
154 | 156 | align: 'center', |
155 | 157 | icon: 'js/resources/images/16x16/arrow_circle_double.png', |
156 | 158 | handler: function(grid, rowIndex, colIndex, actionItem, event, record, row) { |
157 | - Ext.Msg.alert('Editing' + record.get('parameter')); | |
159 | + record.set('value', record.get('default')); | |
158 | 160 | }, |
159 | 161 | // Only leaf level tasks may be edited |
160 | 162 | isDisabled: function(view, rowIdx, colIdx, item, record) { |
161 | - return !record.data.leaf; | |
163 | + return !record.data.leaf || !record.data.modified; | |
162 | 164 | } |
163 | 165 | } |
164 | 166 | ], |
... | ... |
php/classes/AmdaAction.php
... | ... | @@ -1764,15 +1764,13 @@ class AmdaAction |
1764 | 1764 | $results = &$json_o; // Use a reference to update the original array |
1765 | 1765 | foreach($keys as $parameter){ |
1766 | 1766 | $results = &$results[$parameter]; |
1767 | + | |
1768 | + error_log(print_r($results,true)); | |
1767 | 1769 | } |
1768 | - $results = array("value" => $value, "modified" => true, "defaultValue" => $results); | |
1769 | - | |
1770 | - // if(is_string($value) || is_numeric($value)) | |
1771 | - // $results = "*".$value; | |
1772 | - // if(is_bool($value)){ | |
1773 | - // $results = $value ? "true":"false"; | |
1774 | - // $results = "*".$results; | |
1775 | - // } | |
1770 | + if($isTree) | |
1771 | + $results = array("value" => $value, "modified" => true, "defaultValue" => $results); | |
1772 | + else | |
1773 | + $results = $value; | |
1776 | 1774 | } |
1777 | 1775 | } |
1778 | 1776 | |
... | ... |