BUGS 6439, 6448: Solved
This commit is contained in:
@@ -28,22 +28,21 @@ global $sStatus;
|
||||
if ((($sStatus == 'DRAFT') || ($sStatus == 'TO_DO')) && ($_SESSION['TASK'] != -1)) {
|
||||
if (isset($_SESSION['bNoShowSteps'])) {
|
||||
unset($_SESSION['bNoShowSteps']);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$G_TMP_MENU->AddIdOption('STEPS' , G::LoadTranslation('ID_STEPS') , 'javascript:showSteps();' , 'absolute');
|
||||
$G_TMP_MENU->AddIdOption('INFO' , G::LoadTranslation('ID_INFORMATION'), 'javascript:showInformation();', 'absolute');
|
||||
}
|
||||
$G_TMP_MENU->AddIdOption('ACTIONS' , G::LoadTranslation('ID_ACTIONS') , 'javascript:showActions();' , 'absolute');
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$G_TMP_MENU->AddIdOption('INFO' , G::LoadTranslation('ID_INFORMATION'), 'javascript:showInformation();', 'absolute');
|
||||
}
|
||||
require_once 'classes/model/Process.php';
|
||||
$oProcess = new Process();
|
||||
$aProcess = $oProcess->Load($_SESSION['PROCESS']);
|
||||
|
||||
/*if( isset($_SESSION['TRIGGER_DEBUG']['ISSET']) && !isset($_GET['breakpoint']) && $aProcess['PRO_DEBUG']){
|
||||
$G_TMP_MENU->AddIdOption('DEBUG' , G::LoadTranslation('ID_DEBUG'), 'javascript:showdebug();', 'absolute');
|
||||
}*/
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -37,11 +37,50 @@ require_once 'classes/model/Task.php';
|
||||
G::LoadClass('case');
|
||||
|
||||
$action = $_REQUEST['action'];
|
||||
unset($_REQUEST['action']);
|
||||
$ajax = new Ajax();
|
||||
$ajax->$action();
|
||||
$ajax->$action($_REQUEST);
|
||||
|
||||
class Ajax
|
||||
{
|
||||
function getCaseMenu($params)
|
||||
{
|
||||
|
||||
G::LoadClass("configuration");
|
||||
G::LoadClass("case");
|
||||
global $G_TMP_MENU;
|
||||
global $sStatus;
|
||||
$sStatus = $params['app_status'];
|
||||
$oCase = new Cases();
|
||||
$conf = new Configurations;
|
||||
$oMenu = new Menu();
|
||||
$oMenu->load('caseOptions');
|
||||
|
||||
$menuOptions = Array();
|
||||
foreach( $oMenu->Options as $i => $action ) {
|
||||
$option = Array(
|
||||
'id' => $oMenu->Id[$i],
|
||||
'label' => $oMenu->Labels[$i],
|
||||
'action' => ($action!='STEPS' && $action!='ACTIONS' && $action!='INFO') ? $action : ''
|
||||
);
|
||||
|
||||
switch($option['id']) {
|
||||
case 'STEPS':
|
||||
$option['options'] = Array();
|
||||
break;
|
||||
case 'ACTIONS':
|
||||
$option['options'] = $this->getActionOptions();
|
||||
break;
|
||||
case 'INFO':
|
||||
$option['options'] = $this->getInformationOptions();
|
||||
break;
|
||||
}
|
||||
$menuOptions[] = $option;
|
||||
}
|
||||
|
||||
echo G::json_encode($menuOptions);
|
||||
}
|
||||
|
||||
|
||||
function steps()
|
||||
{
|
||||
@@ -180,8 +219,7 @@ class Ajax
|
||||
$node->url = "../cases/cases_Step?TYPE=ASSIGN_TASK&UID=-1&POSITION=10000&ACTION=ASSIGN";
|
||||
$tree[] = $node;
|
||||
|
||||
print(G::json_encode($tree));
|
||||
|
||||
echo G::json_encode($tree);
|
||||
}
|
||||
|
||||
function getInformationOptions()
|
||||
@@ -196,7 +234,7 @@ class Ajax
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_UPLOADED_DOCUMENTS'), 'fn'=>'uploadedDocuments');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_GENERATED_DOCUMENTS'), 'fn'=>'generatedDocuments');
|
||||
|
||||
print(G::json_encode($options));
|
||||
return $options;
|
||||
}
|
||||
|
||||
function getActionOptions()
|
||||
@@ -261,7 +299,7 @@ class Ajax
|
||||
$options[] = Array('text'=>G::LoadTranslation('ID_ADHOC_ASSIGNMENT'), 'fn'=>'');
|
||||
}
|
||||
}
|
||||
print(G::json_encode($options));
|
||||
return $options;
|
||||
}
|
||||
|
||||
function processMap()
|
||||
|
||||
@@ -83,7 +83,7 @@ $G_SUB_MENU = 'caseOptions';
|
||||
$G_ID_MENU_SELECTED = 'CASES';
|
||||
$G_ID_SUB_MENU_SELECTED = '_';
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel(false, true, false)");
|
||||
$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}}')");
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var Cse = {};
|
||||
Cse.panels = {};
|
||||
|
||||
@@ -84,10 +84,7 @@
|
||||
/* Render page */
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
|
||||
if( isset($_SESSION['alreadyDerivated']) && $_SESSION['alreadyDerivated'] == true )
|
||||
$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel(false, true, false)");
|
||||
else
|
||||
$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel(false, true, $actions)");
|
||||
$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}')");
|
||||
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var Cse = {};
|
||||
|
||||
@@ -975,7 +975,7 @@
|
||||
|
||||
/* Render page */
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel(true, true, true);");
|
||||
$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel('$sStatus');");
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var showSteps = function()
|
||||
{
|
||||
|
||||
@@ -57,50 +57,50 @@
|
||||
|
||||
|
||||
/* Prepare page before to show */
|
||||
$oTemplatePower = new TemplatePower(PATH_TPL . 'cases/cases_Step.html');
|
||||
$oTemplatePower->prepare();
|
||||
$G_PUBLISH = new Publisher;
|
||||
$oTemplatePower = new TemplatePower(PATH_TPL . 'cases/cases_Step.html');
|
||||
$oTemplatePower->prepare();
|
||||
$G_PUBLISH = new Publisher;
|
||||
$oCase = new Cases();
|
||||
$Fields = $oCase->loadCase($_SESSION['APPLICATION']);
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode("parent.showCaseNavigatorPanel(false, true, false);");
|
||||
// DEPRECATED this script call is marked for removal since almost all the interface is extJS based
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var Cse = {};
|
||||
Cse.panels = {};
|
||||
var leimnud = new maborak();
|
||||
leimnud.make();
|
||||
leimnud.Package.Load("rpc,drag,drop,panel,app,validator,fx,dom,abbr",{Instance:leimnud,Type:"module"});
|
||||
leimnud.Package.Load("json",{Type:"file"});
|
||||
leimnud.Package.Load("cases",{Type:"file",Absolute:true,Path:"/jscore/cases/core/cases.js"});
|
||||
leimnud.Package.Load("cases_Step",{Type:"file",Absolute:true,Path:"/jscore/cases/core/cases_Step.js"});
|
||||
leimnud.Package.Load("processmap",{Type:"file",Absolute:true,Path:"/jscore/processmap/core/processmap.js"});
|
||||
leimnud.exec(leimnud.fix.memoryLeak);
|
||||
leimnud.event.add(window,"load",function(){
|
||||
'.(isset($_SESSION['showCasesWindow'])?'try{'.$_SESSION['showCasesWindow'].'}catch(e){}':'').'
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode("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 = {};
|
||||
Cse.panels = {};
|
||||
var leimnud = new maborak();
|
||||
leimnud.make();
|
||||
leimnud.Package.Load("rpc,drag,drop,panel,app,validator,fx,dom,abbr",{Instance:leimnud,Type:"module"});
|
||||
leimnud.Package.Load("json",{Type:"file"});
|
||||
leimnud.Package.Load("cases",{Type:"file",Absolute:true,Path:"/jscore/cases/core/cases.js"});
|
||||
leimnud.Package.Load("cases_Step",{Type:"file",Absolute:true,Path:"/jscore/cases/core/cases_Step.js"});
|
||||
leimnud.Package.Load("processmap",{Type:"file",Absolute:true,Path:"/jscore/processmap/core/processmap.js"});
|
||||
leimnud.exec(leimnud.fix.memoryLeak);
|
||||
leimnud.event.add(window,"load",function(){
|
||||
'.(isset($_SESSION['showCasesWindow'])?'try{'.$_SESSION['showCasesWindow'].'}catch(e){}':'').'
|
||||
});
|
||||
');
|
||||
// DEPRECATED this script call is marked for removal
|
||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
||||
');
|
||||
// DEPRECATED this script call is marked for removal
|
||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
||||
|
||||
if(!isset($_GET['type'])) $_GET['type'] = 'DYNAFORM';
|
||||
if(!isset($_GET['position'])) $_GET['position'] = 1;
|
||||
|
||||
$_SESSION['STEP_POSITION'] = (int)$_GET['position'];
|
||||
$oCase = new Cases();
|
||||
$Fields = $oCase->loadCase($_SESSION['APPLICATION']);
|
||||
|
||||
|
||||
|
||||
//Obtain previous and next step - Start
|
||||
if(isset($_GET['type']))
|
||||
$sType = $_GET['type'];
|
||||
else
|
||||
$sType = '';
|
||||
|
||||
try {
|
||||
$aNextStep = $oCase->getNextSupervisorStep($_SESSION['PROCESS'], $_SESSION['STEP_POSITION'], $sType);
|
||||
$aPreviousStep = $oCase->getPreviousSupervisorStep($_SESSION['PROCESS'], $_SESSION['STEP_POSITION'], $sType);
|
||||
}
|
||||
catch (exception $e) {
|
||||
|
||||
G::SendTemporalMessage($e->getMessage(), 'error', 'string');
|
||||
}
|
||||
|
||||
if (!$aPreviousStep) {
|
||||
|
||||
@@ -28,23 +28,25 @@
|
||||
* @date Jan 3th, 2010
|
||||
*/
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$oHeadPublisher->usingExtJs('ux/miframe');
|
||||
$oHeadPublisher->addExtJsScript('cases/open', false);
|
||||
//
|
||||
$uri = '';
|
||||
foreach($_GET as $k=>$v)
|
||||
$uri .= ($uri == '')? "$k=$v": "&$k=$v";
|
||||
|
||||
G::LoadClass("configuration");
|
||||
G::LoadClass("case");
|
||||
$oCase = new Cases();
|
||||
$conf = new Configurations;
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$oHeadPublisher->usingExtJs('ux/miframe');
|
||||
$oHeadPublisher->addExtJsScript('cases/open', true);
|
||||
|
||||
$uri = '';
|
||||
foreach($_GET as $k=>$v) {
|
||||
$uri .= ($uri == '')? "$k=$v": "&$k=$v";
|
||||
}
|
||||
|
||||
$appNum = '';
|
||||
if( isset($_GET['APP_UID']) && isset($_GET['DEL_INDEX'])) {
|
||||
$case = $oCase->loadCase($_GET['APP_UID'], $_GET['DEL_INDEX']);
|
||||
$appNum = $case['APP_TITLE'];
|
||||
}
|
||||
$conf = new Configurations;
|
||||
|
||||
if (!isset($_GET['to_revise'])){
|
||||
$script = 'cases_Open?';
|
||||
@@ -52,8 +54,7 @@
|
||||
$script = 'cases_OpenToRevise?';
|
||||
$delIndex = $_GET['DEL_INDEX'];
|
||||
$appUid = $_GET['APP_UID'];
|
||||
$oHeadPublisher->assign( 'treeToReviseTitle', G::loadtranslation('ID_STEP_LIST')); //translations
|
||||
// $oHeadPublisher->assign( 'TRANSLATIONS', $TRANSLATIONS); //translations
|
||||
$oHeadPublisher->assign( 'treeToReviseTitle', G::loadtranslation('ID_STEP_LIST'));
|
||||
$casesPanelUrl = 'casesToReviseTreeContent?APP_UID='.$appUid.'&DEL_INDEX='.$delIndex;
|
||||
$oHeadPublisher->assign( 'casesPanelUrl', $casesPanelUrl); //translations
|
||||
echo "<div id='toReviseTree'></div>";
|
||||
|
||||
@@ -230,6 +230,8 @@ function redirect(href){
|
||||
}
|
||||
|
||||
Ext.onReady ( function() {
|
||||
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
|
||||
|
||||
var ids = '';
|
||||
var filterProcess = '';
|
||||
var filterUser = '';
|
||||
|
||||
@@ -10,9 +10,10 @@ var _ENV_CURRENT_DATE;
|
||||
|
||||
Ext.onReady(function(){
|
||||
Ext.QuickTips.init();
|
||||
showCaseNavigatorPanel = function(steps, information, action) {
|
||||
|
||||
if(steps==false&&action==false&&typeof(treeToReviseTitle)!='undefined'){
|
||||
|
||||
showCaseNavigatorPanel = function(app_status) {
|
||||
|
||||
if (typeof(treeToReviseTitle) != 'undefined'){
|
||||
var treeToRevise = new Ext.tree.TreePanel({
|
||||
title: treeToReviseTitle,
|
||||
width: 250,
|
||||
@@ -53,15 +54,65 @@ Ext.onReady(function(){
|
||||
winTree.show(this);
|
||||
toReviseTreeOpen = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if( caseMenuOpen )
|
||||
if( caseMenuOpen )
|
||||
return false;
|
||||
else
|
||||
caseMenuOpen = true;
|
||||
|
||||
//get the menu
|
||||
|
||||
Ext.Ajax.request({
|
||||
url : 'ajaxListener',
|
||||
params : {action : 'getCaseMenu', app_status:app_status},
|
||||
success: function ( result, request ) {
|
||||
var data = Ext.util.JSON.decode(result.responseText);
|
||||
for(i=0; i<data.length; i++) {
|
||||
switch(data[i].id) {
|
||||
case 'STEPS':
|
||||
Ext.getCmp('casesStepTree').root.reload();
|
||||
Ext.getCmp('stepsMenu').show();
|
||||
break;
|
||||
|
||||
case 'INFO':
|
||||
//filling information menu
|
||||
var informationMenu = Ext.getCmp('informationMenu');
|
||||
informationMenu.menu.removeAll();
|
||||
for(j=0; j<data[i].options.length; j++) {
|
||||
informationMenu.menu.add({
|
||||
text: data[i].options[j].text,
|
||||
handler: data[i].options[j].fn != '' ? Actions[data[i].options[j].fn] : function(){}
|
||||
});
|
||||
menuSelectedTitle[data[i].options[j].fn] = data[i].options[j].text;
|
||||
}
|
||||
informationMenu.show();
|
||||
break;
|
||||
|
||||
case 'ACTIONS':
|
||||
var actionMenu = Ext.getCmp('actionMenu');
|
||||
actionMenu.menu.removeAll();
|
||||
for(j=0; j<data[i].options.length; j++) {
|
||||
actionMenu.menu.add({
|
||||
text: data[i].options[j].text,
|
||||
handler: data[i].options[j].fn != '' ? Actions[data[i].options[j].fn] : function(){}
|
||||
});
|
||||
menuSelectedTitle[data[i].options[j].fn] = data[i].options[j].text;
|
||||
}
|
||||
actionMenu.show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
failure: function ( result, request) {
|
||||
Ext.MessageBox.alert('Failed', result.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
return;
|
||||
|
||||
|
||||
//getting the case Information availables options
|
||||
Ext.Ajax.request({
|
||||
url : 'ajaxListener' ,
|
||||
|
||||
Reference in New Issue
Block a user