# HG changeset patch # User Steve Losh # Date 1272833524 14400 # Node ID 51b8306fa0c4241fab9e7eb7aa803b3021dfa86d # Parent f5bdfc1d952fdbf747d860618a1c6a7383db1b45 Fix a few bugs with commenting on lines. diff -r f5bdfc1d952f -r 51b8306fa0c4 review/web_media/comments.js --- a/review/web_media/comments.js Sun May 02 16:35:51 2010 -0400 +++ b/review/web_media/comments.js Sun May 02 16:52:04 2010 -0400 @@ -11,6 +11,7 @@ }); $("span.cancel-line a").live("click", function(event) { + $(event.target).closest("tr").prev().removeClass("comment-line-selected").addClass("commentable"); $(event.target).closest("tr").remove(); return false; }); @@ -21,8 +22,8 @@ return false; }); - $("tr.rem.commentable,tr.add.commentable,tr.con.commentable").click(function(event) { - $(event.target).closest("tr").addClass("comment-line-selected"); + $("tr.rem.commentable,tr.add.commentable,tr.con.commentable").live("click", function(event) { + $(event.target).closest("tr").addClass("comment-line-selected").removeClass("commentable"); var filename = $(event.target).closest("tr").find(".line-data").children(".filename").first().text(); var linenumber = $(event.target).closest("tr").find(".line-data").children(".linenumber").first().html(); diff -r f5bdfc1d952f -r 51b8306fa0c4 review/web_media/style.css --- a/review/web_media/style.css Sun May 02 16:35:51 2010 -0400 +++ b/review/web_media/style.css Sun May 02 16:52:04 2010 -0400 @@ -121,7 +121,10 @@ div#comment-file form { } table tbody tr.comment-line-selected { - background-color: #FBEAD0; + background-color: #FBEAD0 !important; +} +span.cancel, form span.cancel-line { + margin-left: 10px; } /* Signoffs. */