Commit 1de0ea28b957068bff7d5a5eaac82956b7529560
1 parent
4c6c2485
Exists in
master
and in
4 other branches
added bg for transparent images
added width and height below images in diff
Showing
3 changed files
with
19 additions
and
1 deletions
Show diff stats
58 Bytes
app/assets/stylesheets/sections/commits.scss
app/views/commit/show.html.haml
... | ... | @@ -7,4 +7,19 @@ |
7 | 7 | :javascript |
8 | 8 | $(function(){ |
9 | 9 | PerLineNotes.init(); |
10 | + var w, h; | |
11 | + $('.diff_file').each(function(){ | |
12 | + $('.image.diff_removed img', this).on('load', $.proxy(function(event){ | |
13 | + var w = event.currentTarget.naturalWidth | |
14 | + , h = event.currentTarget.naturalHeight; | |
15 | + $('.image.diff_removed .image-info', this).append(' | <b>W:</b> ' + w + 'px | <b>H:</b> ' + h + 'px'); | |
16 | + }, this)); | |
17 | + $('.image.diff_added img', this).on('load', $.proxy(function(event){ | |
18 | + var w = event.currentTarget.naturalWidth | |
19 | + , h = event.currentTarget.naturalHeight; | |
20 | + $('.image.diff_added .image-info', this).append(' | <b>W:</b> ' + w + 'px | <b>H:</b> ' + h + 'px'); | |
21 | + }, this)); | |
22 | + | |
23 | + }); | |
24 | + | |
10 | 25 | }); | ... | ... |