Merge remote branch 'upstream/master'
This commit is contained in:
@@ -949,6 +949,10 @@ class Cases
|
||||
public function updateCase($sAppUid, $Fields = array())
|
||||
{
|
||||
try {
|
||||
$oApplication = new Application;
|
||||
if (!$oApplication->exists($sAppUid)) {
|
||||
return false;
|
||||
}
|
||||
$aApplicationFields = $Fields['APP_DATA'];
|
||||
$Fields['APP_UID'] = $sAppUid;
|
||||
$Fields['APP_UPDATE_DATE'] = 'now';
|
||||
@@ -6740,7 +6744,7 @@ class Cases
|
||||
$rows[] = $rs->getRow();
|
||||
}
|
||||
|
||||
if ($PRO_UID != null) {
|
||||
if ($PRO_UID != null) {
|
||||
//Add supervisor
|
||||
// Users
|
||||
$oCriteria = new Criteria('workflow');
|
||||
@@ -6760,8 +6764,10 @@ class Cases
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$flagSupervisors = false;
|
||||
|
||||
if ($oDataset->next()) {
|
||||
$rows[] = $oDataset->getRow();
|
||||
if ($oDataset->next()) {
|
||||
if (!in_array($USR_UID,$row)) {
|
||||
$rows[] = $oDataset->getRow();
|
||||
}
|
||||
$flagSupervisors = true;
|
||||
}
|
||||
|
||||
@@ -6789,10 +6795,13 @@ class Cases
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
if ($oDataset->next()) {
|
||||
$rows[] = $oDataset->getRow();
|
||||
if (!in_array($USR_UID,$row)) {
|
||||
$rows[] = $oDataset->getRow();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
@@ -6898,7 +6907,7 @@ class Cases
|
||||
unset($aFields['APP_STATUS']);
|
||||
unset($aFields['APP_PROC_STATUS']);
|
||||
unset($aFields['APP_PROC_CODE']);
|
||||
unset($aFields['APP_PIN']);
|
||||
unset($aFields['APP_PIN']);
|
||||
$this->updateCase($aFields['APP_UID'], $aFields);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2097,7 +2097,7 @@ function PMFAssignUserToGroup ($userId, $groupId)
|
||||
* @label PMF Create User
|
||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFCreateUser.28.29
|
||||
*
|
||||
* @param string(32) | $userId | User ID | The username for the new user.
|
||||
* @param string(32) | $userId | User Name | The username for the new user.
|
||||
* @param string(32) | $password | Password of the new user | The password of the new user, which can be up to 32 characters long.
|
||||
* @param string(32) | $firstname | Firstname of the new user | The first name of the user, which can be up to 50 characters long.
|
||||
* @param string(32) | $lastname | Lastname of the new user | The last name of the user, which can be up to 50 characters long.
|
||||
@@ -2881,17 +2881,17 @@ function PMFRemoveMask ($field, $separator = '.', $currency = '')
|
||||
* @return int | $result | Result of send variables | Returns 1 if the variables were sent successfully to the case; otherwise, returns 0 if an error occurred.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
function PMFSaveCurrentData ()
|
||||
{
|
||||
global $oPMScript;
|
||||
$result = 0;
|
||||
|
||||
|
||||
if (isset($_SESSION['APPLICATION']) && isset($oPMScript->aFields)) {
|
||||
G::LoadClass( 'wsBase' );
|
||||
$ws = new wsBase();
|
||||
$result = $ws->sendVariables( $_SESSION['APPLICATION'], $oPMScript->aFields );
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -3739,9 +3739,25 @@ class Processes
|
||||
}
|
||||
}
|
||||
|
||||
// for public files
|
||||
//For public files
|
||||
$PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'public' . PATH_SEP . $data->process['PRO_UID'];
|
||||
|
||||
//Get WebEntry file names
|
||||
$arrayWebEntryFile = array();
|
||||
|
||||
if (is_dir($PUBLIC_ROOT_PATH)) {
|
||||
if ($dirh = opendir($PUBLIC_ROOT_PATH)) {
|
||||
while (($file = readdir($dirh)) !== false) {
|
||||
if (preg_match("/^(.+)Post\.php$/", $file, $arrayMatch)) {
|
||||
$arrayWebEntryFile[] = $arrayMatch[1] . ".php";
|
||||
$arrayWebEntryFile[] = $arrayMatch[1] . "Post.php";
|
||||
}
|
||||
}
|
||||
|
||||
closedir($dirh);
|
||||
}
|
||||
}
|
||||
|
||||
//if this process have any mailfile
|
||||
if (is_dir( $PUBLIC_ROOT_PATH )) {
|
||||
//get mail files list from this directory
|
||||
@@ -3749,6 +3765,10 @@ class Processes
|
||||
foreach ($file_list as $filename) {
|
||||
// verify if this filename is a valid file, because it could be . or .. on *nix systems
|
||||
if ($filename != '.' && $filename != '..') {
|
||||
if (in_array($filename, $arrayWebEntryFile)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (@is_readable( $PUBLIC_ROOT_PATH . PATH_SEP . $filename )) {
|
||||
$sFileName = $PUBLIC_ROOT_PATH . PATH_SEP . $filename;
|
||||
if (file_exists( $sFileName )) {
|
||||
@@ -4094,7 +4114,6 @@ class Processes
|
||||
$fsData = intval( fread( $fp, 9 ) ); //reading the size of $oData
|
||||
$contents = fread( $fp, $fsData ); //reading string $oData
|
||||
|
||||
|
||||
$path = PATH_DYNAFORM . $oData->process['PRO_UID'] . PATH_SEP;
|
||||
if (! is_dir( $path )) {
|
||||
G::verifyPath( $path, true );
|
||||
@@ -4180,6 +4199,28 @@ class Processes
|
||||
}
|
||||
|
||||
if (trim( $sIdentifier ) == 'PUBLIC') {
|
||||
//Get WebEntry file names
|
||||
$arrayWebEntryFile = array();
|
||||
|
||||
$fh = fopen($pmFilename, "rb");
|
||||
$contents = fread($fh, intval(fread($fh, 9))); //Reading string $oData
|
||||
|
||||
while (!feof($fh)) {
|
||||
$fsFileName = intval(fread($fh, 9)); //Reading the size of $filename
|
||||
|
||||
if ($fsFileName > 0) {
|
||||
$sFileName = fread($fh, $fsFileName); //Reading filename string
|
||||
|
||||
if (preg_match("/^(.+)Post\.php$/", $sFileName, $arrayMatch)) {
|
||||
$arrayWebEntryFile[] = $arrayMatch[1] . ".php";
|
||||
$arrayWebEntryFile[] = $arrayMatch[1] . "Post.php";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose($fh);
|
||||
|
||||
//Public files
|
||||
$sIdentifier = 1;
|
||||
while (! feof( $fp ) && is_numeric( $sIdentifier )) {
|
||||
$sIdentifier = fread( $fp, 9 ); //reading the size of $filename
|
||||
@@ -4192,6 +4233,11 @@ class Processes
|
||||
if ($fsContent > 0) {
|
||||
$fileContent = fread( $fp, $fsContent ); //reading string $XmlContent
|
||||
$newFileName = $pathPublic . $sFileName;
|
||||
|
||||
if (in_array($sFileName, $arrayWebEntryFile)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$bytesSaved = @file_put_contents( $newFileName, $fileContent );
|
||||
if ($bytesSaved != $fsContent) {
|
||||
throw (new Exception( 'Error writing Public file in directory : ' . $pathPublic ));
|
||||
@@ -4204,7 +4250,6 @@ class Processes
|
||||
fclose( $fp );
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1610,12 +1610,14 @@ class workspaceTools
|
||||
|
||||
$workspace->checkMafeRequirements($workspaceName, $lang);
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Updating cache view...\n");
|
||||
$workspace->upgradeCacheView(true, false, $lang);
|
||||
CLI::logging("> Updating List tables...\n");
|
||||
$workspace->migrateList($workspace->name);
|
||||
$stop = microtime(true);
|
||||
$final = $stop - $start;
|
||||
CLI::logging("<*> Updating cache view Process took $final seconds.\n");
|
||||
CLI::logging("<*> Updating List Process took $final seconds.\n");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
mysql_close($link);
|
||||
}
|
||||
@@ -1881,6 +1883,7 @@ class workspaceTools
|
||||
}
|
||||
$this->initPropel(true);
|
||||
$appCache = new AppCacheView();
|
||||
$users = new Users();
|
||||
G::LoadClass("case");
|
||||
$case = new Cases();
|
||||
|
||||
@@ -1921,12 +1924,28 @@ class workspaceTools
|
||||
$rsCriteria = AppCacheViewPeer::doSelectRS($inbCriteria);
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$criteriaUser = new Criteria();
|
||||
$criteriaUser->addSelectColumn( UsersPeer::USR_UID );
|
||||
$criteriaUser->addSelectColumn( UsersPeer::USR_FIRSTNAME );
|
||||
$criteriaUser->addSelectColumn( UsersPeer::USR_LASTNAME );
|
||||
$criteriaUser->addSelectColumn( UsersPeer::USR_USERNAME );
|
||||
//Insert new data LIST_INBOX
|
||||
while ($rsCriteria->next()) {
|
||||
$row = $rsCriteria->getRow();
|
||||
$isSelfService = ($row['USR_UID'] == '') ? true : false;
|
||||
if($row["DEL_THREAD_STATUS"] == 'OPEN'){
|
||||
//Update information about the previous_user
|
||||
$row["DEL_PREVIOUS_USR_UID"] = $row["PREVIOUS_USR_UID"];
|
||||
$criteriaUser->add( UsersPeer::USR_UID, $row["PREVIOUS_USR_UID"] );
|
||||
$datasetU = UsersPeer::doSelectRS($criteriaUser);
|
||||
$datasetU->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$datasetU->next();
|
||||
$arrayUsers = $datasetU->getRow();
|
||||
$row["DEL_PREVIOUS_USR_USERNAME"] = $arrayUsers["USR_USERNAME"];
|
||||
$row["DEL_PREVIOUS_USR_FIRSTNAME"]= $arrayUsers["USR_FIRSTNAME"];
|
||||
$row["DEL_PREVIOUS_USR_LASTNAME"] = $arrayUsers["USR_LASTNAME"];
|
||||
//Update the due date
|
||||
$row["DEL_DUE_DATE"] = $row["DEL_TASK_DUE_DATE"];
|
||||
$listInbox = new ListInbox();
|
||||
$listInbox->remove($row["APP_UID"],$row["DEL_INDEX"]);
|
||||
$listInbox->setDeleted(false);
|
||||
|
||||
@@ -56,6 +56,11 @@ class Application extends BaseApplication
|
||||
*/
|
||||
public function getAppTitle()
|
||||
{
|
||||
$oApplication = new Application;
|
||||
if (!$oApplication->exists($this->getAppUid())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->getAppUid() == '') {
|
||||
throw (new Exception( "Error in getAppTitle, the APP_UID can't be blank"));
|
||||
}
|
||||
@@ -311,7 +316,9 @@ class Application extends BaseApplication
|
||||
|
||||
try {
|
||||
$oApplication = ApplicationPeer::retrieveByPk( $AppUid );
|
||||
|
||||
if (!$oApplication) {
|
||||
return false;
|
||||
}
|
||||
if (is_object($oApplication) && get_class ($oApplication) == 'Application' ) {
|
||||
$aFields = $oApplication->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
$this->fromArray($aFields, BasePeer::TYPE_FIELDNAME);
|
||||
@@ -574,19 +581,19 @@ class Application extends BaseApplication
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
public function calculateAppDuration ($cron = 0)
|
||||
{
|
||||
try {
|
||||
if ($cron == 1) {
|
||||
$arrayCron = unserialize( trim( @file_get_contents( PATH_DATA . "cron" ) ) );
|
||||
$arrayCron["processcTimeStart"] = time();
|
||||
@file_put_contents( PATH_DATA . "cron", serialize( $arrayCron ) );
|
||||
}
|
||||
|
||||
$calendar = new calendar();
|
||||
|
||||
$c = new Criteria( 'workflow' );
|
||||
$c->clearSelectColumns();
|
||||
public function calculateAppDuration ($cron = 0)
|
||||
{
|
||||
try {
|
||||
if ($cron == 1) {
|
||||
$arrayCron = unserialize( trim( @file_get_contents( PATH_DATA . "cron" ) ) );
|
||||
$arrayCron["processcTimeStart"] = time();
|
||||
@file_put_contents( PATH_DATA . "cron", serialize( $arrayCron ) );
|
||||
}
|
||||
|
||||
$calendar = new calendar();
|
||||
|
||||
$c = new Criteria( 'workflow' );
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn( ApplicationPeer::APP_UID );
|
||||
$c->addSelectColumn( ApplicationPeer::APP_NUMBER );
|
||||
$c->addSelectColumn( ApplicationPeer::APP_STATUS );
|
||||
@@ -602,80 +609,80 @@ class Application extends BaseApplication
|
||||
$c->addSelectColumn( ProcessPeer::PRO_TIME );
|
||||
$c->addSelectColumn( ProcessPeer::PRO_TIMEUNIT );
|
||||
|
||||
$c->addJoin( ApplicationPeer::PRO_UID, ProcessPeer::PRO_UID, Criteria::LEFT_JOIN );
|
||||
|
||||
$rs = ApplicationPeer::doSelectRS( $c );
|
||||
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$rs->next();
|
||||
$row = $rs->getRow();
|
||||
$i = 0;
|
||||
|
||||
$now = strtotime( 'now' );
|
||||
while (is_array( $row )) {
|
||||
$appNumber = $row['APP_NUMBER'];
|
||||
$appStatus = $row['APP_STATUS'];
|
||||
$appInitUser = $row['APP_INIT_USER'];
|
||||
$appCurUser = $row['APP_CUR_USER'];
|
||||
$appCreateDate = $row['APP_CREATE_DATE'];
|
||||
$appInitDate = $row['APP_INIT_DATE'];
|
||||
$appFinishDate = $row['APP_FINISH_DATE'];
|
||||
$c->addJoin( ApplicationPeer::PRO_UID, ProcessPeer::PRO_UID, Criteria::LEFT_JOIN );
|
||||
|
||||
$rs = ApplicationPeer::doSelectRS( $c );
|
||||
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$rs->next();
|
||||
$row = $rs->getRow();
|
||||
$i = 0;
|
||||
|
||||
$now = strtotime( 'now' );
|
||||
while (is_array( $row )) {
|
||||
$appNumber = $row['APP_NUMBER'];
|
||||
$appStatus = $row['APP_STATUS'];
|
||||
$appInitUser = $row['APP_INIT_USER'];
|
||||
$appCurUser = $row['APP_CUR_USER'];
|
||||
$appCreateDate = $row['APP_CREATE_DATE'];
|
||||
$appInitDate = $row['APP_INIT_DATE'];
|
||||
$appFinishDate = $row['APP_FINISH_DATE'];
|
||||
$appUpdateDate = $row['APP_UPDATE_DATE'];
|
||||
$appDuration = $row['APP_DURATION'];
|
||||
$proTime = $row['PRO_TIME'];
|
||||
$proTimeUnit = $row['PRO_TIMEUNIT'];
|
||||
$proUid = $row['PRO_UID'];
|
||||
|
||||
//get the object,
|
||||
$oApp = ApplicationPeer::retrieveByPk( $row['APP_UID'] );
|
||||
|
||||
//getting the calendar
|
||||
$calendar->getCalendar(null, $proUid);
|
||||
$proUid = $row['PRO_UID'];
|
||||
|
||||
//get the object,
|
||||
$oApp = ApplicationPeer::retrieveByPk( $row['APP_UID'] );
|
||||
|
||||
//getting the calendar
|
||||
$calendar->getCalendar(null, $proUid);
|
||||
$calData = $calendar->getCalendarData();
|
||||
|
||||
/*if(G::toUpper($proTimeUnit) != 'DAYS'){ //if it is not in days must be in mins.
|
||||
$proTime = $proTime / (24 * 60 * 60); //converting to Days
|
||||
}*/
|
||||
|
||||
$proDueDate = $calendar->dashCalculateDate($row['APP_INIT_DATE'], $proTime, $proTimeUnit, $calData); //date when the process has to finish
|
||||
|
||||
$proDueDate = $calendar->dashCalculateDate($row['APP_INIT_DATE'], $proTime, $proTimeUnit, $calData); //date when the process has to finish
|
||||
|
||||
if($appFinishDate == null){//When the process didnt finish yet.
|
||||
//Duration
|
||||
$appDuration = $calendar->dashCalculateDurationWithCalendar($appInitDate, date("Y-m-d H:i:s"), $calData );
|
||||
|
||||
$appDuration = $calendar->dashCalculateDurationWithCalendar($appInitDate, date("Y-m-d H:i:s"), $calData );
|
||||
|
||||
$appDuration = $appDuration / (24 * 60 * 60); //Saving the proDuration in days. The calculateDurationWithCalendar func returns segs.
|
||||
|
||||
$appDuration = $appDuration / (24 * 60 * 60); //Saving the proDuration in days. The calculateDurationWithCalendar func returns segs.
|
||||
$oApp->setAppDuration( $appDuration );
|
||||
|
||||
//Delay Duration
|
||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $proDueDate, date("Y-m-d H:i:s"), $calData );//it returns in mins
|
||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $proDueDate, date("Y-m-d H:i:s"), $calData );//it returns in mins
|
||||
$delayDuration = $delayDuration / (24 * 60 * 60); //Days
|
||||
$oApp->setAppDelayDuration( $delayDuration );
|
||||
} else {
|
||||
//Duration
|
||||
$appDuration = $calendar->dashCalculateDurationWithCalendar($appInitDate, $appFinishDate, $calData );
|
||||
$appDuration = $appDuration / (24 * 60 * 60); //Saving the proDuration in days. The calculateDurationWithCalendar func returns mins.
|
||||
//Duration
|
||||
$appDuration = $calendar->dashCalculateDurationWithCalendar($appInitDate, $appFinishDate, $calData );
|
||||
$appDuration = $appDuration / (24 * 60 * 60); //Saving the proDuration in days. The calculateDurationWithCalendar func returns mins.
|
||||
$oApp->setAppDuration( $appDuration );
|
||||
|
||||
//Delay Duration
|
||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $proDueDate, $appFinishDate, $calData );
|
||||
|
||||
//Delay Duration
|
||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $proDueDate, $appFinishDate, $calData );
|
||||
$delayDuration = $delayDuration / (24 * 60 * 60); //Days
|
||||
$oApp->setAppDelayDuration( $delayDuration );
|
||||
}
|
||||
|
||||
//and finally save the record
|
||||
$RES = $oApp->save();
|
||||
$rs->next();
|
||||
$row = $rs->getRow();
|
||||
}
|
||||
|
||||
if ($cron == 1) {
|
||||
$arrayCron = unserialize( trim( @file_get_contents( PATH_DATA . "cron" ) ) );
|
||||
$arrayCron["processcTimeStart"] = time();
|
||||
@file_put_contents( PATH_DATA . "cron", serialize( $arrayCron ) );
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
error_log( $oError->getMessage() );
|
||||
}
|
||||
|
||||
//and finally save the record
|
||||
$RES = $oApp->save();
|
||||
$rs->next();
|
||||
$row = $rs->getRow();
|
||||
}
|
||||
|
||||
if ($cron == 1) {
|
||||
$arrayCron = unserialize( trim( @file_get_contents( PATH_DATA . "cron" ) ) );
|
||||
$arrayCron["processcTimeStart"] = time();
|
||||
@file_put_contents( PATH_DATA . "cron", serialize( $arrayCron ) );
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
error_log( $oError->getMessage() );
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
@@ -2661,9 +2661,10 @@ processmap.prototype={
|
||||
uid:false
|
||||
};
|
||||
this.data.build.text(index);
|
||||
text = text.replace(/"/g, '\\"');
|
||||
var r = new leimnud.module.rpc.xmlhttp({
|
||||
url:this.options.dataServer,
|
||||
args:"action=addText&data="+{uid:this.options.uid,label:text,position:{x:pos.x,y:pos.y}}.toJSONString()
|
||||
args:"action=addText&data="+{uid:this.options.uid,label:encodeURIComponent(text),position:{x:pos.x,y:pos.y}}.toJSONString()
|
||||
});
|
||||
r.callback=function(rpc,index){
|
||||
var rs = rpc.xmlhttp.responseText.parseJSON();
|
||||
|
||||
@@ -52,6 +52,7 @@ function array_sort ($array, $on, $order = SORT_ASC, $query = '')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $new_array;
|
||||
}
|
||||
// $APP_UIDS = explode(',', $_POST['APP_UID']);
|
||||
|
||||
@@ -38,7 +38,7 @@ try {
|
||||
break;
|
||||
} */
|
||||
//$oJSON = new Services_JSON();
|
||||
|
||||
|
||||
G::LoadSystem('inputfilter');
|
||||
$filter = new InputFilter();
|
||||
$_GET = $filter->xssFilterHard($_GET);
|
||||
@@ -307,7 +307,7 @@ try {
|
||||
G::auditLog('DeleteLines','Delete all lines in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
break;
|
||||
case 'addText':
|
||||
$sOutput = $oProcessMap->addText($oData->uid, $oData->label, $oData->position->x, $oData->position->y);
|
||||
$sOutput = $oProcessMap->addText($oData->uid, html_entity_decode(html_entity_decode($oData->label)), $oData->position->x, $oData->position->y);
|
||||
$sOutputAux = G::json_decode($sOutput);
|
||||
$sOutputAux = (array)$sOutputAux;
|
||||
G::auditLog('AddText','Add new text ('.$sOutputAux['uid'].') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
|
||||
@@ -66,5 +66,44 @@ if ($noShowTitle == 0) {
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_DynaDocs', $oProcessMap->getCaseTrackerObjectsCriteria( $_SESSION['PROCESS'] ), array ('VIEW' => G::LoadTranslation( 'ID_VIEW' )
|
||||
) );
|
||||
|
||||
G::RenderPage( 'publish' );
|
||||
$bpmn = new ProcessMaker\Project\Bpmn();
|
||||
$flagIsBpmn = ($bpmn->exists($_SESSION["PROCESS"]))? true : false;
|
||||
|
||||
if ($flagIsBpmn) {
|
||||
$urlTrackerProcessMap = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APPLICATION"] . "&tracker_designer=1";
|
||||
|
||||
$_SESSION["TRACKER_JAVASCRIPT"] = "
|
||||
<script type=\"text/javascript\">
|
||||
var winTracker;
|
||||
|
||||
if ((navigator.userAgent.indexOf(\"MSIE\") != -1) || (navigator.userAgent.indexOf(\"Trident\") != -1)) {
|
||||
var li1 = document.getElementById(\"MAP\");
|
||||
var a1 = li1.getElementsByTagName(\"a\");
|
||||
a1[0].onclick = function () {
|
||||
winTracker = window.open(\"$urlTrackerProcessMap\", \"winTracker\");
|
||||
li1.className = \"SelectedMenu\";
|
||||
li2.className = \"mainMenu\";
|
||||
li3.className = \"mainMenu\";
|
||||
li4.className = \"mainMenu\";
|
||||
document.getElementById(\"trackerContainer\").innerHTML = \"\";
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
var li2 = document.getElementById(\"DYNADOC\");
|
||||
var a2= li2.getElementsByTagName(\"a\");
|
||||
a2[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||
|
||||
var li3 = document.getElementById(\"HISTORY\");
|
||||
var a3 = li3.getElementsByTagName(\"a\");
|
||||
a3[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||
|
||||
var li4 = document.getElementById(\"MESSAGES\");
|
||||
var a4 = li4.getElementsByTagName(\"a\");
|
||||
a4[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||
}
|
||||
</script>
|
||||
";
|
||||
}
|
||||
|
||||
G::RenderPage("publish");
|
||||
|
||||
@@ -62,5 +62,45 @@ if ($noShowTitle == 0) {
|
||||
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
|
||||
}
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_TransferHistory', Cases::getTransferHistoryCriteria( $_SESSION['APPLICATION'] ), array () );
|
||||
G::RenderPage( 'publish' );
|
||||
|
||||
$bpmn = new ProcessMaker\Project\Bpmn();
|
||||
$flagIsBpmn = ($bpmn->exists($_SESSION["PROCESS"]))? true : false;
|
||||
|
||||
if ($flagIsBpmn) {
|
||||
$urlTrackerProcessMap = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APPLICATION"] . "&tracker_designer=1";
|
||||
|
||||
$_SESSION["TRACKER_JAVASCRIPT"] = "
|
||||
<script type=\"text/javascript\">
|
||||
var winTracker;
|
||||
|
||||
if ((navigator.userAgent.indexOf(\"MSIE\") != -1) || (navigator.userAgent.indexOf(\"Trident\") != -1)) {
|
||||
var li1 = document.getElementById(\"MAP\");
|
||||
var a1 = li1.getElementsByTagName(\"a\");
|
||||
a1[0].onclick = function () {
|
||||
winTracker = window.open(\"$urlTrackerProcessMap\", \"winTracker\");
|
||||
li1.className = \"SelectedMenu\";
|
||||
li2.className = \"mainMenu\";
|
||||
li3.className = \"mainMenu\";
|
||||
li4.className = \"mainMenu\";
|
||||
document.getElementById(\"trackerContainer\").innerHTML = \"\";
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
var li2 = document.getElementById(\"DYNADOC\");
|
||||
var a2= li2.getElementsByTagName(\"a\");
|
||||
a2[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||
|
||||
var li3 = document.getElementById(\"HISTORY\");
|
||||
var a3 = li3.getElementsByTagName(\"a\");
|
||||
a3[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||
|
||||
var li4 = document.getElementById(\"MESSAGES\");
|
||||
var a4 = li4.getElementsByTagName(\"a\");
|
||||
a4[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||
}
|
||||
</script>
|
||||
";
|
||||
}
|
||||
|
||||
G::RenderPage("publish");
|
||||
|
||||
@@ -64,5 +64,45 @@ if ($noShowTitle == 0) {
|
||||
}
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_Messages', Cases::getHistoryMessagesTracker( $_SESSION['APPLICATION'] ), array ('VIEW' => G::LoadTranslation( 'ID_VIEW' )
|
||||
) );
|
||||
G::RenderPage( 'publish' );
|
||||
|
||||
$bpmn = new ProcessMaker\Project\Bpmn();
|
||||
$flagIsBpmn = ($bpmn->exists($_SESSION["PROCESS"]))? true : false;
|
||||
|
||||
if ($flagIsBpmn) {
|
||||
$urlTrackerProcessMap = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APPLICATION"] . "&tracker_designer=1";
|
||||
|
||||
$_SESSION["TRACKER_JAVASCRIPT"] = "
|
||||
<script type=\"text/javascript\">
|
||||
var winTracker;
|
||||
|
||||
if ((navigator.userAgent.indexOf(\"MSIE\") != -1) || (navigator.userAgent.indexOf(\"Trident\") != -1)) {
|
||||
var li1 = document.getElementById(\"MAP\");
|
||||
var a1 = li1.getElementsByTagName(\"a\");
|
||||
a1[0].onclick = function () {
|
||||
winTracker = window.open(\"$urlTrackerProcessMap\", \"winTracker\");
|
||||
li1.className = \"SelectedMenu\";
|
||||
li2.className = \"mainMenu\";
|
||||
li3.className = \"mainMenu\";
|
||||
li4.className = \"mainMenu\";
|
||||
document.getElementById(\"trackerContainer\").innerHTML = \"\";
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
var li2 = document.getElementById(\"DYNADOC\");
|
||||
var a2= li2.getElementsByTagName(\"a\");
|
||||
a2[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||
|
||||
var li3 = document.getElementById(\"HISTORY\");
|
||||
var a3 = li3.getElementsByTagName(\"a\");
|
||||
a3[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||
|
||||
var li4 = document.getElementById(\"MESSAGES\");
|
||||
var a4 = li4.getElementsByTagName(\"a\");
|
||||
a4[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||
}
|
||||
</script>
|
||||
";
|
||||
}
|
||||
|
||||
G::RenderPage("publish");
|
||||
|
||||
@@ -59,7 +59,7 @@ while ($ds->next()) {
|
||||
$row = $ds->getRow();
|
||||
$bpmnProjects[] = $row['PRJ_UID'];
|
||||
}
|
||||
|
||||
|
||||
switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
||||
case 'NONE':
|
||||
//Nothing
|
||||
@@ -71,11 +71,48 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
||||
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||
if (in_array($aFields['PRO_UID'], $bpmnProjects)) {
|
||||
//bpmb
|
||||
$_SESSION["APP_UID"] = $aFields["APP_UID"];
|
||||
$_SESSION["APPLICATION"] = $aFields["APP_UID"];
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'view', 'tracker/viewMap' );
|
||||
G::RenderPage( 'publish' );
|
||||
|
||||
$urlTrackerProcessMap = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APPLICATION"] . "&tracker_designer=1";
|
||||
|
||||
$_SESSION["TRACKER_JAVASCRIPT"] = "
|
||||
<script type=\"text/javascript\">
|
||||
var winTracker;
|
||||
|
||||
if ((navigator.userAgent.indexOf(\"MSIE\") != -1) || (navigator.userAgent.indexOf(\"Trident\") != -1)) {
|
||||
var li1 = document.getElementById(\"MAP\");
|
||||
var a1 = li1.getElementsByTagName(\"a\");
|
||||
a1[0].onclick = function () {
|
||||
winTracker = window.open(\"$urlTrackerProcessMap\", \"winTracker\");
|
||||
li1.className = \"SelectedMenu\";
|
||||
li2.className = \"mainMenu\";
|
||||
li3.className = \"mainMenu\";
|
||||
li4.className = \"mainMenu\";
|
||||
document.getElementById(\"trackerContainer\").innerHTML = \"\";
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
var li2 = document.getElementById(\"DYNADOC\");
|
||||
var a2= li2.getElementsByTagName(\"a\");
|
||||
a2[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||
|
||||
var li3 = document.getElementById(\"HISTORY\");
|
||||
var a3 = li3.getElementsByTagName(\"a\");
|
||||
a3[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||
|
||||
var li4 = document.getElementById(\"MESSAGES\");
|
||||
var a4 = li4.getElementsByTagName(\"a\");
|
||||
a4[0].onclick = function () { if (winTracker) { winTracker.close(); } };
|
||||
}
|
||||
</script>
|
||||
";
|
||||
|
||||
G::RenderPage("publish");
|
||||
//note: url processmap "../designer?prj_uid=$_SESSION['PROCESS']&prj_readonly=true&app_uid=$_SESSION['APP_UID']"
|
||||
|
||||
break;
|
||||
}
|
||||
if (isset( $aFields['TITLE'] )) {
|
||||
@@ -246,9 +283,8 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
||||
}.extend(this);
|
||||
|
||||
rpcRequest.make();
|
||||
|
||||
|
||||
});' );
|
||||
G::RenderPage( 'publish' );
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,10 +58,16 @@
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td width="100%" align="center">
|
||||
<td {php} if (isset($_SESSION["TRACKER_JAVASCRIPT"])) { echo "id=\"trackerContainer\""; } {/php} width="100%" align="center">
|
||||
{php}
|
||||
global $G_TEMPLATE;
|
||||
if ($G_TEMPLATE != '') G::LoadTemplate($G_TEMPLATE);
|
||||
|
||||
if (isset($_SESSION["TRACKER_JAVASCRIPT"])) {
|
||||
echo $_SESSION["TRACKER_JAVASCRIPT"];
|
||||
|
||||
unset($_SESSION["TRACKER_JAVASCRIPT"]);
|
||||
}
|
||||
{/php}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -59,10 +59,16 @@
|
||||
<td>
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0" >
|
||||
<tr>
|
||||
<td width="100%" align="center">
|
||||
<td {php} if (isset($_SESSION["TRACKER_JAVASCRIPT"])) { echo "id=\"trackerContainer\""; } {/php} width="100%" align="center">
|
||||
{php}
|
||||
global $G_TEMPLATE;
|
||||
if ($G_TEMPLATE != '') G::LoadTemplate($G_TEMPLATE);
|
||||
|
||||
if (isset($_SESSION["TRACKER_JAVASCRIPT"])) {
|
||||
echo $_SESSION["TRACKER_JAVASCRIPT"];
|
||||
|
||||
unset($_SESSION["TRACKER_JAVASCRIPT"]);
|
||||
}
|
||||
{/php}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -428,7 +428,8 @@ EditCategory = function(){
|
||||
title: _('ID_EDIT_CATEGORY'),
|
||||
items: [editForm],
|
||||
id: 'w',
|
||||
modal: true
|
||||
modal: true,
|
||||
closeAction: "hide"
|
||||
});
|
||||
w.show();
|
||||
}
|
||||
|
||||
@@ -535,11 +535,12 @@ EditRole = function(){
|
||||
editForm.getForm().findField('name').setValue(rowSelected.data.ROL_NAME);
|
||||
editForm.getForm().findField('status').setValue(rowSelected.data.ROL_STATUS);
|
||||
w = new Ext.Window({
|
||||
closeAction: "hide",
|
||||
autoHeight: true,
|
||||
id: 'w',
|
||||
modal: true,
|
||||
width: 420,
|
||||
title: _('ID_EDIT_ROLE_TITLE'),
|
||||
title: _("ID_EDIT_ROLE_TITLE"),
|
||||
items: [editForm]
|
||||
});
|
||||
w.show();
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<td>
|
||||
<a target="_blank" href="http://www.processmaker.com"><img src="/images/get_started.png" border="0" width="163" height="438"></a>
|
||||
</td>
|
||||
<td class="cell2" valign="top">
|
||||
<td class="cell2" valign="top" align="left">
|
||||
<p><b><span class="cLow">Welcome to ProcessMaker</span></b></p><br/>
|
||||
<p style="text-align: justify;"><span class="cLow-min">This new version features a new process designer based upon the Business Process Management Notation 2 standard. It offers a new form designer with flexible layouts for desktops, tablets and cellphones and a new REST API to remotely access ProcessMaker.</span></p>
|
||||
<p style="text-align: justify;"><span class="cLow-min">To get started, log in using the following credentials. You can change them later:</span></p>
|
||||
|
||||
@@ -1,44 +1,12 @@
|
||||
<?php
|
||||
$url = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APP_UID"] . "&tracker_designer=1";
|
||||
$urlTrackerProcessMap = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APPLICATION"] . "&tracker_designer=1";
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
var winTracker;
|
||||
|
||||
if ((navigator.userAgent.indexOf("MSIE") != -1) || (navigator.userAgent.indexOf("Trident") != -1)) {
|
||||
var li1 = document.getElementById("MAP");
|
||||
var a1 = li1.getElementsByTagName("a");
|
||||
a1[0].href = "javascript:;";
|
||||
a1[0].onclick = function () { winTracker = window.open("<?php echo $url; ?>", "winTracker"); return false; };
|
||||
|
||||
var li2 = document.getElementById("DYNADOC");
|
||||
var a2= li2.getElementsByTagName("a");
|
||||
a2[0].onclick = function ()
|
||||
{
|
||||
if (winTracker) {
|
||||
winTracker.close();
|
||||
}
|
||||
};
|
||||
|
||||
var li3 = document.getElementById("HISTORY");
|
||||
var a3 = li3.getElementsByTagName("a");
|
||||
a3[0].onclick = function ()
|
||||
{
|
||||
if (winTracker) {
|
||||
winTracker.close();
|
||||
}
|
||||
};
|
||||
|
||||
var li4 = document.getElementById("MESSAGES");
|
||||
var a4 = li4.getElementsByTagName("a");
|
||||
a4[0].onclick = function ()
|
||||
{
|
||||
if (winTracker) {
|
||||
winTracker.close();
|
||||
}
|
||||
};
|
||||
} else {
|
||||
document.write("<iframe name=\"casesFrame\" id=\"casesFrame\" src=\"<?php echo $url; ?>\" width=\"99%\" height=\"768\" frameborder=\"0\">");
|
||||
if (!(navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Trident") != -1)) {
|
||||
document.write("<iframe name=\"casesFrame\" id=\"casesFrame\" src=\"<?php echo $urlTrackerProcessMap; ?>\" width=\"99%\" height=\"768\" frameborder=\"0\">");
|
||||
document.write("<p>Your browser does not support iframes.</p>");
|
||||
document.write("</iframe>");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user