Always include the showReply/hideReply functions.
authorMatthijs Kooijman <matthijs@stdin.nl>
Fri, 31 Oct 2008 13:38:32 +0000 (14:38 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Fri, 31 Oct 2008 13:38:32 +0000 (14:38 +0100)
Previously, these javascript functions were only defined when there were
any comments, but the "add comment" link uses them as well.

templates/influences/influence_comments_block.html

index 5392d2f2db3938117e11315dc3f2c1353f2762f0..19695917e4363b80a8b1011d22c7c1b7e21fbb09 100644 (file)
@@ -1,19 +1,19 @@
 {% load i18n %}
 {% load threadedcommentstags %}
 
-{% if comments %}
-    <script type="text/javascript">
-        function showReply(comment_id) {
-            YAHOO.util.Dom.setStyle('replyForm' + comment_id, 'display', 'block');
-            YAHOO.util.Dom.setStyle('replyLink' + comment_id, 'display', 'none');
-        }
+<script type="text/javascript">
+    function showReply(comment_id) {
+        YAHOO.util.Dom.setStyle('replyForm' + comment_id, 'display', 'block');
+        YAHOO.util.Dom.setStyle('replyLink' + comment_id, 'display', 'none');
+    }
 
-        function hideReply(comment_id) {
-            YAHOO.util.Dom.setStyle('replyForm' + comment_id, 'display', 'none');
-            YAHOO.util.Dom.setStyle('replyLink' + comment_id, 'display', 'block');
-        }
-    </script>
+    function hideReply(comment_id) {
+        YAHOO.util.Dom.setStyle('replyForm' + comment_id, 'display', 'none');
+        YAHOO.util.Dom.setStyle('replyLink' + comment_id, 'display', 'block');
+    }
+</script>
 
+{% if comments %}
     {% for comment in comments %}
         <div style="margin-left: {{ comment.depth }}em;" class="comment{% if not comment.is_public %} private{% endif %}">
             {{ comment.user }} said:<br/>