51b8306fa0c4

Fix a few bugs with commenting on lines.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sun, 02 May 2010 16:52:04 -0400
parents f5bdfc1d952f
children a0c98a413342
branches/tags (none)
files review/web_media/comments.js review/web_media/style.css

Changes

--- 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();
         
--- 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. */