BUG-6855 Error message in 'Database Conections' clicking in Edit or Delete title.

I put an 'IF' validation in file 'workflow/engine/classes/class.propelTable.php.php', to prevent that this columns were sortable.
This commit is contained in:
jennylee
2012-11-27 10:21:32 -04:00
parent 1079ae5eee
commit 11c7fe3b42
3 changed files with 11 additions and 7 deletions

View File

@@ -338,8 +338,13 @@ 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);
$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 ($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;';
} else {
$this->style[$r]['href'] = '#';
$this->style[$r]['onsort'] = 'return false;';
}
if (isset( $this->style[$r]['href'] )) {
$this->tpl->assign( "href", $this->style[$r]['href'] );
}
@@ -492,7 +497,7 @@ class propelTable
}
}
//Hidden titles
if (! (strpos( ' linknew button endgrid2 ', ' ' . $this->fields[$r]['Type'] . ' ' ) === false)) {
if (! (strpos( ' linknew button link endgrid2 ', ' ' . $this->fields[$r]['Type'] . ' ' ) === false)) {
$this->style[$r]['titleVisibility'] = '0';
}
//Align titles

View File

@@ -22,15 +22,14 @@
</DBS_DESCRIPTION>
<DBS_EDIT type="link" colWidth="50" value="Edit" link="javascript:editDbConnection(&#039;@#DBS_UID&#039;)">
<en></en>
<en>Edit</en>
</DBS_EDIT>
<DBS_DELETE type="link" colWidth="50" value="Delete" link="javascript:deleteDbConnection(&#039;@#DBS_UID&#039;,&#039;@#PRO_UID&#039;)">
<en></en>
<en>Delete</en>
</DBS_DELETE>
<GET_UID type="link" colWidth="40" value="UID" link="#" onclick="msgBox(&#039;UID: &#039;+@QDBS_UID, &#039;info&#039;);return false;"/>
</dynaForm>