HOR-3620
Fixed class name processMap to ProcessMap
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
* @author Julio Cesar Laura Avendano
|
* @author Julio Cesar Laura Avendano
|
||||||
* @copyright 2007 COLOSA
|
* @copyright 2007 COLOSA
|
||||||
*/
|
*/
|
||||||
class processMap
|
class ProcessMap
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Load the process map data
|
* Load the process map data
|
||||||
@@ -2567,7 +2567,7 @@ class processMap
|
|||||||
//Getting Gateway UID after saving gateway
|
//Getting Gateway UID after saving gateway
|
||||||
//if($sType != 'SEQUENTIAL' && $sGatewayUID == '' && $sDelete == '1')
|
//if($sType != 'SEQUENTIAL' && $sGatewayUID == '' && $sDelete == '1')
|
||||||
if ($sType != 'SEQUENTIAL') {
|
if ($sType != 'SEQUENTIAL') {
|
||||||
$oProcessMap = new processMap();
|
$oProcessMap = new ProcessMap();
|
||||||
$sGatewayUID = $oProcessMap->saveNewGateway($sProcessUID, $sTaskUID, $sNextTask);
|
$sGatewayUID = $oProcessMap->saveNewGateway($sProcessUID, $sTaskUID, $sNextTask);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ class Tasks
|
|||||||
foreach ($aRoutes as $key => $row) {
|
foreach ($aRoutes as $key => $row) {
|
||||||
$sRouteType = $row['ROU_TYPE'];
|
$sRouteType = $row['ROU_TYPE'];
|
||||||
$oRoute = new Route();
|
$oRoute = new Route();
|
||||||
$oProcessMap = new processMap();
|
$oProcessMap = new ProcessMap();
|
||||||
$oTask = new Task();
|
$oTask = new Task();
|
||||||
$oEvent = new Event();
|
$oEvent = new Event();
|
||||||
//unset ($row['ROU_UID']);
|
//unset ($row['ROU_UID']);
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ class XmlForm_Field_toolButton extends XmlForm_Field
|
|||||||
$html = '';
|
$html = '';
|
||||||
if (isset($this->owner->values['PRO_UID'])) {
|
if (isset($this->owner->values['PRO_UID'])) {
|
||||||
|
|
||||||
$criteria = processMap::getDynaformsCriteria($this->owner->values['PRO_UID']);
|
$criteria = ProcessMap::getDynaformsCriteria($this->owner->values['PRO_UID']);
|
||||||
$dataset = DynaformPeer::doSelectRS($criteria);
|
$dataset = DynaformPeer::doSelectRS($criteria);
|
||||||
if ($dataset->getRecordCount() > 0) {
|
if ($dataset->getRecordCount() > 0) {
|
||||||
$html .= '<span style="display:inline-block; font-size: 8pt;margin-left: 5px;margin-bottom: 3px;">' . G::LoadTranslation('ID_DYNAFORM');
|
$html .= '<span style="display:inline-block; font-size: 8pt;margin-left: 5px;margin-bottom: 3px;">' . G::LoadTranslation('ID_DYNAFORM');
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server
|
|||||||
if (count($paths) == 1 && $paths[0] == 'processes' && is_dir($pathProcesses)) {
|
if (count($paths) == 1 && $paths[0] == 'processes' && is_dir($pathProcesses)) {
|
||||||
// try to get the process directory list
|
// try to get the process directory list
|
||||||
|
|
||||||
$oProcessMap = new processMap();
|
$oProcessMap = new ProcessMap();
|
||||||
$oProcess = new Process();
|
$oProcess = new Process();
|
||||||
$c = $oProcessMap->getConditionProcessList();
|
$c = $oProcessMap->getConditionProcessList();
|
||||||
$oDataset = ProcessPeer::doSelectRS($c);
|
$oDataset = ProcessPeer::doSelectRS($c);
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ class wsBase
|
|||||||
|
|
||||||
$_DBArray = (isset( $_SESSION['_DBArray'] ) ? $_SESSION['_DBArray'] : '');
|
$_DBArray = (isset( $_SESSION['_DBArray'] ) ? $_SESSION['_DBArray'] : '');
|
||||||
|
|
||||||
$oMap = new processMap();
|
$oMap = new ProcessMap();
|
||||||
$oCriteria = $oMap->getInputDocumentsCriteria( $sProcessUID );
|
$oCriteria = $oMap->getInputDocumentsCriteria( $sProcessUID );
|
||||||
$oDataset = InputDocumentPeer::doSelectRS( $oCriteria );
|
$oDataset = InputDocumentPeer::doSelectRS( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class caseSchedulerProxy extends HttpProxyController
|
|||||||
$sch_uid = $oData['EVN_ACTION'];
|
$sch_uid = $oData['EVN_ACTION'];
|
||||||
|
|
||||||
if ($sch_uid != '') {
|
if ($sch_uid != '') {
|
||||||
$oProcessMap = new processMap( new DBConnection() );
|
$oProcessMap = new ProcessMap( new DBConnection() );
|
||||||
$rows = $oProcessMap->caseNewSchedulerList( $sch_uid );
|
$rows = $oProcessMap->caseNewSchedulerList( $sch_uid );
|
||||||
if ($rows['SCH_OPTION'] == '3') {
|
if ($rows['SCH_OPTION'] == '3') {
|
||||||
$sch_start_day = explode( '|', $rows['SCH_START_DAY'] );
|
$sch_start_day = explode( '|', $rows['SCH_START_DAY'] );
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class pmTablesProxy extends HttpProxyController
|
|||||||
public function getList ($httpData)
|
public function getList ($httpData)
|
||||||
{
|
{
|
||||||
$configurations = new Configurations();
|
$configurations = new Configurations();
|
||||||
$processMap = new processMap();
|
$processMap = new ProcessMap();
|
||||||
|
|
||||||
// setting parameters
|
// setting parameters
|
||||||
$config = $configurations->getConfiguration( 'additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
$config = $configurations->getConfiguration( 'additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class processOptionsProxy extends HttpProxyController
|
|||||||
|
|
||||||
public function loadInputDocuments ($params)
|
public function loadInputDocuments ($params)
|
||||||
{
|
{
|
||||||
$oProcessMap = new processMap( new DBConnection() );
|
$oProcessMap = new ProcessMap( new DBConnection() );
|
||||||
|
|
||||||
$pro_uid = $params->PRO_UID;
|
$pro_uid = $params->PRO_UID;
|
||||||
$start = isset( $params->start ) ? $params->start : 0;
|
$start = isset( $params->start ) ? $params->start : 0;
|
||||||
@@ -24,7 +24,7 @@ class processOptionsProxy extends HttpProxyController
|
|||||||
|
|
||||||
public function canDeleteInputDoc ($params)
|
public function canDeleteInputDoc ($params)
|
||||||
{
|
{
|
||||||
$oProcessMap = new processMap( new DBConnection() );
|
$oProcessMap = new ProcessMap( new DBConnection() );
|
||||||
$aRows = $oProcessMap->getAllInputDocsByTask( $params->PRO_UID );
|
$aRows = $oProcessMap->getAllInputDocsByTask( $params->PRO_UID );
|
||||||
$response = isset( $aRows[$params->IDOC_UID] ) ? false : true;
|
$response = isset( $aRows[$params->IDOC_UID] ) ? false : true;
|
||||||
$this->success = $response;
|
$this->success = $response;
|
||||||
@@ -54,7 +54,7 @@ class processOptionsProxy extends HttpProxyController
|
|||||||
$oOP->removeByObject( 'INPUT', $params->IDOC_UID );
|
$oOP->removeByObject( 'INPUT', $params->IDOC_UID );
|
||||||
|
|
||||||
//refresh dbarray with the last change in inputDocument
|
//refresh dbarray with the last change in inputDocument
|
||||||
$oMap = new processMap();
|
$oMap = new ProcessMap();
|
||||||
$oCriteria = $oMap->getInputDocumentsCriteria( $params->PRO_UID );
|
$oCriteria = $oMap->getInputDocumentsCriteria( $params->PRO_UID );
|
||||||
|
|
||||||
$this->success = true;
|
$this->success = true;
|
||||||
@@ -90,7 +90,7 @@ class processOptionsProxy extends HttpProxyController
|
|||||||
}
|
}
|
||||||
|
|
||||||
//refresh dbarray with the last change in inputDocument
|
//refresh dbarray with the last change in inputDocument
|
||||||
$oMap = new processMap();
|
$oMap = new ProcessMap();
|
||||||
$oCriteria = $oMap->getInputDocumentsCriteria( $aData['PRO_UID'] );
|
$oCriteria = $oMap->getInputDocumentsCriteria( $aData['PRO_UID'] );
|
||||||
$this->success = true;
|
$this->success = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ class ProcessProxy extends HttpProxyController
|
|||||||
switch ($httpData->type) {
|
switch ($httpData->type) {
|
||||||
case 'process':
|
case 'process':
|
||||||
|
|
||||||
$oProcessMap = new processMap( new DBConnection() );
|
$oProcessMap = new ProcessMap( new DBConnection() );
|
||||||
$process = $oProcessMap->editProcessNew( $httpData->UID );
|
$process = $oProcessMap->editProcessNew( $httpData->UID );
|
||||||
$category = ProcessCategoryPeer::retrieveByPk( $process['PRO_CATEGORY'] );
|
$category = ProcessCategoryPeer::retrieveByPk( $process['PRO_CATEGORY'] );
|
||||||
$categoryName = is_object( $category ) ? $category->getCategoryName() : '';
|
$categoryName = is_object( $category ) ? $category->getCategoryName() : '';
|
||||||
@@ -388,7 +388,7 @@ class ProcessProxy extends HttpProxyController
|
|||||||
*/
|
*/
|
||||||
public function getPMVariables ($param)
|
public function getPMVariables ($param)
|
||||||
{
|
{
|
||||||
$oProcessMap = new processMap( new DBConnection() );
|
$oProcessMap = new ProcessMap( new DBConnection() );
|
||||||
$rows = getDynaformsVars( $param->PRO_UID );
|
$rows = getDynaformsVars( $param->PRO_UID );
|
||||||
foreach ($rows as $i => $var) {
|
foreach ($rows as $i => $var) {
|
||||||
$rows[$i]['sName'] = "@@{$var['sName']}";
|
$rows[$i]['sName'] = "@@{$var['sName']}";
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ class webEntryProxy extends HttpProxyController
|
|||||||
|
|
||||||
public function load ($params)
|
public function load ($params)
|
||||||
{
|
{
|
||||||
$oProcessMap = new processMap( new DBConnection() );
|
$oProcessMap = new ProcessMap( new DBConnection() );
|
||||||
$PRO_UID = $params->PRO_UID;
|
$PRO_UID = $params->PRO_UID;
|
||||||
$EVN_UID = $params->EVN_UID;
|
$EVN_UID = $params->EVN_UID;
|
||||||
$sOutput = $oProcessMap->listNewWebEntry( $PRO_UID, $EVN_UID );
|
$sOutput = $oProcessMap->listNewWebEntry( $PRO_UID, $EVN_UID );
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ class Ajax
|
|||||||
|
|
||||||
//$oHeadPublisher->addScriptfile('/jscore/processmap/core/processmap.js');
|
//$oHeadPublisher->addScriptfile('/jscore/processmap/core/processmap.js');
|
||||||
$oHeadPublisher->addScriptCode('
|
$oHeadPublisher->addScriptCode('
|
||||||
var maximunX = ' . processMap::getMaximunTaskX($_SESSION['PROCESS']) . ';
|
var maximunX = ' . ProcessMap::getMaximunTaskX($_SESSION['PROCESS']) . ';
|
||||||
window.onload = function(){
|
window.onload = function(){
|
||||||
var pb=leimnud.dom.capture("tag.body 0");
|
var pb=leimnud.dom.capture("tag.body 0");
|
||||||
Pm=new processmap();
|
Pm=new processmap();
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
|||||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptCode( '
|
$oHeadPublisher->addScriptCode( '
|
||||||
var maximunX = ' . processMap::getMaximunTaskX( $_SESSION['PROCESS'] ) . ';
|
var maximunX = ' . ProcessMap::getMaximunTaskX( $_SESSION['PROCESS'] ) . ';
|
||||||
var pb=leimnud.dom.capture("tag.body 0");
|
var pb=leimnud.dom.capture("tag.body 0");
|
||||||
Pm=new processmap();
|
Pm=new processmap();
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ $G_ID_SUB_MENU_SELECTED = 'DB_CONNECTIONS';
|
|||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
|
|
||||||
$oProcess = new processMap();
|
$oProcess = new ProcessMap();
|
||||||
$oCriteria = $oProcess->getConditionProcessList();
|
$oCriteria = $oProcess->getConditionProcessList();
|
||||||
if (ProcessPeer::doCount( $oCriteria ) > 0) {
|
if (ProcessPeer::doCount( $oCriteria ) > 0) {
|
||||||
$aProcesses = array ();
|
$aProcesses = array ();
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ switch ($action) {
|
|||||||
return print ($oStep->loadInfoAssigConnecctionDB( $_POST['PRO_UID'], $_POST['DBS_UID'] )) ;
|
return print ($oStep->loadInfoAssigConnecctionDB( $_POST['PRO_UID'], $_POST['DBS_UID'] )) ;
|
||||||
break;
|
break;
|
||||||
case 'showDbConnectionsList':
|
case 'showDbConnectionsList':
|
||||||
$oProcess = new processMap();
|
$oProcess = new ProcessMap();
|
||||||
$oCriteria = $oProcess->getConditionProcessList();
|
$oCriteria = $oProcess->getConditionProcessList();
|
||||||
if (ProcessPeer::doCount( $oCriteria ) > 0) {
|
if (ProcessPeer::doCount( $oCriteria ) > 0) {
|
||||||
$aProcesses = array ();
|
$aProcesses = array ();
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ try {
|
|||||||
fclose( $templateHd1 );
|
fclose( $templateHd1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
$criteria = processMap::getDynaformsCriteria($PRO_UID);
|
$criteria = ProcessMap::getDynaformsCriteria($PRO_UID);
|
||||||
//FROM
|
//FROM
|
||||||
//WHERE
|
//WHERE
|
||||||
//QUERY
|
//QUERY
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ foreach ($aAux1 as $aAux2) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$oProcessMap = new processMap( new DBConnection() );
|
$oProcessMap = new ProcessMap( new DBConnection() );
|
||||||
$aTriggersList = $oProcessMap->getTriggers( $_SESSION['PROCESS'] );
|
$aTriggersList = $oProcessMap->getTriggers( $_SESSION['PROCESS'] );
|
||||||
$aTriggersFileds = array ();
|
$aTriggersFileds = array ();
|
||||||
$aTriggersFileds[] = array ('TRI_UID' => 'char','TRI_TITLE' => 'char');
|
$aTriggersFileds[] = array ('TRI_UID' => 'char','TRI_TITLE' => 'char');
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ foreach ($aAux1 as $aAux2) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$oProcessMap = new processMap( new DBConnection() );
|
$oProcessMap = new ProcessMap( new DBConnection() );
|
||||||
$aTriggersList = $oProcessMap->getTriggers( $_GET['PRO_UID'] );
|
$aTriggersList = $oProcessMap->getTriggers( $_GET['PRO_UID'] );
|
||||||
|
|
||||||
$aTriggersFileds = array();
|
$aTriggersFileds = array();
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ try {
|
|||||||
$oOP->removeByObject( 'INPUT', $_POST['INP_DOC_UID'] );
|
$oOP->removeByObject( 'INPUT', $_POST['INP_DOC_UID'] );
|
||||||
|
|
||||||
//refresh dbarray with the last change in inputDocument
|
//refresh dbarray with the last change in inputDocument
|
||||||
$oMap = new processMap();
|
$oMap = new ProcessMap();
|
||||||
$oCriteria = $oMap->getInputDocumentsCriteria( $fields['PRO_UID'] );
|
$oCriteria = $oMap->getInputDocumentsCriteria( $fields['PRO_UID'] );
|
||||||
|
|
||||||
$result->success = true;
|
$result->success = true;
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//refresh dbarray with the last change in inputDocument
|
//refresh dbarray with the last change in inputDocument
|
||||||
$oMap = new processMap();
|
$oMap = new ProcessMap();
|
||||||
$oCriteria = $oMap->getInputDocumentsCriteria( $aData['PRO_UID'] );
|
$oCriteria = $oMap->getInputDocumentsCriteria( $aData['PRO_UID'] );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,60 +1,60 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* outputdocs_Delete.php
|
* outputdocs_Delete.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
switch ($RBAC->userCanAccess( 'PM_FACTORY' )) {
|
switch ($RBAC->userCanAccess( 'PM_FACTORY' )) {
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die();
|
die();
|
||||||
break;
|
break;
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die();
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$oOutputDocument = new OutputDocument();
|
$oOutputDocument = new OutputDocument();
|
||||||
$fields = $oOutputDocument->load( $_POST['OUT_DOC_UID'] );
|
$fields = $oOutputDocument->load( $_POST['OUT_DOC_UID'] );
|
||||||
$oOutputDocument->remove( $_POST['OUT_DOC_UID'] );
|
$oOutputDocument->remove( $_POST['OUT_DOC_UID'] );
|
||||||
$oStep = new Step();
|
$oStep = new Step();
|
||||||
$oStep->removeStep( 'OUTPUT_DOCUMENT', $_POST['OUT_DOC_UID'] );
|
$oStep->removeStep( 'OUTPUT_DOCUMENT', $_POST['OUT_DOC_UID'] );
|
||||||
$oOP = new ObjectPermission();
|
$oOP = new ObjectPermission();
|
||||||
$oOP->removeByObject( 'OUTPUT', $_POST['OUT_DOC_UID'] );
|
$oOP->removeByObject( 'OUTPUT', $_POST['OUT_DOC_UID'] );
|
||||||
//refresh dbarray with the last change in outputDocument
|
//refresh dbarray with the last change in outputDocument
|
||||||
$oMap = new processMap();
|
$oMap = new ProcessMap();
|
||||||
$oCriteria = $oMap->getOutputDocumentsCriteria( $fields['PRO_UID'] );
|
$oCriteria = $oMap->getOutputDocumentsCriteria( $fields['PRO_UID'] );
|
||||||
|
|
||||||
$result = new stdClass();
|
$result = new stdClass();
|
||||||
$result->success = true;
|
$result->success = true;
|
||||||
$result->msg = G::LoadTranslation( 'ID_OUTPUTDOCUMENT_REMOVED' );
|
$result->msg = G::LoadTranslation( 'ID_OUTPUTDOCUMENT_REMOVED' );
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$result = new stdClass();
|
$result = new stdClass();
|
||||||
$result->success = false;
|
$result->success = false;
|
||||||
$result->msg = $e->getMessage();
|
$result->msg = $e->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
print G::json_encode( $result );
|
print G::json_encode( $result );
|
||||||
|
|
||||||
|
|||||||
@@ -1,90 +1,90 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* outputdocs_Save.php
|
* outputdocs_Save.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
switch ($RBAC->userCanAccess( 'PM_FACTORY' )) {
|
switch ($RBAC->userCanAccess( 'PM_FACTORY' )) {
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die();
|
die();
|
||||||
break;
|
break;
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die();
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//default:
|
//default:
|
||||||
|
|
||||||
$oOutputDocument = new OutputDocument();
|
$oOutputDocument = new OutputDocument();
|
||||||
|
|
||||||
if (isset( $_POST['form'] ))
|
if (isset( $_POST['form'] ))
|
||||||
$aData = $_POST['form']; //For old process map form
|
$aData = $_POST['form']; //For old process map form
|
||||||
else
|
else
|
||||||
$aData = $_POST; //For Extjs (Since we are not using form in ExtJS)
|
$aData = $_POST; //For Extjs (Since we are not using form in ExtJS)
|
||||||
|
|
||||||
|
|
||||||
if (isset( $aData['OUT_DOC_TITLE'] ) && $aData['OUT_DOC_TITLE'] != '') {
|
if (isset( $aData['OUT_DOC_TITLE'] ) && $aData['OUT_DOC_TITLE'] != '') {
|
||||||
$oForm = new Form( 'outputdocs/outputdocs_Properties', PATH_XMLFORM );
|
$oForm = new Form( 'outputdocs/outputdocs_Properties', PATH_XMLFORM );
|
||||||
$aData = $oForm->validatePost();
|
$aData = $oForm->validatePost();
|
||||||
if (isset( $aData['OUT_DOC_PDF_SECURITY_ENABLED'] ) && $aData['OUT_DOC_PDF_SECURITY_ENABLED'] == "0") {
|
if (isset( $aData['OUT_DOC_PDF_SECURITY_ENABLED'] ) && $aData['OUT_DOC_PDF_SECURITY_ENABLED'] == "0") {
|
||||||
$aData['OUT_DOC_PDF_SECURITY_OPEN_PASSWORD'] = "";
|
$aData['OUT_DOC_PDF_SECURITY_OPEN_PASSWORD'] = "";
|
||||||
$aData['OUT_DOC_PDF_SECURITY_OWNER_PASSWORD'] = "";
|
$aData['OUT_DOC_PDF_SECURITY_OWNER_PASSWORD'] = "";
|
||||||
$aData['OUT_DOC_PDF_SECURITY_PERMISSIONS'] = "";
|
$aData['OUT_DOC_PDF_SECURITY_PERMISSIONS'] = "";
|
||||||
}
|
}
|
||||||
if (isset( $aData['OUT_DOC_PDF_SECURITY_OPEN_PASSWORD'] ) && $aData['OUT_DOC_PDF_SECURITY_OPEN_PASSWORD'] != "") {
|
if (isset( $aData['OUT_DOC_PDF_SECURITY_OPEN_PASSWORD'] ) && $aData['OUT_DOC_PDF_SECURITY_OPEN_PASSWORD'] != "") {
|
||||||
$aData['OUT_DOC_PDF_SECURITY_OPEN_PASSWORD'] = G::encrypt( $aData['OUT_DOC_PDF_SECURITY_OPEN_PASSWORD'], $aData['OUT_DOC_UID'] );
|
$aData['OUT_DOC_PDF_SECURITY_OPEN_PASSWORD'] = G::encrypt( $aData['OUT_DOC_PDF_SECURITY_OPEN_PASSWORD'], $aData['OUT_DOC_UID'] );
|
||||||
$aData['OUT_DOC_PDF_SECURITY_OWNER_PASSWORD'] = G::encrypt( $aData['OUT_DOC_PDF_SECURITY_OWNER_PASSWORD'], $aData['OUT_DOC_UID'] );
|
$aData['OUT_DOC_PDF_SECURITY_OWNER_PASSWORD'] = G::encrypt( $aData['OUT_DOC_PDF_SECURITY_OWNER_PASSWORD'], $aData['OUT_DOC_UID'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($aData['OUT_DOC_UID'] == '') {
|
if ($aData['OUT_DOC_UID'] == '') {
|
||||||
|
|
||||||
if ((isset( $aData['OUT_DOC_TYPE'] )) && ($aData['OUT_DOC_TYPE'] == 'JRXML')) {
|
if ((isset( $aData['OUT_DOC_TYPE'] )) && ($aData['OUT_DOC_TYPE'] == 'JRXML')) {
|
||||||
$dynaformUid = $aData['DYN_UID'];
|
$dynaformUid = $aData['DYN_UID'];
|
||||||
$outDocUid = $oOutputDocument->create( $aData );
|
$outDocUid = $oOutputDocument->create( $aData );
|
||||||
|
|
||||||
$jbpm = new JavaBridgePM();
|
$jbpm = new JavaBridgePM();
|
||||||
print $jbpm->generateJrxmlFromDynaform( $outDocUid, $dynaformUid, 'classic' );
|
print $jbpm->generateJrxmlFromDynaform( $outDocUid, $dynaformUid, 'classic' );
|
||||||
} else {
|
} else {
|
||||||
$outDocUid = $oOutputDocument->create( $aData );
|
$outDocUid = $oOutputDocument->create( $aData );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$oOutputDocument->update( $aData );
|
$oOutputDocument->update( $aData );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset( $aData['PRO_UID'] )) {
|
if (isset( $aData['PRO_UID'] )) {
|
||||||
//refresh dbarray with the last change in outputDocument
|
//refresh dbarray with the last change in outputDocument
|
||||||
$oMap = new processMap();
|
$oMap = new ProcessMap();
|
||||||
$oCriteria = $oMap->getOutputDocumentsCriteria( $aData['PRO_UID'] );
|
$oCriteria = $oMap->getOutputDocumentsCriteria( $aData['PRO_UID'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception $oException) {
|
} catch (Exception $oException) {
|
||||||
$token = strtotime("now");
|
$token = strtotime("now");
|
||||||
PMException::registerErrorLog($oException, $token);
|
PMException::registerErrorLog($oException, $token);
|
||||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ class Ajax
|
|||||||
{
|
{
|
||||||
switch ($param['type']) {
|
switch ($param['type']) {
|
||||||
case 'process':
|
case 'process':
|
||||||
$oProcessMap = new processMap(new DBConnection());
|
$oProcessMap = new ProcessMap(new DBConnection());
|
||||||
$process = $oProcessMap->editProcessNew($param['UID']);
|
$process = $oProcessMap->editProcessNew($param['UID']);
|
||||||
$category = ProcessCategoryPeer::retrieveByPk($process['PRO_CATEGORY']);
|
$category = ProcessCategoryPeer::retrieveByPk($process['PRO_CATEGORY']);
|
||||||
$categoryName = is_object($category) ? $category->getCategoryName() : '';
|
$categoryName = is_object($category) ? $category->getCategoryName() : '';
|
||||||
@@ -444,7 +444,7 @@ class Ajax
|
|||||||
|
|
||||||
public function getPMVariables($param)
|
public function getPMVariables($param)
|
||||||
{
|
{
|
||||||
$oProcessMap = new processMap(new DBConnection());
|
$oProcessMap = new ProcessMap(new DBConnection());
|
||||||
$response->rows = getDynaformsVars($param['PRO_UID']);
|
$response->rows = getDynaformsVars($param['PRO_UID']);
|
||||||
foreach ($response->rows as $i => $var) {
|
foreach ($response->rows as $i => $var) {
|
||||||
$response->rows[$i]['sName'] = "@@{$var['sName']}";
|
$response->rows[$i]['sName'] = "@@{$var['sName']}";
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ try {
|
|||||||
$resultProcess = $infoProcess->getProcessRow($proUid);
|
$resultProcess = $infoProcess->getProcessRow($proUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oProcessMap = new processMap(new DBConnection());
|
$oProcessMap = new ProcessMap(new DBConnection());
|
||||||
|
|
||||||
switch ($_REQUEST['action']) {
|
switch ($_REQUEST['action']) {
|
||||||
case 'load':
|
case 'load':
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ $aLabels['ACTIVE'] = G::LoadTranslation( 'ID_ACTIVE' );
|
|||||||
$aLabels['INACTIVE'] = G::LoadTranslation( 'ID_INACTIVE' );
|
$aLabels['INACTIVE'] = G::LoadTranslation( 'ID_INACTIVE' );
|
||||||
$aLabels['CONFIRM'] = G::LoadTranslation( 'ID_MSG_CONFIRM_DELETE_PROCESS' );
|
$aLabels['CONFIRM'] = G::LoadTranslation( 'ID_MSG_CONFIRM_DELETE_PROCESS' );
|
||||||
|
|
||||||
$oProcess = new processMap();
|
$oProcess = new ProcessMap();
|
||||||
$c = $oProcess->getConditionProcessList();
|
$c = $oProcess->getConditionProcessList();
|
||||||
|
|
||||||
function activeFalse ($value)
|
function activeFalse ($value)
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3Fxell
|
|||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptFile( '/jscore/dbConnections/main.js' );
|
$oHeadPublisher->addScriptFile( '/jscore/dbConnections/main.js' );
|
||||||
$oHeadPublisher->addScriptCode( '
|
$oHeadPublisher->addScriptCode( '
|
||||||
var maximunX = ' . processMap::getMaximunTaskX( $processUID ) . ';
|
var maximunX = ' . ProcessMap::getMaximunTaskX( $processUID ) . ';
|
||||||
var leimnud = new maborak();
|
var leimnud = new maborak();
|
||||||
leimnud.make();
|
leimnud.make();
|
||||||
leimnud.Package.Load("rpc,drag,drop,panel,app,validator,fx,dom,abbr",{Instance:leimnud,Type:"module"});
|
leimnud.Package.Load("rpc,drag,drop,panel,app,validator,fx,dom,abbr",{Instance:leimnud,Type:"module"});
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ switch ($action) {
|
|||||||
case 'list':
|
case 'list':
|
||||||
|
|
||||||
$configigurations = new Configurations();
|
$configigurations = new Configurations();
|
||||||
$oProcessMap = new processMap();
|
$oProcessMap = new ProcessMap();
|
||||||
|
|
||||||
$config = $configigurations->getConfiguration( 'additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
$config = $configigurations->getConfiguration( 'additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
$env = $configigurations->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
$env = $configigurations->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
||||||
|
|||||||
@@ -1,462 +1,462 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* trackerAjax.php
|
* trackerAjax.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$filter = new InputFilter();
|
$filter = new InputFilter();
|
||||||
$_POST = $filter->xssFilterHard($_POST);
|
$_POST = $filter->xssFilterHard($_POST);
|
||||||
|
|
||||||
if (isset( $_POST['form']['action'] )) {
|
if (isset( $_POST['form']['action'] )) {
|
||||||
$_POST['action'] = $_POST['form']['action'];
|
$_POST['action'] = $_POST['form']['action'];
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($_POST['action']) {
|
switch ($_POST['action']) {
|
||||||
case 'availableCaseTrackerObjects':
|
case 'availableCaseTrackerObjects':
|
||||||
$oProcessMap = new ProcessMap();
|
$oProcessMap = new ProcessMap();
|
||||||
$oProcessMap->availableCaseTrackerObjects( $_POST['PRO_UID'] );
|
$oProcessMap->availableCaseTrackerObjects( $_POST['PRO_UID'] );
|
||||||
break;
|
break;
|
||||||
case 'assignCaseTrackerObject':
|
case 'assignCaseTrackerObject':
|
||||||
$oProcessMap = new ProcessMap();
|
$oProcessMap = new ProcessMap();
|
||||||
$cto_UID = $oProcessMap->assignCaseTrackerObject( $_POST['PRO_UID'], $_POST['OBJECT_TYPE'], $_POST['OBJECT_UID'] );
|
$cto_UID = $oProcessMap->assignCaseTrackerObject( $_POST['PRO_UID'], $_POST['OBJECT_TYPE'], $_POST['OBJECT_UID'] );
|
||||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||||
$infoProcess = new Process();
|
$infoProcess = new Process();
|
||||||
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
||||||
G::auditLog('CaseTrackers','Assign Case Tracker Object ('.$cto_UID.' - '.$_POST['OBJECT_TYPE'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
G::auditLog('CaseTrackers','Assign Case Tracker Object ('.$cto_UID.' - '.$_POST['OBJECT_TYPE'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||||
echo $cto_UID;
|
echo $cto_UID;
|
||||||
break;
|
break;
|
||||||
case 'removeCaseTrackerObject':
|
case 'removeCaseTrackerObject':
|
||||||
$oProcessMap = new ProcessMap();
|
$oProcessMap = new ProcessMap();
|
||||||
$oProcessMap->removeCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
$oProcessMap->removeCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||||
$infoProcess = new Process();
|
$infoProcess = new Process();
|
||||||
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
||||||
G::auditLog('CaseTrackers','Remove Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
G::auditLog('CaseTrackers','Remove Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||||
break;
|
break;
|
||||||
case 'upCaseTrackerObject':
|
case 'upCaseTrackerObject':
|
||||||
$oProcessMap = new ProcessMap();
|
$oProcessMap = new ProcessMap();
|
||||||
$oProcessMap->upCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
$oProcessMap->upCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||||
$infoProcess = new Process();
|
$infoProcess = new Process();
|
||||||
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
||||||
G::auditLog('CaseTrackers','Move Up Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
G::auditLog('CaseTrackers','Move Up Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||||
break;
|
break;
|
||||||
case 'downCaseTrackerObject':
|
case 'downCaseTrackerObject':
|
||||||
$oProcessMap = new ProcessMap();
|
$oProcessMap = new ProcessMap();
|
||||||
$oProcessMap->downCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
$oProcessMap->downCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||||
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||||
$infoProcess = new Process();
|
$infoProcess = new Process();
|
||||||
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
$resultProcess = $infoProcess->load($_POST['PRO_UID']);
|
||||||
G::auditLog('CaseTrackers','Move Down Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
G::auditLog('CaseTrackers','Move Down Case Tracker Object ('.$_POST['CTO_UID'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
|
||||||
break;
|
break;
|
||||||
case 'editStagesMap':
|
case 'editStagesMap':
|
||||||
$oTemplatePower = new TemplatePower( PATH_TPL . 'tracker/stages_Map.html' );
|
$oTemplatePower = new TemplatePower( PATH_TPL . 'tracker/stages_Map.html' );
|
||||||
$oTemplatePower->prepare();
|
$oTemplatePower->prepare();
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptCode( '
|
$oHeadPublisher->addScriptCode( '
|
||||||
var pb=leimnud.dom.capture("tag.body 0");
|
var pb=leimnud.dom.capture("tag.body 0");
|
||||||
Sm=new stagesmap();
|
Sm=new stagesmap();
|
||||||
Sm.options = {
|
Sm.options = {
|
||||||
target : "sm_target",
|
target : "sm_target",
|
||||||
dataServer: "../tracker/tracker_Ajax",
|
dataServer: "../tracker/tracker_Ajax",
|
||||||
uid : "' . $_POST['PRO_UID'] . '",
|
uid : "' . $_POST['PRO_UID'] . '",
|
||||||
lang : "' . SYS_LANG . '",
|
lang : "' . SYS_LANG . '",
|
||||||
theme : "processmaker",
|
theme : "processmaker",
|
||||||
size : {w:"780",h:"540"},
|
size : {w:"780",h:"540"},
|
||||||
images_dir: "/jscore/processmap/core/images/",
|
images_dir: "/jscore/processmap/core/images/",
|
||||||
rw : true,
|
rw : true,
|
||||||
hideMenu : false
|
hideMenu : false
|
||||||
};
|
};
|
||||||
Sm.make();' );
|
Sm.make();' );
|
||||||
G::RenderPage( 'publish', 'raw' );
|
G::RenderPage( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
case 'showUploadedDocumentTracker':
|
case 'showUploadedDocumentTracker':
|
||||||
require_once 'classes/model/AppDocument.php';
|
require_once 'classes/model/AppDocument.php';
|
||||||
require_once 'classes/model/AppDelegation.php';
|
require_once 'classes/model/AppDelegation.php';
|
||||||
require_once 'classes/model/InputDocument.php';
|
require_once 'classes/model/InputDocument.php';
|
||||||
require_once 'classes/model/Users.php';
|
require_once 'classes/model/Users.php';
|
||||||
$oAppDocument = new AppDocument();
|
$oAppDocument = new AppDocument();
|
||||||
$oAppDocument->Fields = $oAppDocument->load( $_POST['APP_DOC_UID'] );
|
$oAppDocument->Fields = $oAppDocument->load( $_POST['APP_DOC_UID'] );
|
||||||
|
|
||||||
$oInputDocument = new InputDocument();
|
$oInputDocument = new InputDocument();
|
||||||
if ($oAppDocument->Fields['DOC_UID'] != - 1) {
|
if ($oAppDocument->Fields['DOC_UID'] != - 1) {
|
||||||
$Fields = $oInputDocument->load( $oAppDocument->Fields['DOC_UID'] );
|
$Fields = $oInputDocument->load( $oAppDocument->Fields['DOC_UID'] );
|
||||||
} else {
|
} else {
|
||||||
$Fields = array ('INP_DOC_FORM_NEEDED' => '','FILENAME' => $oAppDocument->Fields['APP_DOC_FILENAME']);
|
$Fields = array ('INP_DOC_FORM_NEEDED' => '','FILENAME' => $oAppDocument->Fields['APP_DOC_FILENAME']);
|
||||||
}
|
}
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->add( AppDelegationPeer::DEL_INDEX, $oAppDocument->Fields['DEL_INDEX'] );
|
$oCriteria->add( AppDelegationPeer::DEL_INDEX, $oAppDocument->Fields['DEL_INDEX'] );
|
||||||
$oDataset = AppDelegationPeer::doSelectRS( $oCriteria );
|
$oDataset = AppDelegationPeer::doSelectRS( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$aRow = $oDataset->getRow();
|
$aRow = $oDataset->getRow();
|
||||||
$oTask = new Task();
|
$oTask = new Task();
|
||||||
$aTask = $oTask->load( $aRow['TAS_UID'] );
|
$aTask = $oTask->load( $aRow['TAS_UID'] );
|
||||||
$Fields['ORIGIN'] = $aTask['TAS_TITLE'];
|
$Fields['ORIGIN'] = $aTask['TAS_TITLE'];
|
||||||
$oUser = new Users();
|
$oUser = new Users();
|
||||||
$aUser = $oUser->load( $oAppDocument->Fields['USR_UID'] );
|
$aUser = $oUser->load( $oAppDocument->Fields['USR_UID'] );
|
||||||
$Fields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
$Fields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
||||||
switch ($Fields['INP_DOC_FORM_NEEDED']) {
|
switch ($Fields['INP_DOC_FORM_NEEDED']) {
|
||||||
case 'REAL':
|
case 'REAL':
|
||||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument2';
|
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument2';
|
||||||
break;
|
break;
|
||||||
case 'VIRTUAL':
|
case 'VIRTUAL':
|
||||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument1';
|
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument1';
|
||||||
break;
|
break;
|
||||||
case 'VREAL':
|
case 'VREAL':
|
||||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument3';
|
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument3';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument';
|
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$oAppDocument->Fields['VIEW'] = G::LoadTranslation( 'ID_OPEN' );
|
$oAppDocument->Fields['VIEW'] = G::LoadTranslation( 'ID_OPEN' );
|
||||||
$oAppDocument->Fields['FILE'] = 'tracker_ShowDocument?a=' . $_POST['APP_DOC_UID'] . '&r=' . rand();
|
$oAppDocument->Fields['FILE'] = 'tracker_ShowDocument?a=' . $_POST['APP_DOC_UID'] . '&r=' . rand();
|
||||||
|
|
||||||
//If plugin and trigger are defined for listing
|
//If plugin and trigger are defined for listing
|
||||||
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) {
|
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) {
|
||||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||||
$filesPluginArray = $oPluginRegistry->executeTriggers( PM_CASE_DOCUMENT_LIST_ARR, $_SESSION['APPLICATION'] );
|
$filesPluginArray = $oPluginRegistry->executeTriggers( PM_CASE_DOCUMENT_LIST_ARR, $_SESSION['APPLICATION'] );
|
||||||
//Now search for the file, if exists the change the download URL
|
//Now search for the file, if exists the change the download URL
|
||||||
foreach ($filesPluginArray as $file) {
|
foreach ($filesPluginArray as $file) {
|
||||||
if ($file->filename == $_POST['APP_DOC_UID']) {
|
if ($file->filename == $_POST['APP_DOC_UID']) {
|
||||||
$oAppDocument->Fields['FILE'] = $file->downloadScript;
|
$oAppDocument->Fields['FILE'] = $file->downloadScript;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $sXmlForm, '', G::array_merges( $Fields, $oAppDocument->Fields ), '' );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $sXmlForm, '', G::array_merges( $Fields, $oAppDocument->Fields ), '' );
|
||||||
G::RenderPage( 'publish', 'raw' );
|
G::RenderPage( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
case 'showGeneratedDocumentTracker':
|
case 'showGeneratedDocumentTracker':
|
||||||
require_once 'classes/model/AppDocument.php';
|
require_once 'classes/model/AppDocument.php';
|
||||||
require_once 'classes/model/AppDelegation.php';
|
require_once 'classes/model/AppDelegation.php';
|
||||||
$oAppDocument = new AppDocument();
|
$oAppDocument = new AppDocument();
|
||||||
$aFields = $oAppDocument->load( $_POST['APP_DOC_UID'] );
|
$aFields = $oAppDocument->load( $_POST['APP_DOC_UID'] );
|
||||||
require_once 'classes/model/OutputDocument.php';
|
require_once 'classes/model/OutputDocument.php';
|
||||||
$oOutputDocument = new OutputDocument();
|
$oOutputDocument = new OutputDocument();
|
||||||
$aOD = $oOutputDocument->load( $aFields['DOC_UID'] );
|
$aOD = $oOutputDocument->load( $aFields['DOC_UID'] );
|
||||||
|
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->add( AppDelegationPeer::APP_UID, $aFields['APP_UID'] );
|
$oCriteria->add( AppDelegationPeer::APP_UID, $aFields['APP_UID'] );
|
||||||
$oCriteria->add( AppDelegationPeer::DEL_INDEX, $aFields['DEL_INDEX'] );
|
$oCriteria->add( AppDelegationPeer::DEL_INDEX, $aFields['DEL_INDEX'] );
|
||||||
$oDataset = AppDelegationPeer::doSelectRS( $oCriteria );
|
$oDataset = AppDelegationPeer::doSelectRS( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$aRow = $oDataset->getRow();
|
$aRow = $oDataset->getRow();
|
||||||
$oTask = new Task();
|
$oTask = new Task();
|
||||||
$aTask = $oTask->load( $aRow['TAS_UID'] );
|
$aTask = $oTask->load( $aRow['TAS_UID'] );
|
||||||
$aFields['ORIGIN'] = $aTask['TAS_TITLE'];
|
$aFields['ORIGIN'] = $aTask['TAS_TITLE'];
|
||||||
require_once 'classes/model/Users.php';
|
require_once 'classes/model/Users.php';
|
||||||
$oUser = new Users();
|
$oUser = new Users();
|
||||||
$aUser = $oUser->load( $aFields['USR_UID'] );
|
$aUser = $oUser->load( $aFields['USR_UID'] );
|
||||||
$aFields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
$aFields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
||||||
$aFields['VIEW'] = G::LoadTranslation( 'ID_OPEN' );
|
$aFields['VIEW'] = G::LoadTranslation( 'ID_OPEN' );
|
||||||
$aFields['FILE1'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=doc&random=' . rand();
|
$aFields['FILE1'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=doc&random=' . rand();
|
||||||
$aFields['FILE2'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=pdf&random=' . rand();
|
$aFields['FILE2'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=pdf&random=' . rand();
|
||||||
|
|
||||||
//If plugin and trigger are defined for listing
|
//If plugin and trigger are defined for listing
|
||||||
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) {
|
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) {
|
||||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||||
$filesPluginArray = $oPluginRegistry->executeTriggers( PM_CASE_DOCUMENT_LIST_ARR, $aFields['APP_UID'] );
|
$filesPluginArray = $oPluginRegistry->executeTriggers( PM_CASE_DOCUMENT_LIST_ARR, $aFields['APP_UID'] );
|
||||||
//Now search for the file, if exists the change the download URL
|
//Now search for the file, if exists the change the download URL
|
||||||
foreach ($filesPluginArray as $file) {
|
foreach ($filesPluginArray as $file) {
|
||||||
if ($file->filename == $_POST['APP_DOC_UID']) {
|
if ($file->filename == $_POST['APP_DOC_UID']) {
|
||||||
$aFields['FILE2'] = $file->downloadScript; // The PDF is the only one uploaded to KT
|
$aFields['FILE2'] = $file->downloadScript; // The PDF is the only one uploaded to KT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_ViewAnyOutputDocument', '', G::array_merges( $aOD, $aFields ), '' );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_ViewAnyOutputDocument', '', G::array_merges( $aOD, $aFields ), '' );
|
||||||
G::RenderPage( 'publish', 'raw' );
|
G::RenderPage( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
case 'load':
|
case 'load':
|
||||||
$oConnection = Propel::getConnection( 'workflow' );
|
$oConnection = Propel::getConnection( 'workflow' );
|
||||||
$oStatement = $oConnection->prepareStatement( "CREATE TABLE IF NOT EXISTS `STAGE` (
|
$oStatement = $oConnection->prepareStatement( "CREATE TABLE IF NOT EXISTS `STAGE` (
|
||||||
`STG_UID` VARCHAR( 32 ) NOT NULL ,
|
`STG_UID` VARCHAR( 32 ) NOT NULL ,
|
||||||
`PRO_UID` VARCHAR( 32 ) NOT NULL ,
|
`PRO_UID` VARCHAR( 32 ) NOT NULL ,
|
||||||
`STG_POSX` INT( 11 ) NOT NULL DEFAULT '0',
|
`STG_POSX` INT( 11 ) NOT NULL DEFAULT '0',
|
||||||
`STG_POSY` INT( 11 ) NOT NULL DEFAULT '0',
|
`STG_POSY` INT( 11 ) NOT NULL DEFAULT '0',
|
||||||
`STG_INDEX` INT( 11 ) NOT NULL DEFAULT '0',
|
`STG_INDEX` INT( 11 ) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY ( `STG_UID` )
|
PRIMARY KEY ( `STG_UID` )
|
||||||
);" );
|
);" );
|
||||||
$oStatement->executeQuery();
|
$oStatement->executeQuery();
|
||||||
/**
|
/**
|
||||||
* ************************************************************************************************************
|
* ************************************************************************************************************
|
||||||
*/
|
*/
|
||||||
require_once 'classes/model/Stage.php';
|
require_once 'classes/model/Stage.php';
|
||||||
require_once 'classes/model/Process.php';
|
require_once 'classes/model/Process.php';
|
||||||
require_once 'classes/model/Task.php';
|
require_once 'classes/model/Task.php';
|
||||||
require_once 'classes/model/AppDelegation.php';
|
require_once 'classes/model/AppDelegation.php';
|
||||||
//$oJSON = new Services_JSON();
|
//$oJSON = new Services_JSON();
|
||||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||||
$oProcess = new Process();
|
$oProcess = new Process();
|
||||||
$aRow = $oProcess->load( $oData->uid );
|
$aRow = $oProcess->load( $oData->uid );
|
||||||
$oSM = new stdclass();
|
$oSM = new stdclass();
|
||||||
$oSM->title = new stdclass();
|
$oSM->title = new stdclass();
|
||||||
$oSM->title->label = strip_tags( $aRow['PRO_TITLE'] );
|
$oSM->title->label = strip_tags( $aRow['PRO_TITLE'] );
|
||||||
//$oSM->title->position->x = $aRow['PRO_TITLE_X'];
|
//$oSM->title->position->x = $aRow['PRO_TITLE_X'];
|
||||||
//$oSM->title->position->y = $aRow['PRO_TITLE_Y'];
|
//$oSM->title->position->y = $aRow['PRO_TITLE_Y'];
|
||||||
$oSM->title->position = new stdclass();
|
$oSM->title->position = new stdclass();
|
||||||
$oSM->title->position->x = 10;
|
$oSM->title->position->x = 10;
|
||||||
$oSM->title->position->y = 10;
|
$oSM->title->position->y = 10;
|
||||||
$oSM->stages = array ();
|
$oSM->stages = array ();
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn( StagePeer::STG_UID );
|
$oCriteria->addSelectColumn( StagePeer::STG_UID );
|
||||||
$oCriteria->addSelectColumn( ContentPeer::CON_VALUE );
|
$oCriteria->addSelectColumn( ContentPeer::CON_VALUE );
|
||||||
$oCriteria->addSelectColumn( StagePeer::STG_POSX );
|
$oCriteria->addSelectColumn( StagePeer::STG_POSX );
|
||||||
$oCriteria->addSelectColumn( StagePeer::STG_POSY );
|
$oCriteria->addSelectColumn( StagePeer::STG_POSY );
|
||||||
$aConditions = array ();
|
$aConditions = array ();
|
||||||
$aConditions[] = array (0 => StagePeer::STG_UID,1 => ContentPeer::CON_ID);
|
$aConditions[] = array (0 => StagePeer::STG_UID,1 => ContentPeer::CON_ID);
|
||||||
$aConditions[] = array (0 => ContentPeer::CON_CATEGORY,1 => DBAdapter::getStringDelimiter() . 'STG_TITLE' . DBAdapter::getStringDelimiter());
|
$aConditions[] = array (0 => ContentPeer::CON_CATEGORY,1 => DBAdapter::getStringDelimiter() . 'STG_TITLE' . DBAdapter::getStringDelimiter());
|
||||||
$aConditions[] = array (0 => ContentPeer::CON_LANG,1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
|
$aConditions[] = array (0 => ContentPeer::CON_LANG,1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
|
||||||
$oCriteria->addJoinMC( $aConditions, Criteria::LEFT_JOIN );
|
$oCriteria->addJoinMC( $aConditions, Criteria::LEFT_JOIN );
|
||||||
$oCriteria->add( StagePeer::PRO_UID, $oData->uid );
|
$oCriteria->add( StagePeer::PRO_UID, $oData->uid );
|
||||||
$oCriteria->addAscendingOrderByColumn( StagePeer::STG_INDEX );
|
$oCriteria->addAscendingOrderByColumn( StagePeer::STG_INDEX );
|
||||||
$oDataset = StagePeer::doSelectRS( $oCriteria );
|
$oDataset = StagePeer::doSelectRS( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
while ($aRow1 = $oDataset->getRow()) {
|
while ($aRow1 = $oDataset->getRow()) {
|
||||||
$oStage = new stdclass();
|
$oStage = new stdclass();
|
||||||
$oStage->uid = $aRow1['STG_UID'];
|
$oStage->uid = $aRow1['STG_UID'];
|
||||||
$oStage->label = strip_tags( $aRow1['CON_VALUE'] );
|
$oStage->label = strip_tags( $aRow1['CON_VALUE'] );
|
||||||
$oStage->position = new stdclass();
|
$oStage->position = new stdclass();
|
||||||
$oStage->position->x = (int) $aRow1['STG_POSX'];
|
$oStage->position->x = (int) $aRow1['STG_POSX'];
|
||||||
$oStage->position->y = (int) $aRow1['STG_POSY'];
|
$oStage->position->y = (int) $aRow1['STG_POSY'];
|
||||||
$oStage->derivation = new stdclass();
|
$oStage->derivation = new stdclass();
|
||||||
$oStage->derivation->to = array ();
|
$oStage->derivation->to = array ();
|
||||||
if (! $oData->mode) {
|
if (! $oData->mode) {
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->add( TaskPeer::STG_UID, $aRow1['STG_UID'] );
|
$oCriteria->add( TaskPeer::STG_UID, $aRow1['STG_UID'] );
|
||||||
$oDataset1 = TaskPeer::doSelectRS( $oCriteria );
|
$oDataset1 = TaskPeer::doSelectRS( $oCriteria );
|
||||||
$oDataset1->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset1->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset1->next();
|
$oDataset1->next();
|
||||||
$aTasks = array ();
|
$aTasks = array ();
|
||||||
while ($aRow2 = $oDataset1->getRow()) {
|
while ($aRow2 = $oDataset1->getRow()) {
|
||||||
$aTasks[] = $aRow2['TAS_UID'];
|
$aTasks[] = $aRow2['TAS_UID'];
|
||||||
$oDataset1->next();
|
$oDataset1->next();
|
||||||
}
|
}
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
||||||
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
||||||
$oCriteria->add( $oCriteria->getNewCriterion( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL )->addOr( $oCriteria->getNewCriterion( AppDelegationPeer::DEL_FINISH_DATE, '' ) ) );
|
$oCriteria->add( $oCriteria->getNewCriterion( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL )->addOr( $oCriteria->getNewCriterion( AppDelegationPeer::DEL_FINISH_DATE, '' ) ) );
|
||||||
if (AppDelegationPeer::doCount( $oCriteria ) > 0) {
|
if (AppDelegationPeer::doCount( $oCriteria ) > 0) {
|
||||||
$oStage->color = '#FF0000';
|
$oStage->color = '#FF0000';
|
||||||
} else {
|
} else {
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
||||||
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
||||||
$oCriteria->add( AppDelegationPeer::DEL_THREAD_STATUS, 'CLOSED' );
|
$oCriteria->add( AppDelegationPeer::DEL_THREAD_STATUS, 'CLOSED' );
|
||||||
if (AppDelegationPeer::doCount( $oCriteria ) > 0) {
|
if (AppDelegationPeer::doCount( $oCriteria ) > 0) {
|
||||||
$oStage->color = '#006633';
|
$oStage->color = '#006633';
|
||||||
} else {
|
} else {
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
||||||
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
||||||
if (AppDelegationPeer::doCount( $oCriteria ) == 0) {
|
if (AppDelegationPeer::doCount( $oCriteria ) == 0) {
|
||||||
$oStage->color = '#939598';
|
$oStage->color = '#939598';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$oSM->stages[] = $oStage;
|
$oSM->stages[] = $oStage;
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
}
|
}
|
||||||
foreach ($oSM->stages as $iKey => $oStage) {
|
foreach ($oSM->stages as $iKey => $oStage) {
|
||||||
if (isset( $oSM->stages[$iKey + 1] )) {
|
if (isset( $oSM->stages[$iKey + 1] )) {
|
||||||
$oDerivation = new stdclass();
|
$oDerivation = new stdclass();
|
||||||
$oDerivation->stage = $oSM->stages[$iKey + 1]->uid;
|
$oDerivation->stage = $oSM->stages[$iKey + 1]->uid;
|
||||||
$oSM->stages[$iKey]->derivation->to = array ($oDerivation);
|
$oSM->stages[$iKey]->derivation->to = array ($oDerivation);
|
||||||
$oSM->stages[$iKey]->derivation->type = 0;
|
$oSM->stages[$iKey]->derivation->type = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//$oJSON = new Services_JSON();
|
//$oJSON = new Services_JSON();
|
||||||
echo Bootstrap::json_encode( $oSM );
|
echo Bootstrap::json_encode( $oSM );
|
||||||
break;
|
break;
|
||||||
case 'addStage':
|
case 'addStage':
|
||||||
require_once 'classes/model/Stage.php';
|
require_once 'classes/model/Stage.php';
|
||||||
//$oJSON = new Services_JSON();
|
//$oJSON = new Services_JSON();
|
||||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn( 'STG_UID' );
|
$oCriteria->addSelectColumn( 'STG_UID' );
|
||||||
$oCriteria->add( StagePeer::PRO_UID, $oData->uid );
|
$oCriteria->add( StagePeer::PRO_UID, $oData->uid );
|
||||||
$oDataset = StagePeer::doSelectRS( $oCriteria );
|
$oDataset = StagePeer::doSelectRS( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$aStages = array ();
|
$aStages = array ();
|
||||||
$iStageNumber = 0;
|
$iStageNumber = 0;
|
||||||
while ($aRow = $oDataset->getRow()) {
|
while ($aRow = $oDataset->getRow()) {
|
||||||
$aStages[] = $aRow['STG_UID'];
|
$aStages[] = $aRow['STG_UID'];
|
||||||
$iStageNumber ++;
|
$iStageNumber ++;
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
}
|
}
|
||||||
if ($iStageNumber == 0) {
|
if ($iStageNumber == 0) {
|
||||||
$iStageNumber = 1;
|
$iStageNumber = 1;
|
||||||
}
|
}
|
||||||
$iIndex = $iStageNumber + 1;
|
$iIndex = $iStageNumber + 1;
|
||||||
$bContinue = false;
|
$bContinue = false;
|
||||||
while (! $bContinue) {
|
while (! $bContinue) {
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn( 'COUNT(*) AS TIMES' );
|
$oCriteria->addSelectColumn( 'COUNT(*) AS TIMES' );
|
||||||
$oCriteria->add( ContentPeer::CON_ID, $aStages, Criteria::IN );
|
$oCriteria->add( ContentPeer::CON_ID, $aStages, Criteria::IN );
|
||||||
$oCriteria->add( ContentPeer::CON_CATEGORY, 'STG_TITLE' );
|
$oCriteria->add( ContentPeer::CON_CATEGORY, 'STG_TITLE' );
|
||||||
$oCriteria->add( ContentPeer::CON_LANG, SYS_LANG );
|
$oCriteria->add( ContentPeer::CON_LANG, SYS_LANG );
|
||||||
$oCriteria->add( ContentPeer::CON_VALUE, G::LoadTranslation( 'ID_STAGE' ) . ' ' . $iStageNumber );
|
$oCriteria->add( ContentPeer::CON_VALUE, G::LoadTranslation( 'ID_STAGE' ) . ' ' . $iStageNumber );
|
||||||
$oDataset = ContentPeer::doSelectRS( $oCriteria );
|
$oDataset = ContentPeer::doSelectRS( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$aRow = $oDataset->getRow();
|
$aRow = $oDataset->getRow();
|
||||||
if ((int) $aRow['TIMES'] > 0) {
|
if ((int) $aRow['TIMES'] > 0) {
|
||||||
$iStageNumber += 1;
|
$iStageNumber += 1;
|
||||||
} else {
|
} else {
|
||||||
$bContinue = true;
|
$bContinue = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$oStage = new Stage();
|
$oStage = new Stage();
|
||||||
$oNewStage = new stdclass();
|
$oNewStage = new stdclass();
|
||||||
$oNewStage->label = G::LoadTranslation( 'ID_STAGE' ) . ' ' . $iStageNumber;
|
$oNewStage->label = G::LoadTranslation( 'ID_STAGE' ) . ' ' . $iStageNumber;
|
||||||
|
|
||||||
if ($oData->position->x < 0)
|
if ($oData->position->x < 0)
|
||||||
$oData->position->x *= - 1;
|
$oData->position->x *= - 1;
|
||||||
if ($oData->position->y < 0)
|
if ($oData->position->y < 0)
|
||||||
$oData->position->y *= - 1;
|
$oData->position->y *= - 1;
|
||||||
|
|
||||||
$oNewStage->uid = $oStage->create( array ('PRO_UID' => $oData->uid,'STG_TITLE' => $oNewStage->label,'STG_POSX' => $oData->position->x,'STG_POSY' => $oData->position->y,'STG_INDEX' => $iIndex) );
|
$oNewStage->uid = $oStage->create( array ('PRO_UID' => $oData->uid,'STG_TITLE' => $oNewStage->label,'STG_POSX' => $oData->position->x,'STG_POSY' => $oData->position->y,'STG_INDEX' => $iIndex) );
|
||||||
//$oJSON = new Services_JSON();
|
//$oJSON = new Services_JSON();
|
||||||
echo Bootstrap::json_encode( $oNewStage );
|
echo Bootstrap::json_encode( $oNewStage );
|
||||||
break;
|
break;
|
||||||
case 'saveStagePosition':
|
case 'saveStagePosition':
|
||||||
require_once 'classes/model/Stage.php';
|
require_once 'classes/model/Stage.php';
|
||||||
//$oJSON = new Services_JSON();
|
//$oJSON = new Services_JSON();
|
||||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||||
$oStage = new Stage();
|
$oStage = new Stage();
|
||||||
$aFields = $oStage->load( $oData->uid );
|
$aFields = $oStage->load( $oData->uid );
|
||||||
$aFields['STG_UID'] = $oData->uid;
|
$aFields['STG_UID'] = $oData->uid;
|
||||||
$aFields['STG_POSX'] = $oData->position->x;
|
$aFields['STG_POSX'] = $oData->position->x;
|
||||||
$aFields['STG_POSY'] = $oData->position->y;
|
$aFields['STG_POSY'] = $oData->position->y;
|
||||||
$oStage->update( $aFields );
|
$oStage->update( $aFields );
|
||||||
break;
|
break;
|
||||||
case 'deleteStage':
|
case 'deleteStage':
|
||||||
require_once 'classes/model/Stage.php';
|
require_once 'classes/model/Stage.php';
|
||||||
//$oJSON = new Services_JSON();
|
//$oJSON = new Services_JSON();
|
||||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||||
$oStage = new Stage();
|
$oStage = new Stage();
|
||||||
$aFields = $oStage->load( $oData->stg_uid );
|
$aFields = $oStage->load( $oData->stg_uid );
|
||||||
$oStage->remove( $oData->stg_uid );
|
$oStage->remove( $oData->stg_uid );
|
||||||
$oStage->reorderPositions( $aFields['PRO_UID'], $aFields['STG_INDEX'] );
|
$oStage->reorderPositions( $aFields['PRO_UID'], $aFields['STG_INDEX'] );
|
||||||
require_once 'classes/model/Task.php';
|
require_once 'classes/model/Task.php';
|
||||||
$oCriteria1 = new Criteria( 'workflow' );
|
$oCriteria1 = new Criteria( 'workflow' );
|
||||||
$oCriteria1->add( TaskPeer::STG_UID, $oData->stg_uid );
|
$oCriteria1->add( TaskPeer::STG_UID, $oData->stg_uid );
|
||||||
$oCriteria2 = new Criteria( 'workflow' );
|
$oCriteria2 = new Criteria( 'workflow' );
|
||||||
$oCriteria2->add( TaskPeer::STG_UID, '' );
|
$oCriteria2->add( TaskPeer::STG_UID, '' );
|
||||||
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
||||||
break;
|
break;
|
||||||
case 'editStage':
|
case 'editStage':
|
||||||
require_once 'classes/model/Stage.php';
|
require_once 'classes/model/Stage.php';
|
||||||
//$oJSON = new Services_JSON();
|
//$oJSON = new Services_JSON();
|
||||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||||
$oStage = new Stage();
|
$oStage = new Stage();
|
||||||
$aFields = $oStage->load( $oData->stg_uid );
|
$aFields = $oStage->load( $oData->stg_uid );
|
||||||
$aFields['THEINDEX'] = $oData->theindex;
|
$aFields['THEINDEX'] = $oData->theindex;
|
||||||
$aFields['action'] = 'updateStage';
|
$aFields['action'] = 'updateStage';
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_StageEdit', '', $aFields, '../tracker/tracker_Ajax' );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_StageEdit', '', $aFields, '../tracker/tracker_Ajax' );
|
||||||
G::RenderPage( 'publish', 'raw' );
|
G::RenderPage( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
case 'updateStage':
|
case 'updateStage':
|
||||||
require_once 'classes/model/Stage.php';
|
require_once 'classes/model/Stage.php';
|
||||||
$oStage = new Stage();
|
$oStage = new Stage();
|
||||||
$aFields = $oStage->load( $_POST['form']['STG_UID'] );
|
$aFields = $oStage->load( $_POST['form']['STG_UID'] );
|
||||||
$aFields['STG_TITLE'] = $_POST['form']['STG_TITLE'];
|
$aFields['STG_TITLE'] = $_POST['form']['STG_TITLE'];
|
||||||
$oStage->update( $aFields );
|
$oStage->update( $aFields );
|
||||||
break;
|
break;
|
||||||
case 'tasksAssigned':
|
case 'tasksAssigned':
|
||||||
require_once 'classes/model/Stage.php';
|
require_once 'classes/model/Stage.php';
|
||||||
require_once 'classes/model/Task.php';
|
require_once 'classes/model/Task.php';
|
||||||
//$oJSON = new Services_JSON();
|
//$oJSON = new Services_JSON();
|
||||||
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
$oData = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn( TaskPeer::TAS_UID );
|
$oCriteria->addSelectColumn( TaskPeer::TAS_UID );
|
||||||
$oCriteria->addSelectColumn( TaskPeer::TAS_TITLE );
|
$oCriteria->addSelectColumn( TaskPeer::TAS_TITLE );
|
||||||
$oCriteria->add( TaskPeer::STG_UID, $oData->stg_uid );
|
$oCriteria->add( TaskPeer::STG_UID, $oData->stg_uid );
|
||||||
$oCriteria->addAscendingOrderByColumn( TaskPeer::TAS_TITLE );
|
$oCriteria->addAscendingOrderByColumn( TaskPeer::TAS_TITLE );
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_StageTasks', $oCriteria, array ('PRO_UID' => $oData->pro_uid,'STG_UID' => $oData->stg_uid) );
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_StageTasks', $oCriteria, array ('PRO_UID' => $oData->pro_uid,'STG_UID' => $oData->stg_uid) );
|
||||||
G::RenderPage( 'publish', 'raw' );
|
G::RenderPage( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
case 'availableTasksForTheStage':
|
case 'availableTasksForTheStage':
|
||||||
require_once 'classes/model/Process.php';
|
require_once 'classes/model/Process.php';
|
||||||
require_once 'classes/model/Task.php';
|
require_once 'classes/model/Task.php';
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn( TaskPeer::TAS_UID );
|
$oCriteria->addSelectColumn( TaskPeer::TAS_UID );
|
||||||
$oCriteria->addSelectColumn( TaskPeer::TAS_TITLE );
|
$oCriteria->addSelectColumn( TaskPeer::TAS_TITLE );
|
||||||
$oCriteria->add( TaskPeer::PRO_UID, $_POST['PRO_UID'] );
|
$oCriteria->add( TaskPeer::PRO_UID, $_POST['PRO_UID'] );
|
||||||
$oCriteria->add( TaskPeer::STG_UID, '' );
|
$oCriteria->add( TaskPeer::STG_UID, '' );
|
||||||
$oCriteria->addAscendingOrderByColumn( TaskPeer::TAS_TITLE );
|
$oCriteria->addAscendingOrderByColumn( TaskPeer::TAS_TITLE );
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_AvailableStageTasks', $oCriteria, array ('STG_UID' => $_POST['STG_UID']) );
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_AvailableStageTasks', $oCriteria, array ('STG_UID' => $_POST['STG_UID']) );
|
||||||
G::RenderPage( 'publish', 'raw' );
|
G::RenderPage( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
case 'assignTaskToStage':
|
case 'assignTaskToStage':
|
||||||
require_once 'classes/model/Task.php';
|
require_once 'classes/model/Task.php';
|
||||||
$oCriteria1 = new Criteria( 'workflow' );
|
$oCriteria1 = new Criteria( 'workflow' );
|
||||||
$oCriteria1->add( TaskPeer::TAS_UID, $_POST['TAS_UID'] );
|
$oCriteria1->add( TaskPeer::TAS_UID, $_POST['TAS_UID'] );
|
||||||
$oCriteria2 = new Criteria( 'workflow' );
|
$oCriteria2 = new Criteria( 'workflow' );
|
||||||
$oCriteria2->add( TaskPeer::STG_UID, $_POST['STG_UID'] );
|
$oCriteria2->add( TaskPeer::STG_UID, $_POST['STG_UID'] );
|
||||||
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
||||||
break;
|
break;
|
||||||
case 'removeTaskFromTheStage':
|
case 'removeTaskFromTheStage':
|
||||||
require_once 'classes/model/Task.php';
|
require_once 'classes/model/Task.php';
|
||||||
$oCriteria1 = new Criteria( 'workflow' );
|
$oCriteria1 = new Criteria( 'workflow' );
|
||||||
$oCriteria1->add( TaskPeer::TAS_UID, $_POST['TAS_UID'] );
|
$oCriteria1->add( TaskPeer::TAS_UID, $_POST['TAS_UID'] );
|
||||||
$oCriteria2 = new Criteria( 'workflow' );
|
$oCriteria2 = new Criteria( 'workflow' );
|
||||||
$oCriteria2->add( TaskPeer::STG_UID, '' );
|
$oCriteria2->add( TaskPeer::STG_UID, '' );
|
||||||
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "processMapLegend":
|
case "processMapLegend":
|
||||||
$arrayField = array ();
|
$arrayField = array ();
|
||||||
$arrayField["sLabel1"] = G::LoadTranslation( "ID_TASK_IN_PROGRESS" );
|
$arrayField["sLabel1"] = G::LoadTranslation( "ID_TASK_IN_PROGRESS" );
|
||||||
$arrayField["sLabel2"] = G::LoadTranslation( "ID_COMPLETED_TASK" );
|
$arrayField["sLabel2"] = G::LoadTranslation( "ID_COMPLETED_TASK" );
|
||||||
$arrayField["sLabel3"] = G::LoadTranslation( "ID_PENDING_TASK" );
|
$arrayField["sLabel3"] = G::LoadTranslation( "ID_PENDING_TASK" );
|
||||||
$arrayField["sLabel4"] = G::LoadTranslation( "ID_PARALLEL_TASK" );
|
$arrayField["sLabel4"] = G::LoadTranslation( "ID_PARALLEL_TASK" );
|
||||||
$arrayField["tracker"] = 1;
|
$arrayField["tracker"] = 1;
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( "smarty", "cases/cases_Leyends", "", "", $arrayField );
|
$G_PUBLISH->AddContent( "smarty", "cases/cases_Leyends", "", "", $arrayField );
|
||||||
G::RenderPage( "publish", "raw" );
|
G::RenderPage( "publish", "raw" );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (Exception $oException) {
|
} catch (Exception $oException) {
|
||||||
$token = strtotime("now");
|
$token = strtotime("now");
|
||||||
PMException::registerErrorLog($oException, $token);
|
PMException::registerErrorLog($oException, $token);
|
||||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,107 +1,107 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tracker_ViewMap.php
|
* tracker_ViewMap.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* dynaforms & documents for Case Tracker
|
* dynaforms & documents for Case Tracker
|
||||||
*
|
*
|
||||||
* @author Everth S. Berrios Morales <everth@colosa.com>
|
* @author Everth S. Berrios Morales <everth@colosa.com>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if (! isset( $_SESSION['PROCESS'] ) || ! isset( $_SESSION['APPLICATION'] )) {
|
if (! isset( $_SESSION['PROCESS'] ) || ! isset( $_SESSION['APPLICATION'] )) {
|
||||||
G::header( 'location: login' );
|
G::header( 'location: login' );
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
$G_MAIN_MENU = 'caseTracker';
|
$G_MAIN_MENU = 'caseTracker';
|
||||||
$G_ID_MENU_SELECTED = 'DYNADOC';
|
$G_ID_MENU_SELECTED = 'DYNADOC';
|
||||||
|
|
||||||
$oProcessMap = new processMap();
|
$oProcessMap = new ProcessMap();
|
||||||
|
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
|
|
||||||
$idProcess = $_SESSION['PROCESS'];
|
$idProcess = $_SESSION['PROCESS'];
|
||||||
$oProcess = new Process();
|
$oProcess = new Process();
|
||||||
$aProcessFieds = $oProcess->load( $idProcess );
|
$aProcessFieds = $oProcess->load( $idProcess );
|
||||||
$noShowTitle = 0;
|
$noShowTitle = 0;
|
||||||
if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
|
if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
|
||||||
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
|
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||||
if (isset( $aFields['TITLE'] )) {
|
if (isset( $aFields['TITLE'] )) {
|
||||||
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
||||||
}
|
}
|
||||||
if ($aFields['APP_PROC_CODE'] != '') {
|
if ($aFields['APP_PROC_CODE'] != '') {
|
||||||
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
||||||
}
|
}
|
||||||
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
|
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
|
||||||
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
|
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
if ($noShowTitle == 0) {
|
if ($noShowTitle == 0) {
|
||||||
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
|
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
|
||||||
}
|
}
|
||||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_DynaDocs', $oProcessMap->getCaseTrackerObjectsCriteria( $_SESSION['PROCESS'] ), array ('VIEW' => G::LoadTranslation( 'ID_VIEW' )
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_DynaDocs', $oProcessMap->getCaseTrackerObjectsCriteria( $_SESSION['PROCESS'] ), array ('VIEW' => G::LoadTranslation( 'ID_VIEW' )
|
||||||
) );
|
) );
|
||||||
|
|
||||||
$bpmn = new ProcessMaker\Project\Bpmn();
|
$bpmn = new ProcessMaker\Project\Bpmn();
|
||||||
$flagIsBpmn = ($bpmn->exists($_SESSION["PROCESS"]))? true : false;
|
$flagIsBpmn = ($bpmn->exists($_SESSION["PROCESS"]))? true : false;
|
||||||
|
|
||||||
if ($flagIsBpmn) {
|
if ($flagIsBpmn) {
|
||||||
$urlTrackerProcessMap = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APPLICATION"] . "&tracker_designer=1";
|
$urlTrackerProcessMap = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APPLICATION"] . "&tracker_designer=1";
|
||||||
|
|
||||||
$_SESSION["TRACKER_JAVASCRIPT"] = "
|
$_SESSION["TRACKER_JAVASCRIPT"] = "
|
||||||
<script type=\"text/javascript\">
|
<script type=\"text/javascript\">
|
||||||
var winTracker;
|
var winTracker;
|
||||||
|
|
||||||
if ((navigator.userAgent.indexOf(\"MSIE\") != -1) || (navigator.userAgent.indexOf(\"Trident\") != -1)) {
|
if ((navigator.userAgent.indexOf(\"MSIE\") != -1) || (navigator.userAgent.indexOf(\"Trident\") != -1)) {
|
||||||
var li1 = document.getElementById(\"MAP\");
|
var li1 = document.getElementById(\"MAP\");
|
||||||
var a1 = li1.getElementsByTagName(\"a\");
|
var a1 = li1.getElementsByTagName(\"a\");
|
||||||
a1[0].onclick = function () {
|
a1[0].onclick = function () {
|
||||||
winTracker = window.open(\"$urlTrackerProcessMap\", \"winTracker\");
|
winTracker = window.open(\"$urlTrackerProcessMap\", \"winTracker\");
|
||||||
li1.className = \"SelectedMenu\";
|
li1.className = \"SelectedMenu\";
|
||||||
li2.className = \"mainMenu\";
|
li2.className = \"mainMenu\";
|
||||||
li3.className = \"mainMenu\";
|
li3.className = \"mainMenu\";
|
||||||
li4.className = \"mainMenu\";
|
li4.className = \"mainMenu\";
|
||||||
document.getElementById(\"trackerContainer\").innerHTML = \"\";
|
document.getElementById(\"trackerContainer\").innerHTML = \"\";
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
var li2 = document.getElementById(\"DYNADOC\");
|
var li2 = document.getElementById(\"DYNADOC\");
|
||||||
var a2= li2.getElementsByTagName(\"a\");
|
var a2= li2.getElementsByTagName(\"a\");
|
||||||
a2[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
a2[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||||
|
|
||||||
var li3 = document.getElementById(\"HISTORY\");
|
var li3 = document.getElementById(\"HISTORY\");
|
||||||
var a3 = li3.getElementsByTagName(\"a\");
|
var a3 = li3.getElementsByTagName(\"a\");
|
||||||
a3[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
a3[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||||
|
|
||||||
var li4 = document.getElementById(\"MESSAGES\");
|
var li4 = document.getElementById(\"MESSAGES\");
|
||||||
var a4 = li4.getElementsByTagName(\"a\");
|
var a4 = li4.getElementsByTagName(\"a\");
|
||||||
a4[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
a4[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
G::RenderPage("publish");
|
G::RenderPage("publish");
|
||||||
|
|||||||
@@ -1,289 +1,289 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tracker_ViewMap.php
|
* tracker_ViewMap.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Map for Case Tracker
|
* Map for Case Tracker
|
||||||
*
|
*
|
||||||
* @author Everth S. Berrios Morales <everth@colosa.com>
|
* @author Everth S. Berrios Morales <everth@colosa.com>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
require_once 'classes/model/Process.php';
|
require_once 'classes/model/Process.php';
|
||||||
if (! isset( $_SESSION['PROCESS'] ) || ! isset( $_SESSION['APPLICATION'] )) {
|
if (! isset( $_SESSION['PROCESS'] ) || ! isset( $_SESSION['APPLICATION'] )) {
|
||||||
G::header( 'location: login' );
|
G::header( 'location: login' );
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
$G_MAIN_MENU = 'caseTracker';
|
$G_MAIN_MENU = 'caseTracker';
|
||||||
$G_ID_MENU_SELECTED = 'MAP';
|
$G_ID_MENU_SELECTED = 'MAP';
|
||||||
|
|
||||||
require_once 'classes/model/CaseTracker.php';
|
require_once 'classes/model/CaseTracker.php';
|
||||||
$oCaseTracker = new CaseTracker();
|
$oCaseTracker = new CaseTracker();
|
||||||
$aCaseTracker = $oCaseTracker->load( $_SESSION['PROCESS'] );
|
$aCaseTracker = $oCaseTracker->load( $_SESSION['PROCESS'] );
|
||||||
|
|
||||||
$idProcess = $_SESSION['PROCESS'];
|
$idProcess = $_SESSION['PROCESS'];
|
||||||
$oProcess = new Process();
|
$oProcess = new Process();
|
||||||
$aProcessFieds = $oProcess->load( $idProcess );
|
$aProcessFieds = $oProcess->load( $idProcess );
|
||||||
$noShowTitle = 0;
|
$noShowTitle = 0;
|
||||||
if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
|
if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
|
||||||
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
|
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// getting bpmn projects
|
// getting bpmn projects
|
||||||
$c = new Criteria('workflow');
|
$c = new Criteria('workflow');
|
||||||
$c->addSelectColumn(BpmnProjectPeer::PRJ_UID);
|
$c->addSelectColumn(BpmnProjectPeer::PRJ_UID);
|
||||||
$ds = ProcessPeer::doSelectRS($c);
|
$ds = ProcessPeer::doSelectRS($c);
|
||||||
$ds->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$ds->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$bpmnProjects = array();
|
$bpmnProjects = array();
|
||||||
|
|
||||||
while ($ds->next()) {
|
while ($ds->next()) {
|
||||||
$row = $ds->getRow();
|
$row = $ds->getRow();
|
||||||
$bpmnProjects[] = $row['PRJ_UID'];
|
$bpmnProjects[] = $row['PRJ_UID'];
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
||||||
case 'NONE':
|
case 'NONE':
|
||||||
//Nothing
|
//Nothing
|
||||||
break;
|
break;
|
||||||
case 'PROCESSMAP':
|
case 'PROCESSMAP':
|
||||||
|
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||||
if (in_array($aFields['PRO_UID'], $bpmnProjects)) {
|
if (in_array($aFields['PRO_UID'], $bpmnProjects)) {
|
||||||
//bpmb
|
//bpmb
|
||||||
$_SESSION["APPLICATION"] = $aFields["APP_UID"];
|
$_SESSION["APPLICATION"] = $aFields["APP_UID"];
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'view', 'tracker/viewMap' );
|
$G_PUBLISH->AddContent( 'view', 'tracker/viewMap' );
|
||||||
|
|
||||||
$urlTrackerProcessMap = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APPLICATION"] . "&tracker_designer=1";
|
$urlTrackerProcessMap = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APPLICATION"] . "&tracker_designer=1";
|
||||||
|
|
||||||
$_SESSION["TRACKER_JAVASCRIPT"] = "
|
$_SESSION["TRACKER_JAVASCRIPT"] = "
|
||||||
<script type=\"text/javascript\">
|
<script type=\"text/javascript\">
|
||||||
var winTracker;
|
var winTracker;
|
||||||
|
|
||||||
if ((navigator.userAgent.indexOf(\"MSIE\") != -1) || (navigator.userAgent.indexOf(\"Trident\") != -1)) {
|
if ((navigator.userAgent.indexOf(\"MSIE\") != -1) || (navigator.userAgent.indexOf(\"Trident\") != -1)) {
|
||||||
var li1 = document.getElementById(\"MAP\");
|
var li1 = document.getElementById(\"MAP\");
|
||||||
var a1 = li1.getElementsByTagName(\"a\");
|
var a1 = li1.getElementsByTagName(\"a\");
|
||||||
a1[0].onclick = function () {
|
a1[0].onclick = function () {
|
||||||
winTracker = window.open(\"$urlTrackerProcessMap\", \"winTracker\");
|
winTracker = window.open(\"$urlTrackerProcessMap\", \"winTracker\");
|
||||||
li1.className = \"SelectedMenu\";
|
li1.className = \"SelectedMenu\";
|
||||||
li2.className = \"mainMenu\";
|
li2.className = \"mainMenu\";
|
||||||
li3.className = \"mainMenu\";
|
li3.className = \"mainMenu\";
|
||||||
li4.className = \"mainMenu\";
|
li4.className = \"mainMenu\";
|
||||||
document.getElementById(\"trackerContainer\").innerHTML = \"\";
|
document.getElementById(\"trackerContainer\").innerHTML = \"\";
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
var li2 = document.getElementById(\"DYNADOC\");
|
var li2 = document.getElementById(\"DYNADOC\");
|
||||||
var a2= li2.getElementsByTagName(\"a\");
|
var a2= li2.getElementsByTagName(\"a\");
|
||||||
a2[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
a2[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||||
|
|
||||||
var li3 = document.getElementById(\"HISTORY\");
|
var li3 = document.getElementById(\"HISTORY\");
|
||||||
var a3 = li3.getElementsByTagName(\"a\");
|
var a3 = li3.getElementsByTagName(\"a\");
|
||||||
a3[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
a3[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||||
|
|
||||||
var li4 = document.getElementById(\"MESSAGES\");
|
var li4 = document.getElementById(\"MESSAGES\");
|
||||||
var a4 = li4.getElementsByTagName(\"a\");
|
var a4 = li4.getElementsByTagName(\"a\");
|
||||||
a4[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
a4[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
";
|
";
|
||||||
|
|
||||||
G::RenderPage("publish");
|
G::RenderPage("publish");
|
||||||
//note: url processmap "../designer?prj_uid=$_SESSION['PROCESS']&prj_readonly=true&app_uid=$_SESSION['APP_UID']"
|
//note: url processmap "../designer?prj_uid=$_SESSION['PROCESS']&prj_readonly=true&app_uid=$_SESSION['APP_UID']"
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (isset( $aFields['TITLE'] )) {
|
if (isset( $aFields['TITLE'] )) {
|
||||||
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
||||||
}
|
}
|
||||||
if ($aFields['APP_PROC_CODE'] != '') {
|
if ($aFields['APP_PROC_CODE'] != '') {
|
||||||
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
||||||
}
|
}
|
||||||
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
|
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
|
||||||
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
|
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
|
||||||
$oTemplatePower = new TemplatePower( PATH_TPL . 'processes/processes_Map.html' );
|
$oTemplatePower = new TemplatePower( PATH_TPL . 'processes/processes_Map.html' );
|
||||||
$oTemplatePower->prepare();
|
$oTemplatePower->prepare();
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
if ($noShowTitle == 0) {
|
if ($noShowTitle == 0) {
|
||||||
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
|
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
|
||||||
}
|
}
|
||||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptCode( '
|
$oHeadPublisher->addScriptCode( '
|
||||||
var maximunX = ' . processMap::getMaximunTaskX( $_SESSION['PROCESS'] ) . ';
|
var maximunX = ' . ProcessMap::getMaximunTaskX( $_SESSION['PROCESS'] ) . ';
|
||||||
leimnud.event.add(window,"load",function(){
|
leimnud.event.add(window,"load",function(){
|
||||||
var pb = leimnud.dom.capture("tag.body 0");
|
var pb = leimnud.dom.capture("tag.body 0");
|
||||||
pm = new processmap();
|
pm = new processmap();
|
||||||
pm.options = {
|
pm.options = {
|
||||||
target : "pm_target",
|
target : "pm_target",
|
||||||
dataServer: "../processes/processes_Ajax",
|
dataServer: "../processes/processes_Ajax",
|
||||||
uid : "' . $_SESSION['PROCESS'] . '",
|
uid : "' . $_SESSION['PROCESS'] . '",
|
||||||
lang : "' . SYS_LANG . '",
|
lang : "' . SYS_LANG . '",
|
||||||
theme : "processmaker",
|
theme : "processmaker",
|
||||||
size : {w:pb.offsetWidth-10,h:pb.offsetHeight},
|
size : {w:pb.offsetWidth-10,h:pb.offsetHeight},
|
||||||
images_dir: "/jscore/processmap/core/images/",
|
images_dir: "/jscore/processmap/core/images/",
|
||||||
rw : false,
|
rw : false,
|
||||||
mi : false,
|
mi : false,
|
||||||
ct : true,
|
ct : true,
|
||||||
hideMenu : false
|
hideMenu : false
|
||||||
}
|
}
|
||||||
|
|
||||||
pm.make();
|
pm.make();
|
||||||
|
|
||||||
///////
|
///////
|
||||||
var pnlLegend = new leimnud.module.panel();
|
var pnlLegend = new leimnud.module.panel();
|
||||||
|
|
||||||
pnlLegend.options = {
|
pnlLegend.options = {
|
||||||
size: {w: 260, h: 140},
|
size: {w: 260, h: 140},
|
||||||
position: {
|
position: {
|
||||||
x: ((document.body.clientWidth * 95) / 100) - ((document.body.clientWidth * 95) / 100 - (((document.body.clientWidth * 95) / 100) - 260)),
|
x: ((document.body.clientWidth * 95) / 100) - ((document.body.clientWidth * 95) / 100 - (((document.body.clientWidth * 95) / 100) - 260)),
|
||||||
y: 175,
|
y: 175,
|
||||||
center: false
|
center: false
|
||||||
},
|
},
|
||||||
title: G_STRINGS.ID_COLOR_LEYENDS,
|
title: G_STRINGS.ID_COLOR_LEYENDS,
|
||||||
theme: "processmaker",
|
theme: "processmaker",
|
||||||
statusBar: false,
|
statusBar: false,
|
||||||
control: {resize: false, roll: false, drag: true, close: false},
|
control: {resize: false, roll: false, drag: true, close: false},
|
||||||
fx: {modal: false, opacity: false, blinkToFront: true, fadeIn: false, drag: false}
|
fx: {modal: false, opacity: false, blinkToFront: true, fadeIn: false, drag: false}
|
||||||
};
|
};
|
||||||
|
|
||||||
pnlLegend.setStyle = {
|
pnlLegend.setStyle = {
|
||||||
content: {overflow: "hidden"}
|
content: {overflow: "hidden"}
|
||||||
};
|
};
|
||||||
|
|
||||||
pnlLegend.events = {
|
pnlLegend.events = {
|
||||||
remove: function () { delete(pnlLegend); }.extend(this)
|
remove: function () { delete(pnlLegend); }.extend(this)
|
||||||
};
|
};
|
||||||
|
|
||||||
pnlLegend.make();
|
pnlLegend.make();
|
||||||
pnlLegend.loader.show();
|
pnlLegend.loader.show();
|
||||||
|
|
||||||
///////
|
///////
|
||||||
var rpcRequest = new leimnud.module.rpc.xmlhttp({
|
var rpcRequest = new leimnud.module.rpc.xmlhttp({
|
||||||
url : "tracker_Ajax",
|
url : "tracker_Ajax",
|
||||||
args: "action=processMapLegend"
|
args: "action=processMapLegend"
|
||||||
});
|
});
|
||||||
|
|
||||||
rpcRequest.callback = function (rpc) {
|
rpcRequest.callback = function (rpc) {
|
||||||
pnlLegend.loader.hide();
|
pnlLegend.loader.hide();
|
||||||
pnlLegend.addContent(rpc.xmlhttp.responseText);
|
pnlLegend.addContent(rpc.xmlhttp.responseText);
|
||||||
}.extend(this);
|
}.extend(this);
|
||||||
|
|
||||||
rpcRequest.make();
|
rpcRequest.make();
|
||||||
});' );
|
});' );
|
||||||
G::RenderPage( 'publish' );
|
G::RenderPage( 'publish' );
|
||||||
break;
|
break;
|
||||||
case 'STAGES':
|
case 'STAGES':
|
||||||
|
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||||
if (in_array($aFields['PRO_UID'], $bpmnProjects)) {
|
if (in_array($aFields['PRO_UID'], $bpmnProjects)) {
|
||||||
//bpmb
|
//bpmb
|
||||||
$_SESSION["APP_UID"] = $aFields["APP_UID"];
|
$_SESSION["APP_UID"] = $aFields["APP_UID"];
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'view', 'tracker/viewMap' );
|
$G_PUBLISH->AddContent( 'view', 'tracker/viewMap' );
|
||||||
G::RenderPage( 'publish' );
|
G::RenderPage( 'publish' );
|
||||||
//note: url processmap "../designer?prj_uid=$_SESSION['PROCESS']&prj_readonly=true&app_uid=$_SESSION['APP_UID']"
|
//note: url processmap "../designer?prj_uid=$_SESSION['PROCESS']&prj_readonly=true&app_uid=$_SESSION['APP_UID']"
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (isset( $aFields['TITLE'] )) {
|
if (isset( $aFields['TITLE'] )) {
|
||||||
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
||||||
}
|
}
|
||||||
if ($aFields['APP_PROC_CODE'] != '') {
|
if ($aFields['APP_PROC_CODE'] != '') {
|
||||||
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
||||||
}
|
}
|
||||||
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
|
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
|
||||||
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
|
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
|
||||||
$oTemplatePower = new TemplatePower( PATH_TPL . 'tracker/stages_Map.html' );
|
$oTemplatePower = new TemplatePower( PATH_TPL . 'tracker/stages_Map.html' );
|
||||||
$oTemplatePower->prepare();
|
$oTemplatePower->prepare();
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
if ($noShowTitle == 0) {
|
if ($noShowTitle == 0) {
|
||||||
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
|
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
|
||||||
}
|
}
|
||||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptCode( '
|
$oHeadPublisher->addScriptCode( '
|
||||||
leimnud.Package.Load("stagesmap",{Type:"file",Absolute:true,Path:"/jscore/stagesmap/core/stagesmap.js"});
|
leimnud.Package.Load("stagesmap",{Type:"file",Absolute:true,Path:"/jscore/stagesmap/core/stagesmap.js"});
|
||||||
leimnud.event.add(window,"load",function(){
|
leimnud.event.add(window,"load",function(){
|
||||||
var pb=leimnud.dom.capture("tag.body 0");
|
var pb=leimnud.dom.capture("tag.body 0");
|
||||||
Sm=new stagesmap();
|
Sm=new stagesmap();
|
||||||
Sm.options = {
|
Sm.options = {
|
||||||
target : "sm_target",
|
target : "sm_target",
|
||||||
dataServer: "../tracker/tracker_Ajax",
|
dataServer: "../tracker/tracker_Ajax",
|
||||||
uid : "' . $_SESSION['PROCESS'] . '",
|
uid : "' . $_SESSION['PROCESS'] . '",
|
||||||
lang : "' . SYS_LANG . '",
|
lang : "' . SYS_LANG . '",
|
||||||
theme : "processmaker",
|
theme : "processmaker",
|
||||||
size : {w:"780",h:"540"},
|
size : {w:"780",h:"540"},
|
||||||
//size : {w:pb.offsetWidth-10,h:pb.offsetHeight},
|
//size : {w:pb.offsetWidth-10,h:pb.offsetHeight},
|
||||||
images_dir: "/jscore/processmap/core/images/",
|
images_dir: "/jscore/processmap/core/images/",
|
||||||
rw : false,
|
rw : false,
|
||||||
hideMenu : false
|
hideMenu : false
|
||||||
};
|
};
|
||||||
Sm.make();
|
Sm.make();
|
||||||
|
|
||||||
///////
|
///////
|
||||||
var pnlLegend = new leimnud.module.panel();
|
var pnlLegend = new leimnud.module.panel();
|
||||||
|
|
||||||
pnlLegend.options = {
|
pnlLegend.options = {
|
||||||
size: {w: 260, h: 140},
|
size: {w: 260, h: 140},
|
||||||
position: {
|
position: {
|
||||||
x: ((document.body.clientWidth * 95) / 100) - ((document.body.clientWidth * 95) / 100 - (((document.body.clientWidth * 95) / 100) - 260)),
|
x: ((document.body.clientWidth * 95) / 100) - ((document.body.clientWidth * 95) / 100 - (((document.body.clientWidth * 95) / 100) - 260)),
|
||||||
y: 175,
|
y: 175,
|
||||||
center: false
|
center: false
|
||||||
},
|
},
|
||||||
title: G_STRINGS.ID_COLOR_LEYENDS,
|
title: G_STRINGS.ID_COLOR_LEYENDS,
|
||||||
theme: "processmaker",
|
theme: "processmaker",
|
||||||
statusBar: false,
|
statusBar: false,
|
||||||
control: {resize: false, roll: false, drag: true, close: false},
|
control: {resize: false, roll: false, drag: true, close: false},
|
||||||
fx: {modal: false, opacity: false, blinkToFront: true, fadeIn: false, drag: false}
|
fx: {modal: false, opacity: false, blinkToFront: true, fadeIn: false, drag: false}
|
||||||
};
|
};
|
||||||
|
|
||||||
pnlLegend.setStyle = {
|
pnlLegend.setStyle = {
|
||||||
content: {overflow: "hidden"}
|
content: {overflow: "hidden"}
|
||||||
};
|
};
|
||||||
|
|
||||||
pnlLegend.events = {
|
pnlLegend.events = {
|
||||||
remove: function () { delete(pnlLegend); }.extend(this)
|
remove: function () { delete(pnlLegend); }.extend(this)
|
||||||
};
|
};
|
||||||
|
|
||||||
pnlLegend.make();
|
pnlLegend.make();
|
||||||
pnlLegend.loader.show();
|
pnlLegend.loader.show();
|
||||||
|
|
||||||
///////
|
///////
|
||||||
var rpcRequest = new leimnud.module.rpc.xmlhttp({
|
var rpcRequest = new leimnud.module.rpc.xmlhttp({
|
||||||
url : "tracker_Ajax",
|
url : "tracker_Ajax",
|
||||||
args: "action=processMapLegend"
|
args: "action=processMapLegend"
|
||||||
});
|
});
|
||||||
|
|
||||||
rpcRequest.callback = function (rpc) {
|
rpcRequest.callback = function (rpc) {
|
||||||
pnlLegend.loader.hide();
|
pnlLegend.loader.hide();
|
||||||
pnlLegend.addContent(rpc.xmlhttp.responseText);
|
pnlLegend.addContent(rpc.xmlhttp.responseText);
|
||||||
}.extend(this);
|
}.extend(this);
|
||||||
|
|
||||||
rpcRequest.make();
|
rpcRequest.make();
|
||||||
|
|
||||||
});' );
|
});' );
|
||||||
G::RenderPage( 'publish' );
|
G::RenderPage( 'publish' );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ if (isset( $sfunction ) && $sfunction == 'lookforNameTrigger') {
|
|||||||
try {
|
try {
|
||||||
$oTrigger = new Triggers();
|
$oTrigger = new Triggers();
|
||||||
|
|
||||||
$oProcessMap = new processMap( new DBConnection() );
|
$oProcessMap = new ProcessMap( new DBConnection() );
|
||||||
if (isset( $_POST['form'] )) {
|
if (isset( $_POST['form'] )) {
|
||||||
$value = $_POST['form'];
|
$value = $_POST['form'];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ if (($RBAC_Response = $RBAC->userCanAccess("PM_FACTORY")) != 1) {
|
|||||||
require_once ('classes/model/Triggers.php');
|
require_once ('classes/model/Triggers.php');
|
||||||
$oTrigger = new Triggers();
|
$oTrigger = new Triggers();
|
||||||
|
|
||||||
$oProcessMap = new processMap(new DBConnection());
|
$oProcessMap = new ProcessMap(new DBConnection());
|
||||||
|
|
||||||
$aDataTriggers = $_POST;
|
$aDataTriggers = $_POST;
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ if (!class_exists('Triggers')) {
|
|||||||
}
|
}
|
||||||
$oTrigger = new Triggers();
|
$oTrigger = new Triggers();
|
||||||
|
|
||||||
$oProcessMap = new processMap(new DBConnection());
|
$oProcessMap = new ProcessMap(new DBConnection());
|
||||||
|
|
||||||
$aDataTriggers = $_POST;
|
$aDataTriggers = $_POST;
|
||||||
$triUid = $_POST['TRI_UID'];
|
$triUid = $_POST['TRI_UID'];
|
||||||
|
|||||||
@@ -608,7 +608,7 @@ class FilesManager
|
|||||||
$sMainDirectory = 'public';
|
$sMainDirectory = 'public';
|
||||||
}
|
}
|
||||||
if (file_exists($path)) {
|
if (file_exists($path)) {
|
||||||
$oProcessMap = new \processMap(new \DBConnection());
|
$oProcessMap = new \ProcessMap(new \DBConnection());
|
||||||
$oProcessMap->downloadFile($sProcessUID,$sMainDirectory,$sSubDirectory,$sFile);
|
$oProcessMap->downloadFile($sProcessUID,$sMainDirectory,$sSubDirectory,$sFile);
|
||||||
die();
|
die();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ class Tracker
|
|||||||
|
|
||||||
public function objects($idProcess, $appUid)
|
public function objects($idProcess, $appUid)
|
||||||
{
|
{
|
||||||
$oProcessMap = new \processMap();
|
$oProcessMap = new \ProcessMap();
|
||||||
|
|
||||||
$oCase = new \Cases();
|
$oCase = new \Cases();
|
||||||
|
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ class OutputDocument
|
|||||||
$oOP = new \ObjectPermission();
|
$oOP = new \ObjectPermission();
|
||||||
$oOP->removeByObject( 'OUTPUT', $sOutputDocumentUID );
|
$oOP->removeByObject( 'OUTPUT', $sOutputDocumentUID );
|
||||||
//refresh dbarray with the last change in outputDocument
|
//refresh dbarray with the last change in outputDocument
|
||||||
$oMap = new \processMap();
|
$oMap = new \ProcessMap();
|
||||||
$oCriteria = $oMap->getOutputDocumentsCriteria( $fields['PRO_UID'] );
|
$oCriteria = $oMap->getOutputDocumentsCriteria( $fields['PRO_UID'] );
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
|
|||||||
@@ -706,7 +706,7 @@ class Process
|
|||||||
{
|
{
|
||||||
//Copy of processmaker/workflow/engine/methods/processes/processes_Ajax.php //case 'saveNewPattern':
|
//Copy of processmaker/workflow/engine/methods/processes/processes_Ajax.php //case 'saveNewPattern':
|
||||||
|
|
||||||
$processMap = new \processMap();
|
$processMap = new \ProcessMap();
|
||||||
|
|
||||||
if ($type != "SEQUENTIAL" && $type != "SEC-JOIN" && $type != "DISCRIMINATOR") {
|
if ($type != "SEQUENTIAL" && $type != "SEC-JOIN" && $type != "DISCRIMINATOR") {
|
||||||
if ($processMap->getNumberOfRoutes($processUid, $taskUid, $nextTaskUid, $type) > 0) {
|
if ($processMap->getNumberOfRoutes($processUid, $taskUid, $nextTaskUid, $type) > 0) {
|
||||||
@@ -1046,7 +1046,7 @@ class Process
|
|||||||
);
|
);
|
||||||
|
|
||||||
//Load data
|
//Load data
|
||||||
$processMap = new \processMap();
|
$processMap = new \ProcessMap();
|
||||||
|
|
||||||
$arrayData = (array)(\Bootstrap::json_decode($processMap->load($processUid)));
|
$arrayData = (array)(\Bootstrap::json_decode($processMap->load($processUid)));
|
||||||
|
|
||||||
|
|||||||
@@ -1140,7 +1140,7 @@ class ProcessSupervisor
|
|||||||
try {
|
try {
|
||||||
$oDynaformSupervidor = \StepSupervisorPeer::retrieveByPK($sPudUID);
|
$oDynaformSupervidor = \StepSupervisorPeer::retrieveByPK($sPudUID);
|
||||||
if (!is_null($oDynaformSupervidor)) {
|
if (!is_null($oDynaformSupervidor)) {
|
||||||
$oProcessMap = new \processMap();
|
$oProcessMap = new \ProcessMap();
|
||||||
$oProcessMap->removeSupervisorStep( $oDynaformSupervidor->getStepUid(), $sProcessUID, 'DYNAFORM', $oDynaformSupervidor->getStepUidObj(), $oDynaformSupervidor->getStepPosition() );
|
$oProcessMap->removeSupervisorStep( $oDynaformSupervidor->getStepUid(), $sProcessUID, 'DYNAFORM', $oDynaformSupervidor->getStepUidObj(), $oDynaformSupervidor->getStepPosition() );
|
||||||
} else {
|
} else {
|
||||||
throw new \Exception(\G::LoadTranslation("ID_ROW_DOES_NOT_EXIST"));
|
throw new \Exception(\G::LoadTranslation("ID_ROW_DOES_NOT_EXIST"));
|
||||||
@@ -1162,7 +1162,7 @@ class ProcessSupervisor
|
|||||||
try {
|
try {
|
||||||
$oInputDocumentSupervidor = \StepSupervisorPeer::retrieveByPK($sPuiUID);
|
$oInputDocumentSupervidor = \StepSupervisorPeer::retrieveByPK($sPuiUID);
|
||||||
if (!is_null($oInputDocumentSupervidor)) {
|
if (!is_null($oInputDocumentSupervidor)) {
|
||||||
$oProcessMap = new \processMap();
|
$oProcessMap = new \ProcessMap();
|
||||||
$oProcessMap->removeSupervisorStep( $oInputDocumentSupervidor->getStepUid(), $sProcessUID, 'INPUT_DOCUMENT', $oInputDocumentSupervidor->getStepUidObj(), $oInputDocumentSupervidor->getStepPosition() );
|
$oProcessMap->removeSupervisorStep( $oInputDocumentSupervidor->getStepUid(), $sProcessUID, 'INPUT_DOCUMENT', $oInputDocumentSupervidor->getStepUidObj(), $oInputDocumentSupervidor->getStepPosition() );
|
||||||
} else {
|
} else {
|
||||||
throw new \Exception(\G::LoadTranslation("ID_ROW_DOES_NOT_EXIST"));
|
throw new \Exception(\G::LoadTranslation("ID_ROW_DOES_NOT_EXIST"));
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ class ReportTable
|
|||||||
$arrayError = [];
|
$arrayError = [];
|
||||||
|
|
||||||
//Ask for all Process
|
//Ask for all Process
|
||||||
$processMap = new \processMap();
|
$processMap = new \ProcessMap();
|
||||||
$arrayProcessUid = [];
|
$arrayProcessUid = [];
|
||||||
|
|
||||||
foreach (\G::json_decode($processMap->getAllProcesses()) as $value) {
|
foreach (\G::json_decode($processMap->getAllProcesses()) as $value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user