summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/pages/ComparePage.java
diff options
context:
space:
mode:
authorTom <tw201207@gmail.com>2014-11-12 20:31:12 +0100
committerTom <tw201207@gmail.com>2014-11-12 20:31:12 +0100
commit3e1336cc6d32511daf2acab9c45a517cd3b10058 (patch)
tree525cf009501d0ba340e17f12154dbd54bf7af602 /src/main/java/com/gitblit/wicket/pages/ComparePage.java
parent4dee2c5ee06677d12d5719bc18199a0affd13cc0 (diff)
downloadgitblit-3e1336cc6d32511daf2acab9c45a517cd3b10058.tar.gz
gitblit-3e1336cc6d32511daf2acab9c45a517cd3b10058.zip
Opacity adjustments for image diffs
* ImageDiffHandler adds the slider; styled in gitblit.css * imgdiff.js is a little bottom-loaded Javascript that adjusts the opacity on sliders' scroll events. * The three diff pages add this bottom script to the page if needed * GitBlitDiffFormatter: center image diffs.
Diffstat (limited to 'src/main/java/com/gitblit/wicket/pages/ComparePage.java')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ComparePage.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/ComparePage.java b/src/main/java/com/gitblit/wicket/pages/ComparePage.java
index dae8d8ea..c0141eba 100644
--- a/src/main/java/com/gitblit/wicket/pages/ComparePage.java
+++ b/src/main/java/com/gitblit/wicket/pages/ComparePage.java
@@ -117,6 +117,9 @@ public class ComparePage extends RepositoryPage {
fromCommit.getName(), toCommit.getName(), imageExtensions);
final DiffOutput diff = DiffUtils.getDiff(r, fromCommit, toCommit, DiffOutputType.HTML, handler);
+ if (handler.getImgDiffCount() > 0) {
+ addBottomScript("scripts/imgdiff.js"); // Tiny support script for image diffs
+ }
// add compare diffstat
int insertions = 0;