Refactor diff notes creation

This commit is contained in:
Riyad Preukschas 2012-11-20 17:46:55 +01:00
parent 39834ec640
commit 06ea122840
15 changed files with 323 additions and 285 deletions

View file

@ -1,12 +1,9 @@
= render "commits/commit_box"
= render "commits/diffs", diffs: @commit.diffs
= render "notes/notes_with_form", tid: @commit.id, tt: "commit"
= render "notes/diff_note_form"
:javascript
$(function(){
PerLineNotes.init();
var w, h;
$('.diff_file').each(function(){
$('.image.diff_removed img', this).on('load', $.proxy(function(event){
@ -19,7 +16,5 @@
, h = event.currentTarget.naturalHeight;
$('.image.diff_added .image-info', this).append(' | <b>W:</b> ' + w + 'px | <b>H:</b> ' + h + 'px');
}, this));
});
});