- md5
- d8870d82f7a18c7933676c8f31d2c623
- sha1
- c017642d66c633f6dec427dfd8ce4b51dc3e107f
- sha256
- 8c03cdf2275f0cb0bc8e09230c4ba88f233179a5daa690a144c2ed41f2a09ff0
((a,b,c)=>{c.unpublishModule=a=>{const b=a.getAttribute("data-module-id");c.request({url:`${"index.php?option=com_modules&task=modules.unpublish&format=json"}&cid=${b}`,method:"POST",headers:{"Content-Type":"application/json"},onSuccess:()=>{const b=a.closest(".module-wrapper");b.parentNode.removeChild(b),c.renderMessages({message:[c.JText._("COM_CPANEL_UNPUBLISH_MODULE_SUCCESS")]})},onError:()=>{c.renderMessages({error:[c.JText._("COM_CPANEL_UNPUBLISH_MODULE_ERROR")]})}})};const d=()=>{const a=b.getElementById("content");if(a){const b=[].slice.call(a.querySelectorAll(".unpublish-module"));b.forEach(a=>{a.addEventListener("click",({target:a})=>c.unpublishModule(a))})}b.removeEventListener("DOMContentLoaded",d)};b.addEventListener("DOMContentLoaded",d);const e={$gridBox:null,resizeGridItem(a,b,c){const d=a.querySelector(".card");if(d){const e=d.getBoundingClientRect().height+c,f=Math.ceil(e/(b+c));a.style.gridRowEnd=`span ${f}`}},resizeAllGridItems(){const b=[].slice.call(e.$gridBox.children),c=a.getComputedStyle(e.$gridBox),d=parseInt(c.getPropertyValue("grid-auto-rows"),10)||0,f=parseInt(c.getPropertyValue("grid-row-gap"),10)||10;b.forEach(a=>{e.resizeGridItem(a,d,f)})},initialise(){e.$gridBox=b.querySelector("#cpanel-modules .card-columns"),e.resizeAllGridItems();let c;a.addEventListener("resize",()=>{a.clearTimeout(c),c=a.setTimeout(e.resizeAllGridItems,300)})}};a.addEventListener("load",e.initialise)})(window,document,window.Joomla);
The same content is in 7 releases, Joomla 4.0.0-beta to 4.0.0-beta7. See them all, or every version of this file.