MDL-66268 forumreport_summary: Add filters handling incl groups filter
[moodle.git] / mod / forum / report / summary / amd / build / filters.min.js
CommitLineData
b29de56d
MH
1define ("forumreport_summary/filters",["exports","jquery","core/popper"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.init=void 0;b=d(b);c=d(c);function d(a){return a&&a.__esModule?a:{default:a}}var e=function(a){a=(0,b.default)(a);(0,b.default)(document).ready(function(){(0,b.default)(".loading-icon").hide();(0,b.default)("#summaryreport").removeClass("hidden")});(0,b.default)(a).on("click",".filter-clear",function(a){var b=a.target.parentNode.parentNode.parentElement.querySelectorAll("input[type=\"checkbox\"]:checked");b.forEach(function(a){a.checked=!1})});var d=function(a){var c=(0,b.default)("#filtersform").attr("action");if(a){a.preventDefault();var d=a.target.search.substr(1);c+="&"+d}(0,b.default)("#filtersform").attr("action",c);(0,b.default)("#filtersform").submit()};(0,b.default)(".resettable").on("click","a",function(a){d(a)});(0,b.default)("thead").on("click","a",function(a){d(a)});(0,b.default)(".pagination").on("click","a",function(a){d(a)});var e=function(a){var b=document.getElementById(a),c=b.querySelectorAll("input[type=\"checkbox\"]:not(:checked)");c.forEach(function(a){a.checked=!0})};(0,b.default)("#filter-groups-popover .select-all").on("click",function(){e("filter-groups-popover")});(0,b.default)("#filter-groups-button").on("click",function(){var a=document.querySelector("#filter-groups-button"),d=document.querySelector("#filter-groups-popover");new c.default(a,d,{placement:"bottom"});(0,b.default)("#filter-groups-popover").removeClass("hidden")});(0,b.default)(a).on("click","#filter-groups-popover .filter-save",function(){(0,b.default)("#filter-groups-popover").addClass("hidden");d(!1)})};a.init=e});
2//# sourceMappingURL=filters.min.js.map