BUG 6756 "External steps": problems with node ids solved

Afer the first solution a detail was happening yet with the nodes of external action esteps, but it is solved now.
This commit is contained in:
Erik Amaru Ortiz
2011-04-19 19:03:54 -04:00
parent 24aa5b9fdf
commit 9d061fed8a

View File

@@ -115,6 +115,7 @@ class Ajax
$pmScript = new PMScript(); $pmScript = new PMScript();
$pmScript->setFields($caseData['APP_DATA']); $pmScript->setFields($caseData['APP_DATA']);
$externalStepCount = 0;
foreach ($caseSteps as $caseStep) { foreach ($caseSteps as $caseStep) {
@@ -190,7 +191,7 @@ $caseStep->getStepPosition());
break; break;
} }
} }
$node->id = md5($stepTitle.rand());
$node->text = $stepTitle; $node->text = $stepTitle;
$node->leaf = false; $node->leaf = false;
$node->url = ""; $node->url = "";
@@ -198,6 +199,8 @@ $caseStep->getStepPosition());
if( isset($externalStepActions) ) { if( isset($externalStepActions) ) {
foreach ( $externalStepActions as $action => $label ) { foreach ( $externalStepActions as $action => $label ) {
$childNode = new stdClass;
$childNode->id = md5($externalStepCount++);
$childNode->text = $label; $childNode->text = $label;
$childNode->iconCls = 'ICON_EXTERNAL_STEP'; $childNode->iconCls = 'ICON_EXTERNAL_STEP';
$childNode->leaf = true; $childNode->leaf = true;