191d8a0d6190

web: hide file contents by default
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sun, 13 Jun 2010 00:23:16 -0400
parents 17ad8036c6e2
children 805b5a153985
branches/tags (none)
files review/static/ui.js review/templates/changeset.html

Changes

--- a/review/static/ui.js	Sun Jun 13 00:20:55 2010 -0400
+++ b/review/static/ui.js	Sun Jun 13 00:23:16 2010 -0400
@@ -1,18 +1,18 @@
 $(function() {
     
     $("a.fold").toggle(function(event) {
+        $(event.target).closest(".file").find(".file-review-contents").slideDown("fast", function() {
+            $(event.target).closest("h3").find(".status").html("&darr;");
+        });
+        return false;
+    },
+    function(event) {
         $(event.target).closest(".file")
                         .find(".file-review-contents")
                         .slideUp("fast", function () {
             $(event.target).closest("h3").find(".status").html("&rarr;");
         });
         return false;
-    },
-    function(event) {
-        $(event.target).closest(".file").find(".file-review-contents").slideDown("fast", function() {
-            $(event.target).closest("h3").find(".status").html("&darr;");
-        });
-        return false;
     });
 
 });
--- a/review/templates/changeset.html	Sun Jun 13 00:20:55 2010 -0400
+++ b/review/templates/changeset.html	Sun Jun 13 00:23:16 2010 -0400
@@ -105,10 +105,10 @@
     {% for filename in rcset.files() %}
         <div class="file">
             <div class="filename group">
-                <h3><a class="fold" href="#">{{ filename }}</a> <span class="status">&darr;</span> </h3>
+                <h3><a class="fold" href="#">{{ filename }}</a> <span class="status">&rarr;</span> </h3>
             </div>
 
-            <div class="file-review-contents">
+            <div class="file-review-contents disabled">
                 {% with %}
                     {% set comments = rcset.file_level_comments(filename) %}