diff --git a/workflow/engine/methods/cases/cases_CatchSelfService.php b/workflow/engine/methods/cases/cases_CatchSelfService.php index af58fe74d..c85ebc5ba 100755 --- a/workflow/engine/methods/cases/cases_CatchSelfService.php +++ b/workflow/engine/methods/cases/cases_CatchSelfService.php @@ -83,7 +83,12 @@ $G_SUB_MENU = 'caseOptions'; $G_ID_MENU_SELECTED = 'CASES'; $G_ID_SUB_MENU_SELECTED = '_'; $oHeadPublisher =& headPublisher::getSingleton(); -$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}}')"); +$oHeadPublisher->addScriptCode(" +if (typeof parent != 'undefined') { + if (parent.showCaseNavigatorPanel) { + parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}}'); + } +}"); $oHeadPublisher->addScriptCode(' var Cse = {}; Cse.panels = {}; diff --git a/workflow/engine/methods/cases/cases_Resume.php b/workflow/engine/methods/cases/cases_Resume.php index 32f5050b2..a12ecc514 100755 --- a/workflow/engine/methods/cases/cases_Resume.php +++ b/workflow/engine/methods/cases/cases_Resume.php @@ -51,7 +51,7 @@ /* Prepare page before to show */ $oCase = new Cases(); - $Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'] ); + $Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'] ); $participated = $oCase->userParticipatedInCase($_GET['APP_UID'], $_SESSION['USER_LOGGED']); if ($RBAC->userCanAccess('PM_ALLCASES') < 0 && $participated == 0) { @@ -73,19 +73,24 @@ $Fields['STATUS'] = ucfirst(strtolower(G::LoadTranslation('ID_CANCELLED'))); break; } - + //$Fields['STATUS'] = $aRow['APP_TYPE']; } - + $actions = 'false'; if( $_GET['action'] == 'paused') $actions = 'true'; - + /* Render page */ $oHeadPublisher =& headPublisher::getSingleton(); - $oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}')"); - + $oHeadPublisher->addScriptCode(" + if (typeof parent != 'undefined') { + if (parent.showCaseNavigatorPanel) { + parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}}'); + } + }"); + $oHeadPublisher->addScriptCode(' var Cse = {}; Cse.panels = {}; @@ -98,9 +103,9 @@ leimnud.Package.Load("processmap",{Type:"file",Absolute:true,Path:"/jscore/processmap/core/processmap.js"}); leimnud.exec(leimnud.fix.memoryLeak); '); - + require_once 'classes/model/Process.php'; - + $objProc = new Process(); $aProc = $objProc->load($Fields['PRO_UID' ] ); $Fields['PRO_TITLE'] = $aProc['PRO_TITLE']; @@ -108,7 +113,7 @@ $objTask = new Task(); $aTask = $objTask->load($Fields['TAS_UID' ] ); $Fields['TAS_TITLE'] = $aTask['TAS_TITLE']; - + $oHeadPublisher =& headPublisher::getSingleton(); $oHeadPublisher->addScriptFile('/jscore/cases/core/cases_Step.js'); $G_PUBLISH = new Publisher; diff --git a/workflow/engine/methods/cases/cases_StepToRevise.php b/workflow/engine/methods/cases/cases_StepToRevise.php index 56de19fd7..74d96cca7 100755 --- a/workflow/engine/methods/cases/cases_StepToRevise.php +++ b/workflow/engine/methods/cases/cases_StepToRevise.php @@ -64,7 +64,12 @@ $Fields = $oCase->loadCase($_SESSION['APPLICATION']); $oHeadPublisher =& headPublisher::getSingleton(); - $oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}');"); + $oHeadPublisher->addScriptCode(" + if (typeof parent != 'undefined') { + if (parent.showCaseNavigatorPanel) { + parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}}'); + } + }"); // DEPRECATED this script call is marked for removal since almost all the interface is extJS based $oHeadPublisher->addScriptCode(' var Cse = {}; @@ -90,11 +95,11 @@ $_SESSION['STEP_POSITION'] = (int)$_GET['position']; //Obtain previous and next step - Start - if(isset($_GET['type'])) + if(isset($_GET['type'])) $sType = $_GET['type']; - else + else $sType = ''; - + try { $aNextStep = $oCase->getNextSupervisorStep($_SESSION['PROCESS'], $_SESSION['STEP_POSITION'], $sType); $aPreviousStep = $oCase->getPreviousSupervisorStep($_SESSION['PROCESS'], $_SESSION['STEP_POSITION'], $sType);