Changes to the ajax function in order to obtain the list of variables
This commit is contained in:
@@ -4,20 +4,17 @@ var getValue = function (list) {
|
||||
|
||||
var getVariableList = function (queryText, proUid, varType){
|
||||
varType = varType.toLowerCase();
|
||||
var response
|
||||
var responseData
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : "../processes/processes_Ajax",
|
||||
async : false,
|
||||
method: "POST",
|
||||
args : "action=getVariableList&process="+proUid+"&queryText="+queryText+"&type="+varType
|
||||
});
|
||||
oRPC.callback = function(rpc){
|
||||
console.log(rpc.xmlhttp.responseText);
|
||||
response = eval(rpc.xmlhttp.responseText);
|
||||
}.extend(this);
|
||||
});
|
||||
|
||||
oRPC.make();
|
||||
console.log(response);
|
||||
oRPC.make();
|
||||
responseData = eval ("(" +oRPC.xmlhttp.responseText+ ")");
|
||||
return responseData;
|
||||
}
|
||||
|
||||
leimnud.event.add(document.getElementById('type_variables'), 'change', function(event) {
|
||||
@@ -29,21 +26,25 @@ leimnud.event.add(document.getElementById('prefix'), 'change', function(event) {
|
||||
});
|
||||
|
||||
|
||||
leimnud.event.add(document.getElementById('search'), 'keypress', function(event) {
|
||||
var tecla = event.keyCode;
|
||||
if(tecla == '13')
|
||||
leimnud.event.add(document.getElementById('search'), 'keypress', function(e) {
|
||||
var key = e.keyCode;
|
||||
if(key == '13')
|
||||
{
|
||||
var list = getVariableList('nuev','2527075735085b447a58523099748463','system');
|
||||
console.log(list);
|
||||
for (var i in list){
|
||||
console.log(list[i]);
|
||||
for (var i=0; i< list.length; i++){
|
||||
console.log(list[i].sName);
|
||||
}
|
||||
e.cancelBubble = true;
|
||||
e.returnValue = false;
|
||||
if (e.stopPropagation) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
console.log('Has pulsado enter');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
leimnud.event.add(document.getElementById('type_variables'), 'change', function(event) {
|
||||
console.log('Dropdown Type of Variables');
|
||||
console.log('Dropdown Type of Variables');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user