// infinite_scroll.js displays a tab's content using automatic scrolling
// when the user scrolls to the bottom of the page and there is more data.
//
// infinite_scroll.js displays a tab's content using automatic scrolling
// when the user scrolls to the bottom of the page and there is more data.
//
if (src == $container.attr('data-infinite-content-href0')) {
// If we're loading the first page, collect filters from
if (src == $container.attr('data-infinite-content-href0')) {
// If we're loading the first page, collect filters from
fail(function(jqxhr, status, error) {
var $faildiv;
var $container = this.container;
fail(function(jqxhr, status, error) {
var $faildiv;
var $container = this.container;
} else if (jqxhr.responseJSON && jqxhr.responseJSON.errors) {
message = jqxhr.responseJSON.errors.join("; ");
} else {
} else if (jqxhr.responseJSON && jqxhr.responseJSON.errors) {
message = jqxhr.responseJSON.errors.join("; ");
} else {
$container.find('div.spinner').replaceWith($faildiv);
}).
done(function(data, status, jqxhr) {
$container.find('div.spinner').replaceWith($faildiv);
}).
done(function(data, status, jqxhr) {
// A newer request is already in progress.
return;
}
$container.find(".spinner").detach();
$container.append(data.content);
$container.attr('data-infinite-content-href', data.next_page_href);
// A newer request is already in progress.
return;
}
$container.find(".spinner").detach();
$container.append(data.content);
$container.attr('data-infinite-content-href', data.next_page_href);
// For example, filterable.js writes filters in
// infiniteContentParamsFilterable ("search for text foo")
// without worrying about clobbering the filters set up by the
// For example, filterable.js writes filters in
// infiniteContentParamsFilterable ("search for text foo")
// without worrying about clobbering the filters set up by the
$.each($container.data(), function(datakey, datavalue) {
// Note: We attach these data to DOM elements using
// <element data-foo-bar="baz">. We store/retrieve them
$.each($container.data(), function(datakey, datavalue) {
// Note: We attach these data to DOM elements using
// <element data-foo-bar="baz">. We store/retrieve them