You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2012/09/25 04:13:09 UTC

[2/14] git commit: [#3751] ticket:153 small fixes

[#3751] ticket:153 small fixes


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

Branch: refs/heads/master
Commit: 3f74adce22ad1555fecca208926af3e384592e06
Parents: 4a2fb82
Author: Igor Bondarenko <je...@gmail.com>
Authored: Thu Sep 6 20:35:50 2012 +0300
Committer: Dave Brondsema <db...@geek.net>
Committed: Tue Sep 25 02:10:31 2012 +0000

----------------------------------------------------------------------
 .../lib/widgets/resources/js/commit_browser.js     |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3f74adce/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 803d4b7..e11ffc2 100644
--- a/Allura/allura/lib/widgets/resources/js/commit_browser.js
+++ b/Allura/allura/lib/widgets/resources/js/commit_browser.js
@@ -102,12 +102,15 @@ if($('#commit_graph')){
         $first.removeClass('disabled');
         $last.removeClass('disabled');
         offset = x;
-        if(offset <= 1) {
+        if (max_row <= page_size) {
             offset = 1;
+            $first.addClass('disabled');
             $last.addClass('disabled');
-        }
-        else if(offset > (max_row-page_size)) {
-            offset = max_row - page_size;
+        } else if (offset <= 1) {
+            offset = 1;
+            $last.addClass('disabled');
+        } else if (offset > (max_row-page_size)) {
+            offset = max_row - page_size + 1;
             $first.addClass('disabled');
         }
         y_offset = offset * y_space;