Adding some changes to the interface in order to fix the list filters in the variable picker feature

This commit is contained in:
user
2012-11-26 12:18:03 -04:00
parent 52461ddc8c
commit ccd87965e8
3 changed files with 24 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
var getValue = function (list) {
console.log(list.value);
var getValue = function (list) {
insertFormVar(document.getElementById('selectedField').value,list.value)
}
var getVariableList = function (queryText, proUid, varType){
@@ -10,11 +10,11 @@ var getVariableList = function (queryText, proUid, varType){
async : false,
method: "POST",
args : "action=getVariableList&process="+proUid+"&queryText="+queryText+"&type="+varType
});
});
oRPC.make();
responseData = eval ("(" +oRPC.xmlhttp.responseText+ ")");
return responseData;
oRPC.make();
responseData = eval ("(" +oRPC.xmlhttp.responseText+ ")");
return responseData;
}
leimnud.event.add(document.getElementById('type_variables'), 'change', function(event) {
@@ -30,7 +30,8 @@ leimnud.event.add(document.getElementById('search'), 'keypress', function(e) {
var key = e.keyCode;
if(key == '13')
{
var list = getVariableList('nuev','2527075735085b447a58523099748463','system');
//var ref = document.getElementById("PRO_UID").value;
var list = getVariableList(document.getElementById('search').value, document.getElementById("PRO_UID").value, document.getElementById('type_variables').value);
for (var i=0; i< list.length; i++){
console.log(list[i].sName);
}
@@ -51,4 +52,4 @@ var generateListValues = function(){
combo.options.add(option, 0);
combo.options[0].value = "valor";
combo.options[0].text = "Textojjjjj";
}
}

View File

@@ -56,6 +56,8 @@ $html .= '<option value="all">All Variables</option>';
$html .= '<option value="system">System Variables</option>';
$html .= '<option value="process">Process Variables</option>';
$html .= '</select> &nbsp;&nbsp;&nbsp;&nbsp;';
$html .= '<input type="hidden" id="PRO_UID" name="PRO_UID" value="'.$_POST['sProcess'].'"/> ';
$html .= '<input type="hidden" id="selectedField" name="selectedField" value="'.$_POST['selectedField'].'"/> ';
$html .= '</td>';
$html .= '<td width="25%">';

View File

@@ -522,11 +522,20 @@ try {
case 'getVariableList':
G::LoadClass( 'xmlfield_InputPM' );
$proUid= isset($_REQUEST['process'])?$_REQUEST['process']:'';
$queryText= isset($_REQUEST['queryText'])?$_REQUEST['queryText']:'';
$aFields = getDynaformsVars( $proUid, true, isset( $_REQUEST['bIncMulSelFields'] ) ? $_REQUEST['bIncMulSelFields'] : 0 );
//$_REQUEST['queryString'] = 'SYS';
$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 );
}
$aVariables = array();
foreach ($aFields as $key => $value) {
foreach ($aFields as $key => $value){
if(stristr($aFields[$key]['sName'], $queryText)){
$aVariables[] = $aFields[$key];
}