From c1cec698b4802647f7a42ad4cbe65e4202dc3d5d Mon Sep 17 00:00:00 2001 From: Hector Cortez Date: Wed, 3 Apr 2013 16:50:06 -0400 Subject: [PATCH] BUG 11075 Adicion de triggers: UP-DOWN no funciona SOLVED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - En la asignación de triggers a un Step, es difícil poder mover la posición de un trigger (en cualquiera de las opciones: Before, After, Before Assignment, Before Routing,etc)con el Down y Up. - Validation editing of the triggers, for not to order. --- workflow/engine/classes/class.propelTable.php | 17 ++++++++++++++++- workflow/engine/methods/steps/steps_Ajax.php | 6 ++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/workflow/engine/classes/class.propelTable.php b/workflow/engine/classes/class.propelTable.php index 88ea3f400..8892e33cb 100755 --- a/workflow/engine/classes/class.propelTable.php +++ b/workflow/engine/classes/class.propelTable.php @@ -329,6 +329,16 @@ class propelTable $this->style[$r]['showInTable'] = '0'; } } + + // triggers validation table + $tablesName = $this->criteria->getTables(); + $triggerEditTable = false; + foreach ($tablesName as $table) { + if ($table == 'STEP_TRIGGER') { + $triggerEditTable = true; + } + } + //Render headers $this->colCount = 0; $this->shownFields = '['; @@ -338,9 +348,14 @@ class propelTable $this->tpl->newBlock( "headers" ); $sortOrder = (((isset( $this->aOrder[$this->fields[$r]['Name']] )) && ($this->aOrder[$this->fields[$r]['Name']] === 'ASC')) ? 'DESC' : 'ASC'); $sortOrder = (((isset( $this->aOrder[$this->fields[$r]['Name']] )) && ($this->aOrder[$this->fields[$r]['Name']] === 'DESC')) ? '' : $sortOrder); + if ($this->style[$r]['titleVisibility'] != '0') { $this->style[$r]['href'] = $this->ownerPage . '?order=' . ($sortOrder !== '' ? (G::createUID( '', $this->fields[$r]['Name'] ) . '=' . $sortOrder) : '') . '&page=' . $this->currentPage; - $this->style[$r]['onsort'] = $this->id . '.doSort("' . G::createUID( '', $this->fields[$r]['Name'] ) . '" , "' . $sortOrder . '");return false;'; + if ($triggerEditTable) { + $this->style[$r]['onsort'] = $this->id . '.doSort("' . G::createUID( '', $this->fields[$r]['Name'] ) . '" , ""); return false;';; + } else { + $this->style[$r]['onsort'] = $this->id . '.doSort("' . G::createUID( '', $this->fields[$r]['Name'] ) . '" , "' . $sortOrder . '"); return false;'; + } } else { $this->style[$r]['href'] = '#'; $this->style[$r]['onsort'] = 'return false;'; diff --git a/workflow/engine/methods/steps/steps_Ajax.php b/workflow/engine/methods/steps/steps_Ajax.php index 5e7ac29b9..426da7f8f 100755 --- a/workflow/engine/methods/steps/steps_Ajax.php +++ b/workflow/engine/methods/steps/steps_Ajax.php @@ -64,11 +64,9 @@ try { global $G_PUBLISH; $G_PUBLISH = new Publisher(); if ($aData['sType'] == 'BEFORE') { - $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'steps/triggersBefore_List', $oProcessMap->getStepTriggersCriteria( $aData['sStep'], $_SESSION['TASK'], $aData['sType'] ), array ('STEP' => $aData['sStep'] - ) ); + $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'steps/triggersBefore_List', $oProcessMap->getStepTriggersCriteria( $aData['sStep'], $_SESSION['TASK'], $aData['sType'] ), array ('STEP' => $aData['sStep']) ); } else { - $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'steps/triggersAfter_List', $oProcessMap->getStepTriggersCriteria( $aData['sStep'], $_SESSION['TASK'], $aData['sType'] ), array ('STEP' => $aData['sStep'] - ) ); + $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'steps/triggersAfter_List', $oProcessMap->getStepTriggersCriteria( $aData['sStep'], $_SESSION['TASK'], $aData['sType'] ), array ('STEP' => $aData['sStep']) ); } G::RenderPage( 'publish-twocolumns', 'raw' ); break;