BUG 11075 Adicion de triggers: UP-DOWN no funciona SOLVED

- 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.
This commit is contained in:
Hector Cortez
2013-04-03 16:50:06 -04:00
parent 86b119d267
commit c1cec698b4
2 changed files with 18 additions and 5 deletions

View File

@@ -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;';