#504 Fix commenting on the last line of a diff
Merged 9 years ago by pingou. Opened 9 years ago by pingou.

@@ -456,6 +456,13 @@ 

        var table = $( this ).parent().parent();

        var nextid = rowid.replace('_' + row, '_' + (Number(row) + 1));

        var next_row = table.find('#' + nextid).parent().parent();

+       {# If we're at the last row, we won't be able to find the next_row

+          therefore we need to add it manually #}

+       if (next_row.length == 0) {

+         table.find("tr:last").after(

+             '<tr><td><a id="' + nextid + '"></a></td></tr>');

+         next_row = table.find('#' + nextid).parent().parent();

+       }

        if (next_row.prev().find('.pr_comment_form').length == 0){

          $.get( url , function( data ) {

            next_row.before(

no initial comment

In the comment you should remove "that we" to get a correct sentence.
Code +1

Thanks for the review

Metadata