Merged master into dashboards2
This commit is contained in:
@@ -105,16 +105,31 @@ while ($rsSql->next()) {
|
||||
$grdTitle = htmlentities($proTitle . " / " . $tabTitle, ENT_QUOTES, "UTF-8");
|
||||
$tabTitle = htmlentities(substr($proTitle, 0, 25) . ((strlen($proTitle) > 25)? "..." : null) . " / " . $tabTitle, ENT_QUOTES, "UTF-8");
|
||||
|
||||
$arrayTabItem[] = "
|
||||
{
|
||||
title: \"<span onmouseover=\\\"toolTipTab('$grdTitle', 1);\\\" onmouseout=\\\"toolTipTab('', 0);\\\">$tabTitle</span>\",
|
||||
listeners: {
|
||||
activate: function ()
|
||||
{
|
||||
generateGrid(\"$processUid\", \"$taskUid\", \"$dynaformUid\");
|
||||
$oProcess = new Process();
|
||||
$isBpmn = $oProcess->isBpmnProcess($processUid);
|
||||
if($isBpmn){
|
||||
$arrayTabItem[] = "
|
||||
{
|
||||
title: \"<span onmouseover=\\\"toolTipTab('$grdTitle', 1);\\\" onmouseout=\\\"toolTipTab('', 0);\\\">$tabTitle</span>\",
|
||||
listeners: {
|
||||
activate: function ()
|
||||
{
|
||||
generateGrid(\"$processUid\", \"$taskUid\", \"$dynaformUid\");
|
||||
}
|
||||
}
|
||||
}
|
||||
}";
|
||||
}";
|
||||
}else{
|
||||
$arrayTabItem[] = "
|
||||
{
|
||||
title: \"<span onmouseover=\\\"toolTipTab('$grdTitle', 1);\\\" onmouseout=\\\"toolTipTab('', 0);\\\">$tabTitle</span>\",
|
||||
listeners: {
|
||||
activate: function ()
|
||||
{
|
||||
generateGridClassic(\"$processUid\", \"$taskUid\", \"$dynaformUid\");
|
||||
}
|
||||
}
|
||||
}";
|
||||
}
|
||||
}
|
||||
|
||||
if (count($arrayTabItem) > 0) {
|
||||
|
||||
75
workflow/engine/methods/cases/proxyDataCombobox.php
Executable file
75
workflow/engine/methods/cases/proxyDataCombobox.php
Executable file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
$appUid = isset($_POST["appUid"])? $_POST["appUid"] : "";
|
||||
$dynUid = isset($_POST["dynUid"])? $_POST["dynUid"] : "";
|
||||
$proUid = isset($_POST["proUid"])? $_POST["proUid"] : "";
|
||||
$fieldName = isset($_POST["fieldName"])? $_POST["fieldName"] : "";
|
||||
|
||||
$filename = $proUid . PATH_SEP . $dynUid . ".xml";
|
||||
|
||||
$G_FORM = new xmlform();
|
||||
$G_FORM->home = PATH_DYNAFORM;
|
||||
$G_FORM->parseFile($filename, SYS_LANG, true);
|
||||
|
||||
G::LoadClass("case");
|
||||
G::LoadClass("pmFunctions");
|
||||
|
||||
//Load the variables
|
||||
$oCase = new Cases();
|
||||
$sqlQuery = null;
|
||||
$array = array();
|
||||
$aFields = $oCase->loadCase($appUid);
|
||||
|
||||
foreach ($G_FORM->fields as $key => $val) {
|
||||
if ($fieldName == $val->name) {
|
||||
if ($G_FORM->fields[$key]->sql != null) {
|
||||
$sqlQuery = G::replaceDataField($G_FORM->fields[$key]->sql, $aFields ["APP_DATA"]);
|
||||
}
|
||||
//$coma = "";
|
||||
//$data1 = "";
|
||||
if (is_array($val->options)) {
|
||||
foreach ($val->options as $key1 => $val1) {
|
||||
$array[] = array("value" => $key1, "text" => $val1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//echo ($sqlQuery);
|
||||
if ($sqlQuery != null) {
|
||||
$aResult = executeQuery($sqlQuery);
|
||||
//var_dump($aResult);
|
||||
if ($aResult == "false" || $aResult == null) {
|
||||
$aResult = array();
|
||||
}
|
||||
} else {
|
||||
$aResult = array();
|
||||
}
|
||||
//var_dump($aResult);
|
||||
$arrayTmp = array();
|
||||
foreach ($aResult as $field) {
|
||||
$i = 0;
|
||||
|
||||
foreach ($field as $key => $value) {
|
||||
if ($i == 0) {
|
||||
$arrayTmp["value"] = $value;
|
||||
if (count($field) == 1) {
|
||||
$arrayTmp["text"]=$value;
|
||||
}
|
||||
}
|
||||
|
||||
if ($i == 1) {
|
||||
$arrayTmp["text"] = $value;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$array[] = $arrayTmp;
|
||||
}
|
||||
|
||||
$response["records"] = $array;
|
||||
|
||||
echo G::json_encode($response);
|
||||
Reference in New Issue
Block a user