diff --git a/kallithea/public/css/style.css b/kallithea/public/css/style.css --- a/kallithea/public/css/style.css +++ b/kallithea/public/css/style.css @@ -4309,7 +4309,7 @@ form.comment-inline-form { background-color: #FAFAFA; } -.inline-comments .add-comment { +.inline-comments .add-button-row { padding: 2px 4px 8px 5px; } 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 @@ -655,7 +655,7 @@ function _get_add_comment_div(target_id) // set $comment_div state - showing or not showing form and Add button function comment_div_state($comment_div, f_path, line_no, show_form) { var $forms = $comment_div.children('.comment-inline-form'); - var $buttons = $comment_div.children('.add-comment'); + var $buttonrow = $comment_div.children('.add-button-row'); var $comments = $comment_div.children('.comment'); if (show_form) { if (!$forms.length) { @@ -664,7 +664,7 @@ function comment_div_state($comment_div, } else { $forms.remove(); } - $buttons.remove(); + $buttonrow.remove(); if ($comments.length && !show_form) { _comment_div_append_add($comment_div, f_path, line_no); } @@ -673,9 +673,9 @@ function comment_div_state($comment_div, // append an Add button to $comment_div and hook it up to show form function _comment_div_append_add($comment_div, f_path, line_no) { var addlabel = TRANSLATION_MAP['Add Another Comment']; - var $add = $('
{0}
'.format(addlabel)); + var $add = $('
{0}
'.format(addlabel)); $comment_div.append($add); - $add.click(function(e) { + $add.children('.add-button').click(function(e) { comment_div_state($comment_div, f_path, line_no, true); }); }