Commit 5b0d92b4bad286277a406018e0fcd2a76132bf81

Authored by Benjamin Renard
1 parent aa539485
Exists in SpeasyGet

Fix 2D parameters & components selection for a speasy remote parameter

js/app/models/RemoteParamNode.js
... ... @@ -23,6 +23,7 @@ Ext.define('amdaModel.RemoteParamNode', {
23 23 if (!this.get('leaf')) this.set('allowDrag', false);
24 24 if (this.get('isParameter')) this.set('allowDrag',true);
25 25 if (this.get('leaf') && this.get('isSpectra')) this.set('iconCls', 'icon-spectra');
  26 + if (this.get('leaf') && this.get('is2dSpectra')) this.set('iconCls', 'icon-2dspectra');
26 27  
27 28 if (this.get('disable')) {
28 29 this.set('cls', 'icon-disabled');
... ...
php/classes/AmdaAction.php
... ... @@ -477,6 +477,7 @@ class AmdaAction
477 477 $isParameter = false;
478 478  
479 479 $isSpectra = false;
  480 + $is2dSpectra = false;
480 481  
481 482 switch ($id)
482 483 {
... ... @@ -489,10 +490,10 @@ class AmdaAction
489 490  
490 491 $info = $child->getAttribute('desc');
491 492  
492   - if ($info && !$isSimulation)
  493 + /*if ($info && !$isSimulation)
493 494 {
494 495 $info = str_replace(';', "<br/>Time Range: ", $info);
495   - }
  496 + }*/
496 497  
497 498 if (($child->tagName == 'parameter') || ($child->tagName == 'component'))
498 499 {
... ... @@ -508,6 +509,7 @@ class AmdaAction
508 509  
509 510 $globalStartStr = "";
510 511 $globalStopStr = "";
  512 + $component_info = array();
511 513  
512 514 if ($child->tagName == 'parameter'){
513 515 if ($child->parentNode->hasAttribute('dataStart')){
... ... @@ -520,6 +522,12 @@ class AmdaAction
520 522 $globalStartStr = $child->parentNode->parentNode->getAttribute('dataStart');
521 523 $globalStopStr = $child->parentNode->parentNode->getAttribute('dataStop');
522 524 }
  525 + if ($child->hasAttribute("index1"))
  526 + $component_info["index1"] = $child->getAttribute('index1');
  527 + if ($child->hasAttribute("index2"))
  528 + $component_info["index2"] = $child->getAttribute('index2');
  529 +
  530 + $component_info["parentId"] = $child->parentNode->getAttribute('xml:id');
523 531 }
524 532 else {
525 533 if ($child->hasAttribute('dataStart')){
... ... @@ -546,6 +554,8 @@ class AmdaAction
546 554 {
547 555 $needsArgs = true;
548 556 $isSpectra = true;
  557 + if (strpos($child->getAttribute('name'),'2D') !== false)
  558 + $is2dSpectra = true;
549 559 }
550 560  
551 561 if ($child->getAttribute('error')) {
... ... @@ -556,12 +566,12 @@ class AmdaAction
556 566 $childrenToReturn[] = array('text' => $name,'alias' => $alias,
557 567 'id' => $id,'nodeType' => $nodeType, 'info' => $info, 'help' => $help, 'globalStart' => $globalStart,
558 568 'globalStop' => $globalStop, 'leaf' => $isLeaf, 'disable' => $disable, 'isParameter' => $isParameter,
559   - 'isSpectra' => $isSpectra, 'needsArgs' => $needsArgs, "component_info" => isset($component_info) ? $component_info : NULL);
  569 + 'isSpectra' => $isSpectra, 'is2dSpectra' => $is2dSpectra, 'needsArgs' => $needsArgs, "component_info" => isset($component_info) ? $component_info : NULL);
560 570 else
561 571 $childrenToReturn[] = array('text' => $name,'alias' => $alias,
562 572 'id' => $id,'nodeType' => $nodeType, 'info' => $info, 'help' => $help,
563 573 'leaf' => $isLeaf, 'disable' => $disable, 'isParameter' => $isParameter,
564   - 'isSpectra' => $isSpectra, 'needsArgs' => $needsArgs, "component_info" => $component_info);
  574 + 'isSpectra' => $isSpectra, 'is2dSpectra' => $is2dSpectra, 'needsArgs' => $needsArgs, "component_info" => $component_info);
565 575 }
566 576 else
567 577 {
... ...