芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/chacsinkinyucatan.gob.mx/media/com_associations/js/associations-edit-es5.min.js
!function(){"use strict";Joomla=window.Joomla||{},function(e,t){e.hideAssociation=function(e,a){[].slice.call(t.querySelectorAll("#associations .control-group")).forEach((function(t){var n=t.querySelector(".control-label label");n&&(n.getAttribute("for").replace(new RegExp("_name$"),"")===e+"_associations_"+a.replace("-","_")&&t.classList.add("hidden"))}))},e.showAssociationMessage=function(){var a=[].slice.call(t.querySelectorAll("#associations .control-group")),n=t.getElementById("associations");if(n){var o=t.createElement("joomla-alert");o.innerText=e.Text._("JGLOBAL_ASSOC_NOT_POSSIBLE"),n.insertAdjacentElement("afterbegin",o)}a.forEach((function(e){e.classList.add("hidden")}))},e.injectAssociations=function(t,a){var n;t.success?(0!==t.data.length&&[].slice.call(Object.keys(t.data)).forEach((function(e){n=a+e.replace("-","_"),window[n](t.data[e].id,t.data[e].title,t.data[e].catid,null,null,e)})),t.message&&e.renderMessages({notice:[t.message]})):e.renderMessages({warning:[e.Text._("JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED")]})},e.propagateAssociation=function(a,n){var o=t.getElementById(a+"_id").value,s=t.getElementById("jform_language"),i={task:"ajax.fetchAssociations",format:"json",assocId:o,excludeLang:s.options[s.selectedIndex].value};i[e.getOptions("csrf.token","")]=1;var c=Object.keys(i).reduce((function(e,t){return e.push(t+"="+encodeURIComponent(i[t])),e}),[]).join("&"),r=t.forms.adminForm.action+"&"+c;return e.request({url:r,method:"GET",data:JSON.stringify(i),headers:{"Content-Type":"application/json"},onSuccess:function(t){e.injectAssociations(JSON.parse(t),n)},onError:function(){e.renderMessages({warning:[e.Text._("JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED")]})}}),!1},t.addEventListener("DOMContentLoaded",(function(){var a=e.getOptions("system.associations.edit"),n=a.formControl||"jform",o=t.getElementById(n+"_language");1===parseInt(a.hidden,10)?e.showAssociationMessage():o&&e.hideAssociation(n,o.value),o&&o.addEventListener("change",(function(a){var o=a.target;e.removeMessages();var s=!1;[].slice.call(t.querySelectorAll("#associations .control-group")).forEach((function(e){var a=e.querySelector(".control-label label").getAttribute("for").replace("_name","").replace("jform_associations_","");e.classList.remove("hidden"),s||""===t.getElementById(n+"_associations_"+a+"_id").value||(s=!0);var o=t.getElementById(n+"_associations_"+a+"_clear");o.onclick?o.onclick():o.click&&o.click()})),s&&e.renderMessages({warning:[e.Text._("JGLOBAL_ASSOCIATIONS_RESET_WARNING")]});var i=o.value;"*"===i?e.showAssociationMessage():e.hideAssociation(n,i)}))}))}(Joomla,document)}();