Commit 7dd36700fe18885bd80a00839f80d3e03fa48aec

Authored by Benjamin Renard
2 parents 78bffaa7 65529d3e

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 21 {name:'rootNode', persist: false},
22 22 {name: 'ownerTreeId', persist: false},
23 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 28 statics : {
... ...
php/classes/AmdaAction.php
... ... @@ -362,6 +362,11 @@ class AmdaAction
362 362 }
363 363 $disable = TRUE;
364 364  
  365 + $hideIfRestricted = FALSE;
  366 + if ($child->hasAttribute("hideIfRestricted") && ($child->getAttribute("hideIfRestricted") == "1")) {
  367 + $hideIfRestricted = TRUE;
  368 + }
  369 +
365 370 if ($child->hasAttribute('group')) {
366 371 if ($child->getAttribute("group") === "TBD") {
367 372 $info .= "<br/><b>Under Testing</b>";
... ... @@ -382,9 +387,10 @@ class AmdaAction
382 387 if ($child->hasAttribute('restriction') && $child->getAttribute('restriction') == 'plotOnly')
383 388 $info .= "<br/><b>Plot Only!!!</b>";
384 389 }
  390 + $visible = !($disable && $hideIfRestricted);
385 391  
386 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 395 break;
390 396  
... ...