dropdowns
This commit is contained in:
@@ -59,28 +59,29 @@ var EcmDropdownEditor_save = function(dom, container) {
|
||||
return false;
|
||||
}
|
||||
var doms = EcmDropdownEditor_parseArrays(dom);
|
||||
var params = new Array;
|
||||
var params = [];
|
||||
params[0] = dom; //name of list
|
||||
params[1] = doms;//list of values
|
||||
// AJAX call
|
||||
jQuery.ajax({
|
||||
type : 'POST',
|
||||
url : 'index.php?entryPoint=HandleEcmAjax',
|
||||
type : "POST",
|
||||
url : "index.php?entryPoint=HandleEcmAjax",
|
||||
data : {
|
||||
ecmclass : 'EcmDropdownEditor',
|
||||
job : 'saveDom',
|
||||
ecmclass : "EcmDropdownEditor",
|
||||
job : "saveDom",
|
||||
params : utf8_to_b64(JSON.stringifyNoSecurity(params)),
|
||||
},
|
||||
dataType : 'json',
|
||||
dataType : "json",
|
||||
async : false,
|
||||
success : function(response) {
|
||||
var div = $('[name='+container+']');
|
||||
div.hide();
|
||||
EcmDropdownEditor_refreshField(container);
|
||||
return;
|
||||
success : function() {
|
||||
setTimeout(function() {
|
||||
EcmDropdownEditor_refreshField(container);
|
||||
var div = $("[name="+container+"]");
|
||||
div.hide();
|
||||
}, 3000);
|
||||
},
|
||||
error : function(xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError);
|
||||
window.console.log(thrownError);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -94,16 +95,17 @@ var EcmDropdownEditor_refreshField = function(container) {
|
||||
params[1] = container;//list of values
|
||||
// AJAX call
|
||||
jQuery.ajax({
|
||||
type : 'POST',
|
||||
url : 'index.php?entryPoint=HandleEcmAjax',
|
||||
type : "POST",
|
||||
url : "index.php?entryPoint=HandleEcmAjax",
|
||||
data : {
|
||||
ecmclass : 'EcmDropdownEditor',
|
||||
job : 'refreshField',
|
||||
ecmclass : "EcmDropdownEditor",
|
||||
job : "refreshField",
|
||||
params : utf8_to_b64(JSON.stringifyNoSecurity(params)),
|
||||
},
|
||||
dataType : 'json',
|
||||
dataType : "json",
|
||||
async : false,
|
||||
success : function(response) {
|
||||
console.log('EditedDropdown', response);
|
||||
var tmp = container.split("___");
|
||||
$('form[name=EditView]').find('select[name='+tmp[0]+']').html(response[0]);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user