芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/hocabayucatan.gob.mx/media/com_cpanel/js/admin-cpanel-default.min.js
const debounce=(e,t=250,i)=>(...o)=>clearTimeout(i,i=setTimeout(e,t,...o));((e,t,i)=>{i.unpublishModule=e=>{const t=e.getAttribute("data-module-id");i.request({url:`index.php?option=com_modules&task=modules.unpublish&format=json&cid=${t}`,method:"POST",headers:{"Content-Type":"application/json"},onSuccess:()=>{const t=e.closest(".module-wrapper");t.parentNode.removeChild(t),i.renderMessages({message:[i.Text._("COM_CPANEL_UNPUBLISH_MODULE_SUCCESS")]})},onError:()=>{i.renderMessages({error:[i.Text._("COM_CPANEL_UNPUBLISH_MODULE_ERROR")]})}})};const o=()=>{const e=t.getElementById("content");if(e){[].slice.call(e.querySelectorAll(".unpublish-module")).forEach((e=>{e.addEventListener("click",(({target:e})=>i.unpublishModule(e)))}))}t.removeEventListener("DOMContentLoaded",o)};t.addEventListener("DOMContentLoaded",o);({$gridBox:null,gridAutoRows:0,gridRowGap:10,resizeGridItem(e,t,i){const o=e.querySelector(".card");if(o){const s=o.getBoundingClientRect().height+i,r=Math.ceil(s/(t+i));e.style.gridRowEnd=`span ${r}`}},resizeAllGridItems(){[].slice.call(this.$gridBox.children).forEach((e=>{this.resizeGridItem(e,this.gridAutoRows,this.gridRowGap)}))},initialise(){this.$gridBox=t.querySelector("#cpanel-modules .card-columns");const i=e.getComputedStyle(this.$gridBox);this.gridAutoRows=parseInt(i.getPropertyValue("grid-auto-rows"),10)||this.gridAutoRows,this.gridRowGap=parseInt(i.getPropertyValue("grid-row-gap"),10)||this.gridRowGap,this.resizeAllGridItems(),e.addEventListener("load",(()=>this.resizeAllGridItems())),e.addEventListener("joomla:menu-toggle",(()=>{setTimeout((()=>this.resizeAllGridItems()),330)})),e.addEventListener("resize",debounce((()=>this.resizeAllGridItems()),50))}}).initialise()})(window,document,window.Joomla);