WYSIWYG EDITOR Generate List values
WYSIWYG EDITOR Generate List Values
This commit is contained in:
@@ -13,12 +13,16 @@ var getVariableList = function (queryText, proUid, varType){
|
||||
});
|
||||
|
||||
oRPC.make();
|
||||
//alert(oRPC.xmlhttp.responseText);
|
||||
responseData = eval ("(" +oRPC.xmlhttp.responseText+ ")");
|
||||
|
||||
return responseData;
|
||||
}
|
||||
|
||||
leimnud.event.add(document.getElementById('type_variables'), 'change', function(event) {
|
||||
console.log('Dropdown Type of Variables');
|
||||
leimnud.event.add(document.getElementById('type_variables'), 'change', function(e) {
|
||||
//console.log('Dropdown Type of Variables');
|
||||
generateListValues();
|
||||
|
||||
});
|
||||
|
||||
leimnud.event.add(document.getElementById('prefix'), 'change', function(event) {
|
||||
@@ -41,15 +45,25 @@ leimnud.event.add(document.getElementById('search'), 'keypress', function(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
return false;
|
||||
//return false;
|
||||
}
|
||||
});
|
||||
|
||||
var generateListValues = function(){
|
||||
|
||||
var combo = document.getElementById("_Var_Form_");
|
||||
var list = getVariableList('', document.getElementById("process").value, document.getElementById('type_variables').value);
|
||||
var combo = document.getElementById("_Var_Form_");
|
||||
var option = document.createElement('option');
|
||||
combo.options.add(option, 0);
|
||||
combo.options[0].value = "valor";
|
||||
combo.options[0].text = "Textojjjjj";
|
||||
for (m=combo.options.length-1;m>=0;m--){
|
||||
combo.options[m]=null
|
||||
}
|
||||
|
||||
for (var i=0; i< list.length; i++){
|
||||
console.log(list[i].sValue);
|
||||
var combo = document.getElementById("_Var_Form_");
|
||||
var option = document.createElement('option');
|
||||
combo.options.add(option, 0);
|
||||
combo.options[0].value = list[i].sName;
|
||||
combo.options[0].text ='@@'+list[i].sName+' ('+list[i].sLabel+')';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user