CoreFiles by mySites.guru
multiselect.min.js1 lines, 2,623 bytes, from Joomla_4.0.0-beta3-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta2
md5
56648f81cd4899f91252a6350c6b949a
sha1
4ae06ac02b63c515eb50c076b8b25ae337e236d1
sha256
5437e1b444409fe73321a49d89f64a61ef3d6a38462dbced153ba4cad633c663
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 changeBg(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 onCheckallToggleClick(a){var b=this,c=a.target,d=c.checked;this.rows.forEach(function(a){b.changeBg(a,d)})}},{key:"onRowClick",value:function onRowClick(b){var c=b.target,d=b.shiftKey;if(!(c.tagName&&("a"===c.tagName.toLowerCase()||"button"===c.tagName.toLowerCase()))&&this.boxes.length){var e=this.rows.indexOf(c.closest("tr")),f=this.checkallToggle?e+1:e,g=this.boxes[f].checked;0<=f&&(c.id!==this.boxes[f].id&&(d&&(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[f].checked=!this.boxes[f].checked,g=this.boxes[f].checked,a.isChecked(this.boxes[f].checked,this.tableEl.id)),this.changeBg(this.rows[f-1],g),d&&(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 onBoot(){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 7 releases, Joomla 4.0.0-beta to 4.0.0-beta7. See them all, or every version of this file.