2 * Javascript for dynamically changing the page limits.
4 * @module core/paged_content_paging_bar_limit_selector
5 * @copyright 2018 Ryan Wyllie <ryan@moodle.com>
6 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
8 define("core/paged_content_paging_bar_limit_selector",["jquery","core/custom_interaction_events","core/paged_content_events","core/pubsub"],(function($,CustomEvents,PagedContentEvents,PubSub){var SELECTORS_LIMIT_OPTION="[data-limit]";return{init:function(root,id){root=$(root),CustomEvents.define(root,[CustomEvents.events.activate]),root.on(CustomEvents.events.activate,SELECTORS_LIMIT_OPTION,(function(e,data){var optionElement=$(e.target).closest(SELECTORS_LIMIT_OPTION);if(!optionElement.hasClass("active")){var limit=parseInt(optionElement.attr("data-limit"),10);PubSub.publish(id+PagedContentEvents.SET_ITEMS_PER_PAGE_LIMIT,limit),data.originalEvent.preventDefault()}}))},rootSelector:'[data-region="paging-control-limit-container"]'}}));
10 //# sourceMappingURL=paged_content_paging_bar_limit_selector.min.js.map