c5932df8f4a8 webui

Add some sweet web2.0javaajaxgoogles effects.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 21 Oct 2009 19:09:28 -0400
parents 43047ad3e2fa
children 5c274209a7ec
branches/tags webui
files review/web_media/comments.js review/web_media/style.css review/web_templates/base.html review/web_templates/review.html

Changes

--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/review/web_media/comments.js	Wed Oct 21 19:09:28 2009 -0400
@@ -0,0 +1,11 @@
+$(function() {
+    
+    $("form").hide();
+    
+    $("p.comment-activate a").click(function() {
+        $(event.target).hide();
+        $(event.target).closest("div").children("form").fadeIn("fast");
+        return false;
+    });
+
+});
\ No newline at end of file
--- a/review/web_media/style.css	Wed Oct 21 18:49:25 2009 -0400
+++ b/review/web_media/style.css	Wed Oct 21 19:09:28 2009 -0400
@@ -79,8 +79,11 @@
     margin-top: 1.5em;
     white-space: pre;
 }
-div#comment-review {
+div#comment-review form {
     margin-bottom: 3em;
+    display: none;
+}
+div#comment-file form {
 }
 
 /* Diffs. */
--- a/review/web_templates/base.html	Wed Oct 21 18:49:25 2009 -0400
+++ b/review/web_templates/base.html	Wed Oct 21 19:09:28 2009 -0400
@@ -9,6 +9,7 @@
         <link rel="stylesheet" href="/media/style.css" type="text/css" media="screen" />
         
         <script type="text/javascript" src="/media/jquery-1.3.2.min.js"></script>
+        <script type="text/javascript" src="/media/comments.js"></script>
     </head>
     
     <body>
--- a/review/web_templates/review.html	Wed Oct 21 18:49:25 2009 -0400
+++ b/review/web_templates/review.html	Wed Oct 21 19:09:28 2009 -0400
@@ -14,6 +14,7 @@
     </div>
 
 <div id="comment-review">
+    <p class="comment-activate"><a href="">Add a comment on this changeset</a></p>
     <form id="comment-review-form" method="post" action="">
         <div class="field">
             <label for="body">Add a comment on this changeset:</label>
@@ -41,6 +42,7 @@
         </div>
     
     <div id="comment-file">
+        <p class="comment-activate"><a href="">Add a comment on this file</a></p>
         <form id="comment-file-form" method="post" action="">
             <div class="field">
                 <label for="body">Add a comment on this file:</label>