Tom
2014-11-17 b6f47539cd1a1dafe05ffd6fdc40bce4547c479d
refs
author Tom <tw201207@gmail.com>
Monday, November 17, 2014 18:25 -0500
committer Tom <tw201207@gmail.com>
Wednesday, November 19, 2014 09:09 -0500
commitb6f47539cd1a1dafe05ffd6fdc40bce4547c479d
tree 04f5db704f631223b3ca8706cbd5e8fea3a42484 tree | zip | gz
parent d85396ad73ef7ae5e142b76136ee61e0e3286a4f view | diff
Add a blink comparator and pixel difference to image diffs

Pixel difference uses CSS mix-blend-mode, which is supported currently
only on Firefox >= 32 and on Safari >= 7.1. Implementation is behind a
Javascript feature test.

For other browsers, there's a blink comparator.

Code changes:

* ImageDiffHandler now takes the page it's used on as argument. We need
that to get labels. DOM generated is a
little bit different (new controls).

* Diff pages adapted to new constructor of ImageDiffHandler.

* CSS and Javascript changes implementing the new controls, making use
of two new static image resources. Since I felt that the new controls
deserved tooltips, I also gave the opacity slider a tooltip: changed
to <a>, and slider handle changed from <div> to <span>. CSS ensures
everything still displays the same (basically display:inline-block).

* Supplied messages for English, French, and German for the new
tooltips.

Tested on IE8, Safari 6.1.6 & 7.1, Chrome 38, FF 33.1 & FF 3.6.13
2 files added
9 files modified
131 ■■■■ changed files
src/main/java/com/gitblit/wicket/GitBlitWebApp.properties 3 ●●●●● diff | view | raw | blame | history
src/main/java/com/gitblit/wicket/GitBlitWebApp_de.properties 3 ●●●●● diff | view | raw | blame | history
src/main/java/com/gitblit/wicket/GitBlitWebApp_fr.properties 3 ●●●●● diff | view | raw | blame | history
src/main/java/com/gitblit/wicket/pages/BlobDiffPage.java 4 ●●●● diff | view | raw | blame | history
src/main/java/com/gitblit/wicket/pages/CommitDiffPage.java 2 ●●● diff | view | raw | blame | history
src/main/java/com/gitblit/wicket/pages/ComparePage.java 2 ●●● diff | view | raw | blame | history
src/main/java/com/gitblit/wicket/pages/ImageDiffHandler.java 32 ●●●● diff | view | raw | blame | history
src/main/java/com/gitblit/wicket/pages/scripts/imgdiff.js 63 ●●●●● diff | view | raw | blame | history
src/main/resources/blink32.png diff | view | raw | blame | history
src/main/resources/gitblit.css 19 ●●●●● diff | view | raw | blame | history
src/main/resources/sub32.png diff | view | raw | blame | history