CoreFiles by mySites.guru
multiselect.min.js1 lines, 2,563 bytes, from Joomla_4.0.0-alpha5-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha3
md5
3bf4c579ee3ba3aaf5f4eb7fa13dca39
sha1
027e9ddadf603b2eb7dd349755dd951676a28c0a
sha256
aa1963095083e1366ed58600b523e06ef1e70fa1d74ed5de1118b7188485cb3d
var _createClass=function(){function e(e,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}return function(t,o,l){return o&&e(t.prototype,o),l&&e(t,l),t}}();function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(e){"use strict";var t=function(){function t(e){var o=this;_classCallCheck(this,t),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(function(e){e.addEventListener("click",o.onRowClick)}))}return _createClass(t,[{key:"changeBg",value:function(e,t){t?[].slice.call(e.querySelectorAll("td, th")).forEach(function(e){e.classList.add("row-selected")}):[].slice.call(e.querySelectorAll("td, th")).forEach(function(e){e.classList.remove("row-selected")})}},{key:"onCheckallToggleClick",value:function(e){var t=this,o=e.target.checked;this.rows.forEach(function(e){t.changeBg(e,o)})}},{key:"onRowClick",value:function(t){if((!t.target.tagName||"a"!==t.target.tagName.toLowerCase()&&"button"!==t.target.tagName.toLowerCase())&&this.boxes.length){var o=this.rows.indexOf(t.target.closest("tr")),l=this.checkallToggle?o+1:o,s=this.boxes[l].checked;l>=0&&(t.target.id!==this.boxes[l].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[l].checked=!this.boxes[l].checked,s=this.boxes[l].checked,e.isChecked(this.boxes[l].checked,this.tableEl.id)),this.changeBg(this.rows[l-1],s),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"))}}}]),t}();document.addEventListener("DOMContentLoaded",function(){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);

No other release has this exact content. See every version of this file.