diff --git a/workflow/engine/js/controls/variablePicker.js b/workflow/engine/js/controls/variablePicker.js
index 127e345ba..c44ca4807 100644
--- a/workflow/engine/js/controls/variablePicker.js
+++ b/workflow/engine/js/controls/variablePicker.js
@@ -1,5 +1,5 @@
var getValue = function (list) {
- insertFormVar(document.getElementById('selectedField').value,list.value)
+ insertFormVar(document.getElementById('selectedField').value,list.value);
}
var getVariableList = function (queryText, proUid, varType){
@@ -19,28 +19,39 @@ var getVariableList = function (queryText, proUid, varType){
return responseData;
}
-leimnud.event.add(document.getElementById('type_variables'), 'change', function(e) {
- //console.log('Dropdown Type of Variables');
- generateListValues();
-
+var getPrefixInfo = function (prefix){
+ var oRPC = new leimnud.module.rpc.xmlhttp({
+ url : "../processes/processes_Ajax",
+ async : false,
+ method: "POST",
+ args : "action=getVariablePrefix&prefix="+prefix
+ });
+ oRPC.make();
+ return oRPC.xmlhttp.responseText;
+}
+
+leimnud.event.add(document.getElementById('type_variables'), 'change', function(event) {
+ generateListValues();
});
leimnud.event.add(document.getElementById('prefix'), 'change', function(event) {
- console.log('Dropdown Prefix');
+ document.getElementById('desc_prefix').textContent = getPrefixInfo(document.getElementById('prefix').value);
});
+leimnud.event.add(document.getElementById('_Var_Form_'), 'change', function(event) {
+ document.getElementById('selectedVariableLabel').textContent = document.getElementById('_Var_Form_').value
+});
leimnud.event.add(document.getElementById('search'), 'keypress', function(e) {
var key = e.keyCode;
- if(key == '13')
- {
- //var ref = document.getElementById("PRO_UID").value;
+ if(key == '13'){
+ // elements that will be part of a function
var list = getVariableList(document.getElementById('search').value, document.getElementById("process").value, document.getElementById('type_variables').value);
for (var i=0; i< list.length; i++){
console.log(list[i].sName);
}
e.cancelBubble = true;
- e.returnValue = false;
+ e.returnValue = false;
if (e.stopPropagation) {
e.stopPropagation();
e.preventDefault();
diff --git a/workflow/engine/methods/controls/varsAjax.php b/workflow/engine/methods/controls/varsAjax.php
index 6f76ba4dd..23b4df451 100755
--- a/workflow/engine/methods/controls/varsAjax.php
+++ b/workflow/engine/methods/controls/varsAjax.php
@@ -27,9 +27,10 @@ $html .= '
';
$html .= '
';
-$html .= '';
+$html .= '
';
$html .= '| ';
$html .= '';
+$html .= ' ';
$html .= ' | ';
$html .= '
';
@@ -56,7 +57,6 @@ $html .= '';
$html .= '';
$html .= '';
$html .= ' ';
-$html .= ' ';
$html .= '';
$html .= '';
@@ -75,12 +75,7 @@ $html .= ' | ';
$html .= '';
$html .= ' | ';
$html .= '';
-
-$html .= '
';
-$html .= '| |
';
$html .= '';
-
-$html .= '
';
$html .= '
|
';
$html .= '';
//onChange="Seleccionar(this);
@@ -91,7 +86,7 @@ $aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSel
//$html .= '
';
$html .= '
';
$html .= '
';
-$html .= '';
$html .= '
';
$html .= '';
$html .= '| Result | ';
-$html .= '@#SYS_LANG | ';
+$html .= '@@SYS_LANG | ';
$html .= '
';
$html .= '';
$html .= '| Description | ';
-$html .= 'Description @#SYS_LANG | ';
+$html .= ''.G::LoadTranslation('ID_SYSTEM').' | ';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
-$html .= '';
$html .= '
';
$html .= '| ';
-$html .= '';
+$html .= '';
$html .= ' |
';
$html .= '';
diff --git a/workflow/engine/methods/processes/processes_Ajax.php b/workflow/engine/methods/processes/processes_Ajax.php
index acb39a0bd..aac67252d 100755
--- a/workflow/engine/methods/processes/processes_Ajax.php
+++ b/workflow/engine/methods/processes/processes_Ajax.php
@@ -520,19 +520,18 @@ try {
$oProcessMap->eventsList( $oData->pro_uid, $oData->type );
break;
case 'getVariableList':
- G::LoadClass( 'xmlfield_InputPM' );
- $proUid= isset($_REQUEST['process'])?$_REQUEST['process']:'';
- $queryText= isset($_REQUEST['queryText'])?$_REQUEST['queryText']:'';
+ G::LoadClass('xmlfield_InputPM');
+ $proUid= isset( $_REQUEST['process'] )?$_REQUEST['process']:'';
+ $queryText= isset( $_REQUEST['queryText'] )?$_REQUEST['queryText']:'';
if ($_REQUEST['type']=='system'){
$isSystem = true;
} else {
$isSystem = false;
}
- var_dump($isSystem);
if ($_REQUEST['type']=='all'){
$aFields = getDynaformsVars( $proUid );
} else {
- $aFields = getDynaformsVars( $proUid, $isSystem, isset( $_REQUEST['bIncMulSelFields'] ) ? $_REQUEST['bIncMulSelFields'] : 1 );
+ $aFields = getDynaformsVars( $proUid, $isSystem, isset( $_REQUEST['bIncMulSelFields'] ) ? $_REQUEST['bIncMulSelFields'] : 1);
}
$aVariables = array();
foreach ($aFields as $key => $value){
@@ -541,7 +540,11 @@ try {
}
}
$oJSON = new Services_JSON();
- echo $oJSON->encode($aVariables);
+ echo $oJSON->encode( $aVariables );
+ break;
+ case 'getVariablePrefix':
+ $_REQUEST['prefix'] = $_REQUEST['prefix']!=null?$_REQUEST['prefix']:'ID_TO_STRING';
+ echo G::LoadTranslation($_REQUEST['prefix']);
break;
/*
case 'saveFile':