Listado antiguo cuando existe CASELIST_BUILDER
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -736,18 +736,26 @@ 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.
|
||||||
var proxyCasesList = new Ext.data.HttpProxy({
|
if (caseListBuilder) {
|
||||||
api: {
|
var proxyCasesList = new Ext.data.HttpProxy({
|
||||||
read : urlProxy
|
api: {
|
||||||
}
|
read : urlProxy
|
||||||
/*----------------------------------********---------------------------------*/
|
}
|
||||||
,method: 'GET'
|
});
|
||||||
,headers: {
|
} else {
|
||||||
'Content-Type': 'application/json',
|
var proxyCasesList = new Ext.data.HttpProxy({
|
||||||
'Authorization': 'Bearer ' + credentials.access_token
|
api: {
|
||||||
}
|
read : urlProxy
|
||||||
/*----------------------------------********---------------------------------*/
|
}
|
||||||
});
|
/*----------------------------------********---------------------------------*/
|
||||||
|
,method: 'GET'
|
||||||
|
,headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'Authorization': 'Bearer ' + credentials.access_token
|
||||||
|
}
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 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
|
||||||
|
|||||||
Reference in New Issue
Block a user