Mercurial > kallithea
changeset 5498:e81498114bc8 stable
comments: fix comment add button - it is only the button that should be clickable, not the containing div
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 14 Sep 2015 23:06:00 +0200 |
parents | 12b47803189f |
children | f24851239566 |
files | kallithea/public/css/style.css kallithea/public/js/base.js |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/public/css/style.css Fri Sep 11 13:00:47 2015 +0200 +++ b/kallithea/public/css/style.css Mon Sep 14 23:06:00 2015 +0200 @@ -4309,7 +4309,7 @@ background-color: #FAFAFA; } -.inline-comments .add-comment { +.inline-comments .add-button-row { padding: 2px 4px 8px 5px; }
--- a/kallithea/public/js/base.js Fri Sep 11 13:00:47 2015 +0200 +++ b/kallithea/public/js/base.js Mon Sep 14 23:06:00 2015 +0200 @@ -655,7 +655,7 @@ // 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 @@ } 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 @@ // 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 = $('<div class="add-comment"><span class="btn btn-mini">{0}</span></div>'.format(addlabel)); + var $add = $('<div class="add-button-row"><span class="btn btn-mini add-button">{0}</span></div>'.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); }); }