You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
1.0 KiB
1 lines
1.0 KiB
define(["jquery","core/str","block_timeline/event_list","core/pubsub","core/paged_content_events"],function(a,b,c,d,e){var f={EVENT_LIST_CONTAINER:'[data-region="event-list-container"]'},g=[5,10,25],h=function(a){var b=parseInt(a.data("limit"),10),c=!1,d=g.map(function(a){return b==a&&(c=!0),{value:a,active:b==a}});return c||(d[0].active=!0),d},i=function(b,c){var f=c+e.SET_ITEMS_PER_PAGE_LIMIT;d.subscribe(f,function(c){a(b).data("limit",c)})},j=function(d){var e=d.find(f.EVENT_LIST_CONTAINER),g=a(e).attr("id")+"user_block_timeline"+Math.random();i(d,g);var j=h(d),k={persistentLimitKey:"block_timeline_user_limit_preference",eventNamespace:g};b.get_string("ariaeventlistpaginationnavdates","block_timeline").then(function(a){return c.init(e,j,{},a,k),a})["catch"](function(){c.init(e,j,{},"",k)})},k=function(b){b=a(b),b.hasClass("active")&&(j(b),b.data("seen",!0))},l=function(a){a.removeAttr("data-seen"),a.hasClass("active")&&(j(a),a.data("seen",!0))},m=function(a){a.data("seen")||(j(a),a.data("seen",!0))};return{init:k,reset:l,shown:m}});
|