merged steps triggers proxy file with main proxyExtjs file
This commit is contained in:
@@ -2,6 +2,16 @@
|
||||
G::LoadClass('processMap');
|
||||
$oProcessMap = new processMap(new DBConnection);
|
||||
|
||||
//$_GET['sid'] gets STEP_UID and sTYPE(i.e BEFORE and AFTER) in format STEP_UID-sTYPE
|
||||
if(isset($_GET['stepid']))
|
||||
{
|
||||
$aStepTypeId = explode('|',$_GET['stepid']);
|
||||
$_SESSION['stepUID'] = $_GET['stepid'];
|
||||
//$aStepTypeId = explode('-','2517180104cd42c25cc39e4071099227-BEFORE');
|
||||
$sStep = $aStepTypeId[0];
|
||||
$sType = $aStepTypeId[1];
|
||||
}
|
||||
|
||||
switch($_GET['action'])
|
||||
{
|
||||
case 'getDynaformList':
|
||||
@@ -130,14 +140,25 @@ switch($_GET['action'])
|
||||
$rows = $oProcessMap->getAvailableExtUsersCriteria($_GET['tid']);
|
||||
break;
|
||||
|
||||
|
||||
case 'getAvailableStepTriggers':
|
||||
$aStepTypeId = explode('|',$_SESSION['stepUID']);
|
||||
$sStep = $aStepTypeId[0];
|
||||
$sType = $aStepTypeId[1];
|
||||
//Getting available Steps Criteria that have been not selected for a particular task
|
||||
$rows = $oProcessMap->getExtAvailableStepTriggersCriteria($_GET['pid'], $sStep, $_GET['tid'], $sType);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case 'getAssignedStepTriggers':
|
||||
$rows = $oProcessMap->getExtStepTriggersCriteria($sStep, $_GET['tid'], $sType);
|
||||
break;
|
||||
}
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
//$result['totalCount'] = count($rows);
|
||||
//$result['data'] = $rows;
|
||||
//print json_encode( $result ) ;
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
|
||||
$result = $tmpData;
|
||||
echo $result;
|
||||
|
||||
?>
|
||||
@@ -126,7 +126,7 @@ TaskContext.prototype.editTaskSteps = function(_3252){
|
||||
remoteSort : true,
|
||||
fields : stepsFields,
|
||||
proxy : new Ext.data.HttpProxy({
|
||||
url : 'proxyExtjs?tid='+taskId+'&action=getSteps'
|
||||
url : 'proxyExtjs?tid='+taskId+'&action=getAssignedSteps'
|
||||
})
|
||||
});
|
||||
//taskUsers.setDefaultSort('LABEL', 'asc');
|
||||
@@ -1469,7 +1469,7 @@ TaskContext.prototype.stepTriggers = function(_5625)
|
||||
beforeload: {
|
||||
fn: function (store, options) {
|
||||
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
|
||||
var link = 'proxyStepTriggers?tid='+taskId+'&stepid='+sStepUID;
|
||||
var link = 'proxyExtjs?tid='+taskId+'&stepid='+sStepUID+'&action=getAssignedStepTriggers';
|
||||
store.proxy.setUrl(link, true);
|
||||
}
|
||||
}
|
||||
@@ -1479,7 +1479,7 @@ TaskContext.prototype.stepTriggers = function(_5625)
|
||||
beforeload: {
|
||||
fn: function (store, options) {
|
||||
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
|
||||
var link = 'proxyStepTriggers?pid='+pro_uid+'&tid='+taskId+'&stepid='+sStepUID;
|
||||
var link = 'proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&stepid='+sStepUID+'&action=getAvailableStepTriggers';
|
||||
store.proxy.setUrl(link, true);
|
||||
}
|
||||
}
|
||||
@@ -1570,7 +1570,7 @@ TaskContext.prototype.stepTriggers = function(_5625)
|
||||
// create the Data Store of users that are already assigned to a task
|
||||
var stepsTriggers = new Ext.data.JsonStore({
|
||||
root : 'data',
|
||||
url : 'proxyStepTriggers?tid='+taskId,//+'&stepid='+workflow.selectedStepUID,
|
||||
url : 'proxyExtjs?tid='+taskId+'&action=',//+'&stepid='+workflow.selectedStepUID,
|
||||
totalProperty : 'totalCount',
|
||||
idProperty : 'gridIndex',
|
||||
remoteSort : true,
|
||||
@@ -1581,7 +1581,7 @@ TaskContext.prototype.stepTriggers = function(_5625)
|
||||
|
||||
var availableTriggers = new Ext.data.JsonStore({
|
||||
root : 'data',
|
||||
url : 'proxyStepTriggers?pid='+pro_uid+'&tid='+taskId,//+'&stepid='+workflow.selectedStepUID,
|
||||
url : 'proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&action=',//+'&stepid='+workflow.selectedStepUID,
|
||||
totalProperty : 'totalCount',
|
||||
idProperty : 'gridIndex',
|
||||
remoteSort : false, //true,
|
||||
|
||||
Reference in New Issue
Block a user