incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [5/5] git commit: [#7128] Prevent double loads on Show More in Commit Browser
Date Wed, 19 Feb 2014 18:29:38 GMT
[#7128] Prevent double loads on Show More in Commit Browser

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/09f21380
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/09f21380
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/09f21380

Branch: refs/heads/master
Commit: 09f2138003e38561210c4048f66c2fe4a49dbbb9
Parents: 1827a63
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Wed Feb 19 18:05:39 2014 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Wed Feb 19 18:05:39 2014 +0000

----------------------------------------------------------------------
 Allura/allura/lib/widgets/resources/js/commit_browser.js | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/09f21380/Allura/allura/lib/widgets/resources/js/commit_browser.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/commit_browser.js b/Allura/allura/lib/widgets/resources/js/commit_browser.js
index 5cb1c00..9c960f4 100644
--- a/Allura/allura/lib/widgets/resources/js/commit_browser.js
+++ b/Allura/allura/lib/widgets/resources/js/commit_browser.js
@@ -100,7 +100,12 @@ if($('#commit_graph')){
       $scroll_placeholder.height(graph_height);
     }
 
+    var pending = false;
     function get_data(select_first) {
+        if (pending) {
+            return;
+        }
+        pending = true;
         var params = {'limit': 100};
         if (data['next_commit']) {
             params['start'] = data['next_commit'];
@@ -138,6 +143,7 @@ if($('#commit_graph')){
             if (select_first) {
                 selectCommit(0);
             }
+            pending = false;
         });
     }
     get_data(true);


Mime
View raw message