BUG 5003 Request for horizontal scroll bars when process map is wider than browser window SOLVED

- The horizontal scrollbar was on the bottom then is not visible
- Before to load the process map get the maximun x position of the task to calculate the correct width
This commit is contained in:
Julio Cesar Laura
2012-09-05 17:17:40 -04:00
parent 7d5144c3c6
commit 514eb6b037
3 changed files with 25 additions and 10 deletions

View File

@@ -6905,4 +6905,18 @@ function saveExtEvents($oData)
return $aIDocs;
}
function getMaximunTaskX($processUid) {
$criteria = new Criteria('workflow');
$criteria->addSelectColumn('MAX(TAS_POSX) AS MAX_X');
$criteria->add(TaskPeer::PRO_UID, $processUid);
$dataset = TaskPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$row = $dataset->getRow();
return (int)$row['MAX_X'];
}
}

View File

@@ -855,6 +855,10 @@ var processmap=function(){
this.observers.menu.register(this.parent.closure({instance:this.menu,method:this.menu.remove}),this.menu);
}
this.data.render.task();
if (maximunX > this.options.size.w && document.getElementById('pm_separator_div')) {
var pm_separator_div = document.getElementById('pm_separator_div');
pm_separator_div.style.width = maximunX + 200;
}
},
task:function()
{
@@ -2384,6 +2388,7 @@ processmap.prototype={
sep.className = "pm_separatorOff___"+this.options.theme;
this.menuRolled=false;
var dse = document.createElement("div");
dse.id = 'pm_separator_div';
dse.className = "pm_separatorDOff___"+this.options.theme;
sep.appendChild(dse);
sep.onmouseup=function()
@@ -2457,8 +2462,7 @@ processmap.prototype={
this.panels.editor.options={
limit:true,
// size:{w:this.options.size.w,h:this.options.size.h},
size:{w:this.options.size.w,h:heightPanel},
size:{w:(maximunX > this.options.size.w ? maximunX + 200 : this.options.size.w),h:heightPanel},
position:{x:200,y:0,centerX:true},
title:"",
titleBar:false,

View File

@@ -46,13 +46,11 @@ if( $access != 1 ){
}
$processUID = $_GET['PRO_UID'];
//if ( isset($_SESSION['PROCESSMAP']) && $_SESSION['PROCESSMAP'] == 'BPMN' ) {
// header ( "Location: ../bpmn/processmap?PRO_UID=". $processUID );
//}
$_SESSION['PROCESS'] = $processUID;
$_SESSION['PROCESSMAP'] = 'LEIMNUD';
G::LoadClass('processMap');
$oTemplatePower = new TemplatePower(PATH_TPL . 'processes/processes_Map.html');
$oTemplatePower->prepare();
@@ -66,9 +64,8 @@ $G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addScriptFile('/jscore/dbConnections/main.js');
//$oHeadPublisher->addScriptFile('/htmlarea/editor.js');
$oHeadPublisher->addScriptCode( '
$oHeadPublisher->addScriptCode('
var maximunX = ' . processMap::getMaximunTaskX($processUID) . ';
var leimnud = new maborak();
leimnud.make();
leimnud.Package.Load("rpc,drag,drop,panel,app,validator,fx,dom,abbr",{Instance:leimnud,Type:"module"});
@@ -91,7 +88,7 @@ $oHeadPublisher->addScriptCode( '
}
Pm.make();
});
var changesSavedLabel = "' . addslashes(G::LoadTranslation('ID_SAVED_SUCCESSFULLY')) . '";' );
var changesSavedLabel = "' . addslashes(G::LoadTranslation('ID_SAVED_SUCCESSFULLY')) . '";');
if( ! isset($_GET['raw']) )
G::RenderPage('publish', 'green-submenu');