CoreFiles by mySites.guru
admin-cpanel-default.min.js4 lines, 1,902 bytes, from Joomla_4.4.2-Stable-Full_Package.zip
Raw History Compare with 4.4.1
md5
7f8ab7090dd5582c03431aefe0e70437
sha1
7fc6a0ceafc7c05d88122061aafec820dffccbbd
sha256
4a28d240d3c36f43ac3a4abdbd878a2affe8152aeacd39b35af19932d3a69f73
/**
 * @copyright  (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */const debounce=(i,r=250,t)=>(...d)=>clearTimeout(t,t=setTimeout(i,r,...d));((i,r,t)=>{t.unpublishModule=e=>{const o="index.php?option=com_modules&task=modules.unpublish&format=json",n=e.getAttribute("data-module-id");t.request({url:`${o}&cid=${n}`,method:"POST",headers:{"Content-Type":"application/json"},onSuccess:()=>{const s=e.closest(".module-wrapper");s.parentNode.removeChild(s),t.renderMessages({message:[t.Text._("COM_CPANEL_UNPUBLISH_MODULE_SUCCESS")]})},onError:()=>{t.renderMessages({error:[t.Text._("COM_CPANEL_UNPUBLISH_MODULE_ERROR")]})}})};const d=()=>{const e=r.getElementById("content");e&&[].slice.call(e.querySelectorAll(".unpublish-module")).forEach(n=>{n.addEventListener("click",({target:s})=>t.unpublishModule(s))}),r.removeEventListener("DOMContentLoaded",d)};r.addEventListener("DOMContentLoaded",d),{$gridBox:null,gridAutoRows:0,gridRowGap:10,resizeGridItem(e,o,n){const s=e.querySelector(".card");if(s){const l=s.getBoundingClientRect().height+n,a=Math.ceil(l/(o+n));e.style.gridRowEnd=`span ${a}`}},resizeAllGridItems(){[].slice.call(this.$gridBox.children).forEach(o=>{this.resizeGridItem(o,this.gridAutoRows,this.gridRowGap)})},initialise(){this.$gridBox=r.querySelector("#cpanel-modules .card-columns");const e=i.getComputedStyle(this.$gridBox);this.gridAutoRows=parseInt(e.getPropertyValue("grid-auto-rows"),10)||this.gridAutoRows,this.gridRowGap=parseInt(e.getPropertyValue("grid-row-gap"),10)||this.gridRowGap,this.resizeAllGridItems(),i.addEventListener("load",()=>this.resizeAllGridItems()),i.addEventListener("joomla:menu-toggle",()=>{setTimeout(()=>this.resizeAllGridItems(),330)}),i.addEventListener("resize",debounce(()=>this.resizeAllGridItems(),50))}}.initialise()})(window,document,window.Joomla);

The same content is in 41 releases, Joomla 4.4.1-rc1 to 5.1.0-beta1. See them all, or every version of this file.