function maybe_load_more_content(event) {
- var scroller = this; // element with scroll bars
- var $container; // element that receives new content
- var src; // url for retrieving content
+ var scroller = this;
+ var $container = $(event.data.container);
+ var src; // url for retrieving content
var scrollHeight;
var spinner, colspan;
var serial = Date.now();
>
scrollHeight - 50)
{
- $container = $(event.data.container);
if (!$container.attr('data-infinite-content-href0')) {
// Remember the first page source url, so we can refresh
// from page 1 later.
trigger('scroll');
});
}).
+ on('shown.bs.tab', 'a[data-toggle="tab"]', function(event) {
+ $(event.target.getAttribute('href') + ' [data-infinite-scroller]').
+ trigger('scroll');
+ }).
on('click', 'th[data-sort-order]', function() {
var direction = $(this).data('sort-order-direction');
// reverse the current direction, or do ascending if none
// put it in the browser history state if browser allows it
if( hasHTML5History() ) {
var tabId = $(this).closest('div.tab-pane').attr('id');
- var state = history.state;
- if( state.order === undefined) {
+ var state = history.state || {};
+ if( state.order === undefined ) {
state.order = {};
}
state.order[tabId] = order;