BUG-13396 Ordenamiento en MessageHistory
Se agrego el odenamiento de todo el listado en MessageHistory y no solo porpagina como estaba funcionando.
This commit is contained in:
@@ -3904,13 +3904,6 @@ class Cases
|
|||||||
if (AppDelegationPeer::doCount($oCriteria) == 1) {
|
if (AppDelegationPeer::doCount($oCriteria) == 1) {
|
||||||
$aFields['APP_STATUS'] = 'CANCELLED';
|
$aFields['APP_STATUS'] = 'CANCELLED';
|
||||||
$oApplication->update($aFields);
|
$oApplication->update($aFields);
|
||||||
|
|
||||||
G::LoadClass('reportTables');
|
|
||||||
require_once 'classes/model/AdditionalTables.php';
|
|
||||||
$oReportTables = new ReportTables();
|
|
||||||
$addtionalTables = new additionalTables();
|
|
||||||
$oReportTables->updateTables($aFields['PRO_UID'], $aFields['APP_UID'], $aFields['APP_NUMBER'], $aFields['APP_DATA']);
|
|
||||||
$addtionalTables->updateReportTables($aFields['PRO_UID'], $aFields['APP_UID'], $aFields['APP_NUMBER'], $aFields['APP_DATA'], $aFields['APP_STATUS']);
|
|
||||||
}
|
}
|
||||||
$this->CloseCurrentDelegation($sApplicationUID, $iIndex);
|
$this->CloseCurrentDelegation($sApplicationUID, $iIndex);
|
||||||
$oAppDel = new AppDelegation();
|
$oAppDel = new AppDelegation();
|
||||||
@@ -5908,12 +5901,7 @@ class Cases
|
|||||||
$oCriteria->add(AppMessagePeer::APP_MSG_SHOW_MESSAGE, 1);
|
$oCriteria->add(AppMessagePeer::APP_MSG_SHOW_MESSAGE, 1);
|
||||||
}
|
}
|
||||||
$oCriteria->addAscendingOrderByColumn(AppMessagePeer::APP_MSG_DATE);
|
$oCriteria->addAscendingOrderByColumn(AppMessagePeer::APP_MSG_DATE);
|
||||||
if (!is_null($start)) {
|
|
||||||
$oCriteria->setOffset($start);
|
|
||||||
}
|
|
||||||
if (!is_null($limit)) {
|
|
||||||
$oCriteria->setLimit($limit);
|
|
||||||
}
|
|
||||||
$oDataset = AppMessagePeer::doSelectRS($oCriteria);
|
$oDataset = AppMessagePeer::doSelectRS($oCriteria);
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
@@ -5946,7 +5934,9 @@ class Cases
|
|||||||
|
|
||||||
$oCriteria = new Criteria('dbarray');
|
$oCriteria = new Criteria('dbarray');
|
||||||
$oCriteria->setDBArrayTable('messages');
|
$oCriteria->setDBArrayTable('messages');
|
||||||
|
|
||||||
|
usort( $aMessages, 'ordProcess' );
|
||||||
|
$aMessages = array_splice($aMessages, $start, $limit);
|
||||||
return $aMessages;
|
return $aMessages;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6761,3 +6751,26 @@ class Cases
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ordProcess ($a, $b)
|
||||||
|
{
|
||||||
|
if (isset($_POST['sort'])) {
|
||||||
|
if ($_POST['dir']=='ASC') {
|
||||||
|
if ($a[$_POST['sort']] > $b[$_POST['sort']]) {
|
||||||
|
return 1;
|
||||||
|
} elseif ($a[$_POST['sort']] < $b[$_POST['sort']]) {
|
||||||
|
return - 1;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($a[$_POST['sort']] > $b[$_POST['sort']]) {
|
||||||
|
return - 1;
|
||||||
|
} elseif ($a[$_POST['sort']] < $b[$_POST['sort']]) {
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -328,6 +328,7 @@ var ActionTabFrameGlobal = '';
|
|||||||
|
|
||||||
function messageHistoryGridList(){
|
function messageHistoryGridList(){
|
||||||
store = new Ext.data.GroupingStore({
|
store = new Ext.data.GroupingStore({
|
||||||
|
remoteSort: true,
|
||||||
proxy : new Ext.data.HttpProxy
|
proxy : new Ext.data.HttpProxy
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user