diff --git a/workflow/engine/methods/cases/caseMessageHistory_Ajax.php b/workflow/engine/methods/cases/caseMessageHistory_Ajax.php index 9c360f572..5a466f1e0 100755 --- a/workflow/engine/methods/cases/caseMessageHistory_Ajax.php +++ b/workflow/engine/methods/cases/caseMessageHistory_Ajax.php @@ -122,11 +122,15 @@ if ($actionAjax == 'messageHistoryGridList_JXP') { $r->data = $aProcesses; $r->totalCount = $totalCount; - if (!isset($r->data[0])) { - $r->data[0] = array('APP_MSG_TYPE' => ''); - } + if (!empty($aProcesses)) { + if (!isset($r->data[0])) { + $r->data[0] = array('APP_MSG_TYPE' => ''); + } - $r->data[0]["APP_MSG_TYPE"] = (array_key_exists($r->data[0]["APP_MSG_TYPE"], $arrayToTranslation))? $arrayToTranslation[$r->data[0]["APP_MSG_TYPE"]] : $r->data[0]["APP_MSG_TYPE"]; + $r->data[0]["APP_MSG_TYPE"] = (array_key_exists($r->data[0]["APP_MSG_TYPE"], $arrayToTranslation)) ? + $arrayToTranslation[$r->data[0]["APP_MSG_TYPE"]] : + $r->data[0]["APP_MSG_TYPE"]; + } echo G::json_encode( $r ); } diff --git a/workflow/engine/templates/cases/caseMessageHistory.js b/workflow/engine/templates/cases/caseMessageHistory.js index 365273d2e..2bc4df634 100644 --- a/workflow/engine/templates/cases/caseMessageHistory.js +++ b/workflow/engine/templates/cases/caseMessageHistory.js @@ -417,7 +417,8 @@ var ActionTabFrameGlobal = ''; // cls : 'grid_with_checkbox', columnLines: true, viewConfig: { - forceFit:true + forceFit:true, + emptyText: (_('ID_NO_RECORDS_FOUND')) }, cm: new Ext.grid.ColumnModel({ defaults: {