Seperate jQuery bit that was still in media.html
authorJef van Schendel <mail@jefvanschendel.nl>
Sun, 1 Jan 2012 21:58:32 +0000 (22:58 +0100)
committerJef van Schendel <mail@jefvanschendel.nl>
Sun, 1 Jan 2012 21:58:32 +0000 (22:58 +0100)
mediagoblin/static/js/comment_show.js [new file with mode: 0644]
mediagoblin/templates/mediagoblin/user_pages/media.html

diff --git a/mediagoblin/static/js/comment_show.js b/mediagoblin/static/js/comment_show.js
new file mode 100644 (file)
index 0000000..2212b9a
--- /dev/null
@@ -0,0 +1,9 @@
+$(document).ready(function(){
+  $('#form_comment').hide();
+  $('#button_addcomment').click(function(){
+    $(this).fadeOut('fast');
+    $('#form_comment').slideDown(function(){
+        $('#comment_content').focus();
+    });
+  });
+});
index 4c2551122a9b93a79b12de22968969345ac125bb..ca650f6350ee750dbd14a346b5a0ded39cf2b1e1 100644 (file)
 {% block title %}{{ media.title }} &mdash; {{ super() }}{% endblock %}
 
 {% block mediagoblin_head %}
-  <script>
-    $(document).ready(function(){
-      $('#form_comment').hide();
-      $('#button_addcomment').click(function(){
-          $(this).fadeOut('fast');
-          $('#form_comment').slideDown(function(){
-            $('#comment_content').focus();
-          });
-      });
-    });
-  </script>
+  <script type="text/javascript"
+          src="{{ request.staticdirect('/js/comment_show.js') }}"></script>
 {% endblock mediagoblin_head %}
 
 {% block mediagoblin_content %}