BPMN designer ver 1.1

This commit is contained in:
Erik Amaru Ortiz
2011-03-02 23:49:29 +00:00
parent 6a92d80ecf
commit 2c934574fe
21 changed files with 2122 additions and 2242 deletions

View File

@@ -0,0 +1,60 @@
<?php
/**
* BPMN Designer v1.1
* @date Feb 2th, 2011
* @author Erik A. O. <erik@colosa.com>
*/
class BpmnDesigner extends Controller
{
function index($httpData)
{
if( ! isset($httpData->id) )
throw new Exception('The Process ID was not set!');
require_once 'classes/model/Process.php';
$process = ProcessPeer::retrieveByPK($httpData->id);
if( get_class($process) != 'Process' ) {
throw new Exception("The Process with UID: {$httpData->id} doesn't exist!");
}
$_SESSION['PROCESS'] = $httpData->id;
$_SESSION['PROCESSMAP'] = 'BPMN';
$this->includeExtJS('bpmn/MyWorkflow',true );
$this->includeExtJS('bpmn/pmosExt', true );
$this->includeExtJS('bpmn/TaskContext', true );
$this->includeExtJS('bpmn/designerComponents', true );
$this->includeExtJS('bpmn/designer', true );
$this->includeExtJS('bpmn/Annotation',true );
$this->includeExtJS('bpmn/bpmnShapes', true);
$this->includeExtJS('bpmn/EventEmptyStart');
$this->includeExtJS('bpmn/EventMessageStart');
$this->includeExtJS('bpmn/EventTimerStart');
$this->includeExtJS('bpmn/EventEmptyInter');
$this->includeExtJS('bpmn/EventMessageRecInter');
$this->includeExtJS('bpmn/EventMessageSendInter');
$this->includeExtJS('bpmn/EventTimerInter');
$this->includeExtJS('bpmn/EventEmptyEnd');
$this->includeExtJS('bpmn/EventMessageEnd');
$this->includeExtJS('bpmn/GatewayInclusive' );
$this->includeExtJS('bpmn/GatewayExclusiveData');
$this->includeExtJS('bpmn/GatewayParallel' );
$this->includeExtJS('bpmn/GridPanel');
$this->includeExtJS('bpmn/SubProcess' );
$this->includeExtJS('bpmn/ProcessOptions',true);
$this->includeExtJS('bpmn/ProcessMapContext', true );
$this->includeExtJS('bpmn/ProcessOptions', true);
$this->setJSVar('pro_uid', $httpData->id);
$this->setJSVar('pro_title', $process->getProTitle());
$this->setView('bpmn/designer');
G::RenderPage('publish', 'extJs');
}
}

View File

@@ -0,0 +1,255 @@
<?php
/**
* BpmnProxy Controller
* @author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
*/
class BpmnProxy extends HttpProxyController
{
function openProcess($httpData)
{
G::LoadClass('xpdl');
$processUID = $httpData->PRO_UID;
$oProcess = new Xpdl();
$fields = $oProcess->serializeProcess($processUID);
$oData = unserialize($fields);
$arrayTasks = array();
$countTasks = 0;
$countSubProcess= 0;
$arrayEvents = array();
$arraySubProcess= array();
$count = 0;
$countRoutes = 0;
$arrayRoutes = array();
$process = array();
$process = $oProcess->createProcessPM($oData->process);
foreach($oData->tasks as $id => $value) {
if($value['TAS_TYPE'] == 'SUBPROCESS'){
$arraySubProcess[$countSubProcess]['0'] = $value['TAS_UID'];
$arraySubProcess[$countSubProcess]['1'] = $value['TAS_TITLE'];
$arraySubProcess[$countSubProcess]['2'] = $value['TAS_POSX'];
$arraySubProcess[$countSubProcess]['3'] = $value['TAS_POSY'];
$countSubProcess = $countSubProcess + 1;
} else {
$arrayTasks[$countTasks]['0'] = $value['TAS_UID'];
$arrayTasks[$countTasks]['1'] = $value['TAS_TITLE'];
$arrayTasks[$countTasks]['2'] = $value['TAS_POSX'];
$arrayTasks[$countTasks]['3'] = $value['TAS_POSY'];
$arrayTasks[$countTasks]['4'] = $value['TAS_WIDTH'];
$arrayTasks[$countTasks]['5'] = $value['TAS_HEIGHT'];
$arrayTasks[$countTasks]['6'] = $value['TAS_BOUNDARY'];
if($value['TAS_START'] == 'TRUE') {
$arrayEvents[$count]['0'] = G::generateUniqueID();
if($value['TAS_EVN_UID'] == '') {
$arrayEvents[$count]['1'] = 'bpmnEventEmptyStart';
} else {
foreach($oData->event as $eventid => $val){
if($val['EVN_UID'] == $value['TAS_EVN_UID']) {
$arrayEvents[$count]['0'] = $val['EVN_UID'];
$arrayEvents[$count]['1'] = $val['EVN_TYPE'];
break;
}
}
}
$arrayEvents[$count]['2'] = $value['TAS_POSX']+68;
$arrayEvents[$count]['3'] = $value['TAS_POSY']-50;
$arrayEvents[$count]['4'] = $value['TAS_UID'];
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
$arrayRoutes[$countRoutes]['1']= $arrayEvents[$count]['0'];
$arrayRoutes[$countRoutes]['2']= $value['TAS_UID'];
$arrayRoutes[$countRoutes]['3']= '1';
$arrayRoutes[$countRoutes]['4']= '2';
$count = $count+ 1;
$countRoutes = $countRoutes+ 1;
}
$countTasks = $countTasks + 1;
}
}
$lanes = $oProcess->createLanesNewPM($oData->lanes);
$fields = $oProcess->createTransitionsPM($oData->tasks,$oData->routes,$arrayEvents,$count,$arrayRoutes,$countRoutes);
//Get Standalone Events and routes
$countEvent = count($fields['EVENTS']);
$countRoutes = count($fields['TRANSITION']);
foreach($oData->event as $id => $value) {
if($value['TAS_UID'] == '' && $value['EVN_TAS_UID_FROM'] != '' && $value['EVN_TAS_UID_TO'] != ''){ //Check for Intermediate Events
$evn_uid = $value['EVN_UID'];
$idTaskFrom = $value['EVN_TAS_UID_FROM'];
$idTaskTo = $value['EVN_TAS_UID_TO'];
$fields['EVENTS'][$countEvent]['0'] = $value['EVN_UID'];
$fields['EVENTS'][$countEvent]['1'] = $value['EVN_TYPE'];
$fields['EVENTS'][$countEvent]['2'] = $value['EVN_POSX'];
$fields['EVENTS'][$countEvent]['3'] = $value['EVN_POSY'];
$fields['EVENTS'][$countEvent]['4'] = $value['TAS_UID'];
$countEvent = $countEvent + 1;
$fields['TRANSITION'][$countRoutes]['0']= G::generateUniqueID();
$fields['TRANSITION'][$countRoutes]['1']= $idTaskFrom;
$fields['TRANSITION'][$countRoutes]['2']= $evn_uid;
$fields['TRANSITION'][$countRoutes]['3']= '1';
$fields['TRANSITION'][$countRoutes]['4']= '2';
$countRoutes = $countRoutes + 1;
$fields['TRANSITION'][$countRoutes]['0']= G::generateUniqueID();
$fields['TRANSITION'][$countRoutes]['1']= $evn_uid;
$fields['TRANSITION'][$countRoutes]['2']= $idTaskTo;
$fields['TRANSITION'][$countRoutes]['3']= '2';
$fields['TRANSITION'][$countRoutes]['4']= '1';
$countRoutes = $countRoutes + 1;
}
else if($value['TAS_UID'] == '' && $value['EVN_TAS_UID_TO'] != '' && ! preg_match("/Start/", $value['EVN_TYPE'])){
$evn_uid = $value['EVN_UID'];
$idTask = $value['EVN_TAS_UID_TO'];
$fields['EVENTS'][$countEvent]['0'] = $value['EVN_UID'];
$fields['EVENTS'][$countEvent]['1'] = $value['EVN_TYPE'];
$fields['EVENTS'][$countEvent]['2'] = $value['EVN_POSX'];
$fields['EVENTS'][$countEvent]['3'] = $value['EVN_POSY'];
$fields['EVENTS'][$countEvent]['4'] = $value['TAS_UID'];
$countEvent = $countEvent + 1;
$fields['TRANSITION'][$countRoutes]['0']= G::generateUniqueID();
$fields['TRANSITION'][$countRoutes]['1']= $evn_uid;
$fields['TRANSITION'][$countRoutes]['2']= $idTask;
$fields['TRANSITION'][$countRoutes]['3']= '2';
$fields['TRANSITION'][$countRoutes]['4']= '1';
$countRoutes = $countRoutes + 1;
}
else if($value['TAS_UID'] == '' && $value['EVN_TAS_UID_FROM'] != '' && ! preg_match("/End/", $value['EVN_TYPE'])){ //Check for Intermediate Events
$evn_uid = $value['EVN_UID'];
$idTask = $value['EVN_TAS_UID_FROM'];
$fields['EVENTS'][$countEvent]['0'] = $value['EVN_UID'];
$fields['EVENTS'][$countEvent]['1'] = $value['EVN_TYPE'];
$fields['EVENTS'][$countEvent]['2'] = $value['EVN_POSX'];
$fields['EVENTS'][$countEvent]['3'] = $value['EVN_POSY'];
$fields['EVENTS'][$countEvent]['4'] = $value['TAS_UID'];
$countEvent = $countEvent + 1;
$fields['TRANSITION'][$countRoutes]['0']= G::generateUniqueID();
$fields['TRANSITION'][$countRoutes]['1']= $idTask;
$fields['TRANSITION'][$countRoutes]['2']= $evn_uid;
$fields['TRANSITION'][$countRoutes]['3']= '1';
$fields['TRANSITION'][$countRoutes]['4']= '2';
$countRoutes = $countRoutes + 1;
}
else if($value['TAS_UID'] == '' && $value['EVN_TAS_UID_FROM'] == '' && $value['EVN_TAS_UID_TO'] == ''){
$fields['EVENTS'][$countEvent]['0'] = $value['EVN_UID'];
$fields['EVENTS'][$countEvent]['1'] = $value['EVN_TYPE'];
$fields['EVENTS'][$countEvent]['2'] = $value['EVN_POSX'];
$fields['EVENTS'][$countEvent]['3'] = $value['EVN_POSY'];
$fields['EVENTS'][$countEvent]['4'] = $value['TAS_UID'];
$countEvent = $countEvent + 1;
}
}
//Get all the standalone Gateway
$countGateway = count($fields['GATEWAYS']);
$countTransitions = count($fields['TRANSITION']);
foreach($oData->gateways as $id => $value) {
if($value['GAT_NEXT_TASK'] != '' && $value['TAS_UID'] != '' && $value['GAT_TYPE'] != ''){
$fields['GATEWAYS'][$countGateway]['0'] = $value['GAT_UID'];
$fields['GATEWAYS'][$countGateway]['1'] = $value['GAT_TYPE'];
$fields['GATEWAYS'][$countGateway]['2'] = $value['GAT_X'];
$fields['GATEWAYS'][$countGateway]['3'] = $value['GAT_Y'];
$fields['GATEWAYS'][$countGateway]['4'] = $value['TAS_UID'];
$fields['GATEWAYS'][$countGateway]['5'] = $value['TAS_UID'];
$countGateway+=1;
$fields['TRANSITION'][$countTransitions]['0'] = G::generateUniqueID();
$fields['TRANSITION'][$countTransitions]['1'] = $value['TAS_UID'];
$fields['TRANSITION'][$countTransitions]['2'] = $value['GAT_UID'];
$fields['TRANSITION'][$countTransitions]['3'] = '1';
$fields['TRANSITION'][$countTransitions]['4'] = '2';
$countTransitions += 1;
$fields['TRANSITION'][$countTransitions]['0'] = G::generateUniqueID();
$fields['TRANSITION'][$countTransitions]['1'] = $value['GAT_UID'];
$fields['TRANSITION'][$countTransitions]['2'] = $value['GAT_NEXT_TASK'];
$fields['TRANSITION'][$countTransitions]['3'] = '2';
$fields['TRANSITION'][$countTransitions]['4'] = '1';
$countTransitions += 1;
}
//creating gateway and route from gateway to task i.e if target task is not NULL
else if($value['GAT_NEXT_TASK'] != '' && $value['TAS_UID'] == ''){
$fields['GATEWAYS'][$countGateway]['0'] = $value['GAT_UID'];
$fields['GATEWAYS'][$countGateway]['1'] = $value['GAT_TYPE'];
$fields['GATEWAYS'][$countGateway]['2'] = $value['GAT_X'];
$fields['GATEWAYS'][$countGateway]['3'] = $value['GAT_Y'];
$fields['GATEWAYS'][$countGateway]['4'] = $value['TAS_UID'];
$fields['GATEWAYS'][$countGateway]['5'] = $value['GAT_NEXT_TASK'];
$fields['TRANSITION'][$countTransitions]['0'] = G::generateUniqueID();
$fields['TRANSITION'][$countTransitions]['1'] = $value['GAT_UID'];
$fields['TRANSITION'][$countTransitions]['2'] = $value['GAT_NEXT_TASK'];
$fields['TRANSITION'][$countTransitions]['3'] = '2';
$fields['TRANSITION'][$countTransitions]['4'] = '1';
$countGateway+=1;
$countTransitions += 1;
}
//creating gateway and route from task to gateway i.e if source task is not NULL
else if($value['GAT_NEXT_TASK'] == '' && $value['TAS_UID'] != ''){
$fields['GATEWAYS'][$countGateway]['0'] = $value['GAT_UID'];
$fields['GATEWAYS'][$countGateway]['1'] = $value['GAT_TYPE'];
$fields['GATEWAYS'][$countGateway]['2'] = $value['GAT_X'];
$fields['GATEWAYS'][$countGateway]['3'] = $value['GAT_Y'];
$fields['GATEWAYS'][$countGateway]['4'] = $value['TAS_UID'];
$fields['GATEWAYS'][$countGateway]['5'] = $value['GAT_NEXT_TASK'];
$fields['TRANSITION'][$countTransitions]['0'] = G::generateUniqueID();
$fields['TRANSITION'][$countTransitions]['1'] = $value['TAS_UID'];
$fields['TRANSITION'][$countTransitions]['2'] = $value['GAT_UID'];
$fields['TRANSITION'][$countTransitions]['3'] = '1';
$fields['TRANSITION'][$countTransitions]['4'] = '2';
$countGateway+=1;
$countTransitions += 1;
}
else if($value['GAT_NEXT_TASK'] == '' && $value['TAS_UID'] == ''){
$fields['GATEWAYS'][$countGateway]['0'] = $value['GAT_UID'];
$fields['GATEWAYS'][$countGateway]['1'] = $value['GAT_TYPE'];
$fields['GATEWAYS'][$countGateway]['2'] = $value['GAT_X'];
$fields['GATEWAYS'][$countGateway]['3'] = $value['GAT_Y'];
$countGateway += 1;
}
}
//Create Annotation route
foreach($oData->lanes as $id => $value)
{
if($value['SWI_NEXT_UID'] != '') {
$fields['TRANSITION'][$countTransitions]['0'] = G::generateUniqueID();
$fields['TRANSITION'][$countTransitions]['1'] = $value['SWI_NEXT_UID'];
$fields['TRANSITION'][$countTransitions]['2'] = $value['SWI_UID'];
$fields['TRANSITION'][$countTransitions]['3'] = '1';
$fields['TRANSITION'][$countTransitions]['4'] = '2';
$countTransitions += 1;
}
}
//$subProcess = $oProcess->createSubProcessesPM($oData->subProcess);
$arrayEvents = $fields['EVENTS'];
$arrayGateways = $fields['GATEWAYS'];
$arrayRoutes = $fields['TRANSITION'];
$data['tasks'] = $arrayTasks;
$data['subprocess'] = $arraySubProcess;
$data['routes'] = $arrayRoutes;
$data['events'] = $arrayEvents;
$data['gateways'] = $arrayGateways;
$data['process'] = $process;
$data['annotations'] = $lanes;
return $data;
}
}

