Commit 7dd36700fe18885bd80a00839f80d3e03fa48aec
Exists in
master
and in
32 other branches
Merge branch 'master' into amdadev
Showing
2 changed files
with
9 additions
and
2 deletions
Show diff stats
js/app/models/AmdaNode.js
@@ -21,7 +21,8 @@ Ext.define('amdaModel.AmdaNode', { | @@ -21,7 +21,8 @@ Ext.define('amdaModel.AmdaNode', { | ||
21 | {name:'rootNode', persist: false}, | 21 | {name:'rootNode', persist: false}, |
22 | {name: 'ownerTreeId', persist: false}, | 22 | {name: 'ownerTreeId', persist: false}, |
23 | {name: 'ownerTree', persist: false}, | 23 | {name: 'ownerTree', persist: false}, |
24 | - {name: 'checked', defaultValue: null, persist: false} | 24 | + {name: 'checked', defaultValue: null, persist: false}, |
25 | + {name: 'visible', type: 'boolean', defaultValue: true}, | ||
25 | ], | 26 | ], |
26 | 27 | ||
27 | statics : { | 28 | statics : { |
php/classes/AmdaAction.php
@@ -362,6 +362,11 @@ class AmdaAction | @@ -362,6 +362,11 @@ class AmdaAction | ||
362 | } | 362 | } |
363 | $disable = TRUE; | 363 | $disable = TRUE; |
364 | 364 | ||
365 | + $hideIfRestricted = FALSE; | ||
366 | + if ($child->hasAttribute("hideIfRestricted") && ($child->getAttribute("hideIfRestricted") == "1")) { | ||
367 | + $hideIfRestricted = TRUE; | ||
368 | + } | ||
369 | + | ||
365 | if ($child->hasAttribute('group')) { | 370 | if ($child->hasAttribute('group')) { |
366 | if ($child->getAttribute("group") === "TBD") { | 371 | if ($child->getAttribute("group") === "TBD") { |
367 | $info .= "<br/><b>Under Testing</b>"; | 372 | $info .= "<br/><b>Under Testing</b>"; |
@@ -382,9 +387,10 @@ class AmdaAction | @@ -382,9 +387,10 @@ class AmdaAction | ||
382 | if ($child->hasAttribute('restriction') && $child->getAttribute('restriction') == 'plotOnly') | 387 | if ($child->hasAttribute('restriction') && $child->getAttribute('restriction') == 'plotOnly') |
383 | $info .= "<br/><b>Plot Only!!!</b>"; | 388 | $info .= "<br/><b>Plot Only!!!</b>"; |
384 | } | 389 | } |
390 | + $visible = !($disable && $hideIfRestricted); | ||
385 | 391 | ||
386 | $childrenToReturn[] = array('text' => $name, 'id' => $id,'nodeType' => $nodeType, 'info' => $info, 'last_update' => $last_update, | 392 | $childrenToReturn[] = array('text' => $name, 'id' => $id,'nodeType' => $nodeType, 'info' => $info, 'last_update' => $last_update, |
387 | - 'leaf' => false, 'help' => $help, 'disable' => $disable, 'rank' => $rank, 'timeRestriction' => $timeRestriction); | 393 | + 'leaf' => false, 'help' => $help, 'disable' => $disable, 'visible' => $visible, 'rank' => $rank, 'timeRestriction' => $timeRestriction); |
388 | } | 394 | } |
389 | break; | 395 | break; |
390 | 396 |