diff --git a/js/app/models/AmdaNode.js b/js/app/models/AmdaNode.js index 94c30f8..bcc6b92 100644 --- a/js/app/models/AmdaNode.js +++ b/js/app/models/AmdaNode.js @@ -21,7 +21,8 @@ Ext.define('amdaModel.AmdaNode', { {name:'rootNode', persist: false}, {name: 'ownerTreeId', persist: false}, {name: 'ownerTree', persist: false}, - {name: 'checked', defaultValue: null, persist: false} + {name: 'checked', defaultValue: null, persist: false}, + {name: 'visible', type: 'boolean', defaultValue: true}, ], statics : { diff --git a/php/classes/AmdaAction.php b/php/classes/AmdaAction.php index 2fba3d7..b1e13f9 100644 --- a/php/classes/AmdaAction.php +++ b/php/classes/AmdaAction.php @@ -361,6 +361,11 @@ class AmdaAction } $disable = TRUE; + $hideIfRestricted = FALSE; + if ($child->hasAttribute("hideIfRestricted") && ($child->getAttribute("hideIfRestricted") == "1")) { + $hideIfRestricted = TRUE; + } + if ($child->hasAttribute('group')) { if ($child->getAttribute("group") === "TBD") { $info .= "<br/><b>Under Testing</b>"; @@ -381,9 +386,10 @@ class AmdaAction if ($child->hasAttribute('restriction') && $child->getAttribute('restriction') == 'plotOnly') $info .= "<br/><b>Plot Only!!!</b>"; } + $visible = !($disable && $hideIfRestricted); $childrenToReturn[] = array('text' => $name, 'id' => $id,'nodeType' => $nodeType, 'info' => $info, 'last_update' => $last_update, - 'leaf' => false, 'help' => $help, 'disable' => $disable, 'rank' => $rank, 'timeRestriction' => $timeRestriction); + 'leaf' => false, 'help' => $help, 'disable' => $disable, 'visible' => $visible, 'rank' => $rank, 'timeRestriction' => $timeRestriction); } break; -- libgit2 0.21.2