Sindbad~EG File Manager
/**
* Manage the timeline dates view for the timeline block.
*
* @copyright 2018 Ryan Wyllie <ryan@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("block_timeline/view_dates",["jquery","core/str","block_timeline/event_list","core/pubsub","core/paged_content_events"],(function($,Str,EventList,PubSub,PagedContentEvents){var SELECTORS_EVENT_LIST_CONTAINER='[data-region="event-list-container"]',DEFAULT_PAGE_LIMIT=[5,10,25],load=function(root){var eventListContainer=root.find(SELECTORS_EVENT_LIST_CONTAINER),namespace=$(eventListContainer).attr("id")+"user_block_timeline"+Math.random();!function(root,namespace){var event=namespace+PagedContentEvents.SET_ITEMS_PER_PAGE_LIMIT;PubSub.subscribe(event,(function(limit){$(root).data("limit",limit)}))}(root,namespace);var limits=function(root){var limitPref=parseInt(root.data("limit"),10),isDefaultSet=!1,limits=DEFAULT_PAGE_LIMIT.map((function(value){return limitPref==value&&(isDefaultSet=!0),{value:value,active:limitPref==value}}));return isDefaultSet||(limits[0].active=!0),limits}(root),config={persistentLimitKey:"block_timeline_user_limit_preference",eventNamespace:namespace};Str.get_string("ariaeventlistpaginationnavdates","block_timeline").then((function(string){return EventList.init(eventListContainer,limits,{},string,config),string})).catch((function(){EventList.init(eventListContainer,limits,{},"",config)}))};return{init:function(root){(root=$(root)).hasClass("active")&&(load(root),root.attr("data-seen",!0))},reset:function(root){root.removeAttr("data-seen"),root.hasClass("active")&&(load(root),root.attr("data-seen",!0))},shown:function(root){root.attr("data-seen")||(load(root),root.attr("data-seen",!0))}}}));
//# sourceMappingURL=view_dates.min.js.map
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists