CoreFiles by mySites.guru
multiselect.min.js1 lines, 2,603 bytes, from Joomla_4.0.0-alpha7-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha6
md5
d061805fa6004e59e24993b2eb4921e9
sha1
d5dc1dc4c84072909d7b745037570fb18ec9827d
sha256
74de8ae6f5cf309f514973c07ad1f2ed8cd83231e88aa9ce753f62a6c643bf5c
function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),a}(function(a){"use strict";var b=function(){function b(a){var c=this;_classCallCheck(this,b),this.tableEl=document.querySelector(a),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(function(a){a.addEventListener("click",c.onRowClick)}))}return _createClass(b,[{key:"changeBg",value:function c(a,b){b?[].slice.call(a.querySelectorAll("td, th")).forEach(function(a){a.classList.add("row-selected")}):[].slice.call(a.querySelectorAll("td, th")).forEach(function(a){a.classList.remove("row-selected")})}},{key:"onCheckallToggleClick",value:function d(a){var b=this,c=a.target.checked;this.rows.forEach(function(a){b.changeBg(a,c)})}},{key:"onRowClick",value:function f(b){if(!(b.target.tagName&&("a"===b.target.tagName.toLowerCase()||"button"===b.target.tagName.toLowerCase()))&&this.boxes.length){var c=this.rows.indexOf(b.target.closest("tr")),d=this.checkallToggle?c+1:c,e=this.boxes[d].checked;0<=d&&(b.target.id!==this.boxes[d].id&&(b.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[d].checked=!this.boxes[d].checked,e=this.boxes[d].checked,a.isChecked(this.boxes[d].checked,this.tableEl.id)),this.changeBg(this.rows[d-1],e),b.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"))}}}]),b}();document.addEventListener("DOMContentLoaded",function c(){a?a.getOptions&&"function"==typeof a.getOptions&&a.getOptions("js-multiselect")&&(a.getOptions("js-multiselect").formName?new b("#".concat(a.getOptions("js-multiselect").formName)):new b("#adminForm")):new b("#adminForm")})})(Joomla);

The same content is in 2 releases, Joomla 4.0.0-alpha6 to 4.0.0-alpha7. See them all, or every version of this file.