}
$container.find(".spinner").detach();
$container.append(spinner);
- $container.attr('data-infinite-serial', serial);
+ $container.data('data-infinite-serial', serial);
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;
- if ($container.attr('data-infinite-serial') != this.serial) {
+ if ($container.data('data-infinite-serial') != this.serial) {
// A newer request is already in progress.
return;
}
if (jqxhr.readyState == 0 || jqxhr.status == 0) {
- message = "Cancelled."
+ message = "Cancelled.";
} else if (jqxhr.responseJSON && jqxhr.responseJSON.errors) {
message = jqxhr.responseJSON.errors.join("; ");
} else {
$container.find('div.spinner').replaceWith($faildiv);
}).
done(function(data, status, jqxhr) {
- if ($container.attr('data-infinite-serial') != this.serial) {
+ if ($container.data('data-infinite-serial') != this.serial) {
// A newer request is already in progress.
return;
}
// For example, filterable.js writes filters in
// infiniteContentParamsFilterable ("search for text foo")
// without worrying about clobbering the filters set up by the
- // tab pane ("only show jobs and pipelines in this tab").
+ // tab pane ("only show container requests and pipeline instances
+ // in this tab").
$.each($container.data(), function(datakey, datavalue) {
// Note: We attach these data to DOM elements using
// <element data-foo-bar="baz">. We store/retrieve them