diff options
author | James Moger <james.moger@gmail.com> | 2016-11-18 18:48:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-18 18:48:38 -0500 |
commit | 855a19a242d9ce0ebbbfe7baa120603d3c598f05 (patch) | |
tree | aa160c8bdb2dc593af36c8646587b0c6544daf67 /src/main/java/com/gitblit/wicket/panels/PagerPanel.java | |
parent | e5068d689d47747778dcb7a6b967abbd600a30a4 (diff) | |
parent | 7f33a835295216210b7ca63367a460d76f9738d0 (diff) | |
download | gitblit-wicket-7.tar.gz gitblit-wicket-7.zip |
Merge pull request #1153 from pingunaut/wicket-7wicket-7
Wicket Update and merge master
Diffstat (limited to 'src/main/java/com/gitblit/wicket/panels/PagerPanel.java')
-rw-r--r-- | src/main/java/com/gitblit/wicket/panels/PagerPanel.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/wicket/panels/PagerPanel.java b/src/main/java/com/gitblit/wicket/panels/PagerPanel.java index c80bb73c..3a136f03 100644 --- a/src/main/java/com/gitblit/wicket/panels/PagerPanel.java +++ b/src/main/java/com/gitblit/wicket/panels/PagerPanel.java @@ -48,7 +48,7 @@ public class PagerPanel extends Panel { deltas = new int[] { -2, -1, 0, 1, 2 };
}
- if (totalPages > 0) {
+ if (totalPages > 0 && currentPage > 1) {
pages.add(new PageObject("\u2190", currentPage - 1));
}
for (int delta : deltas) {
@@ -57,7 +57,7 @@ public class PagerPanel extends Panel { pages.add(new PageObject("" + page, page));
}
}
- if (totalPages > 0) {
+ if (totalPages > 0 && currentPage < totalPages) {
pages.add(new PageObject("\u2192", currentPage + 1));
}
@@ -75,6 +75,7 @@ public class PagerPanel extends Panel { item.add(link);
if (pageItem.page == currentPage || pageItem.page < 1 || pageItem.page > totalPages) {
WicketUtils.setCssClass(item, "disabled");
+ link.setEnabled(false);
}
}
};
|