BUG 7943: Steps browsing issue

This issue was fixed, now displays the selected dynaform
This commit is contained in:
Carlos Pacha
2011-11-03 17:36:51 -04:00
parent 2b0b9de0f6
commit 0034a2cc05
4 changed files with 39 additions and 8 deletions

View File

@@ -141,6 +141,7 @@ class Ajax
$node->iconCls = 'ss_sprite ss_application_form'; $node->iconCls = 'ss_sprite ss_application_form';
$node->leaf = true; $node->leaf = true;
$node->url = "cases_Step?UID=$stepUidObj&TYPE=$stepTypeObj&POSITION=$stepPosition&ACTION=EDIT"; $node->url = "cases_Step?UID=$stepUidObj&TYPE=$stepTypeObj&POSITION=$stepPosition&ACTION=EDIT";
$node->idtodraw= $stepUidObj;
break; break;
case 'OUTPUT_DOCUMENT': case 'OUTPUT_DOCUMENT':

View File

@@ -186,6 +186,8 @@
$array['TITLE'] = G::LoadTranslation('ID_TITLE'); $array['TITLE'] = G::LoadTranslation('ID_TITLE');
$G_PUBLISH->AddContent('smarty', 'cases/cases_title', '', '', $array); $G_PUBLISH->AddContent('smarty', 'cases/cases_title', '', '', $array);
$uidf=$_GET['UID'];
switch ($_GET['TYPE']) switch ($_GET['TYPE'])
{ {
case 'DYNAFORM': case 'DYNAFORM':
@@ -199,6 +201,13 @@
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = $aNextStep['PAGE']; $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = $aNextStep['PAGE'];
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = G::loadTranslation('ID_NEXT_STEP'); $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = G::loadTranslation('ID_NEXT_STEP');
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addScriptCode("
if (typeof parent != 'undefined') {
parent.setNode('$uidf');
}
");
$oStep = new Step(); $oStep = new Step();
$oStep = $oStep->loadByProcessTaskPosition($_SESSION['PROCESS'], $_SESSION['TASK'], $_GET['POSITION']); $oStep = $oStep->loadByProcessTaskPosition($_SESSION['PROCESS'], $_SESSION['TASK'], $_GET['POSITION']);
@@ -689,6 +698,7 @@
'APP_UID' => $_SESSION['APPLICATION'], 'APP_UID' => $_SESSION['APPLICATION'],
'DEL_INDEX' => $_SESSION['INDEX']) 'DEL_INDEX' => $_SESSION['INDEX'])
); );
if ( empty($aFields['TASK']) ) { if ( empty($aFields['TASK']) ) {
throw ( new Exception ( G::LoadTranslation( 'ID_NO_DERIVATION_RULE') ) ); throw ( new Exception ( G::LoadTranslation( 'ID_NO_DERIVATION_RULE') ) );
} }
@@ -976,7 +986,6 @@
die; die;
} }
/* Render page */
$oHeadPublisher =& headPublisher::getSingleton(); $oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addScriptCode(" $oHeadPublisher->addScriptCode("
if (typeof parent != 'undefined') { if (typeof parent != 'undefined') {

View File

@@ -31,7 +31,7 @@
if (!isset($_GET['APP_UID']) || !isset($_GET['DEL_INDEX'])) { if (!isset($_GET['APP_UID']) || !isset($_GET['DEL_INDEX'])) {
throw new Exception("Application ID or Delegation Index is missing!. The System can't open the case."); throw new Exception("Application ID or Delegation Index is missing!. The System can't open the case.");
} }
require_once ("classes/model/Step.php");
G::LoadClass("configuration"); G::LoadClass("configuration");
G::LoadClass("case"); G::LoadClass("case");
$oCase = new Cases(); $oCase = new Cases();
@@ -62,10 +62,15 @@
echo "<div id='toReviseTree'></div>"; echo "<div id='toReviseTree'></div>";
} }
$oStep = new Step;
$oStep = $oStep->loadByProcessTaskPosition($case['PRO_UID'], $case['TAS_UID'], 1);
$oHeadPublisher->assign('uri', $script . $uri); $oHeadPublisher->assign('uri', $script . $uri);
$oHeadPublisher->assign('_APP_NUM', '#: ' . $case['APP_NUMBER']); $oHeadPublisher->assign('_APP_NUM', '#: ' . $case['APP_NUMBER']);
$oHeadPublisher->assign('_ENV_CURRENT_DATE', $conf->getSystemDate(date('Y-m-d'))); $oHeadPublisher->assign('_ENV_CURRENT_DATE', $conf->getSystemDate(date('Y-m-d')));
$oHeadPublisher->assign('_ENV_CURRENT_DATE_NO_FORMAT', date('Y-m-d')); $oHeadPublisher->assign('_ENV_CURRENT_DATE_NO_FORMAT', date('Y-m-d'));
$oHeadPublisher->assign('idfirstform', $oStep->getStepUidObj());
G::RenderPage('publish', 'extJs'); G::RenderPage('publish', 'extJs');

View File

@@ -9,7 +9,6 @@ var _ENV_CURRENT_DATE;
Ext.onReady(function(){ Ext.onReady(function(){
Ext.QuickTips.init(); Ext.QuickTips.init();
showCaseNavigatorPanel = function(app_status) { showCaseNavigatorPanel = function(app_status) {
if (typeof(treeToReviseTitle) != 'undefined'){ if (typeof(treeToReviseTitle) != 'undefined'){
@@ -155,20 +154,31 @@ Ext.onReady(function(){
root: { root: {
nodeType: 'async' nodeType: 'async'
}, },
listeners: { listeners: {
render: function() { render: function() {
this.getRootNode().expand(); this.getRootNode().expand();
}, },
click: function(tp) { click: function(tp) {
if( tp.attributes.url ){ if( tp.attributes.url ){
document.getElementById('openCaseFrame').src = tp.attributes.url; document.getElementById('openCaseFrame').src = tp.attributes.url;
}
}
} },
} "afterrender": {
fn: setNodeini,
scope: this
} }
}) })
var loader = casesStepTree.getLoader();
loader.on("load", setNodeini);
function setNodeini(){
var aNode = Ext.getCmp('casesStepTree').getNodeById(idfirstform);
aNode.select();
}
var navPanelWest = { var navPanelWest = {
id: 'navPanelWest', id: 'navPanelWest',
region: 'west', region: 'west',
@@ -880,6 +890,12 @@ Ext.onReady(function(){
CloseWindow = function(){ CloseWindow = function(){
Ext.getCmp('w').hide(); Ext.getCmp('w').hide();
}; };
setNode = function (uid){
var aNode = Ext.getCmp('casesStepTree').getNodeById(uid);
aNode.select();
}
/*-----added by krlos end------------*/ /*-----added by krlos end------------*/
/*Date.prototype.dateFormat = function(format) { /*Date.prototype.dateFormat = function(format) {
var result = ""; var result = "";