- Se valido que la respuesta JSON no devuelva un registro vacio innecesario
- También se agregó el mensaje por defecto para el listado, cuando no se tienen records
This commit is contained in:
Julio Cesar Laura
2016-02-12 16:27:22 -04:00
parent c34766b03b
commit ed7417666a
2 changed files with 10 additions and 5 deletions

View File

@@ -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 );
}

View File

@@ -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: {