CoreFiles by mySites.guru
multiselect.es6.min.js1 lines, 2,028 bytes, from Joomla_4.0.0-alpha5-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha3
md5
2a26cae987209390a120072caa389a9c
sha1
1a450ff5a433baf334f3992f2cb314aacd7111bf
sha256
bfb80dc94782564428778d18982d8365309fd7a7df31942a23c683a564536b6f
(e=>{"use strict";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(e){const t=e.target.checked;this.rows.forEach(e=>{this.changeBg(e,t)})}onRowClick(t){if(t.target.tagName&&("a"===t.target.tagName.toLowerCase()||"button"===t.target.tagName.toLowerCase()))return;if(!this.boxes.length)return;const s=this.rows.indexOf(t.target.closest("tr")),o=this.checkallToggle?s+1:s;let l=this.boxes[o].checked;o>=0&&(t.target.id!==this.boxes[o].id&&(t.shiftKey&&(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[o].checked=!this.boxes[o].checked,l=this.boxes[o].checked,e.isChecked(this.boxes[o].checked,this.tableEl.id)),this.changeBg(this.rows[o-1],l),t.shiftKey&&(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 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.