completed custom triggers part and modified grid view for processmap context option

This commit is contained in:
safan
2011-02-18 14:13:57 +00:00
parent acdc517b37
commit 0835c879a4
6 changed files with 341 additions and 95 deletions

View File

@@ -3172,7 +3172,7 @@ class processMap {
}
//Obtain object and type
switch ($aRow ['OP_OBJ_TYPE']) {
case 'ANY' :
case 'ALL' :
$sObjectType = G::LoadTranslation('ID_ALL');
$sObject = G::LoadTranslation('ID_ALL');
break;
@@ -3316,7 +3316,7 @@ class processMap {
}
//Obtain object and type
switch ($aRow ['OP_OBJ_TYPE']) {
case 'ANY' :
case 'ALL' :
$sObjectType = G::LoadTranslation('ID_ALL');
$sObject = G::LoadTranslation('ID_ALL');
break;

View File

@@ -348,23 +348,7 @@ if ( isset ($_REQUEST['action']) ) {
//$cont = Content::addContent( 'SP_TITLE', '', $_POST['form']['SP_UID'], $lang, $_POST['form']['SPROCESS_NAME'] );
$cont = Content::addContent( 'TAS_TITLE', '', $_POST['TAS_PARENT'], $lang, $_POST['SPROCESS_NAME'] );
break;
case'saveSubprocessDetails11':
//$aTask=($_POST['TASKS']!=0)?$oTask->load($_POST['TASKS']):0;
require_once 'classes/model/SubProcess.php';
$oOP = new SubProcess();
$aData = array(
'SP_UID' => $_POST['SP_UID'],
'PRO_UID' => $_POST['PRO_UID'],
'PRO_PARENT' => $_POST['PRO_PARENT'],
'TAS_PARENT' => $_POST['TAS_PARENT'],
'SP_SYNCHRONOUS' => $_POST['SP_SYNCHRONOUS']
);
$oOP->update($aData);
//require_once 'classes/model/Content.php';
//$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
//$cont = Content::addContent( 'TAS_TITLE', '', $_POST['TAS_PARENT'], $lang, $_POST['SPROCESS_NAME'] );
break;
case 'subprocessProperties':
require_once 'classes/model/Content.php';
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
@@ -372,28 +356,28 @@ if ( isset ($_REQUEST['action']) ) {
$cont = Content::addContent( 'TAS_TITLE', '', $_POST['TAS_PARENT'], $lang, $_POST['SPROCESS_NAME'] );
break;
case 'deleteTriggers':
case 'deleteTriggers':
try{
require_once('classes/model/Triggers.php');
foreach($TRI_UIDS as $i=>$TRI_UID) {
$oTrigger = new Triggers();
$triggerObj=$oTrigger->load($_POST['TRI_UID']);
$oTrigger->remove($_POST['TRI_UID']);
require_once('classes/model/Triggers.php');
require_once('classes/model/StepTrigger.php');
$oStepTrigger = new StepTrigger();
$oStepTrigger->removeTrigger($_POST['TRI_UID']);
$TRI_UIDS = explode(',', $_POST['TRI_UID']);
foreach($TRI_UIDS as $i=>$TRI_UID) {
$oTrigger = new Triggers();
$triggerObj=$oTrigger->load($TRI_UID);
$oTrigger->remove($TRI_UID);
$oStepTrigger = new StepTrigger();
$oStepTrigger->removeTrigger($TRI_UID);
}
$result->success = true;
$result->message = G::LoadTranslation('ID_REPORTTABLE_REMOVED');
$result->message = G::LoadTranslation('ID_TRIGGERS_REMOVED');
}
catch (Exception $e) {
catch (Exception $e) {
$result->success = false;
$result->message = $e->getMessage();
}
print G::json_encode($result);
}
print G::json_encode($result);
break;
}
}
?>

View File

@@ -309,7 +309,25 @@
$result = $tmpData;
echo $result;
break;
case 'getSubProcessProperties':
if($_GET['type'] == 2) //Loading sub process details
{
$rows = $oProcessMap->subProcessExtProperties($_GET['pid'], $_GET['tid'],'','0');
$tmpData = json_encode( $rows ) ;
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
$result = $tmpData;
print $result;
}
else
{
$rows = $oProcessMap->subProcessExtProperties($_GET['pid'], $_GET['tid'],'',$_GET['type']);
$result['totalCount'] = count($rows);
$result['data'] = $rows;
print json_encode( $result ) ;
}
break;
case 'getObjectPermission':
$rows = $oProcessMap->getExtObjectsPermissions($start, $limit,$_GET['pid']);
$result['totalCount'] = $oProcessMap->getAllObjectPermissionCount();
@@ -343,18 +361,18 @@
break;
case 'editTriggers':
require_once('classes/model/Triggers.php');
require_once('classes/model/Triggers.php');
if (isset($_GET['TRI_UID']))
{
$oTrigger = new Triggers();
$rows = $oTrigger->load($_GET['TRI_UID']);
}
$result['totalCount'] = count($rows);
$result['data'] = $rows;
print json_encode( $result ) ;
break;
$tmpData = json_encode( $rows ) ;
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
$result = $tmpData;
echo $result;
break;
}
//$result['data'] = $rows;
//print json_encode( $result ) ;

View File

@@ -36,7 +36,7 @@ $oStepTrigger = new StepTrigger();
$oStepTrigger->removeTrigger($_POST['TRI_UID']);
$result->success = true;
$result->msg = G::LoadTranslation('ID_REPORTTABLE_REMOVED');
$result->msg = G::LoadTranslation('ID_TRIGGERS_REMOVED');
}
catch (Exception $e) {

File diff suppressed because it is too large Load Diff

View File

@@ -1655,7 +1655,7 @@ TaskContext.prototype.stepTriggers = function()
{
id: 'blank',
hidden : true,
width:0,
//width:0,
editable: true,
editor: new Ext.form.TextField({
allowBlank: true
@@ -1799,7 +1799,7 @@ TaskContext.prototype.stepTriggers = function()
xtype: 'fieldset',
//labelWidth: 120,
title:_('ID_ASSIGN_TRIGGERS'),
defaults: {width: 140, border:false},
//defaults: {width: 140, border:false},
autoHeight: true,
border: false,
items: [triggerGrid]
@@ -2262,7 +2262,7 @@ TaskContext.prototype.editSubProcessProperties= function(_3525)
loadingText : 'Loading...',
//renderTo : 'cases-grid',
frame : false,
autoHeight : false,
autoHeight : true,
autoScroll : true,
clicksToEdit: 1,
layout : 'form',
@@ -2316,7 +2316,7 @@ TaskContext.prototype.editSubProcessProperties= function(_3525)
loadingText : 'Loading...',
//renderTo : 'cases-grid',
frame : false,
autoHeight : false,
autoHeight : true,
autoScroll : true,
clicksToEdit: 1,
layout : 'form',