diff --git a/include/ECM/EcmDropdownEditor/EcmDropdownEditor.js b/include/ECM/EcmDropdownEditor/EcmDropdownEditor.js index fa9284cc..5fa99e23 100644 --- a/include/ECM/EcmDropdownEditor/EcmDropdownEditor.js +++ b/include/ECM/EcmDropdownEditor/EcmDropdownEditor.js @@ -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; diff --git a/include/language/en_us.EcmDropdownEditor.php b/include/language/en_us.EcmDropdownEditor.php old mode 100644 new mode 100755 index b58f44c1..92ee58b4 --- a/include/language/en_us.EcmDropdownEditor.php +++ b/include/language/en_us.EcmDropdownEditor.php @@ -1,5 +1,5 @@ array ( @@ -321,6 +321,7 @@ $customDoms = array ( 'end_of_line' => 'Non Active', 'active' => 'Active', 'new' => 'New', + 'e8d1191e-2c7b-c24d-88e2-68b2bd076498' => 'test', ), 'ecmsales_status_dom' => array ( diff --git a/include/language/pl_pl.EcmDropdownEditor.php b/include/language/pl_pl.EcmDropdownEditor.php old mode 100644 new mode 100755 index 648c96f2..e06a7b36 --- a/include/language/pl_pl.EcmDropdownEditor.php +++ b/include/language/pl_pl.EcmDropdownEditor.php @@ -1,5 +1,5 @@ array ( @@ -322,6 +322,7 @@ $customDoms = array ( 'end_of_line' => 'Nieaktywny', 'active' => 'Aktywny', 'new' => 'Nowość', + 'e8d1191e-2c7b-c24d-88e2-68b2bd076498' => 'test', ), 'ecmsales_status_dom' => array (