芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/acancehyucatan.gob.mx/media/system/js/multiselect.min.js
(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);