summaryrefslogtreecommitdiff
path: root/app/views/commit/show.html.haml
blob: f920534e03a30aec6425576d29402e501892e9c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
= render "commits/commit_box"

%p.right.cgray
  This commit has
  %span.cgreen #{@commit.stats.additions} additions
  and
  %span.cred #{@commit.stats.deletions} deletions

= render "commits/diffs", diffs: @commit.diffs
= render "notes/notes_with_form"

:javascript
  $(function(){
    var w, h;
    $('.diff_file').each(function(){
      $('.image.diff_removed img', this).on('load', $.proxy(function(event){
        var w = event.currentTarget.naturalWidth
          , h = event.currentTarget.naturalHeight;
        $('.image.diff_removed .image-info', this).append(' | <b>W:</b> ' + w + 'px | <b>H:</b> ' + h + 'px');
      }, this));
      $('.image.diff_added img', this).on('load', $.proxy(function(event){
        var w = event.currentTarget.naturalWidth
          , h = event.currentTarget.naturalHeight;
        $('.image.diff_added .image-info', this).append(' | <b>W:</b> ' + w + 'px | <b>H:</b> ' + h + 'px');
      }, this));

    });

  });