# HG changeset patch # User Thomas De Schampheleire # Date 2015-06-18 08:46:07 # Node ID 329c0584cba891252ccd0c742d47d3d1219e71e6 # Parent 6db5d95c2d2128ec0ca3394bbc3f1953a398e22a comments: remove dysfunctional comment bubble on compare and file views (issue #84) Several compare and file views would show a comment bubble when hovering code lines, even though clicking on this bubble would not do anything. Instead, make sure that the bubble only appears when the diff block is in a class 'commentable-diff', which can be set from the appropriate places (changeset and pullrequest views) where a click handler is also attached. 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 @@ -5008,9 +5008,10 @@ table.code-difftable .unmod .code pre:be box-sizing: border-box; } -tr.line.add:hover td .add-bubble, -tr.line.del:hover td .add-bubble, -tr.line.unmod:hover td .add-bubble { +/* comment bubble, only visible when in a commentable diff */ +.commentable-diff tr.line.add:hover td .add-bubble, +.commentable-diff tr.line.del:hover td .add-bubble, +.commentable-diff tr.line.unmod:hover td .add-bubble { display: block; z-index: 1; } diff --git a/kallithea/templates/changeset/changeset.html b/kallithea/templates/changeset/changeset.html --- a/kallithea/templates/changeset/changeset.html +++ b/kallithea/templates/changeset/changeset.html @@ -158,13 +158,14 @@ ${self.repo_context_bar('changelog', c.c ## diff block +
<%namespace name="diff_block" file="/changeset/diff_block.html"/> ${diff_block.diff_block_js()} ${diff_block.diff_block(c.changes[c.changeset.raw_id])} - % if c.limited_diff:

${_('Changeset was too big and was cut off...')} ${_('Show full diff anyway')}

% endif +
## template for inline comment form ${comment.comment_inline_form()} diff --git a/kallithea/templates/pullrequests/pullrequest_show.html b/kallithea/templates/pullrequests/pullrequest_show.html --- a/kallithea/templates/pullrequests/pullrequest_show.html +++ b/kallithea/templates/pullrequests/pullrequest_show.html @@ -341,6 +341,7 @@ ${self.repo_context_bar('showpullrequest ## diff block +
<%namespace name="diff_block" file="/changeset/diff_block.html"/> ${diff_block.diff_block_js()} %for fid, change, f, stat in c.files: @@ -349,7 +350,7 @@ ${self.repo_context_bar('showpullrequest % if c.limited_diff:

${_('Changeset was too big and was cut off...')} ${_('Show full diff anyway')}

% endif - +
## template for inline comment form ${comment.comment_inline_form()}