CoreFiles by mySites.guru
multiselect.min.js1 lines, 1,994 bytes, from Joomla_4.0.2-Stable-Full_Package.zip
Raw History Compare with 4.0.1
md5
8e0f14e361b622f13bfa82c08c6bec72
sha1
48ce748e2d6e0ff3552bd0e0927833cefcf01911
sha256
d763f660da285260cdadc681ada5bde39c93b07bc98bf9eb2beca4bc383a8fd1
(e=>{class t{constructor(e){this.tableEl=document.querySelector(e),this.tableEl&&(this.boxes=[].slice.call(this.tableEl.querySelectorAll("input[type=checkbox]")),this.rows=[].slice.call(document.querySelectorAll('tr[class^="row"]')),this.checkallToggle=document.querySelector('[name="checkall-toggle"]'),this.onCheckallToggleClick=this.onCheckallToggleClick.bind(this),this.onRowClick=this.onRowClick.bind(this),this.checkallToggle&&this.checkallToggle.addEventListener("click",this.onCheckallToggleClick),this.rows.length&&this.rows.forEach((e=>{e.addEventListener("click",this.onRowClick)})))}changeBg(e,t){t?[].slice.call(e.querySelectorAll("td, th")).forEach((e=>{e.classList.add("row-selected")})):[].slice.call(e.querySelectorAll("td, th")).forEach((e=>{e.classList.remove("row-selected")}))}onCheckallToggleClick({target:e}){const t=e.checked;this.rows.forEach((e=>{this.changeBg(e,t)}))}onRowClick({target:t,shiftKey:s}){if(t.tagName&&("a"===t.tagName.toLowerCase()||"button"===t.tagName.toLowerCase()))return;if(!this.boxes.length)return;const o=this.rows.indexOf(t.closest("tr")),l=this.checkallToggle?o+1:o;let c=this.boxes[l].checked;l>=0&&(t.id!==this.boxes[l].id&&(s&&(document.body.style["-webkit-user-select"]="none",document.body.style["-moz-user-select"]="none",document.body.style["-ms-user-select"]="none",document.body.style["user-select"]="none"),this.boxes[l].checked=!this.boxes[l].checked,c=this.boxes[l].checked,e.isChecked(this.boxes[l].checked,this.tableEl.id)),this.changeBg(this.rows[l-1],c),s&&(document.body.style["-webkit-user-select"]="none",document.body.style["-moz-user-select"]="none",document.body.style["-ms-user-select"]="none",document.body.style["user-select"]="none"))}}document.addEventListener("DOMContentLoaded",(()=>{e?e.getOptions&&"function"==typeof e.getOptions&&e.getOptions("js-multiselect")&&(e.getOptions("js-multiselect").formName?new t(`#${e.getOptions("js-multiselect").formName}`):new t("#adminForm")):new t("#adminForm")}))})(Joomla);

The same content is in 29 releases, Joomla 4.0.0-rc1 to 4.1.0-rc1. See them all, or every version of this file.