BUG 10980 Issue in pagination displaying "Messages History" SOLVED
- Pagination doesn't work - Fix pagination
This commit is contained in:
@@ -5751,7 +5751,7 @@ class Cases
|
|||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function getHistoryMessagesTrackerExt($sApplicationUID)
|
public function getHistoryMessagesTrackerExt($sApplicationUID, $start = null, $limit = null)
|
||||||
{
|
{
|
||||||
G::LoadClass('ArrayPeer');
|
G::LoadClass('ArrayPeer');
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
@@ -5760,6 +5760,12 @@ class Cases
|
|||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria('workflow');
|
||||||
$oCriteria->add(AppMessagePeer::APP_UID, $sApplicationUID);
|
$oCriteria->add(AppMessagePeer::APP_UID, $sApplicationUID);
|
||||||
$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();
|
||||||
|
|||||||
@@ -25,6 +25,14 @@
|
|||||||
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
||||||
|
|
||||||
if ($actionAjax == 'messageHistoryGridList_JXP') {
|
if ($actionAjax == 'messageHistoryGridList_JXP') {
|
||||||
|
|
||||||
|
if (!isset($_REQUEST['start'])) {
|
||||||
|
$_REQUEST['start'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($_REQUEST['limit'])) {
|
||||||
|
$_REQUEST['limit'] = 20;
|
||||||
|
}
|
||||||
|
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
G::LoadClass( "BasePeer" );
|
G::LoadClass( "BasePeer" );
|
||||||
@@ -32,16 +40,22 @@ if ($actionAjax == 'messageHistoryGridList_JXP') {
|
|||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
|
|
||||||
$appMessageArray = $oCase->getHistoryMessagesTrackerExt( $_SESSION['APPLICATION'] );
|
$appMessageArray = $oCase->getHistoryMessagesTrackerExt( $_SESSION['APPLICATION'], $_REQUEST['start'], $_REQUEST['limit']);
|
||||||
|
$appMessageCountArray = $oCase->getHistoryMessagesTrackerExt( $_SESSION['APPLICATION']);
|
||||||
|
|
||||||
$result = new stdClass();
|
$result = new stdClass();
|
||||||
$aProcesses = Array ();
|
$aProcesses = Array ();
|
||||||
|
|
||||||
$totalCount = 0;
|
|
||||||
foreach ($appMessageArray as $index => $value) {
|
foreach ($appMessageArray as $index => $value) {
|
||||||
if ($appMessageArray[$index]['APP_MSG_SHOW_MESSAGE'] == 1) {
|
if ($appMessageArray[$index]['APP_MSG_SHOW_MESSAGE'] == 1) {
|
||||||
$appMessageArray[$index]['ID_MESSAGE'] = $appMessageArray[$index]['APP_UID'] . '_' . $appMessageArray[$index]['APP_MSG_UID'];
|
$appMessageArray[$index]['ID_MESSAGE'] = $appMessageArray[$index]['APP_UID'] . '_' . $appMessageArray[$index]['APP_MSG_UID'];
|
||||||
$aProcesses[] = $appMessageArray[$index];
|
$aProcesses[] = $appMessageArray[$index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$totalCount = 0;
|
||||||
|
foreach ($appMessageCountArray as $index => $value) {
|
||||||
|
if ($appMessageCountArray[$index]['APP_MSG_SHOW_MESSAGE'] == 1) {
|
||||||
$totalCount ++;
|
$totalCount ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -159,10 +173,10 @@ if ($actionAjax == 'sendMailMessage_JXP') {
|
|||||||
$aConfiguration['MESS_PASSWORD'] = $passwd;
|
$aConfiguration['MESS_PASSWORD'] = $passwd;
|
||||||
|
|
||||||
$oSpool = new spoolRun();
|
$oSpool = new spoolRun();
|
||||||
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
|
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
|
||||||
$aConfiguration['MESS_RAUTH'] = 0;
|
$aConfiguration['MESS_RAUTH'] = 0;
|
||||||
} else {
|
} else {
|
||||||
$aConfiguration['MESS_RAUTH'] = 1;
|
$aConfiguration['MESS_RAUTH'] = 1;
|
||||||
}
|
}
|
||||||
$oSpool->setConfig( array ('MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],'MESS_SERVER' => $aConfiguration['MESS_SERVER'],'MESS_PORT' => $aConfiguration['MESS_PORT'],'MESS_ACCOUNT' => $aConfiguration['MESS_ACCOUNT'],'MESS_PASSWORD' => $passwd,'SMTPAuth' => $aConfiguration['MESS_RAUTH']
|
$oSpool->setConfig( array ('MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],'MESS_SERVER' => $aConfiguration['MESS_SERVER'],'MESS_PORT' => $aConfiguration['MESS_PORT'],'MESS_ACCOUNT' => $aConfiguration['MESS_ACCOUNT'],'MESS_PASSWORD' => $passwd,'SMTPAuth' => $aConfiguration['MESS_RAUTH']
|
||||||
) );
|
) );
|
||||||
|
|||||||
@@ -517,7 +517,7 @@ var ActionTabFrameGlobal = '';
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
bbar: new Ext.PagingToolbar({
|
bbar: new Ext.PagingToolbar({
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
store: store,
|
store: store,
|
||||||
displayInfo: true,
|
displayInfo: true,
|
||||||
displayMsg: _('ID_DISPLAY_PROCESSES'),
|
displayMsg: _('ID_DISPLAY_PROCESSES'),
|
||||||
@@ -536,7 +536,7 @@ var ActionTabFrameGlobal = '';
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
processesGrid.store.load({params: {"function":"languagesList"}});
|
processesGrid.store.load({params: {"actionAjax":"messageHistoryGridList_JXP"}});
|
||||||
|
|
||||||
processesGrid.store.on(
|
processesGrid.store.on(
|
||||||
'load',
|
'load',
|
||||||
|
|||||||
Reference in New Issue
Block a user