Merge branch 'master' into 5720-ajax-loading-error
[arvados.git] / apps / workbench / app / assets / javascripts / infinite_scroll.js
index 6e467f5594747449af66e89998dadd1e668aa3a6..047858c5a0e3a9811408de40442f24605994868d 100644 (file)
@@ -72,7 +72,7 @@ function maybe_load_more_content(event) {
         }
         $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
@@ -103,12 +103,12 @@ function maybe_load_more_content(event) {
             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 {
@@ -123,7 +123,7 @@ function maybe_load_more_content(event) {
                 $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;
                 }