# HG changeset patch # User Steve Losh # Date 1272832102 14400 # Node ID ebc5f7c7a6b7e8c08b7c7b77ac42d2f98b69158b # Parent 9d032dbf867dcd257fcb1b953092827217289fce Add cancel links to comment/signoff forms to hide them. diff -r 9d032dbf867d -r ebc5f7c7a6b7 review/web_media/comments.js --- a/review/web_media/comments.js Sat May 01 13:51:22 2010 -0400 +++ b/review/web_media/comments.js Sun May 02 16:28:22 2010 -0400 @@ -3,13 +3,19 @@ $("div > form").hide(); $("tr:has(form)").hide(); - $("p.comment-activate a").click(function(event) { - $(event.target).hide(); - $(event.target).closest("div").children("form").fadeIn("fast"); + + $("span.cancel a").click(function(event) { + $(event.target).closest("div.input").children(".activate").children("a").show(); + $(event.target).parents("form").hide(); return false; }); - $("p.signoff-activate a").click(function(event) { + $("span.cancel-line a").live("click", function(event) { + $(event.target).closest("tr").remove(); + return false; + }); + + $(".input .activate a").click(function(event) { $(event.target).hide(); $(event.target).closest("div").children("form").fadeIn("fast"); return false; @@ -29,6 +35,7 @@ \n\
\n\ \n\ + Cancel\n\
\n\ \n\ \n\ diff -r 9d032dbf867d -r ebc5f7c7a6b7 review/web_media/style.css --- a/review/web_media/style.css Sat May 01 13:51:22 2010 -0400 +++ b/review/web_media/style.css Sun May 02 16:28:22 2010 -0400 @@ -184,3 +184,8 @@ div.diff .comment { margin-bottom: 0em; } + +.debug { + border: 2px solid green; + background-color: red; +} \ No newline at end of file diff -r 9d032dbf867d -r ebc5f7c7a6b7 review/web_templates/changeset.html --- a/review/web_templates/changeset.html Sat May 01 13:51:22 2010 -0400 +++ b/review/web_templates/changeset.html Sun May 02 16:28:22 2010 -0400 @@ -20,8 +20,8 @@ {% endfor %} {% if not read_only %} -
-

Add a comment on this changeset

+
+

Add a comment on this changeset

@@ -29,6 +29,7 @@
+ Cancel
@@ -50,8 +51,8 @@ {% endfor %} {% if not read_only %} -
-

+

+

{% if cu_signoff %} Change your signoff {% else %} @@ -70,6 +71,7 @@

+ Cancel
@@ -100,8 +102,8 @@ {% endfor %} {% if not read_only %} -