Listado antiguo cuando existe CASELIST_BUILDER

This commit is contained in:
Brayan Pereyra
2015-03-23 14:38:19 -04:00
parent 45bf373839
commit a3b97e6412
2 changed files with 27 additions and 13 deletions

View File

@@ -104,11 +104,17 @@ try {
$generalConfCasesList = array (); $generalConfCasesList = array ();
} }
$caseListBuilder = (count($confCasesList)) ? 1 : 0;
if ($caseListBuilder) {
$urlProxy = 'proxyCasesList';
}
// reassign header configuration // reassign header configuration
$confReassignList = getReassignList(); $confReassignList = getReassignList();
// evaluates an action and the configuration for the list that will be rendered // evaluates an action and the configuration for the list that will be rendered
$config = getAdditionalFields( $action, $confCasesList ); $config = getAdditionalFields( $action, $confCasesList );
$columns = $config['caseColumns']; $columns = $config['caseColumns'];
$readerFields = $config['caseReaderFields']; $readerFields = $config['caseReaderFields'];
$reassignColumns = $confReassignList['caseColumns']; $reassignColumns = $confReassignList['caseColumns'];
@@ -188,6 +194,7 @@ $oHeadPublisher->assign( 'readerFields', $readerFields ); //sending the fields t
$oHeadPublisher->assign( 'reassignColumns', $reassignColumns ); //sending the columns to display in grid $oHeadPublisher->assign( 'reassignColumns', $reassignColumns ); //sending the columns to display in grid
$oHeadPublisher->assign( 'action', $action ); //sending the action to make $oHeadPublisher->assign( 'action', $action ); //sending the action to make
$oHeadPublisher->assign( 'urlProxy', $urlProxy ); //sending the urlProxy to make $oHeadPublisher->assign( 'urlProxy', $urlProxy ); //sending the urlProxy to make
$oHeadPublisher->assign( 'caseListBuilder', $caseListBuilder ); //sending the caseListBuilder
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
$oHeadPublisher->assign( 'credentials', $clientToken ); //sending the SYS_SYS to make $oHeadPublisher->assign( 'credentials', $clientToken ); //sending the SYS_SYS to make
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
@@ -486,7 +493,6 @@ function getAdditionalFields($action, $confCasesList = array())
$caseReaderFieldsAux[] = $arrayField["name"]; $caseReaderFieldsAux[] = $arrayField["name"];
} }
} }
foreach ($arrayConfig["caseReaderFields"] as $index => $value) { foreach ($arrayConfig["caseReaderFields"] as $index => $value) {
if (!in_array($value["name"], $caseReaderFieldsAux)) { if (!in_array($value["name"], $caseReaderFieldsAux)) {
$caseReaderFields[] = $value; $caseReaderFields[] = $value;

View File

@@ -736,6 +736,13 @@ Ext.onReady ( function() {
// Create HttpProxy instance, all CRUD requests will be directed to single proxy url. // Create HttpProxy instance, all CRUD requests will be directed to single proxy url.
if (caseListBuilder) {
var proxyCasesList = new Ext.data.HttpProxy({
api: {
read : urlProxy
}
});
} else {
var proxyCasesList = new Ext.data.HttpProxy({ var proxyCasesList = new Ext.data.HttpProxy({
api: { api: {
read : urlProxy read : urlProxy
@@ -748,6 +755,7 @@ Ext.onReady ( function() {
} }
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
}); });
}
// Typical JsonReader with additional meta-data params for defining the core attributes of your json-response // Typical JsonReader with additional meta-data params for defining the core attributes of your json-response
// the readerFields is defined in PHP server side // the readerFields is defined in PHP server side