[ARVADOS] updated: 0cca55281abd16c16c55f9c9b7e3f1038206207e

git at public.curoverse.com git at public.curoverse.com
Mon Jun 30 20:43:34 EDT 2014


Summary of changes:
 .../app/assets/javascripts/infinite_scroll.js      | 30 +++++++++++-----------
 1 file changed, 15 insertions(+), 15 deletions(-)

  discards  41f3eef92c138cae45e8db12e385eaca8dc85941 (commit)
       via  0cca55281abd16c16c55f9c9b7e3f1038206207e (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (41f3eef92c138cae45e8db12e385eaca8dc85941)
            \
             N -- N -- N (0cca55281abd16c16c55f9c9b7e3f1038206207e)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 0cca55281abd16c16c55f9c9b7e3f1038206207e
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Jun 30 20:41:15 2014 -0400

    3099: Use appropriate tr>td markup if infinite scroll container is a table.
    Remove unused class.

diff --git a/apps/workbench/app/assets/javascripts/infinite_scroll.js b/apps/workbench/app/assets/javascripts/infinite_scroll.js
index 44584d9..a17b446 100644
--- a/apps/workbench/app/assets/javascripts/infinite_scroll.js
+++ b/apps/workbench/app/assets/javascripts/infinite_scroll.js
@@ -3,6 +3,7 @@ function maybe_load_more_content() {
     var container;              // element that receives new content
     var src;                    // url for retrieving content
     var scrollHeight;
+    var spinner, colspan;
     scrollHeight = scroller.scrollHeight || $('body')[0].scrollHeight;
     if ($(scroller).scrollTop() + $(scroller).height()
         >
@@ -14,12 +15,27 @@ function maybe_load_more_content() {
             return;
         // Don't start another request until this one finishes
         $(container).attr('data-infinite-content-href', null);
-        $(container).append('<div class="spinner spinner-32px spinner-h-center infinite-scroller-spinner"></div>');
+        spinner = '<div class="spinner spinner-32px spinner-h-center"></div>';
+        if ($(container).is('table,tbody,thead,tfoot')) {
+            // Hack to determine how many columns a new tr should have
+            // in order to reach full width.
+            colspan = $(container).closest('table').
+                find('tr').eq(0).find('td,th').length;
+            if (colspan == 0)
+                colspan = '*';
+            spinner = ('<tr class="spinner"><td colspan="' + colspan + '">' +
+                       spinner +
+                       '</td></tr>');
+        }
+        $(container).append(spinner);
         $.ajax(src,
                {dataType: 'json',
                 type: 'GET',
                 data: {},
                 context: {container: container, src: src}}).
+            always(function() {
+                $(this.container).find(".spinner").detach();
+            }).
             fail(function(jqxhr, status, error) {
                 if (jqxhr.readyState == 0 || jqxhr.status == 0) {
                     message = "Cancelled."
@@ -33,7 +49,6 @@ function maybe_load_more_content() {
                 $(this.container).attr('data-infinite-content-href', this.src);
             }).
             done(function(data, status, jqxhr) {
-                $(this.container).find(".spinner").detach();
                 $(this.container).append(data.content);
                 $(this.container).attr('data-infinite-content-href', data.next_page_href);
             });
@@ -44,7 +59,7 @@ $(document).
         $('[data-infinite-scroller]').each(function() {
             var $scroller = $($(this).attr('data-infinite-scroller'));
             if (!$scroller.hasClass('smart-scroll') &&
-		'scroll' != $scroller.css('overflow-y'))
+                'scroll' != $scroller.css('overflow-y'))
                 $scroller = $(window);
             $scroller.
                 addClass('infinite-scroller').

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list