BUG 10158 I added the colors in case tracker to stages SOLVED
I added the colors in case tracker to stages
This commit is contained in:
@@ -159,11 +159,7 @@
|
||||
} else if(thisform.elements[i].type == "textarea") { //Handle textareas
|
||||
formdata += thisform.elements[i].name + "=" + encodeURIComponent(thisform.elements[i].value);
|
||||
} else if(thisform.elements[i].type == "checkbox") { //Handle checkbox's
|
||||
if (typeof(thisform.elements[i].value) != undefined) {
|
||||
formdata += thisform.elements[i].name + '=' + thisform.elements[i].value;
|
||||
} else {
|
||||
formdata += thisform.elements[i].name + '=' + ((thisform.elements[i].checked)? '1': '0');
|
||||
}
|
||||
formdata += thisform.elements[i].name + '=' + ((thisform.elements[i].checked)? '1': '0');
|
||||
} else if(thisform.elements[i].type == "radio") { //Handle Radio buttons
|
||||
if(thisform.elements[i].checked==true){
|
||||
formdata += thisform.elements[i].name + "=" + thisform.elements[i].value;
|
||||
|
||||
@@ -427,7 +427,7 @@ objetus.onreadystatechange=function(){if(objetus.readyState==4)
|
||||
if((method==='POST')||(method==='GET/POST'))objetus.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");objetus.send(((method==='GET')?null:data));if(!asynchronous)
|
||||
{if(callback)callback(objetus.responseText);return objetus.responseText;}}catch(ss)
|
||||
{alert("Error: "+var_dump(ss));}}
|
||||
function ajax_getForm(thisform){var formdata='';for(var i=0;i<thisform.length;i++){if(formdata!=='')formdata+='&';if(thisform.elements[i].type=="text"){formdata+=thisform.elements[i].name+"="+encodeURIComponent(thisform.elements[i].value);}else if(thisform.elements[i].type=="textarea"){formdata+=thisform.elements[i].name+"="+encodeURIComponent(thisform.elements[i].value);}else if(thisform.elements[i].type=="checkbox"){if(typeof(thisform.elements[i].value)!=undefined){formdata+=thisform.elements[i].name+'='+thisform.elements[i].value;}else{formdata+=thisform.elements[i].name+'='+((thisform.elements[i].checked)?'1':'0');}}else if(thisform.elements[i].type=="radio"){if(thisform.elements[i].checked==true){formdata+=thisform.elements[i].name+"="+thisform.elements[i].value;}}else if(thisform.elements[i].type=="select-multiple"){for(var j=0;j<thisform.elements[i].options.length;j++){if(j!==0)formdata+='&';formdata+=((thisform.elements[i].options[j].selected)?thisform.elements[i].name.replace('[]','['+j+']')+"="+encodeURIComponent(thisform.elements[i].options[j].value):'');}}else{formdata+=thisform.elements[i].name+"="+encodeURIComponent(thisform.elements[i].value);}}
|
||||
function ajax_getForm(thisform){var formdata='';for(var i=0;i<thisform.length;i++){if(formdata!=='')formdata+='&';if(thisform.elements[i].type=="text"){formdata+=thisform.elements[i].name+"="+encodeURIComponent(thisform.elements[i].value);}else if(thisform.elements[i].type=="textarea"){formdata+=thisform.elements[i].name+"="+encodeURIComponent(thisform.elements[i].value);}else if(thisform.elements[i].type=="checkbox"){formdata+=thisform.elements[i].name+'='+((thisform.elements[i].checked)?'1':'0');}else if(thisform.elements[i].type=="radio"){if(thisform.elements[i].checked==true){formdata+=thisform.elements[i].name+"="+thisform.elements[i].value;}}else if(thisform.elements[i].type=="select-multiple"){for(var j=0;j<thisform.elements[i].options.length;j++){if(j!==0)formdata+='&';formdata+=((thisform.elements[i].options[j].selected)?thisform.elements[i].name.replace('[]','['+j+']')+"="+encodeURIComponent(thisform.elements[i].options[j].value):'');}}else{formdata+=thisform.elements[i].name+"="+encodeURIComponent(thisform.elements[i].value);}}
|
||||
return formdata;}
|
||||
function isNumber(sValue)
|
||||
{var sValue=new String(sValue);var bDot=false;var i,sCharacter;if((sValue==null)||(sValue.length==0))
|
||||
|
||||
@@ -62,20 +62,20 @@ try {
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode( '
|
||||
var pb=leimnud.dom.capture("tag.body 0");
|
||||
Sm=new stagesmap();
|
||||
Sm.options = {
|
||||
target : "sm_target",
|
||||
dataServer: "../tracker/tracker_Ajax",
|
||||
uid : "' . $_POST['PRO_UID'] . '",
|
||||
lang : "' . SYS_LANG . '",
|
||||
theme : "processmaker",
|
||||
size : {w:"780",h:"540"},
|
||||
images_dir: "/jscore/processmap/core/images/",
|
||||
rw : true,
|
||||
hideMenu : false
|
||||
};
|
||||
$oHeadPublisher->addScriptCode( '
|
||||
var pb=leimnud.dom.capture("tag.body 0");
|
||||
Sm=new stagesmap();
|
||||
Sm.options = {
|
||||
target : "sm_target",
|
||||
dataServer: "../tracker/tracker_Ajax",
|
||||
uid : "' . $_POST['PRO_UID'] . '",
|
||||
lang : "' . SYS_LANG . '",
|
||||
theme : "processmaker",
|
||||
size : {w:"780",h:"540"},
|
||||
images_dir: "/jscore/processmap/core/images/",
|
||||
rw : true,
|
||||
hideMenu : false
|
||||
};
|
||||
Sm.make();' );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
break;
|
||||
@@ -122,11 +122,11 @@ try {
|
||||
$oAppDocument->Fields['VIEW'] = G::LoadTranslation( 'ID_OPEN' );
|
||||
$oAppDocument->Fields['FILE'] = 'tracker_ShowDocument?a=' . $_POST['APP_DOC_UID'] . '&r=' . rand();
|
||||
|
||||
//If plugin and trigger are defined for listing
|
||||
//If plugin and trigger are defined for listing
|
||||
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) {
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$filesPluginArray = $oPluginRegistry->executeTriggers( PM_CASE_DOCUMENT_LIST_ARR, $_SESSION['APPLICATION'] );
|
||||
//Now search for the file, if exists the change the download URL
|
||||
//Now search for the file, if exists the change the download URL
|
||||
foreach ($filesPluginArray as $file) {
|
||||
if ($file->filename == $_POST['APP_DOC_UID']) {
|
||||
$oAppDocument->Fields['FILE'] = $file->downloadScript;
|
||||
@@ -165,14 +165,14 @@ try {
|
||||
$aFields['FILE1'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=doc&random=' . rand();
|
||||
$aFields['FILE2'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=pdf&random=' . rand();
|
||||
|
||||
//If plugin and trigger are defined for listing
|
||||
//If plugin and trigger are defined for listing
|
||||
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) {
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
$filesPluginArray = $oPluginRegistry->executeTriggers( PM_CASE_DOCUMENT_LIST_ARR, $aFields['APP_UID'] );
|
||||
//Now search for the file, if exists the change the download URL
|
||||
//Now search for the file, if exists the change the download URL
|
||||
foreach ($filesPluginArray as $file) {
|
||||
if ($file->filename == $_POST['APP_DOC_UID']) {
|
||||
$aFields['FILE2'] = $file->downloadScript; // The PDF is the only one uploaded to KT
|
||||
$aFields['FILE2'] = $file->downloadScript; // The PDF is the only one uploaded to KT
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -183,13 +183,13 @@ try {
|
||||
break;
|
||||
case 'load':
|
||||
$oConnection = Propel::getConnection( 'workflow' );
|
||||
$oStatement = $oConnection->prepareStatement( "CREATE TABLE IF NOT EXISTS `STAGE` (
|
||||
`STG_UID` VARCHAR( 32 ) NOT NULL ,
|
||||
`PRO_UID` VARCHAR( 32 ) NOT NULL ,
|
||||
`STG_POSX` INT( 11 ) NOT NULL DEFAULT '0',
|
||||
`STG_POSY` INT( 11 ) NOT NULL DEFAULT '0',
|
||||
`STG_INDEX` INT( 11 ) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY ( `STG_UID` )
|
||||
$oStatement = $oConnection->prepareStatement( "CREATE TABLE IF NOT EXISTS `STAGE` (
|
||||
`STG_UID` VARCHAR( 32 ) NOT NULL ,
|
||||
`PRO_UID` VARCHAR( 32 ) NOT NULL ,
|
||||
`STG_POSX` INT( 11 ) NOT NULL DEFAULT '0',
|
||||
`STG_POSY` INT( 11 ) NOT NULL DEFAULT '0',
|
||||
`STG_INDEX` INT( 11 ) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY ( `STG_UID` )
|
||||
);" );
|
||||
$oStatement->executeQuery();
|
||||
/**
|
||||
@@ -204,8 +204,8 @@ try {
|
||||
$oProcess = new Process();
|
||||
$aRow = $oProcess->load( $oData->uid );
|
||||
$oSM->title->label = strip_tags( $aRow['PRO_TITLE'] );
|
||||
//$oSM->title->position->x = $aRow['PRO_TITLE_X'];
|
||||
//$oSM->title->position->y = $aRow['PRO_TITLE_Y'];
|
||||
//$oSM->title->position->x = $aRow['PRO_TITLE_X'];
|
||||
//$oSM->title->position->y = $aRow['PRO_TITLE_Y'];
|
||||
$oSM->title->position->x = 10;
|
||||
$oSM->title->position->y = 10;
|
||||
$oSM->stages = array ();
|
||||
@@ -249,6 +249,22 @@ try {
|
||||
$oCriteria->add( $oCriteria->getNewCriterion( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL )->addOr( $oCriteria->getNewCriterion( AppDelegationPeer::DEL_FINISH_DATE, '' ) ) );
|
||||
if (AppDelegationPeer::doCount( $oCriteria ) > 0) {
|
||||
$oStage->color = '#FF0000';
|
||||
} else {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
||||
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
||||
$oCriteria->add( AppDelegationPeer::DEL_THREAD_STATUS, 'CLOSED' );
|
||||
if (AppDelegationPeer::doCount( $oCriteria ) > 0) {
|
||||
$oStage->color = '#006633';
|
||||
} else {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
||||
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
||||
if (AppDelegationPeer::doCount( $oCriteria ) == 0) {
|
||||
$oStage->color = '#939598';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
$oSM->stages[] = $oStage;
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
/*
|
||||
* Map for Case Tracker
|
||||
*
|
||||
* @author Everth S. Berrios Morales <everth@colosa.com>
|
||||
*
|
||||
/*
|
||||
* Map for Case Tracker
|
||||
*
|
||||
* @author Everth S. Berrios Morales <everth@colosa.com>
|
||||
*
|
||||
*/
|
||||
require_once 'classes/model/Process.php';
|
||||
if (! isset( $_SESSION['PROCESS'] )) {
|
||||
@@ -48,7 +48,7 @@ if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
|
||||
}
|
||||
switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
||||
case 'NONE':
|
||||
//Nothing
|
||||
//Nothing
|
||||
break;
|
||||
case 'PROCESSMAP':
|
||||
G::LoadClass( 'case' );
|
||||
@@ -71,67 +71,67 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
||||
}
|
||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode( '
|
||||
var maximunX = ' . processMap::getMaximunTaskX( $_SESSION['PROCESS'] ) . ';
|
||||
leimnud.event.add(window,"load",function(){
|
||||
var pb = leimnud.dom.capture("tag.body 0");
|
||||
pm = new processmap();
|
||||
pm.options = {
|
||||
target : "pm_target",
|
||||
dataServer: "../processes/processes_Ajax",
|
||||
uid : "' . $_SESSION['PROCESS'] . '",
|
||||
lang : "' . SYS_LANG . '",
|
||||
theme : "processmaker",
|
||||
size : {w:pb.offsetWidth-10,h:pb.offsetHeight},
|
||||
images_dir: "/jscore/processmap/core/images/",
|
||||
rw : false,
|
||||
mi : false,
|
||||
ct : true,
|
||||
hideMenu : false
|
||||
}
|
||||
|
||||
pm.make();
|
||||
|
||||
///////
|
||||
var pnlLegend = new leimnud.module.panel();
|
||||
|
||||
pnlLegend.options = {
|
||||
size: {w: 260, h: 140},
|
||||
position: {
|
||||
x: ((document.body.clientWidth * 95) / 100) - ((document.body.clientWidth * 95) / 100 - (((document.body.clientWidth * 95) / 100) - 260)),
|
||||
y: 175,
|
||||
center: false
|
||||
},
|
||||
title: G_STRINGS.ID_COLOR_LEYENDS,
|
||||
theme: "processmaker",
|
||||
statusBar: false,
|
||||
control: {resize: false, roll: false, drag: true, close: false},
|
||||
fx: {modal: false, opacity: false, blinkToFront: true, fadeIn: false, drag: false}
|
||||
};
|
||||
|
||||
pnlLegend.setStyle = {
|
||||
content: {overflow: "hidden"}
|
||||
};
|
||||
|
||||
pnlLegend.events = {
|
||||
remove: function () { delete(pnlLegend); }.extend(this)
|
||||
};
|
||||
|
||||
pnlLegend.make();
|
||||
pnlLegend.loader.show();
|
||||
|
||||
///////
|
||||
var rpcRequest = new leimnud.module.rpc.xmlhttp({
|
||||
url : "tracker_Ajax",
|
||||
args: "action=processMapLegend"
|
||||
});
|
||||
|
||||
rpcRequest.callback = function (rpc) {
|
||||
pnlLegend.loader.hide();
|
||||
pnlLegend.addContent(rpc.xmlhttp.responseText);
|
||||
}.extend(this);
|
||||
|
||||
rpcRequest.make();
|
||||
$oHeadPublisher->addScriptCode( '
|
||||
var maximunX = ' . processMap::getMaximunTaskX( $_SESSION['PROCESS'] ) . ';
|
||||
leimnud.event.add(window,"load",function(){
|
||||
var pb = leimnud.dom.capture("tag.body 0");
|
||||
pm = new processmap();
|
||||
pm.options = {
|
||||
target : "pm_target",
|
||||
dataServer: "../processes/processes_Ajax",
|
||||
uid : "' . $_SESSION['PROCESS'] . '",
|
||||
lang : "' . SYS_LANG . '",
|
||||
theme : "processmaker",
|
||||
size : {w:pb.offsetWidth-10,h:pb.offsetHeight},
|
||||
images_dir: "/jscore/processmap/core/images/",
|
||||
rw : false,
|
||||
mi : false,
|
||||
ct : true,
|
||||
hideMenu : false
|
||||
}
|
||||
|
||||
pm.make();
|
||||
|
||||
///////
|
||||
var pnlLegend = new leimnud.module.panel();
|
||||
|
||||
pnlLegend.options = {
|
||||
size: {w: 260, h: 140},
|
||||
position: {
|
||||
x: ((document.body.clientWidth * 95) / 100) - ((document.body.clientWidth * 95) / 100 - (((document.body.clientWidth * 95) / 100) - 260)),
|
||||
y: 175,
|
||||
center: false
|
||||
},
|
||||
title: G_STRINGS.ID_COLOR_LEYENDS,
|
||||
theme: "processmaker",
|
||||
statusBar: false,
|
||||
control: {resize: false, roll: false, drag: true, close: false},
|
||||
fx: {modal: false, opacity: false, blinkToFront: true, fadeIn: false, drag: false}
|
||||
};
|
||||
|
||||
pnlLegend.setStyle = {
|
||||
content: {overflow: "hidden"}
|
||||
};
|
||||
|
||||
pnlLegend.events = {
|
||||
remove: function () { delete(pnlLegend); }.extend(this)
|
||||
};
|
||||
|
||||
pnlLegend.make();
|
||||
pnlLegend.loader.show();
|
||||
|
||||
///////
|
||||
var rpcRequest = new leimnud.module.rpc.xmlhttp({
|
||||
url : "tracker_Ajax",
|
||||
args: "action=processMapLegend"
|
||||
});
|
||||
|
||||
rpcRequest.callback = function (rpc) {
|
||||
pnlLegend.loader.hide();
|
||||
pnlLegend.addContent(rpc.xmlhttp.responseText);
|
||||
}.extend(this);
|
||||
|
||||
rpcRequest.make();
|
||||
});' );
|
||||
G::RenderPage( 'publish' );
|
||||
break;
|
||||
@@ -155,24 +155,66 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
||||
}
|
||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode( '
|
||||
leimnud.Package.Load("stagesmap",{Type:"file",Absolute:true,Path:"/jscore/stagesmap/core/stagesmap.js"});
|
||||
leimnud.event.add(window,"load",function(){
|
||||
var pb=leimnud.dom.capture("tag.body 0");
|
||||
Sm=new stagesmap();
|
||||
Sm.options = {
|
||||
target : "sm_target",
|
||||
dataServer: "../tracker/tracker_Ajax",
|
||||
uid : "' . $_SESSION['PROCESS'] . '",
|
||||
lang : "' . SYS_LANG . '",
|
||||
theme : "processmaker",
|
||||
size : {w:"780",h:"540"},
|
||||
//size : {w:pb.offsetWidth-10,h:pb.offsetHeight},
|
||||
images_dir: "/jscore/processmap/core/images/",
|
||||
rw : false,
|
||||
hideMenu : false
|
||||
};
|
||||
Sm.make();
|
||||
$oHeadPublisher->addScriptCode( '
|
||||
leimnud.Package.Load("stagesmap",{Type:"file",Absolute:true,Path:"/jscore/stagesmap/core/stagesmap.js"});
|
||||
leimnud.event.add(window,"load",function(){
|
||||
var pb=leimnud.dom.capture("tag.body 0");
|
||||
Sm=new stagesmap();
|
||||
Sm.options = {
|
||||
target : "sm_target",
|
||||
dataServer: "../tracker/tracker_Ajax",
|
||||
uid : "' . $_SESSION['PROCESS'] . '",
|
||||
lang : "' . SYS_LANG . '",
|
||||
theme : "processmaker",
|
||||
size : {w:"780",h:"540"},
|
||||
//size : {w:pb.offsetWidth-10,h:pb.offsetHeight},
|
||||
images_dir: "/jscore/processmap/core/images/",
|
||||
rw : false,
|
||||
hideMenu : false
|
||||
};
|
||||
Sm.make();
|
||||
|
||||
///////
|
||||
var pnlLegend = new leimnud.module.panel();
|
||||
|
||||
pnlLegend.options = {
|
||||
size: {w: 260, h: 140},
|
||||
position: {
|
||||
x: ((document.body.clientWidth * 95) / 100) - ((document.body.clientWidth * 95) / 100 - (((document.body.clientWidth * 95) / 100) - 260)),
|
||||
y: 175,
|
||||
center: false
|
||||
},
|
||||
title: G_STRINGS.ID_COLOR_LEYENDS,
|
||||
theme: "processmaker",
|
||||
statusBar: false,
|
||||
control: {resize: false, roll: false, drag: true, close: false},
|
||||
fx: {modal: false, opacity: false, blinkToFront: true, fadeIn: false, drag: false}
|
||||
};
|
||||
|
||||
pnlLegend.setStyle = {
|
||||
content: {overflow: "hidden"}
|
||||
};
|
||||
|
||||
pnlLegend.events = {
|
||||
remove: function () { delete(pnlLegend); }.extend(this)
|
||||
};
|
||||
|
||||
pnlLegend.make();
|
||||
pnlLegend.loader.show();
|
||||
|
||||
///////
|
||||
var rpcRequest = new leimnud.module.rpc.xmlhttp({
|
||||
url : "tracker_Ajax",
|
||||
args: "action=processMapLegend"
|
||||
});
|
||||
|
||||
rpcRequest.callback = function (rpc) {
|
||||
pnlLegend.loader.hide();
|
||||
pnlLegend.addContent(rpc.xmlhttp.responseText);
|
||||
}.extend(this);
|
||||
|
||||
rpcRequest.make();
|
||||
|
||||
});' );
|
||||
G::RenderPage( 'publish' );
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user