# HG changeset patch # User Mads Kiilerich # Date 2015-08-17 01:11:42 # Node ID 5cc8e1d7ee2108bfc8ea5a6527930f2cba758d91 # Parent 09f58befd9f1ec9b044e422ee1d4b854664bdf69 comments: fix warning when unloading page with unsaved comments e87baa8f1c5b broke the existing check. Instead, only set the comment-inline-form class when it actually is an inline form and use that class for finding comments. diff --git a/kallithea/public/js/base.js b/kallithea/public/js/base.js --- a/kallithea/public/js/base.js +++ b/kallithea/public/js/base.js @@ -683,7 +683,8 @@ function _comment_div_append_add($commen // append a comment form to $comment_div function _comment_div_append_form($comment_div, f_path, line_no) { - var $form_div = $($('#comment-inline-form-template').html().format(f_path, line_no)); + var $form_div = $($('#comment-inline-form-template').html().format(f_path, line_no)) + .addClass('comment-inline-form'); $comment_div.append($form_div); var $form = $comment_div.find("form"); diff --git a/kallithea/templates/changeset/changeset_file_comment.html b/kallithea/templates/changeset/changeset_file_comment.html --- a/kallithea/templates/changeset/changeset_file_comment.html +++ b/kallithea/templates/changeset/changeset_file_comment.html @@ -52,7 +52,7 @@ ## TODO: don't assume line_no is globally unique ... <%def name="comment_inline_form()">