Adding some updates to the ajax function and also, the Ajax call to the variable picker form
This commit is contained in:
@@ -111,7 +111,7 @@ class XmlForm_Field_WYSIWYG_EDITOR extends XmlForm_Field
|
||||
tinyMCE.baseURL = "/js/tinymce/jscripts/tiny_mce"
|
||||
tinyMCE.init({
|
||||
theme : "advanced",
|
||||
plugins : "fullpage, pmSimpleUploader, pmVariablePicker",
|
||||
plugins : "fullpage, pmSimpleUploader, pmVariablePicker, inlinepopups",
|
||||
mode : "specific_textareas",
|
||||
editor_selector : "tmceEditor",
|
||||
width : "770",
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
var getValue = function (list) {
|
||||
console.log(list.value);
|
||||
}
|
||||
|
||||
var getVariableList = function (queryText, proUid, varType){
|
||||
varType = varType.toLowerCase();
|
||||
var response
|
||||
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);
|
||||
}
|
||||
|
||||
leimnud.event.add(document.getElementById('type_variables'), 'change', function(event) {
|
||||
console.log('Dropdown Type of Variables');
|
||||
});
|
||||
@@ -11,8 +33,13 @@ leimnud.event.add(document.getElementById('search'), 'keypress', function(event)
|
||||
var tecla = event.keyCode;
|
||||
if(tecla == '13')
|
||||
{
|
||||
console.log('Has pulsado enter');
|
||||
return false;
|
||||
var list = getVariableList('nuev','2527075735085b447a58523099748463','system');
|
||||
console.log(list);
|
||||
for (var i in list){
|
||||
console.log(list[i]);
|
||||
}
|
||||
console.log('Has pulsado enter');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -20,6 +47,3 @@ leimnud.event.add(document.getElementById('type_variables'), 'change', function(
|
||||
console.log('Dropdown Type of Variables');
|
||||
});
|
||||
|
||||
function getValue(list) {
|
||||
console.log(list.value);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -519,6 +519,20 @@ try {
|
||||
case 'events':
|
||||
$oProcessMap->eventsList( $oData->pro_uid, $oData->type );
|
||||
break;
|
||||
case 'getVariableList':
|
||||
G::LoadClass( 'xmlfield_InputPM' );
|
||||
$proUid= isset($_REQUEST['process'])?$_REQUEST['process']:'';
|
||||
$aFields = getDynaformsVars( $proUid, true, isset( $_REQUEST['bIncMulSelFields'] ) ? $_REQUEST['bIncMulSelFields'] : 0 );
|
||||
$_REQUEST['queryString'] = 'SYS';
|
||||
$aVariables = array();
|
||||
foreach ($aFields as $key => $value) {
|
||||
if(stristr($aFields[$key]['sName'], $_REQUEST['queryString'])){
|
||||
$aVariables[] = $aFields[$key];
|
||||
}
|
||||
}
|
||||
$oJSON = new Services_JSON();
|
||||
echo $oJSON->encode($aFields);
|
||||
break;
|
||||
/*
|
||||
case 'saveFile':
|
||||
global $G_PUBLISH;
|
||||
|
||||
Reference in New Issue
Block a user