View File

@@ -2609,7 +2609,7 @@ function showCaseSchedulerList(PRO_UID)
function showNewProcessMap(PRO_UID)
{
window.location = "../bpmn/processmap?PRO_UID="+PRO_UID;
window.location = "../bpmnDesigner?id="+PRO_UID;
}
function showLogCaseSchedulerList(PRO_UID)

View File

@@ -48,4 +48,4 @@ if (ReportTables::tableExist()) {
$G_TMP_MENU->AddIdRawOption('DB_CONNECTIONS', '', G::LoadTranslation('ID_DB_CONNECTIONS'),"",'showDbConnectionsList(Pm.options.uid); return false;','','ss_sprite ss_database_connect');
$G_TMP_MENU->AddIdRawOption('CASE_SCHEDULER', '', G::LoadTranslation('ID_CASE_SCHEDULER'), "", 'showCaseSchedulerList(Pm.options.uid); return false;','','ss_sprite ss_calendar_view_day');
$G_TMP_MENU->AddIdRawOption('EDIT_BPMN', '', G::LoadTranslation('ID_SWITCH_EDITOR'), "", 'showNewProcessMap(Pm.options.uid); return false;','','ss_sprite ss_pencil');
$G_TMP_MENU->AddIdRawOption('EDIT_BPMN', '', G::LoadTranslation('ID_SWITCH_EDITOR'), "", 'showNewProcessMap(Pm.options.uid); return false;','','ss_sprite ss_arrow_switch');

View File

@@ -1,62 +0,0 @@
<?php
$oHeadPublisher =& headPublisher::getSingleton();
//$oHeadPublisher->setExtSkin( 'xtheme-gray');
$oHeadPublisher->addExtJsScript('bpmn/MyWorkflow',true ); //adding a javascript file .js
$oHeadPublisher->addExtJsScript('bpmn/pmosExt', true ); //adding a javascript file .js
$oHeadPublisher->addExtJsScript('bpmn/TaskContext', true ); //adding a javascript file .js
$oHeadPublisher->addExtJsScript('bpmn/designer', true ); //adding a javascript file .js
$oHeadPublisher->addExtJsScript('bpmn/Annotation',true );
$oHeadPublisher->addExtJsScript('bpmn/bpmnShapes', true); //
//$oHeadPublisher->addExtJsScript('bpmn/LoopingSubProcess'); //
//$oHeadPublisher->addExtJsScript('bpmn/LoopingTask'); //
//$oHeadPublisher->addExtJsScript('bpmn/Dataobject'); //
//$oHeadPublisher->addExtJsScript('bpmn/Pool',true);
//$oHeadPublisher->addExtJsScript('bpmn/Lane');
$oHeadPublisher->addExtJsScript('bpmn/EventEmptyStart');
$oHeadPublisher->addExtJsScript('bpmn/EventMessageStart');
$oHeadPublisher->addExtJsScript('bpmn/EventTimerStart');
//$oHeadPublisher->addExtJsScript('bpmn/EventRuleStart');
//$oHeadPublisher->addExtJsScript('bpmn/EventSignalStart');
//$oHeadPublisher->addExtJsScript('bpmn/EventMulStart');
//$oHeadPublisher->addExtJsScript('bpmn/EventLinkStart');
$oHeadPublisher->addExtJsScript('bpmn/EventEmptyInter');
$oHeadPublisher->addExtJsScript('bpmn/EventMessageRecInter');
$oHeadPublisher->addExtJsScript('bpmn/EventMessageSendInter');
$oHeadPublisher->addExtJsScript('bpmn/EventTimerInter');
//$oHeadPublisher->addExtJsScript('bpmn/EventBoundaryTimerInter');
//$oHeadPublisher->addExtJsScript('bpmn/EventErrorInter');
//$oHeadPublisher->addExtJsScript('bpmn/EventCompInter');
//$oHeadPublisher->addExtJsScript('bpmn/EventRuleInter');
//$oHeadPublisher->addExtJsScript('bpmn/EventCancelInter');
//$oHeadPublisher->addExtJsScript('bpmn/EventInterSignal');
//$oHeadPublisher->addExtJsScript('bpmn/EventMultipleInter');
//$oHeadPublisher->addExtJsScript('bpmn/EventLinkInter');
$oHeadPublisher->addExtJsScript('bpmn/EventEmptyEnd');
$oHeadPublisher->addExtJsScript('bpmn/EventMessageEnd');
//$oHeadPublisher->addExtJsScript('bpmn/EventErrorEnd');
//$oHeadPublisher->addExtJsScript('bpmn/EventCompEnd');
//$oHeadPublisher->addExtJsScript('bpmn/EventTerminateEnd');
//$oHeadPublisher->addExtJsScript('bpmn/EventEndSignal');
//$oHeadPublisher->addExtJsScript('bpmn/EventMultipleEnd');
//$oHeadPublisher->addExtJsScript('bpmn/EventCancelEnd');
//$oHeadPublisher->addExtJsScript('bpmn/EventLinkEnd');
$oHeadPublisher->addExtJsScript('bpmn/GatewayInclusive' );
$oHeadPublisher->addExtJsScript('bpmn/GatewayExclusiveData' );
//$oHeadPublisher->addExtJsScript('bpmn/GatewayExclusiveEvent' );
$oHeadPublisher->addExtJsScript('bpmn/GatewayParallel' );
//$oHeadPublisher->addExtJsScript('bpmn/GatewayComplex' );
$oHeadPublisher->addExtJsScript('bpmn/GridPanel');
$oHeadPublisher->addExtJsScript('bpmn/SubProcess' );
$oHeadPublisher->addExtJsScript('bpmn/ProcessOptions',true);
$oHeadPublisher->addExtJsScript('bpmn/ProcessMapContext', true );
$oHeadPublisher->addContent( 'bpmn/designer'); //adding a html file .html.
$oHeadPublisher->assign('pro_uid', (isset($_GET['PRO_UID']) ? $_GET['PRO_UID']: ''));
G::RenderPage('publish', 'extJs');

View File

@@ -1,25 +0,0 @@
<?php
if( ! isset($_GET['PRO_UID']) )
throw new Exception('The Process ID was not set!');
require_once 'classes/model/Process.php';
$process = ProcessPeer::retrieveByPK( $_GET['PRO_UID'] );
if( get_class($process) != 'Process' ) {
throw new Exception("The Process with UID: {$_GET['PRO_UID']} doesn't exist!");
}
$processUID = $_GET['PRO_UID'];
$_SESSION['PROCESS'] = $processUID;
$_SESSION['PROCESSMAP'] = 'BPMN';
$oHeadPublisher =& headPublisher::getSingleton();
//$oHeadPublisher->usingExtJs('ux/miframe');
$oHeadPublisher->addExtJsScript('bpmn/ProcessOptions', true);
$oHeadPublisher->addExtJsScript('bpmn/processmap', true);
$oHeadPublisher->addContent( 'bpmn/processmap');
$oHeadPublisher->assign('pro_title', $process->getProTitle());
$oHeadPublisher->assign('pro_uid', $process->getProUid());
G::RenderPage('publish', 'extJs');

View File

@@ -38,15 +38,15 @@ try {
break;
}*/
$oJSON = new Services_JSON();
if ( isset ($_POST['data']) ) {
$oData = $oJSON->decode(stripslashes($_POST['data']));
if ( isset ($_REQUEST['data']) ) {
$oData = $oJSON->decode(stripslashes($_REQUEST['data']));
$sOutput = '';
}
G::LoadClass('processMap');
$oProcessMap = new processMap(new DBConnection);
switch($_POST['action'])
switch($_REQUEST['action'])
{
case 'load':
if ($oData->ct) {
@@ -81,10 +81,10 @@ try {
include(PATH_METHODS . 'processes/processes_webEntryValidate.php');
break;
case 'webEntry_delete':
$form=$_POST;
$form=$_REQUEST;
unlink(PATH_DATA ."sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP. $form['PRO_UID']. PATH_SEP.$form['FILENAME']);
unlink(PATH_DATA ."sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP. $form['PRO_UID']. PATH_SEP .str_replace(".php","Post",$form['FILENAME']).".php");
$oProcessMap->webEntry($_POST['PRO_UID']);
$oProcessMap->webEntry($_REQUEST['PRO_UID']);
break;
case 'webEntry_new':
@@ -194,13 +194,13 @@ try {
$oProcessMap->triggersList($oData->pro_uid);
break;
case 'case_scheduler':
if(isset($_POST['PRO_UID'])){
$oProcessMap->caseSchedulerList($_POST['PRO_UID']);
if(isset($_REQUEST['PRO_UID'])){
$oProcessMap->caseSchedulerList($_REQUEST['PRO_UID']);
}
break;
case 'log_case_scheduler':
if(isset($_POST['PRO_UID'])){
$oProcessMap->logCaseSchedulerList($_POST['PRO_UID']);
if(isset($_REQUEST['PRO_UID'])){
$oProcessMap->logCaseSchedulerList($_REQUEST['PRO_UID']);
}
break;
case 'messages':
@@ -305,7 +305,7 @@ try {
$oProcessMap->processFilesManager($oData->pro_uid);
break;
case 'exploreDirectory':
$objData = json_decode($_POST['data']);
$objData = json_decode($_REQUEST['data']);
$_SESSION['PFMDirectory'] = $objData->{'main_directory'};
$oProcessMap->exploreDirectory($oData->pro_uid, $oData->main_directory, $oData->directory);
break;
@@ -421,30 +421,30 @@ try {
break;
case 'editFile':
//echo $_POST['filename'];
//echo $_REQUEST['filename'];
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
///-- $sDirectory = PATH_DATA_MAILTEMPLATES . $_POST['pro_uid'] . PATH_SEP . $_POST['filename'];
///-- $sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
$sDir = "";
if(isset($_SESSION['PFMDirectory']))
$sDir = $_SESSION['PFMDirectory'];
switch($sDir){
case 'mailTemplates' : $sDirectory = PATH_DATA_MAILTEMPLATES . $_POST['pro_uid'] . PATH_SEP . $_POST['filename'];
case 'mailTemplates' : $sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
break;
case 'public' : $sDirectory = PATH_DATA_PUBLIC . $_POST['pro_uid'] . PATH_SEP . $_POST['filename'];
case 'public' : $sDirectory = PATH_DATA_PUBLIC . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
break;
default : $sDirectory = PATH_DATA_MAILTEMPLATES . $_POST['pro_uid'] . PATH_SEP . $_POST['filename'];
default : $sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
break;
}
$fcontent = file_get_contents($sDirectory);
$extion=explode(".",$_POST['filename']);
$extion=explode(".",$_REQUEST['filename']);
//if($extion[count($extion)-1]=='html' || $extion[count($extion)-1]=='txt'){
$aData = Array(
'pro_uid'=>$_POST['pro_uid'],
'pro_uid'=>$_REQUEST['pro_uid'],
'fcontent'=>$fcontent,
'filename'=>$_POST['filename'],
'filename'=>$_REQUEST['filename'],
);
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'processes/processes_FileEdit', '', $aData);
G::RenderPage('publish', 'raw');
@@ -458,18 +458,18 @@ try {
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$sDir = "";
if(isset($_POST['MAIN_DIRECTORY']))
$sDir = $_POST['MAIN_DIRECTORY'];
if(isset($_REQUEST['MAIN_DIRECTORY']))
$sDir = $_REQUEST['MAIN_DIRECTORY'];
switch($sDir){
case 'mailTemplates' : $sDirectory = PATH_DATA_MAILTEMPLATES . $_POST['pro_uid'] . PATH_SEP . $_POST['filename'];
case 'mailTemplates' : $sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
break;
case 'public' : $sDirectory = PATH_DATA_PUBLIC . $_POST['pro_uid'] . PATH_SEP . $_POST['filename'];
case 'public' : $sDirectory = PATH_DATA_PUBLIC . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
break;
default : $sDirectory = PATH_DATA_MAILTEMPLATES . $_POST['pro_uid'] . PATH_SEP . $_POST['filename'];
default : $sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
break;
}
$fp = fopen($sDirectory, 'w');
$content = stripslashes($_POST['fcontent']);
$content = stripslashes($_REQUEST['fcontent']);
$content = str_replace("@amp@", "&", $content);
fwrite($fp, $content);
fclose($fp);
@@ -482,10 +482,10 @@ try {
case 'saveFile':
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$sDirectory = PATH_DATA_MAILTEMPLATES . $_POST['pro_uid'] . PATH_SEP . $_POST['filename'];
$sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
$fp = fopen($sDirectory, 'w');
$content = stripslashes($_POST['fcontent']);
$content = stripslashes($_REQUEST['fcontent']);
$content = str_replace("@amp@", "&", $content);
fwrite($fp, $content);
fclose($fp);

View File

@@ -3111,7 +3111,7 @@ ul#pm_submenu a{
}
ul#pm_submenu a img{
float:left;
max-height: 18px;sudo
max-height: 18px;
}
ul#pm_submenu li.SelectedSubMenu,ul#pm_submenu li:hover{
background-color: #CCC;

View File

@@ -1033,7 +1033,7 @@ MyWorkflow.prototype.savePosition= function(oShape)
}
if(urlparams != ''){
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
//Ext.Msg.alert (response.responseText);
},
@@ -1120,7 +1120,7 @@ MyWorkflow.prototype.saveShape= function(oNewShape)
if(urlparams != ''){
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
//Ext.Msg.alert (response.responseText);
if(response.responseText != 1 && response.responseText != ""){
@@ -1150,9 +1150,9 @@ MyWorkflow.prototype.saveShape= function(oNewShape)
* erik: Setting Drop targets from users & groups grids to assignment to tasks
* for new tasks created recently
*/
var dropEls = Ext.get('paintarea').query('.x-task');
for(var i = 0; i < dropEls.length; i++)
new Ext.dd.DropTarget(dropEls[i], {ddGroup:'task-assignment', notifyDrop : Ext.getCmp('usersPanel')._onDrop});
//var dropEls = Ext.get('paintarea').query('.x-task');
//for(var i = 0; i < dropEls.length; i++)
//new Ext.dd.DropTarget(dropEls[i], {ddGroup:'task-assignment', notifyDrop : Ext.getCmp('usersPanel')._onDrop});
}
else if(oNewShape.type == 'bpmnSubProcess'){
@@ -1196,7 +1196,7 @@ MyWorkflow.prototype.saveTask= function(actiontype,xpos,ypos)
break;
}
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
//Ext.Msg.alert (response.responseText);
if(response.responseText != 1 && response.responseText != "") {
@@ -1234,7 +1234,7 @@ MyWorkflow.prototype.deleteSilently= function(oShape)
}
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
//Ext.Msg.alert (response.responseText);
},
@@ -1341,7 +1341,7 @@ MyWorkflow.prototype.showAjaxDialog = function(btn){
}
}
Ext.Ajax.request({
url: "processes_Ajax.php"+ url,
url: "processes/processes_Ajax.php"+ url,
success: function(response) {
workflow.getCommandStack().execute(new CommandDelete(currentObj));
},
@@ -1490,7 +1490,7 @@ MyWorkflow.prototype.saveGateways = function(oGateway){
urlparams = '?action=addGateway&data={"pro_uid":"'+ pro_uid +'","tas_from":"'+task_uid+'","tas_to":"'+next_task_uid+'","gat_type":"'+oGateway.type+'","gat_uid":"'+oGateway.id+'","gat_next_type":"'+next_task_type+'","position":'+pos+'}';
if(urlparams != ''){
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
if(response.responseText != '')
{
@@ -1578,7 +1578,7 @@ MyWorkflow.prototype.saveEvents = function(oEvent,sTaskUID)
if(urlparams != '') {
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
if(response.responseText != '')
{
@@ -1717,7 +1717,7 @@ MyWorkflow.prototype.saveRoute = function(preObj,newObj)
if(task_uid.length > 0 && next_task_uid.length > 0)
{
Ext.Ajax.request({
url: "patterns_Ajax.php",
url: "bpmn/patterns_Ajax.php",
success: function(response) {
if(response.responseText != 0) {
if(typeof newObj.conn != 'undefined') {
@@ -1781,7 +1781,7 @@ MyWorkflow.prototype.showEventResult = function(btn){
if(btn == 'yes')
{
Ext.Ajax.request({
url: "processes_Ajax.php"+ url,
url: "processes/processes_Ajax.php"+ url,
success: function(response) {
workflow.getCommandStack().execute(new CommandDelete(workflow.oConn));
},
@@ -1804,7 +1804,7 @@ MyWorkflow.prototype.deleteEvent = function(eventObj){
if(event_uid != '') {
var urlparams = '?action=deleteEvent&data={"uid":"'+ event_uid +'"}';
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
},
failure: function(){

View File

@@ -94,7 +94,7 @@ ProcessMapContext.prototype.editProcess= function()
pro_debug = 0;
var urlparams = '?action=saveProcess&data={"PRO_UID":"'+ pro_uid +'","PRO_CALENDAR":"'+ pro_calendar +'","PRO_CATEGORY":"'+ pro_category +'","PRO_DEBUG":"'+ pro_debug +'","PRO_DESCRIPTION":"'+ pro_description +'","PRO_TITLE":"'+ pro_title +'"}';
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
PMExt.notify( _('ID_STATUS') , _('ID_PROCESS_SAVE') );
window.hide();
@@ -113,7 +113,7 @@ ProcessMapContext.prototype.editProcess= function()
});
editProcess.form.load({
url:'proxyExtjs.php?pid='+pro_uid+'&action=process_Edit',
url:'bpmn/proxyExtjs.php?pid='+pro_uid+'&action=process_Edit',
method:'GET',
waitMsg:'Loading',
success:function(form, action) {
@@ -321,7 +321,7 @@ ProcessMapContext.prototype.processPermission= function()
}
var opUID = rowSelected[0].get('OP_UID');
PermissionForm.form.load({
url:'proxyExtjs.php?pid='+pro_uid+'&op_uid=' +opUID+'&action=editObjectPermission',
url:'bpmn/proxyExtjs.php?pid='+pro_uid+'&op_uid=' +opUID+'&action=editObjectPermission',
method:'GET',
waitMsg:'Loading',
success:function(form, action) {
@@ -402,7 +402,7 @@ ProcessMapContext.prototype.processPermission= function()
remoteSort : true,
fields : dbConnFields,
proxy : new Ext.data.HttpProxy({
url: 'proxyExtjs.php?pid='+pro_uid+'&action=getObjectPermission'
url: 'bpmn/proxyExtjs.php?pid='+pro_uid+'&action=getObjectPermission'
})
});
PermissionStore.load({params:{start:0, limit:10}});
@@ -414,7 +414,7 @@ ProcessMapContext.prototype.processPermission= function()
remoteSort : true,
fields : selectField,
proxy: new Ext.data.HttpProxy({
url: 'proxyExtjs.php?pid='+pro_uid+'&action=getObjectPermissionType&objectType=tasks'
url: 'bpmn/proxyExtjs.php?pid='+pro_uid+'&action=getObjectPermissionType&objectType=tasks'
})
});
@@ -425,7 +425,7 @@ ProcessMapContext.prototype.processPermission= function()
remoteSort : true,
fields : selectField,
proxy: new Ext.data.HttpProxy({
url: 'proxyExtjs.php?pid='+pro_uid+'&action=getObjectPermissionType&objectType=users'
url: 'bpmn/proxyExtjs.php?pid='+pro_uid+'&action=getObjectPermissionType&objectType=users'
})
});
@@ -436,7 +436,7 @@ ProcessMapContext.prototype.processPermission= function()
remoteSort : true,
fields : selectField,
proxy: new Ext.data.HttpProxy({
url: 'proxyExtjs.php?pid='+pro_uid+'&action=getObjectPermissionType&objectType=dynaform'
url: 'bpmn/proxyExtjs.php?pid='+pro_uid+'&action=getObjectPermissionType&objectType=dynaform'
})
});
@@ -447,7 +447,7 @@ ProcessMapContext.prototype.processPermission= function()
remoteSort : true,
fields : selectField,
proxy: new Ext.data.HttpProxy({
url: 'proxyExtjs.php?pid='+pro_uid+'&action=getObjectPermissionType&objectType=input'
url: 'bpmn/proxyExtjs.php?pid='+pro_uid+'&action=getObjectPermissionType&objectType=input'
})
});
@@ -458,7 +458,7 @@ ProcessMapContext.prototype.processPermission= function()
remoteSort : true,
fields : selectField,
proxy: new Ext.data.HttpProxy({
url: 'proxyExtjs.php?pid='+pro_uid+'&action=getObjectPermissionType&objectType=output'
url: 'bpmn/proxyExtjs.php?pid='+pro_uid+'&action=getObjectPermissionType&objectType=output'
})
});
@@ -1044,7 +1044,7 @@ ProcessMapContext.prototype.processSupervisors= function()
if(r.data.PU_UID != "")
{
Ext.Ajax.request({
url : 'processes_Ajax.php'+urlparams,
url : 'processes/processes_Ajax.php'+urlparams,
method: 'GET',
success: function(response) {
PMExt.notify( _('ID_STATUS') , _('ID_SUPERVISOR_REMOVED') );
@@ -1074,7 +1074,7 @@ ProcessMapContext.prototype.processSupervisors= function()
remoteSort : true,
fields : processUserFields,
proxy: new Ext.data.HttpProxy({
url: 'proxyExtjs?pid='+pro_uid+'&action=process_Supervisors'
url: 'bpmn/proxyExtjs?pid='+pro_uid+'&action=process_Supervisors'
})
});
processUser.load({params:{start:0, limit:10}});
@@ -1082,7 +1082,7 @@ ProcessMapContext.prototype.processSupervisors= function()
// create the Data Store of users that are not assigned to a process supervisor
var availableProcessesUser = new Ext.data.JsonStore({
root : 'data',
url : 'proxyExtjs?pid='+pro_uid+'&action=availableProcessesSupervisors',
url : 'bpmn/proxyExtjs?pid='+pro_uid+'&action=availableProcessesSupervisors',
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : false, //true,
@@ -1174,7 +1174,7 @@ ProcessMapContext.prototype.processSupervisors= function()
var urlparams = '?action=assignProcessUser&data={"PRO_UID":"'+pro_uid+'","USR_UID":"'+userID+'"}';
Ext.Ajax.request({
url: 'processes_Ajax.php'+urlparams,
url: 'processes/processes_Ajax.php'+urlparams,
method: 'GET',
success: function (response) { // When saving data success
PMExt.notify( _('ID_STATUS') , _('ID_SUPERVISOR_ASSIGNED') );
@@ -1302,7 +1302,7 @@ ProcessMapContext.prototype.processDynaform= function()
remoteSort : true,
fields : supervisorDynaformsFields,
proxy: new Ext.data.HttpProxy({
url: 'proxyExtjs?pid='+pro_uid+'&action=supervisorDynaforms'
url: 'bpmn/proxyExtjs?pid='+pro_uid+'&action=supervisorDynaforms'
})
});
supervisorDynaforms.load({params:{start : 0 , limit : 10 }});
@@ -1310,7 +1310,7 @@ ProcessMapContext.prototype.processDynaform= function()
// create the Data Store of users that are not assigned to a process supervisor
var availableSupervisorDynaforms = new Ext.data.JsonStore({
root : 'data',
url : 'proxyExtjs?pid='+pro_uid+'&action=availableSupervisorDynaforms',
url : 'bpmn/proxyExtjs?pid='+pro_uid+'&action=availableSupervisorDynaforms',
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : false, //true,
@@ -1526,7 +1526,7 @@ ProcessMapContext.prototype.processIODoc = function()
remoteSort : true,
fields : supervisorInputDocFields,
proxy: new Ext.data.HttpProxy({
url: 'proxyExtjs?pid='+pro_uid+'&action=supervisorInputDoc'
url: 'bpmn/proxyExtjs?pid='+pro_uid+'&action=supervisorInputDoc'
})
});
supervisorInputDoc.load({params:{start : 0 , limit : 10 }});
@@ -1534,7 +1534,7 @@ ProcessMapContext.prototype.processIODoc = function()
// create the Data Store of users that are not assigned to a process supervisor
var availableSupervisorInputDoc = new Ext.data.JsonStore({
root : 'data',
url : 'proxyExtjs?pid='+pro_uid+'&action=availableSupervisorInputDoc',
url : 'bpmn/proxyExtjs?pid='+pro_uid+'&action=availableSupervisorInputDoc',
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : false, //true,
@@ -1779,7 +1779,7 @@ ProcessMapContext.prototype.caseTrackerProperties= function()
});
PropertiesForm.form.load({
url:'proxyExtjs.php?pid='+pro_uid+'&action=getCaseTracker',
url:'bpmn/proxyExtjs.php?pid='+pro_uid+'&action=getCaseTracker',
method:'GET',
waitMsg:'Loading',
success:function(form, action) {
@@ -1954,14 +1954,14 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
remoteSort : true,
fields : ObjectFields,
proxy : new Ext.data.HttpProxy({
url : 'proxyExtjs?pid='+pro_uid+'&action=getAssignedCaseTrackerObjects'
url : 'bpmn/proxyExtjs?pid='+pro_uid+'&action=getAssignedCaseTrackerObjects'
})
});
assignedStore.load({params:{start : 0 , limit : 10 }});
var availableStore = new Ext.data.JsonStore({
root : 'data',
url : 'proxyExtjs?pid='+pro_uid+'&action=getAvailableCaseTrackerObjects',
url : 'bpmn/proxyExtjs?pid='+pro_uid+'&action=getAvailableCaseTrackerObjects',
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : false, //true,
@@ -2169,7 +2169,7 @@ ProcessMapContext.prototype.ExtVariables = function()
remoteSort : true,
fields : varFields,
proxy : new Ext.data.HttpProxy({
url : 'proxyExtjs?pid='+pro_uid+'&action=getVariables&sFieldName=form[CTO_CONDITION]&sSymbol=@@'
url : 'bpmn/proxyExtjs?pid='+pro_uid+'&action=getVariables&sFieldName=form[CTO_CONDITION]&sSymbol=@@'
})
});
//varStore.load();
@@ -2215,7 +2215,7 @@ ProcessMapContext.prototype.ExtVariables = function()
listeners: {
activate: function(tabPanel){
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
var link = 'proxyExtjs?pid='+pro_uid+'&action=getVariables&type='+tabPanel.id+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
var link = 'bpmn/proxyExtjs?pid='+pro_uid+'&action=getVariables&type='+tabPanel.id+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
varStore.proxy.setUrl(link, true);
varStore.load();
}
@@ -2329,7 +2329,7 @@ ProcessMapContext.prototype.ExtVariables = function()
listeners:{
activate: function(tabPanel){
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
var link = 'proxyExtjs?pid='+pro_uid+'&action=getVariables&type='+tabPanel.id+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
var link = 'bpmn/proxyExtjs?pid='+pro_uid+'&action=getVariables&type='+tabPanel.id+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
varStore.proxy.setUrl(link, true);
varStore.load();
}
@@ -2402,7 +2402,7 @@ ProcessMapContext.prototype.ExtVariables = function()
listeners: {
activate: function(tabPanel){
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
var link = 'proxyExtjs?pid='+pro_uid+'&action=getVariables&type='+tabPanel.id+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
var link = 'bpmn/proxyExtjs?pid='+pro_uid+'&action=getVariables&type='+tabPanel.id+'&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
varStore.proxy.setUrl(link, true);
varStore.load();
}

View File

@@ -44,9 +44,11 @@ ProcessOptions.prototype.addDynaform= function(_5625)
var editDynaform = function() {
var rowSelected = Ext.getCmp('dynaformGrid').getSelectionModel().getSelected();
if( rowSelected )
location.href = '../dynaforms/dynaforms_Editor?PRO_UID='+pro_uid+'&DYN_UID='+rowSelected.data.DYN_UID+'&bpmn=1'
else
if( rowSelected ) {
//location.href = '../dynaforms/dynaforms_Editor?PRO_UID='+pro_uid+'&DYN_UID='+rowSelected.data.DYN_UID+'&bpmn=1'
var url = 'dynaforms/dynaforms_Editor?PRO_UID='+pro_uid+'&DYN_UID='+rowSelected.data.DYN_UID+'&bpmn=1';
Ext.getCmp('mainTabPanel')._addTabFrame(rowSelected.data.DYN_UID, rowSelected.data.DYN_TITLE, url);
} else
PMExt.error('', _('ID_NO_SELECTION_WARNING'));
}
@@ -159,7 +161,7 @@ ProcessOptions.prototype.addDynaform= function(_5625)
fields : dynaFields
}),
proxy : new Ext.data.HttpProxy({
url: 'proxyExtjs?pid='+pro_uid+'&action=getDynaformList'
url: 'bpmn/proxyExtjs?pid='+pro_uid+'&action=getDynaformList'
})
//sortInfo:{field: 'DYN_TITLE', direction: "ASC"}
});
@@ -179,7 +181,7 @@ ProcessOptions.prototype.addDynaform= function(_5625)
remoteSort : true,
fields : additionalTablesFields,
proxy: new Ext.data.HttpProxy({
url: 'proxyExtjs?action=getAdditionalTables'
url: 'bpmn/proxyExtjs?action=getAdditionalTables'
})
});
additionalTables.load();
@@ -298,6 +300,7 @@ ProcessOptions.prototype.addDynaform= function(_5625)
//connecting context menu to grid
dynaformGrid.addListener('rowcontextmenu', onDynaformsContextMenu,this);
dynaformGrid.addListener('rowdblclick', editDynaform,this);
//by default the right click is not selecting the grid row over the mouse
//we need to set this four lines
@@ -456,7 +459,7 @@ ProcessOptions.prototype.addDynaform= function(_5625)
// value : '---------------------------',
// store : additionalTables,
// onSelect: function(record, index){
// var link = 'proxyExtjs?tabId='+record.data.ADD_TAB_UID+'&action=getPMTableDynaform';
// var link = 'bpmn/proxyExtjs?tabId='+record.data.ADD_TAB_UID+'&action=getPMTableDynaform';
// tablesFieldsStore.proxy.setUrl(link, true);
// tablesFieldsStore.load();
//
@@ -539,7 +542,7 @@ ProcessOptions.prototype.addDynaform= function(_5625)
else
{
Ext.Ajax.request({
url : '../dynaforms/dynaforms_Save.php',
url : 'dynaforms/dynaforms_Save.php',
method: 'POST',
params:{
functions : 'saveDynaform',
@@ -641,7 +644,7 @@ ProcessOptions.prototype.dbConnection = function()
}
var dbConnUID = rowSelected[0].get('DBS_UID');
dbconnForm.form.load({
url :'proxyExtjs.php?pid='+pro_uid+'&dbs_uid='+dbConnUID+'&action=editDatabaseConnection',
url :'bpmn/proxyExtjs.php?pid='+pro_uid+'&dbs_uid='+dbConnUID+'&action=editDatabaseConnection',
method: 'GET',
waitMsg:'Loading',
success:function(form, action) {
@@ -722,7 +725,7 @@ ProcessOptions.prototype.dbConnection = function()
remoteSort : true,
fields : dbConnFields,
proxy: new Ext.data.HttpProxy({
url: 'proxyExtjs.php?pid='+pro_uid+'&action=getDatabaseConnectionList'
url: 'bpmn/proxyExtjs.php?pid='+pro_uid+'&action=getDatabaseConnectionList'
})
});
dbStore.load({params:{start : 0 , limit : 10 }});
@@ -1274,7 +1277,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
}
var inputDocUID = rowSelected[0].get('INP_DOC_UID');
inputDocForm.form.load({
url : 'proxyExtjs.php?INP_DOC_UID=' +inputDocUID+'&action=editInputDocument',
url : 'bpmn/proxyExtjs.php?INP_DOC_UID=' +inputDocUID+'&action=editInputDocument',
method : 'GET',
waitMsg : 'Loading',
success : function(form, action) {
@@ -1375,7 +1378,7 @@ ProcessOptions.prototype.addInputDoc= function(_5625)
remoteSort : true,
fields : inpDocFields,
proxy: new Ext.data.HttpProxy({
url: 'proxyExtjs?pid='+pro_uid+'&action=getInputDocumentList'
url: 'bpmn/proxyExtjs?pid='+pro_uid+'&action=getInputDocumentList'
})
});
inputDocStore.load({params:{start : 0 , limit : 10}});
@@ -2031,7 +2034,7 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
window.show();
top.form.load({
url :'processes_Ajax.php?OUT_DOC_UID='+outputDocUID+'&action=getOutputDocsTemplates',
url :'processes/processes_Ajax.php?OUT_DOC_UID='+outputDocUID+'&action=getOutputDocsTemplates',
method: 'GET',
waitMsg:'Loading',
success:function(form, action) {
@@ -2096,7 +2099,7 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
}
var outputDocUID = rowSelected[0].get('OUT_DOC_UID');
outputDocForm.form.load({
url :'proxyExtjs.php?tid='+outputDocUID+'&action=editOutputDocument',
url :'bpmn/proxyExtjs.php?tid='+outputDocUID+'&action=editOutputDocument',
method: 'GET',
waitMsg:'Loading',
success:function(form, action) {
@@ -2144,7 +2147,7 @@ ProcessOptions.prototype.addOutputDoc= function(_5625)
remoteSort : true,
fields : outputDocFields,
proxy : new Ext.data.HttpProxy({
url: 'proxyExtjs?pid='+pro_uid+'&action=getOutputDocument'
url: 'bpmn/proxyExtjs?pid='+pro_uid+'&action=getOutputDocument'
})
});
outputDocStore.load({params:{start : 0 , limit : 10 }});
@@ -2681,7 +2684,7 @@ ProcessOptions.prototype.addReportTable= function(_5625)
}
var repTabUID = rowSelected[0].get('REP_TAB_UID');
reportForm.form.load({
url :'proxyExtjs.php?pid='+pro_uid+'&REP_TAB_UID=' +repTabUID+'&action=editReportTables',
url :'bpmn/proxyExtjs.php?pid='+pro_uid+'&REP_TAB_UID=' +repTabUID+'&action=editReportTables',
method: 'GET',
waitMsg:'Loading',
success:function(form, action) {
@@ -2757,7 +2760,7 @@ ProcessOptions.prototype.addReportTable= function(_5625)
remoteSort : true,
fields : reportFields,
proxy : new Ext.data.HttpProxy({
url : 'proxyExtjs?pid='+pro_uid+'&action=getReportTables'
url : 'bpmn/proxyExtjs?pid='+pro_uid+'&action=getReportTables'
})
});
reportStore.load({params:{start : 0 , limit : 10 }});
@@ -2769,7 +2772,7 @@ ProcessOptions.prototype.addReportTable= function(_5625)
remoteSort : true,
fields : reportFields,
proxy : new Ext.data.HttpProxy({
url : 'proxyExtjs?pid='+pro_uid+'&type=NORMAL&action=getReportTableType'
url : 'bpmn/proxyExtjs?pid='+pro_uid+'&type=NORMAL&action=getReportTableType'
})
});
reportTableTypeStore.load();
@@ -2933,7 +2936,7 @@ var reportForm =new Ext.FormPanel({
Ext.getCmp("gridfields").show();
Ext.getCmp("fields").hide();
}
var link = 'proxyExtjs?pid='+pro_uid+'&type='+record.data.value+'&action=getReportTableType';
var link = 'bpmn/proxyExtjs?pid='+pro_uid+'&type='+record.data.value+'&action=getReportTableType';
reportTableTypeStore.proxy.setUrl(link, true);
reportTableTypeStore.load();
@@ -3110,7 +3113,7 @@ ProcessOptions.prototype.addTriggers = function()
}
var triggerUID = rowSelected[0].get('TRI_UID');
editTriggerForm.getForm().load({
url :'proxyExtjs.php?pid='+pro_uid+'&TRI_UID='+triggerUID+'&action=editTriggers',
url :'bpmn/proxyExtjs.php?pid='+pro_uid+'&TRI_UID='+triggerUID+'&action=editTriggers',
method: 'GET',
waitMsg:'Loading',
success:function(form, action) {
@@ -3133,7 +3136,7 @@ ProcessOptions.prototype.addTriggers = function()
var triggerUID = rowSelected[0].get('TRI_UID');
//editPropertiesFormWindow.show();
editPropertiesForm.form.load({
url :'proxyExtjs.php?pid='+pro_uid+'&TRI_UID='+triggerUID+'&action=editTriggers',
url :'bpmn/proxyExtjs.php?pid='+pro_uid+'&TRI_UID='+triggerUID+'&action=editTriggers',
method: 'GET',
waitMsg:'Loading',
success:function(form, action) {
@@ -3176,7 +3179,7 @@ ProcessOptions.prototype.addTriggers = function()
if( result.passed ) { //deleting the selected triggers
PMExt.confirm(_('ID_CONFIRM'), _('ID_DELETE_TRIGGER_CONFIRM'), function(){
Ext.Ajax.request({
url : 'processes_Ajax.php',
url : 'processes/processes_Ajax.php',
method: 'POST',
params: {
action : 'deleteTriggers',
@@ -3234,7 +3237,7 @@ ProcessOptions.prototype.addTriggers = function()
fields : triggerFields
}),
proxy : new Ext.data.HttpProxy({
url: 'proxyExtjs?pid='+pro_uid+'&action=getTriggersList'
url: 'bpmn/proxyExtjs?pid='+pro_uid+'&action=getTriggersList'
})
});
triggerStore.load({params:{start:0, limit:10}});
@@ -3699,7 +3702,7 @@ var PMVariables = function() {
remoteSort : true,
fields : varFields,
proxy : new Ext.data.HttpProxy( {
url : 'proxyExtjs?pid=' + pro_uid + '&action=getVariables&sFieldName=form[CTO_CONDITION]&sSymbol=@@'
url : 'bpmn/proxyExtjs?pid=' + pro_uid + '&action=getVariables&sFieldName=form[CTO_CONDITION]&sSymbol=@@'
})
});
//varStore.load();
@@ -3743,7 +3746,7 @@ var PMVariables = function() {
listeners : {
activate : function(tabPanel) {
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
var link = 'proxyExtjs?pid=' + pro_uid + '&action=getVariables&type=' + tabPanel.id + '&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
var link = 'bpmn/proxyExtjs?pid=' + pro_uid + '&action=getVariables&type=' + tabPanel.id + '&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
varStore.proxy.setUrl(link, true);
varStore.load();
}
@@ -3852,7 +3855,7 @@ var PMVariables = function() {
listeners : {
activate : function(tabPanel) {
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
var link = 'proxyExtjs?pid=' + pro_uid + '&action=getVariables&type=' + tabPanel.id + '&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
var link = 'bpmn/proxyExtjs?pid=' + pro_uid + '&action=getVariables&type=' + tabPanel.id + '&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
varStore.proxy.setUrl(link, true);
varStore.load();
}
@@ -3922,7 +3925,7 @@ var PMVariables = function() {
listeners : {
activate : function(tabPanel) {
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
var link = 'proxyExtjs?pid=' + pro_uid + '&action=getVariables&type=' + tabPanel.id + '&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
var link = 'bpmn/proxyExtjs?pid=' + pro_uid + '&action=getVariables&type=' + tabPanel.id + '&sFieldName=form[CTO_CONDITION]&sSymbol=@@';
varStore.proxy.setUrl(link, true);
varStore.load();
}

View File

@@ -126,7 +126,7 @@ TaskContext.prototype.editTaskSteps = function(_3252){
remoteSort : true,
fields : stepsFields,
proxy : new Ext.data.HttpProxy({
url : 'proxyExtjs?tid='+taskId+'&action=getAssignedSteps'
url : 'bpmn/proxyExtjs?tid='+taskId+'&action=getAssignedSteps'
})
});
taskSteps.load({params:{start : 0 , limit : 10 }});
@@ -134,7 +134,7 @@ TaskContext.prototype.editTaskSteps = function(_3252){
// create the Data Store of all Steps that are not been assigned to a task i.e available steps
var availableSteps = new Ext.data.JsonStore({
root : 'data',
url : 'proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&action=getAvailableSteps',
url : 'bpmn/proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&action=getAvailableSteps',
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : false,
@@ -515,7 +515,7 @@ TaskContext.prototype.editUsers= function()
if(r.data.USR_UID != "")
{
Ext.Ajax.request({
url : 'processes_Ajax.php' +urlparams ,
url : 'processes/processes_Ajax.php' +urlparams ,
success: function(response) {
PMExt.notify( _('ID_STATUS') , _('ID_USERS_REMOVED') );
//Secondly deleting from Grid
@@ -544,7 +544,7 @@ TaskContext.prototype.editUsers= function()
remoteSort : true,
fields : userFields,
proxy: new Ext.data.HttpProxy({
url: 'proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&action=getAssignedUsersList'
url: 'bpmn/proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&action=getAssignedUsersList'
})
});
taskUsers.setDefaultSort('LABEL', 'asc');
@@ -553,7 +553,7 @@ TaskContext.prototype.editUsers= function()
// create the Data Store of users that are not assigned to a task
var storeUsers = new Ext.data.JsonStore({
root : 'data',
url : 'proxyExtjs?tid='+taskId+'&action=getAvailableUsersList',
url : 'bpmn/proxyExtjs?tid='+taskId+'&action=getAvailableUsersList',
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : false, //true,
@@ -653,7 +653,7 @@ TaskContext.prototype.editUsers= function()
var urlparams = '?action=assign&data={"TAS_UID":"'+taskId+'","USR_UID":"'+userId+'","TU_TYPE":"'+tu_Type+'","TU_RELATION":"'+tu_Relation+'"}';
Ext.Ajax.request({
url: 'processes_Ajax.php' +urlparams ,
url: 'processes/processes_Ajax.php' +urlparams ,
success: function (response) { // When saving data success
PMExt.notify( _('ID_STATUS') , _('ID_USER_ASSIGNED') );
},
@@ -670,7 +670,7 @@ TaskContext.prototype.editUsers= function()
var user_TUtype = record.json.TU_TYPE;
urlparams = '?action=ofToAssign&data={"TAS_UID":"'+taskId+'","TU_RELATION":"'+user_TURel+'","USR_UID":"'+userUID+'","TU_TYPE":"'+user_TUtype+'"}';
Ext.Ajax.request({
url : 'processes_Ajax.php' +urlparams ,
url : 'processes/processes_Ajax.php' +urlparams ,
success: function(response) {
//Ext.MessageBox.alert ('Status','User has been updated successfully.');
}
@@ -1263,7 +1263,7 @@ TaskContext.prototype.editTaskProperties= function()
//Loading Task Details into the form
taskPropertiesTabs.form.load({
url:'proxyExtjs.php?tid='+taskId+'&action=getTaskPropertiesList',
url:'bpmn/proxyExtjs.php?tid='+taskId+'&action=getTaskPropertiesList',
method:'GET',
waitMsg:'Loading',
success:function(form, action) {
@@ -1487,7 +1487,7 @@ TaskContext.prototype.stepTriggers = function()
beforeload: {
fn: function (store, options) {
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
var link = 'proxyExtjs?tid='+taskId+'&stepid='+sStepUID+'&action=getAssignedStepTriggers';
var link = 'bpmn/proxyExtjs?tid='+taskId+'&stepid='+sStepUID+'&action=getAssignedStepTriggers';
store.proxy.setUrl(link, true);
}
}
@@ -1497,7 +1497,7 @@ TaskContext.prototype.stepTriggers = function()
beforeload: {
fn: function (store, options) {
// use {@link Ext.data.HttpProxy#setUrl setUrl} to change the URL for *just* this request.
var link = 'proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&stepid='+sStepUID+'&action=getAvailableStepTriggers';
var link = 'bpmn/proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&stepid='+sStepUID+'&action=getAvailableStepTriggers';
store.proxy.setUrl(link, true);
}
}
@@ -1608,7 +1608,7 @@ TaskContext.prototype.stepTriggers = function()
// create the Data Store of users that are already assigned to a task
var stepsTriggers = new Ext.data.JsonStore({
root : 'data',
url : 'proxyExtjs?tid='+taskId+'&action=',//+'&stepid='+workflow.selectedStepUID,
url : 'bpmn/proxyExtjs?tid='+taskId+'&action=',//+'&stepid='+workflow.selectedStepUID,
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : true,
@@ -1619,7 +1619,7 @@ TaskContext.prototype.stepTriggers = function()
var availableTriggers = new Ext.data.JsonStore({
root : 'data',
url : 'proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&action=',//+'&stepid='+workflow.selectedStepUID,
url : 'bpmn/proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&action=',//+'&stepid='+workflow.selectedStepUID,
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : false, //true,
@@ -1835,7 +1835,7 @@ TaskContext.prototype.editUsersAdHoc= function()
remoteSort : true,
fields : userFields,
proxy: new Ext.data.HttpProxy({
url: 'proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&action=assignedUsers'
url: 'bpmn/proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&action=assignedUsers'
})
});
//taskUsers.setDefaultSort('LABEL', 'asc');
@@ -1844,7 +1844,7 @@ TaskContext.prototype.editUsersAdHoc= function()
// create the Data Store of users that are not assigned to a task
var storeUsers = new Ext.data.JsonStore({
root : 'data',
url : 'proxyExtjs?tid='+taskId+'&action=availableUsers',
url : 'bpmn/proxyExtjs?tid='+taskId+'&action=availableUsers',
totalProperty : 'totalCount',
idProperty : 'gridIndex',
remoteSort : false, //true,
@@ -1905,7 +1905,7 @@ TaskContext.prototype.editUsersAdHoc= function()
if(r.data.USR_UID != "")
{
Ext.Ajax.request({
url : 'processes_Ajax.php' +urlparams ,
url : 'processes/processes_Ajax.php' +urlparams ,
/*method: 'POST',
params: {
functions : 'ofToAssign',
@@ -2218,7 +2218,7 @@ TaskContext.prototype.editSubProcessProperties= function(_3525)
remoteSort : true,
fields : subProcessFields,
proxy : new Ext.data.HttpProxy({
url : 'proxyExtjs?pid='+pro_uid+'&action=getSubProcessProperties&tid='+taskId+'&type=0' //type=0 specifies Variables Out (Asynchronous)
url : 'bpmn/proxyExtjs?pid='+pro_uid+'&action=getSubProcessProperties&tid='+taskId+'&type=0' //type=0 specifies Variables Out (Asynchronous)
})
});
variablesOutStore.load();
@@ -2231,7 +2231,7 @@ TaskContext.prototype.editSubProcessProperties= function(_3525)
remoteSort : true,
fields : subProcessFields,
proxy : new Ext.data.HttpProxy({
url : 'proxyExtjs?pid='+pro_uid+'&action=getSubProcessProperties&tid='+taskId+'&type=1' //type=1 specifies Variables In (Synchronous)
url : 'bpmn/proxyExtjs?pid='+pro_uid+'&action=getSubProcessProperties&tid='+taskId+'&type=1' //type=1 specifies Variables In (Synchronous)
})
});
//taskUsers.setDefaultSort('LABEL', 'asc');
@@ -2459,7 +2459,7 @@ TaskContext.prototype.editSubProcessProperties= function(_3525)
//Loading Task Details into the form
subProcessProperties.form.load({
url:'proxyExtjs?pid='+pro_uid+'&action=getSubProcessProperties&tid='+taskId+'&type=2',
url:'bpmn/proxyExtjs?pid='+pro_uid+'&action=getSubProcessProperties&tid='+taskId+'&type=2',
method:'GET',
waitMsg:'Loading....',
success:function(form, action) {
@@ -2547,7 +2547,7 @@ TaskContext.prototype.editSubProcessProperties= function(_3525)
Ext.Ajax.request({
url : 'processes_Ajax.php',
url : 'processes/processes_Ajax.php',
method: 'POST',
params: {
action : 'saveSubprocessDetails',

View File

@@ -1,7 +1,12 @@
<div id='cases-grid'></div>
<div id="toolbar"></div>
<div id="center1" class="x-layout-active-content">
<div id="paintarea" ></div>
<div id="west" class="x-hide-display">
</div>
<div id="debug"></div>
<div id="properties"></div>
<div id="center2" class="x-hide-display">
</div>
<div id="center1" class="x-layout-active-content" style="position:relative;">
<div id="paintarea" style="position:relative;width:3000px;height:3000px;" >
</div>
</div>
<div id="props-panel" class="x-hide-display" style="width:200px;height:200px;overflow:hidden;">
</div>
<div id="south" class="x-hide-display">
</div>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,773 @@
/**
* BPMN Designer v1.1
* @date Feb 2th, 2011
* @author Erik A. O. <erik@colosa.com>
*/
var toolbarPanel;
var actorsPanel;
var northPanelItems;
var eastPanelTree;
var ActiveProperty;
var comboCategory;
var comboCalendar;
var comboPMVariables;
var propertiesGrid;
var propertyStore;
var usersTaskStore;
var usersTaskGrid;
var onDynaformsContextMenu;
var usersTaskGridContextMenu;
var usersTaskAdHocStore;
var usersTaskAdHocGrid;
var onUsersTaskAdHocGridContextMenu;
var usersTaskAdHocGridContextMenu;
var mainMenu;
Ext.onReady(function(){
toolbarPanel = {
title: 'Toolbar',
border: false,
//iconCls: 'nav',
layout:'table',
defaultType: 'button',
cls: 'btn-panel',
layoutConfig: {
columns: 2
},
defaults: {
autoEl: {tag: 'h3', style:"padding:15px 0 3px;"},
scale: 'large'
},
items : [{
iconCls: 'button_large_ext ss_sprite ss_bpmn_task',//icon: '/skins/ext/images/gray/shapes/pallete/task.png',
id:"x-shapes-task"
},{
iconCls: 'button_large_ext ss_sprite ss_bpmn_startevent',//icon: '/skins/ext/images/gray/shapes/pallete/startevent.png',
id:"x-shapes-startEvent"
},{
iconCls: 'button_large_ext ss_sprite ss_bpmn_interevent',//icon: '/skins/ext/images/gray/shapes/pallete/interevent.png',
id:"x-shapes-interEvent"
},{
iconCls: 'button_large_ext ss_sprite ss_bpmn_endevent',//icon: '/skins/ext/images/gray/shapes/pallete/endevent.png',
id:"x-shapes-endEvent"
},{
iconCls: 'button_large_ext ss_sprite ss_bpmn_gateway',//icon: '/skins/ext/images/gray/shapes/pallete/gateway.png',
id:"x-shapes-gateways"
},{
iconCls: 'button_large_ext ss_sprite ss_bpmn_annotation',//icon: '/skins/ext/images/gray/shapes/pallete/annotation.png',
id:"x-shapes-annotation"
}
]
};
actorsPanel = {
title: 'Actors',
html: '',
iconCls: 'ICON_USERS',
border: false
}
northPanelItems = [
/*
{
text: 'Save',
cls: 'x-btn-text-icon',
iconCls: 'button_menu_ext ss_sprite ss_disk',
handler: function() {
saveProcess();
}
}, {
text:'Save as',
iconCls: 'button_menu_ext ss_sprite ss_disk_multiple'
}, {
xtype: 'tbseparator'
},
*/{
//xtype: 'tbsplit',
text:'Edit',
//iconCls: '',
menu: new Ext.menu.Menu({
items: [{
text: _('ID_SWITCH_EDITOR'),
iconCls: 'ss_sprite ss_arrow_switch',
handler: function() {
if(typeof pro_uid !== 'undefined') {
location.href = 'processes/processes_Map?PRO_UID=' +pro_uid+ '&rand=' +Math.random()
}
}
}]
})
},
{
//xtype: 'tbsplit',
//iconCls: 'button_menu_ext ss_sprite ss_application',
text: 'Process',
menu: new Ext.menu.Menu({
items: [{
text : 'Dynaform',
iconCls: 'button_menu_ext ss_sprite ss_application_form',
handler : function() {
processObj.addDynaform();
}
}, {
text: 'Input Document',
iconCls: 'button_menu_ext ss_sprite ss_page_white_put',
handler : function() {
processObj.addInputDoc();
}
}, {
text: 'Output Document',
iconCls: 'button_menu_ext ss_sprite ss_page_white_get',
handler : function() {
processObj.addOutputDoc();
}
}, {
text: 'Trigger',
iconCls: 'button_menu_ext ss_sprite ss_cog',
handler : function() {
processObj.addTriggers();
}
}, {
text: 'Report Table',
iconCls: 'button_menu_ext ss_sprite ss_table',
handler : function() {
processObj.addReportTable();
}
}, {
text: 'Database Connection',
iconCls: 'button_menu_ext ss_sprite ss_database_connect',
handler : function() {
processObj.dbConnection();
}
}
]
})
},
'->',
{
text:'Undo',
iconCls: 'button_menu_ext ss_sprite ss_arrow_undo',
handler: function() {
workflow.getCommandStack().undo();
}
}, {
text:'Redo',
iconCls: 'button_menu_ext ss_sprite ss_arrow_redo',
handler: function() {
workflow.getCommandStack().redo();
}
},{
//xtype: 'tbsplit',
text:'Zoom',
iconCls: 'button_menu_ext ss_sprite ss_zoom',
menu: new Ext.menu.Menu({
items: [{
text : '25%',
handler: function() {
Ext.getCmp('designerTab')._setDesignerTitle(pro_title + ' (25%)');
workflow.zoom('25');
}
},{
text : '50%',
handler: function() {
Ext.getCmp('designerTab')._setDesignerTitle(pro_title + ' (50%)');
workflow.zoom('50');
}
},{
text : '75%',
handler: function() {
Ext.getCmp('designerTab')._setDesignerTitle(pro_title + ' (75%)');
workflow.zoom('75');
}
},{
text : '100%',
handler: function() {
Ext.getCmp('designerTab')._setDesignerTitle(pro_title + ' (100%)');
workflow.zoom('100');
}
},{
text : '125%',
handler: function() {
Ext.getCmp('designerTab')._setDesignerTitle(pro_title + ' (125%)');
workflow.zoom('125');
}
},{
text : '150%',
handler: function() {
Ext.getCmp('designerTab')._setDesignerTitle(pro_title + ' (150%)');
workflow.zoom('150');
}
},{
text : '200%',
handler: function() {
Ext.getCmp('designerTab')._setDesignerTitle(pro_title + ' (200%)');
workflow.zoom('200');
}
}
]
})
} /*,{
xtype: 'tbseparator'
}, {
text: _('ID_ACTORS'),
iconCls: 'ICON_USERS',
handler: function(){
usersPanel.show()
}
}, {
xtype: 'tbfill'
}, {
text: _('ID_SWITCH_EDITOR'),
iconCls: 'button_menu_ext ss_sprite ss_pencil',
handler: function() {
if(typeof pro_uid !== 'undefined') {
location.href = 'processes/processes_Map?PRO_UID=' +pro_uid+ '&rand=' +Math.random()
}
}
}*/
]
eastPanelTree = new Ext.tree.TreePanel({
id: 'eastPanelTree',
useArrows: false,
autoScroll: true,
animate: true,
rootVisible : false,
border: true,
height: PMExt.getBrowser().screen.height * 0.3,
region: 'north',
split : true,
collapseMode:'mini',
loader : new Ext.tree.TreeLoader({
preloadChildren : true,
dataUrl : 'processProxy/getProcessDetail',
baseParams : {
PRO_UID: pro_uid
}
}),
root: {
nodeType : 'async',
draggable : false,
id : 'root',
expanded : true
}
});
// tree east panel selection change
eastPanelTree.getSelectionModel().on('selectionchange', function(tree, node){
if( node.attributes.type == 'task') {
_TAS_UID = node.attributes.id;
Ext.getCmp('usersPanelTabs').getTabEl('usersTaskGrid').style.display = '';
Ext.getCmp('usersPanelTabs').getTabEl('usersTaskAdHocGrid').style.display = '';
Ext.getCmp('usersTaskGrid').store.reload({params: {tas_uid: _TAS_UID, tu_type: 1}});
Ext.getCmp('usersTaskAdHocGrid').store.reload({params: {tas_uid: _TAS_UID, tu_type: 2}});
} else {
Ext.getCmp('usersPanelTabs').setActiveTab(0);
Ext.getCmp('usersPanelTabs').getTabEl('usersTaskGrid').style.display = 'none';
Ext.getCmp('usersPanelTabs').getTabEl('usersTaskAdHocGrid').style.display = 'none';
}
propertyStore.reload({params: {
action : 'getProperties',
UID : node.attributes.id,
type : node.attributes.type
}});
Ext.getCmp('eastPanelCenter').setTitle(node.attributes.typeLabel+': '+node.attributes.text);
//propertiesGrid.store.sort('name','DESC');
propertiesGrid.setSource(propertyStore.reader.jsonData.prop);
})
ActiveProperty = new Ext.form.Checkbox({
name : 'active',
fieldLabel : 'Active',
checked : true,
inputValue : '1'
});
comboCategory = new Ext.form.ComboBox({
fieldLabel : 'Category',
name : 'category',
allowBlank : true,
store : new Ext.data.Store( {
//autoLoad: true, //autoload the data
proxy : new Ext.data.HttpProxy( {
url : 'processProxy/getCategoriesList',
method : 'POST'
}),
baseParams : {
action : 'getCategoriesList'
},
reader : new Ext.data.JsonReader( {
//root : 'rows',
fields : [
{name : 'CATEGORY_UID'},
{name : 'CATEGORY_NAME'}
]
})
}),
valueField : 'CATEGORY_NAME',
displayField : 'CATEGORY_NAME',
typeAhead : true,
//mode : 'local',
triggerAction : 'all',
editable: true,
forceSelection: true,
selectOnFocus : true
});
comboCalendar = new Ext.form.ComboBox({
fieldLabel : 'Calendar',
name : 'calendar',
allowBlank : true,
store : new Ext.data.Store( {
//autoLoad: true, //autoload the data
proxy : new Ext.data.HttpProxy({ url: 'processProxy/getCaledarList'}),
//baseParams : {action: 'getCaledarList'},
reader : new Ext.data.JsonReader( {
root : 'rows',
fields : [
{name : 'CALENDAR_UID'},
{name : 'CALENDAR_NAME'}
]
})
}),
valueField : 'CALENDAR_NAME',
displayField : 'CALENDAR_NAME',
typeAhead : true,
//mode : 'local',
triggerAction : 'all',
editable: true,
forceSelection: true
});
var comboPMVariables = new Ext.form.ComboBox({
fieldLabel : 'Calendar',
name : 'calendar',
allowBlank : true,
store : new Ext.data.Store( {
//autoLoad: false, //autoload the data
proxy : new Ext.data.HttpProxy({ url: 'processProxy/getPMVariables'}),
baseParams : {PRO_UID: pro_uid},
reader : new Ext.data.JsonReader( {
root : 'rows',
fields : [
{name : 'sName'},
{name : 'sName'}
]
})
}),
valueField : 'sName',
displayField : 'sName',
typeAhead : true,
//mode : 'local',
triggerAction: 'all',
editable: true,
forceSelection: true
});
propertiesGrid = new Ext.grid.PropertyGrid({
id: 'propGrid',
title: 'Properties',
loadMask : {msg:"Loading..."},
autoHeight: true,
viewConfig : {
forceFit: true,
scrollOffset: 2 // the grid will never have scrollbars
},
customEditors: {
//'Debug' : new Ext.grid.GridEditor(ActiveProperty),
'Category' : new Ext.grid.GridEditor(comboCategory),
'Calendar' : new Ext.grid.GridEditor(comboCalendar),
'Variable for case priority' : new Ext.grid.GridEditor(comboPMVariables)
}
});
propertiesGrid.on('afteredit', function afterEdit(r) {
var node = Ext.getCmp('eastPanelTree').getSelectionModel().getSelectedNode();
var UID;
var type;
if( node ) {
UID = node.attributes.id;
type = node.attributes.type;
} else {
UID = pro_uid;
type = 'process';
}
Ext.Ajax.request({
url: 'processProxy/saveProperties',
params: {
UID: UID,
type: type,
property: r.record.data.name,
value: r.value
},
success: function(response) {
if( type == 'process' && r.record.data.name == 'Title') {
pro_title = r.value;
Ext.getCmp('designerTab')._setDesignerTitle(pro_title);
Ext.getCmp('eastPanelTree').getNodeById(UID).setText(pro_title);
} else if( type == 'task' && r.record.data.name == 'Title') {
Ext.getCmp('eastPanelTree').getNodeById(UID).setText(r.value);
//here we need to find and update the task title into task figure on designer
}
},
failure: function(){
//Ext.Msg.alert ('Failure');
}
});
//r.record.commit();
}, this );
propertyStore = new Ext.data.JsonStore({
id: 'propertyStore',
autoLoad: true, //autoload the data
url: 'processProxy/getProperties',
root: 'prop',
fields: ['title', 'description'],
store: new Ext.grid.PropertyStore({
sortable: false,
defaultSortable: false
}),
listeners: {
load: {
fn: function(store, records, options){
//propertiesGrid.store.sort('name','DESC');
propertiesGrid.setSource(store.reader.jsonData.prop);
}
}
},
baseParams: {
UID : pro_uid,
type : 'process'
}
});
usersTaskStore = new Ext.data.GroupingStore( {
autoLoad: false,
url: 'processProxy/getActorsTask',
reader : new Ext.data.JsonReader({
totalProperty: 'totalCount',
root: 'data',
fields : [
{name : 'USR_UID'},
{name : 'USR_USERNAME'},
{name : 'USR_FIRSTNAME'},
{name : 'USR_LASTNAME'},
{name : 'NAME'},
{name : 'TU_RELATION'}
]
}),
baseParams: {tas_uid: '', tu_type: ''},
groupField: 'TU_RELATION'
});
usersTaskGrid = new Ext.grid.GridPanel({
id : 'usersTaskGrid',
title : _('ID_ACTORS'),
height : 180,
stateful : true,
stateId : 'usersTaskGrid',
sortable:false,
view: new Ext.grid.GroupingView({
forceFit:true,
groupTextTpl: '{[values.rs.length]} {[values.rs[0].data["TU_RELATION"] == 1 ? "Users" : "Groups"]}'
}),
cm : new Ext.grid.ColumnModel({
defaults: {
width: 300,
sortable: true
},
columns : [
{id:'USR_UID', dataIndex: 'USR_UID', hidden:true, hideable:false},
{header: 'Assigned', id:'TU_RELATION', dataIndex: 'TU_RELATION', hidden:true, hideable:false},
{header: 'User', dataIndex: 'USER', width: 249, renderer:function(v,p,r){
if( r.data.TU_RELATION == '1' )
return _FNF(r.data.USR_USERNAME, r.data.USR_FIRSTNAME, r.data.USR_LASTNAME);
else
return r.data.NAME;
}}
]
}),
store: usersTaskStore,
listeners: {
render: function(){
this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING')});
}
}/*,
tbar:[
'->', {
text: _('ID_REMOVE'),
iconCls: 'button_menu_ext ss_sprite ss_delete',
handler: removeUsersTask
}
]*/,
bbar: [new Ext.PagingToolbar({
pageSize : 10,
store : usersTaskStore,
displayInfo: true,
displayMsg : '{2} Users',
emptyMsg : ''
})]
});
//connecting context menu to grid
usersTaskGrid.addListener('rowcontextmenu', onDynaformsContextMenu,this);
//by default the right click is not selecting the grid row over the mouse
//we need to set this four lines
usersTaskGrid.on('rowcontextmenu', function (grid, rowIndex, evt) {
var sm = grid.getSelectionModel();
sm.selectRow(rowIndex, sm.isSelected(rowIndex));
}, this);
//prevent default
usersTaskGrid.on('contextmenu', function (evt) {
evt.preventDefault();
}, this);
onDynaformsContextMenu = function(grid, rowIndex, e) {
e.stopEvent();
var coords = e.getXY();
usersTaskGridContextMenu.showAt([coords[0], coords[1]]);
}
usersTaskGridContextMenu = new Ext.menu.Menu({
id: 'messageContextMenu',
items: [{
text: _('ID_REMOVE'),
iconCls: 'button_menu_ext ss_sprite ss_delete',
handler: removeUsersTask
}
]
});
//AD HOC
usersTaskAdHocStore = new Ext.data.GroupingStore( {
autoLoad: false,
url: 'processProxy/getActorsTask',
reader : new Ext.data.JsonReader({
totalProperty: 'totalCount',
root: 'data',
fields : [
{name : 'USR_UID'},
{name : 'USR_USERNAME'},
{name : 'USR_FIRSTNAME'},
{name : 'USR_LASTNAME'},
{name : 'NAME'},
{name : 'TU_RELATION'}
]
}),
baseParams: {tas_uid: '', tu_type: ''},
groupField: 'TU_RELATION'
});
usersTaskAdHocGrid = new Ext.grid.GridPanel({
id : 'usersTaskAdHocGrid',
title : _('ID_AD_HOC_ACTORS'),
height : 180,
stateful : true,
stateId : 'usersTaskAdHocGrid',
sortable:false,
view: new Ext.grid.GroupingView({
forceFit:true,
groupTextTpl: '{[values.rs.length]} {[values.rs[0].data["TU_RELATION"] == 1 ? "Users" : "Groups"]}'
}),
cm : new Ext.grid.ColumnModel({
defaults: {
width: 300,
sortable: true
},
columns : [
{id:'USR_UID', dataIndex: 'USR_UID', hidden:true, hideable:false},
{header: 'Assigned', id:'TU_RELATION', dataIndex: 'TU_RELATION', hidden:true, hideable:false},
{header: 'User', dataIndex: 'USER', width: 249, renderer:function(v,p,r){
if( r.data.TU_RELATION == '1' )
return _FNF(r.data.USR_USERNAME, r.data.USR_FIRSTNAME, r.data.USR_LASTNAME);
else
return r.data.NAME;
}}
]
}),
store: usersTaskAdHocStore,
listeners: {
render: function(){
this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING')});
}
}/*,
tbar:[
'->', {
text: _('ID_REMOVE'),
iconCls: 'button_menu_ext ss_sprite ss_delete',
handler: removeUsersTask
}
]*/,
bbar: [new Ext.PagingToolbar({
pageSize : 10,
store : usersTaskStore,
displayInfo: true,
displayMsg : '{2} Users',
emptyMsg : ''
})]
});
//connecting context menu to grid
usersTaskAdHocGrid.addListener('rowcontextmenu', onUsersTaskAdHocGridContextMenu,this);
//by default the right click is not selecting the grid row over the mouse
//we need to set this four lines
usersTaskAdHocGrid.on('rowcontextmenu', function (grid, rowIndex, evt) {
var sm = grid.getSelectionModel();
sm.selectRow(rowIndex, sm.isSelected(rowIndex));
}, this);
//prevent default
usersTaskGrid.on('contextmenu', function (evt) {
evt.preventDefault();
}, this);
onUsersTaskAdHocGridContextMenu = function(grid, rowIndex, e) {
e.stopEvent();
var coords = e.getXY();
usersTaskAdHocGridContextMenu.showAt([coords[0], coords[1]]);
}
usersTaskAdHocGridContextMenu = new Ext.menu.Menu({
id: 'messagAdHocGrideContextMenu',
items: [{
text: _('ID_REMOVE'),
iconCls: 'button_menu_ext ss_sprite ss_delete',
handler: removeUsersAdHocTask
}
]
});
})
//end onReady()
function removeUsersTask(){
var usr_uid = Array();
var tu_relation = Array();
var rowsSelected = Ext.getCmp('usersTaskGrid').getSelectionModel().getSelections();
if( rowsSelected.length == 0 ) {
PMExt.error('', _('ID_NO_SELECTION_WARNING'));
return false;
}
for(i=0; i<rowsSelected.length; i++) {
usr_uid[i] = rowsSelected[i].get('USR_UID');
tu_relation[i] = rowsSelected[i].get('TU_RELATION');
}
usr_uid = usr_uid.join(',');
tu_relation = tu_relation.join(',');
//PMExt.confirm(_('ID_CONFIRM'), _('ID_REMOVE_USERS_CONFIRM'), function(){
Ext.Ajax.request({
url : 'processProxy/removeActorsTask',
method: 'POST',
params: {
action : 'removeUsersTask',
USR_UID: usr_uid,
TU_RELATION: tu_relation,
TAS_UID: _TAS_UID,
TU_TYPE: 1
},
success: function(response) {
var result = Ext.util.JSON.decode(response.responseText);
if( result.success ){
Ext.getCmp('usersTaskGrid').store.reload();
} else {
PMExt.error(_('ID_ERROR'), result.msg);
}
}
});
//});
}
function removeUsersAdHocTask(){
var usr_uid = Array();
var tu_relation = Array();
var rowsSelected = Ext.getCmp('usersTaskAdHocGrid').getSelectionModel().getSelections();
if( rowsSelected.length == 0 ) {
PMExt.error('', _('ID_NO_SELECTION_WARNING'));
return false;
}
for(i=0; i<rowsSelected.length; i++) {
usr_uid[i] = rowsSelected[i].get('USR_UID');
tu_relation[i] = rowsSelected[i].get('TU_RELATION');
}
usr_uid = usr_uid.join(',');
tu_relation = tu_relation.join(',');
//PMExt.confirm(_('ID_CONFIRM'), _('ID_REMOVE_USERS_CONFIRM'), function(){
Ext.Ajax.request({
url : 'processProxy/removeActorsTask',
method: 'POST',
params: {
action : 'removeUsersTask',
USR_UID: usr_uid,
TU_RELATION: tu_relation,
TAS_UID: _TAS_UID,
TU_TYPE: 2
},
success: function(response) {
var result = Ext.util.JSON.decode(response.responseText);
if( result.success ){
Ext.getCmp('usersTaskAdHocGrid').store.reload();
} else {
PMExt.error(_('ID_ERROR'), result.msg);
}
}
});
//});
}
function usersSearch()
{
var search = Ext.getCmp('usersSearchTxt').getValue().trim();
if( search == '' ) {
PMExt.info(_('ID_INFO'), _('ID_ENTER_SEARCH_TERM'));
return;
}
Ext.getCmp('usersGrid').store.setBaseParam('search', search);
Ext.getCmp('usersGrid').store.load({params:{search: search, start : 0 , limit : usersPanelLimit }});
}
function groupsSearch()
{
var search = Ext.getCmp('groupsSearchTxt').getValue().trim();
if( search == '' ) {
PMExt.info(_('ID_INFO'), _('ID_ENTER_SEARCH_TERM'));
return;
}
Ext.getCmp('groupsGrid').store.setBaseParam('search', search);
Ext.getCmp('groupsGrid').store.load({params:{search: search, start : 0 , limit : usersPanelLimit }});
}

View File

@@ -293,7 +293,7 @@ pmosExt.prototype.popWebEntry= function(_5678)
var evn_uid = workflow.currentSelection.id;
Ext.Ajax.request({
url: 'processes_Ajax.php',
url: 'processes/processes_Ajax.php',
params:{action:'webEntry', data: '{"uid":"'+ pro_uid +'","evn_uid":"'+evn_uid+'"}'},
success: function(r,o){
webEntryList = Ext.util.JSON.decode(r.responseText);
@@ -921,7 +921,7 @@ pmosExt.prototype.popTaskNotification= function(_5678){
{
var urlparams = '?action=saveInterMessageEvent&data={"uid":"'+ taskUid.value +'","tas_send":"'+tas_send+'","data":"'+data+'"}';
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
window.close();
},
@@ -949,7 +949,7 @@ pmosExt.prototype.popTaskNotification= function(_5678){
{
var urlparams = '?action=loadTask&data={"uid":"'+ taskUid.value +'"}';
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
workflow.taskDetails = Ext.util.JSON.decode(response.responseText);
},
@@ -965,7 +965,7 @@ pmosExt.prototype.popTaskNotification= function(_5678){
{
var urlparams = '?action=triggersList&data={"pro_uid":"'+ pro_uid +'"}';
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
workflow.triggerList = Ext.util.JSON.decode(response.responseText);
},
@@ -1140,7 +1140,7 @@ pmosExt.prototype.popTaskNotification= function(_5678){
{
var urlparams = '?action=saveInterMessageEvent&data={"uid":"'+ taskUid[0].value +'","tas_send":"'+tas_send+'","data":"'+data+'"}';
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
window.close();
},
@@ -1438,7 +1438,7 @@ pmosExt.prototype.loadProcess=function(_5678)
{
var urlparams = '?action=load&data={"uid":"'+ pro_uid +'"}';
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
workflow.processInfo = Ext.util.JSON.decode(response.responseText);
},
@@ -1454,7 +1454,7 @@ pmosExt.prototype.loadDynaforms=function()
{
var urlparams = '?action=dynaforms&data={"uid":"'+ taskUid[0].value +'"}';
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
workflow.dynaList = Ext.util.JSON.decode(response.responseText);
},
@@ -1468,7 +1468,7 @@ pmosExt.prototype.loadConnectedTask=function()
{
var urlparams = '?action=load&data={"uid":"'+ pro_uid +'"}';
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
workflow.processInfo = Ext.util.JSON.decode(response.responseText);
@@ -1483,7 +1483,7 @@ pmosExt.prototype.loadWebEntry=function()
var evn_uid = workflow.currentSelection.id;
var urlparams = '?action=webEntry&data={"uid":"'+ pro_uid +'","evn_uid":"'+evn_uid+'"}';
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
workflow.webEntryList = Ext.util.JSON.decode(response.responseText);
},
@@ -1496,7 +1496,7 @@ pmosExt.prototype.loadEditProcess=function()
{
var urlparams = '?action=process_Edit&data={"pro_uid":"'+ pro_uid +'"}';
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
workflow.processEdit = Ext.util.JSON.decode(response.responseText);
},
@@ -1509,7 +1509,7 @@ pmosExt.prototype.loadProcessCategory =function()
{
var urlparams = '?action=loadCategory';
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
workflow.processCategory = Ext.util.JSON.decode(response.responseText);
},
@@ -1521,7 +1521,7 @@ pmosExt.prototype.loadProcessCategory =function()
pmosExt.prototype.saveEvent =function(urlparams)
{
Ext.Ajax.request({
url: "processes_Ajax.php"+ urlparams,
url: "processes/processes_Ajax.php"+ urlparams,
success: function(response) {
},

View File

@@ -1,7 +0,0 @@
<div id='cases-grid'></div>
<div id="toolbar"></div>
<div id="center1" class="x-layout-active-content">
<div id="paintarea" ></div>
</div>
<div id="debug"></div>
<div id="properties"></div>

View File

@@ -1,798 +0,0 @@
var _TAS_UID;
var updateActorsGrids;
var processObj;
Ext.onReady ( function() {
new Ext.KeyMap(document, {
key: Ext.EventObject.F5,
fn: function(keycode, e) {
e.stopEvent();
}
});
processObj = new ProcessOptions();
var west= {
id : 'palette',
title : 'Palette',
region : 'west',
width : 65,
border : false,
autoScroll : true,
collapsible :true,
split :true,
collapseMode:'mini',
hideCollapseTool: false,
items:{
html:''
}
};
var usersTaskStore = new Ext.data.GroupingStore( {
autoLoad: false,
url: '../processProxy/getActorsTask',
reader : new Ext.data.JsonReader({
totalProperty: 'totalCount',
root: 'data',
fields : [
{name : 'USR_UID'},
{name : 'USR_USERNAME'},
{name : 'USR_FIRSTNAME'},
{name : 'USR_LASTNAME'},
{name : 'NAME'},
{name : 'TU_RELATION'}
]
}),
baseParams: {tas_uid: '', tu_type: ''},
groupField: 'TU_RELATION'
});
var usersTaskGrid = new Ext.grid.GridPanel({
id : 'usersTaskGrid',
title : _('ID_ACTORS'),
height : 180,
stateful : true,
stateId : 'usersTaskGrid',
sortable:false,
view: new Ext.grid.GroupingView({
forceFit:true,
groupTextTpl: '{[values.rs.length]} {[values.rs[0].data["TU_RELATION"] == 1 ? "Users" : "Groups"]}'
}),
cm : new Ext.grid.ColumnModel({
defaults: {
width: 300,
sortable: true
},
columns : [
{id:'USR_UID', dataIndex: 'USR_UID', hidden:true, hideable:false},
{header: 'Assigned', id:'TU_RELATION', dataIndex: 'TU_RELATION', hidden:true, hideable:false},
{header: 'User', dataIndex: 'USER', width: 249, renderer:function(v,p,r){
return _FNF(r.data.USR_USERNAME, r.data.USR_FIRSTNAME, r.data.USR_LASTNAME);
}}
]
}),
store: usersTaskStore,
listeners: {
render: function(){
this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING')});
}
}/*,
tbar:[
'->', {
text: _('ID_REMOVE'),
iconCls: 'button_menu_ext ss_sprite ss_delete',
handler: removeUsersTask
}
]*/,
bbar: [new Ext.PagingToolbar({
pageSize : 10,
store : usersTaskStore,
displayInfo: true,
displayMsg : '{2} Users',
emptyMsg : ''
})]
});
//connecting context menu to grid
usersTaskGrid.addListener('rowcontextmenu', onDynaformsContextMenu,this);
//by default the right click is not selecting the grid row over the mouse
//we need to set this four lines
usersTaskGrid.on('rowcontextmenu', function (grid, rowIndex, evt) {
var sm = grid.getSelectionModel();
sm.selectRow(rowIndex, sm.isSelected(rowIndex));
}, this);
//prevent default
usersTaskGrid.on('contextmenu', function (evt) {
evt.preventDefault();
}, this);
function onDynaformsContextMenu(grid, rowIndex, e) {
e.stopEvent();
var coords = e.getXY();
usersTaskGridContextMenu.showAt([coords[0], coords[1]]);
}
var usersTaskGridContextMenu = new Ext.menu.Menu({
id: 'messageContextMenu',
items: [{
text: _('ID_REMOVE'),
iconCls: 'button_menu_ext ss_sprite ss_delete',
handler: removeUsersTask
}
]
});
//AD HOC
var usersTaskAdHocStore = new Ext.data.GroupingStore( {
autoLoad: false,
url: '../processProxy/getActorsTask',
reader : new Ext.data.JsonReader({
totalProperty: 'totalCount',
root: 'data',
fields : [
{name : 'USR_UID'},
{name : 'USR_USERNAME'},
{name : 'USR_FIRSTNAME'},
{name : 'USR_LASTNAME'},
{name : 'NAME'},
{name : 'TU_RELATION'}
]
}),
baseParams: {tas_uid: '', tu_type: ''},
groupField: 'TU_RELATION'
});
var usersTaskAdHocGrid = new Ext.grid.GridPanel({
id : 'usersTaskAdHocGrid',
title : _('ID_AD_HOC_ACTORS'),
height : 180,
stateful : true,
stateId : 'usersTaskAdHocGrid',
sortable:false,
view: new Ext.grid.GroupingView({
forceFit:true,
groupTextTpl: '{[values.rs.length]} {[values.rs[0].data["TU_RELATION"] == 1 ? "Users" : "Groups"]}'
}),
cm : new Ext.grid.ColumnModel({
defaults: {
width: 300,
sortable: true
},
columns : [
{id:'USR_UID', dataIndex: 'USR_UID', hidden:true, hideable:false},
{header: 'Assigned', id:'TU_RELATION', dataIndex: 'TU_RELATION', hidden:true, hideable:false},
{header: 'User', dataIndex: 'USER', width: 249, renderer:function(v,p,r){
return _FNF(r.data.USR_USERNAME, r.data.USR_FIRSTNAME, r.data.USR_LASTNAME);
}}
]
}),
store: usersTaskAdHocStore,
listeners: {
render: function(){
this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING')});
}
}/*,
tbar:[
'->', {
text: _('ID_REMOVE'),
iconCls: 'button_menu_ext ss_sprite ss_delete',
handler: removeUsersTask
}
]*/,
bbar: [new Ext.PagingToolbar({
pageSize : 10,
store : usersTaskStore,
displayInfo: true,
displayMsg : '{2} Users',
emptyMsg : ''
})]
});
//connecting context menu to grid
usersTaskAdHocGrid.addListener('rowcontextmenu', onUsersTaskAdHocGridContextMenu,this);
//by default the right click is not selecting the grid row over the mouse
//we need to set this four lines
usersTaskAdHocGrid.on('rowcontextmenu', function (grid, rowIndex, evt) {
var sm = grid.getSelectionModel();
sm.selectRow(rowIndex, sm.isSelected(rowIndex));
}, this);
//prevent default
usersTaskGrid.on('contextmenu', function (evt) {
evt.preventDefault();
}, this);
function onUsersTaskAdHocGridContextMenu(grid, rowIndex, e) {
e.stopEvent();
var coords = e.getXY();
usersTaskAdHocGridContextMenu.showAt([coords[0], coords[1]]);
}
var usersTaskAdHocGridContextMenu = new Ext.menu.Menu({
id: 'messagAdHocGrideContextMenu',
items: [{
text: _('ID_REMOVE'),
iconCls: 'button_menu_ext ss_sprite ss_delete',
handler: removeUsersAdHocTask
}
]
});
updateActorsGrids = function(){
}
function removeUsersTask(){
var usr_uid = Array();
var tu_relation = Array();
var rowsSelected = Ext.getCmp('usersTaskGrid').getSelectionModel().getSelections();
if( rowsSelected.length == 0 ) {
PMExt.error('', _('ID_NO_SELECTION_WARNING'));
return false;
}
for(i=0; i<rowsSelected.length; i++) {
usr_uid[i] = rowsSelected[i].get('USR_UID');
tu_relation[i] = rowsSelected[i].get('TU_RELATION');
}
usr_uid = usr_uid.join(',');
tu_relation = tu_relation.join(',');
//PMExt.confirm(_('ID_CONFIRM'), _('ID_REMOVE_USERS_CONFIRM'), function(){
Ext.Ajax.request({
url : '../processProxy/removeActorsTask',
method: 'POST',
params: {
action : 'removeUsersTask',
USR_UID: usr_uid,
TU_RELATION: tu_relation,
TAS_UID: _TAS_UID,
TU_TYPE: 1
},
success: function(response) {
var result = Ext.util.JSON.decode(response.responseText);
if( result.success ){
Ext.getCmp('usersTaskGrid').store.reload();
} else {
PMExt.error(_('ID_ERROR'), result.msg);
}
}
});
//});
}
function removeUsersAdHocTask(){
var usr_uid = Array();
var tu_relation = Array();
var rowsSelected = Ext.getCmp('usersTaskAdHocGrid').getSelectionModel().getSelections();
if( rowsSelected.length == 0 ) {
PMExt.error('', _('ID_NO_SELECTION_WARNING'));
return false;
}
for(i=0; i<rowsSelected.length; i++) {
usr_uid[i] = rowsSelected[i].get('USR_UID');
tu_relation[i] = rowsSelected[i].get('TU_RELATION');
}
usr_uid = usr_uid.join(',');
tu_relation = tu_relation.join(',');
//PMExt.confirm(_('ID_CONFIRM'), _('ID_REMOVE_USERS_CONFIRM'), function(){
Ext.Ajax.request({
url : '../processProxy/removeActorsTask',
method: 'POST',
params: {
action : 'removeUsersTask',
USR_UID: usr_uid,
TU_RELATION: tu_relation,
TAS_UID: _TAS_UID,
TU_TYPE: 2
},
success: function(response) {
var result = Ext.util.JSON.decode(response.responseText);
if( result.success ){
Ext.getCmp('usersTaskAdHocGrid').store.reload();
} else {
PMExt.error(_('ID_ERROR'), result.msg);
}
}
});
//});
}
var eastPanelTree = new Ext.tree.TreePanel({
id: 'eastPanelTree',
useArrows: false,
autoScroll: true,
animate: true,
rootVisible : false,
border: true,
height: PMExt.getBrowser().screen.height * 0.3,
region: 'north',
split : true,
collapseMode:'mini',
loader : new Ext.tree.TreeLoader({
preloadChildren : true,
dataUrl : '../processProxy/getProcessDetail',
baseParams : {
PRO_UID: pro_uid
}
}),
root: {
nodeType : 'async',
draggable : false,
id : 'root',
expanded : true
}
});
// tree east panel selection change
eastPanelTree.getSelectionModel().on('selectionchange', function(tree, node){
if( node.attributes.type == 'task') {
_TAS_UID = node.attributes.id;
Ext.getCmp('usersPanelTabs').getTabEl('usersTaskGrid').style.display = '';
Ext.getCmp('usersPanelTabs').getTabEl('usersTaskAdHocGrid').style.display = '';
Ext.getCmp('usersTaskGrid').store.reload({params: {tas_uid: _TAS_UID, tu_type: 1}});
Ext.getCmp('usersTaskAdHocGrid').store.reload({params: {tas_uid: _TAS_UID, tu_type: 2}});
} else {
Ext.getCmp('usersPanelTabs').setActiveTab(0);
Ext.getCmp('usersPanelTabs').getTabEl('usersTaskGrid').style.display = 'none';
Ext.getCmp('usersPanelTabs').getTabEl('usersTaskAdHocGrid').style.display = 'none';
}
propertyStore.reload({params: {
action : 'getProperties',
UID : node.attributes.id,
type : node.attributes.type
}});
Ext.getCmp('eastPanelCenter').setTitle(node.attributes.typeLabel+': '+node.attributes.text);
//propertiesGrid.store.sort('name','DESC');
propertiesGrid.setSource(propertyStore.reader.jsonData.prop);
})
var ActiveProperty = new Ext.form.Checkbox({
name : 'active',
fieldLabel : 'Active',
checked : true,
inputValue : '1'
});
var comboCategory = new Ext.form.ComboBox({
fieldLabel : 'Category',
name : 'category',
allowBlank : true,
store : new Ext.data.Store( {
//autoLoad: true, //autoload the data
proxy : new Ext.data.HttpProxy( {
url : '../processProxy/getCategoriesList',
method : 'POST'
}),
baseParams : {
action : 'getCategoriesList'
},
reader : new Ext.data.JsonReader( {
//root : 'rows',
fields : [
{name : 'CATEGORY_UID'},
{name : 'CATEGORY_NAME'}
]
})
}),
valueField : 'CATEGORY_NAME',
displayField : 'CATEGORY_NAME',
typeAhead : true,
//mode : 'local',
triggerAction : 'all',
editable: true,
forceSelection: true,
selectOnFocus : true
});
var comboCalendar = new Ext.form.ComboBox({
fieldLabel : 'Calendar',
name : 'calendar',
allowBlank : true,
store : new Ext.data.Store( {
//autoLoad: true, //autoload the data
proxy : new Ext.data.HttpProxy({ url: '../processProxy/getCaledarList'}),
//baseParams : {action: 'getCaledarList'},
reader : new Ext.data.JsonReader( {
root : 'rows',
fields : [
{name : 'CALENDAR_UID'},
{name : 'CALENDAR_NAME'}
]
})
}),
valueField : 'CALENDAR_NAME',
displayField : 'CALENDAR_NAME',
typeAhead : true,
//mode : 'local',
triggerAction : 'all',
editable: true,
forceSelection: true
});
var comboPMVariables = new Ext.form.ComboBox({
fieldLabel : 'Calendar',
name : 'calendar',
allowBlank : true,
store : new Ext.data.Store( {
//autoLoad: false, //autoload the data
proxy : new Ext.data.HttpProxy({ url: '../processProxy/getPMVariables'}),
baseParams : {PRO_UID: pro_uid},
reader : new Ext.data.JsonReader( {
root : 'rows',
fields : [
{name : 'sName'},
{name : 'sName'}
]
})
}),
valueField : 'sName',
displayField : 'sName',
typeAhead : true,
//mode : 'local',
triggerAction: 'all',
editable: true,
forceSelection: true
});
var propertiesGrid = new Ext.grid.PropertyGrid({
id: 'propGrid',
title: 'Properties',
loadMask : {msg:"Loading..."},
autoHeight: true,
viewConfig : {
forceFit: true,
scrollOffset: 2 // the grid will never have scrollbars
},
customEditors: {
//'Debug' : new Ext.grid.GridEditor(ActiveProperty),
'Category' : new Ext.grid.GridEditor(comboCategory),
'Calendar' : new Ext.grid.GridEditor(comboCalendar),
'Variable for case priority' : new Ext.grid.GridEditor(comboPMVariables)
}
});
propertiesGrid.on('afteredit', function afterEdit(r) {
var node = Ext.getCmp('eastPanelTree').getSelectionModel().getSelectedNode();
var UID;
var type;
if( node ) {
UID = node.attributes.id;
type = node.attributes.type;
} else {
UID = pro_uid;
type = 'process';
}
Ext.Ajax.request({
url: '../processProxy/saveProperties',
params: {
UID: UID,
type: type,
property: r.record.data.name,
value: r.value
},
success: function(response) {
if( type == 'process' && r.record.data.name == 'Title') {
pro_title = r.value;
Ext.getCmp('centerPanel').setTitle(_('ID_PROCESSMAP_TITLE') + ' - ' + pro_title);
Ext.getCmp('eastPanelTree').getNodeById(UID).setText(pro_title);
} else if( type == 'task' && r.record.data.name == 'Title') {
Ext.getCmp('eastPanelTree').getNodeById(UID).setText(r.value);
//here we need to find and update the task title into task figure on designer
}
},
failure: function(){
//Ext.Msg.alert ('Failure');
}
});
//r.record.commit();
}, this );
var propertyStore = new Ext.data.JsonStore({
id: 'propertyStore',
autoLoad: true, //autoload the data
url: '../processProxy/getProperties',
root: 'prop',
fields: ['title', 'description'],
store: new Ext.grid.PropertyStore({
sortable: false,
defaultSortable: false
}),
listeners: {
load: {
fn: function(store, records, options){
//propertiesGrid.store.sort('name','DESC');
propertiesGrid.setSource(store.reader.jsonData.prop);
}
}
},
baseParams: {
UID : pro_uid,
type : 'process'
}
});
var east = new Ext.Panel({
id : 'eastPanel',
title : '',
region : 'east',
width : 280,
title : '',
//autoScroll : true,
layout:'border',
collapsible :true,
split :true,
//collapseMode:'mini',
//hideCollapseTool: false,
items:[
eastPanelTree,
{
id: 'eastPanelCenter',
xtype: 'panel',
title: _('ID_PROCESS')+': '+pro_title,
region: 'center',
layout: 'fit',
items:[
new Ext.TabPanel({
id : 'usersPanelTabs',
title : 'sdd',
border: true, // already wrapped so don't add another border
activeTab : 0, // second tab initially active
tabPosition : 'top',
split : true,
collapseMode:'mini',
//height : 318,
items : [
propertiesGrid,
usersTaskGrid,
usersTaskAdHocGrid
]
})
]
}
]
});
var north = {
xtype : "panel",
initialSize: 60,
split:false,
titlebar: false,
collapsible: false,
animate: false,
region : "north"
};
var south = {
xtype : "panel",
initialSize: 120,
height: 100,
split:true,
titlebar: false,
collapsible: true,
autoScroll:true,
animate: true,
region : "south",
items: {
region: 'center',
xtype: 'tabpanel',
items: [{
title: 'Properties',
html: 'Properties'
},
{
title: 'Debug Console',
html: 'Debug Console'
}]
}
};
var center= {
region: 'center',
id: 'centerPanel',
width:100,
height:2000,
xtype : "iframepanel",
title : _('ID_PROCESSMAP_TITLE') + ' - ' + pro_title+ ' (100%)',
frameConfig:{name:'designerFrame', id:'designerFrame'},
defaultSrc : 'designer?PRO_UID=' + pro_uid,
loadMask:{msg:'Loading...'},
bodyStyle:{height: (PMExt.getBrowser().screen.height-55) + 'px'},
width:'1024px'
};
var main = new Ext.Panel({
renderTo : "center1",
region : "center",
layout : "border",
autoScroll: true,
height : 1000,
width : 1300,
items : [north, center, east],
tbar: [
/*
{
text: 'Save',
cls: 'x-btn-text-icon',
iconCls: 'button_menu_ext ss_sprite ss_disk',
handler: function() {
document.getElementById('designerFrame').contentWindow.saveProcess();
}
}, {
text:'Save as',
iconCls: 'button_menu_ext ss_sprite ss_disk_multiple'
}, {
xtype: 'tbseparator'
},
*/
{
text:'Undo',
iconCls: 'button_menu_ext ss_sprite ss_arrow_undo',
handler: function() {
document.getElementById('designerFrame').contentWindow.workflow.getCommandStack().undo();
}
}, {
text:'Redo',
iconCls: 'button_menu_ext ss_sprite ss_arrow_redo',
handler: function() {
document.getElementById('designerFrame').contentWindow.workflow.getCommandStack().redo();
}
},{
//xtype: 'tbsplit',
text:'Zoom',
iconCls: 'button_menu_ext ss_sprite ss_zoom',
menu: new Ext.menu.Menu({
items: [{
text : '25%',
handler: function() {
Ext.getCmp('centerPanel').setTitle(_('ID_PROCESSMAP_TITLE') + ' - ' + pro_title + ' (25%)' );
document.getElementById('designerFrame').contentWindow.workflow.zoom('25');
}
},{
text : '50%',
handler: function() {
Ext.getCmp('centerPanel').setTitle(_('ID_PROCESSMAP_TITLE') + ' - ' + pro_title + ' (50%)' );
document.getElementById('designerFrame').contentWindow.workflow.zoom('50');
}
},{
text : '75%',
handler: function() {
Ext.getCmp('centerPanel').setTitle(_('ID_PROCESSMAP_TITLE') + ' - ' + pro_title + ' (75%)' );
document.getElementById('designerFrame').contentWindow.workflow.zoom('75');
}
},{
text : '100%',
handler: function() {
Ext.getCmp('centerPanel').setTitle(_('ID_PROCESSMAP_TITLE') + ' - ' + pro_title + ' (100%)' );
document.getElementById('designerFrame').contentWindow.workflow.zoom('100');
}
},{
text : '125%',
handler: function() {
Ext.getCmp('centerPanel').setTitle(_('ID_PROCESSMAP_TITLE') + ' - ' + pro_title + ' (125%)' );
document.getElementById('designerFrame').contentWindow.workflow.zoom('125');
}
},{
text : '150%',
handler: function() {
Ext.getCmp('centerPanel').setTitle(_('ID_PROCESSMAP_TITLE') + ' - ' + pro_title + ' (150%)' );
document.getElementById('designerFrame').contentWindow.workflow.zoom('150');
}
},{
text : '200%',
handler: function() {
Ext.getCmp('centerPanel').setTitle(_('ID_PROCESSMAP_TITLE') + ' - ' + pro_title + ' (200%)' );
document.getElementById('designerFrame').contentWindow.workflow.zoom('200');
}
}
]
})
}, {
xtype: 'tbseparator'
}, {
//xtype: 'tbsplit',
iconCls: 'button_menu_ext ss_sprite ss_application',
text: 'Process',
menu: new Ext.menu.Menu({
items: [{
text : 'Dynaform',
iconCls: 'button_menu_ext ss_sprite ss_application_form',
handler : function() {
processObj.addDynaform();
}
}, {
text: 'Input Document',
iconCls: 'button_menu_ext ss_sprite ss_page_white_put',
handler : function() {
processObj.addInputDoc();
}
}, {
text: 'Output Document',
iconCls: 'button_menu_ext ss_sprite ss_page_white_get',
handler : function() {
processObj.addOutputDoc();
}
}, {
text: 'Trigger',
iconCls: 'button_menu_ext ss_sprite ss_cog',
handler : function() {
processObj.addTriggers();
}
}
/*
,{
text: 'Report Table',
iconCls: 'button_menu_ext ss_sprite ss_table',
handler : function() {
processObj.addReportTable();
}
},
{
text: 'Database Connection',
iconCls: 'button_menu_ext ss_sprite ss_database_connect',
handler : function() {
processObj.dbConnection();
}
}
*/
]
})
}, {
text: _('ID_ACTORS'),
iconCls: 'ICON_USERS',
handler: function(){
document.getElementById('designerFrame').contentWindow.usersPanel.show()
}
}, {
xtype: 'tbfill'
}, {
text: _('ID_SWITCH_EDITOR'),
iconCls: 'button_menu_ext ss_sprite ss_pencil',
handler: function() {
if(typeof pro_uid !== 'undefined') {
location.href = '../processes/processes_Map?PRO_UID=' +pro_uid+ '&rand=' +Math.random()
}
}
}
]
});
var viewport = new Ext.Viewport({
id:'viewPort1'
,layout:'border'
,border:false,
items:[main]
});
Ext.getCmp('usersPanelTabs').getTabEl('usersTaskGrid').style.display = 'none';
Ext.getCmp('usersPanelTabs').getTabEl('usersTaskAdHocGrid').style.display = 'none';
//Ext.getCmp('eastPanel').hide();
//Ext.getCmp('eastPanel').ownerCt.doLayout();
});

View File

@@ -515,7 +515,7 @@ editProcess = function(){
editNewProcess = function(){
var rowSelected = processesGrid.getSelectionModel().getSelected();
if( rowSelected ) {
location.href = '../bpmn/processmap?PRO_UID='+rowSelected.data.PRO_UID+'&rand='+Math.random()
location.href = '../bpmnDesigner?id='+rowSelected.data.PRO_UID
} else {
Ext.Msg.show({
title:'',