changeset 2500:1892e3bf7b21

Serving the JS for basic theme, only for the basic theme
author sharky93 <rishabhr123@gmail.com>
date Sat, 21 Sep 2013 19:51:15 +0530
parents 41032fd77822
children 79e419c71b82
files MoinMoin/templates/snippets.html MoinMoin/themes/basic/templates/layout.html MoinMoin/themes/basic/templates/snippets.html
diffstat 3 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/snippets.html	Sat Sep 21 18:40:52 2013 +0530
+++ b/MoinMoin/templates/snippets.html	Sat Sep 21 19:51:15 2013 +0530
@@ -69,5 +69,4 @@
 
 {# Additional Javascript #}
 {% macro scripts() -%}
-<script src="{{ url_for('frontend.template', filename='basic.js') }}"></script>
 {%- endmacro %}
--- a/MoinMoin/themes/basic/templates/layout.html	Sat Sep 21 18:40:52 2013 +0530
+++ b/MoinMoin/themes/basic/templates/layout.html	Sat Sep 21 19:51:15 2013 +0530
@@ -5,6 +5,7 @@
 {% set footer_logos = snippets.creditlogos() %}
 {% set credits = snippets.credits() %}
 {% set user_actions, item_navigation, item_actions = theme_supp.get_local_panel(item_name) %}
+{% set basic_scripts = snippets.add_scripts() %}
 
 {% set current_url = request.url %}
 {% set current_path = request.path %}
@@ -284,3 +285,8 @@
         {% endblock %}
 	</div><!--/container-->
 {% endblock %}
+
+{% block body_scripts %}
+    {{ super() }}
+    {{ basic_scripts }}
+{% endblock %}
--- a/MoinMoin/themes/basic/templates/snippets.html	Sat Sep 21 18:40:52 2013 +0530
+++ b/MoinMoin/themes/basic/templates/snippets.html	Sat Sep 21 19:51:15 2013 +0530
@@ -36,4 +36,9 @@
 {{ sep }}
 {{ credit('http://validator.w3.org/check?uri=referer', 'Valid HTML 5', 'Click here to validate this page.') }}
 {{ end }}
-{% endmacro %}
\ No newline at end of file
+{% endmacro %}
+
+{# Additional JavaScript #}
+{% macro add_scripts() -%}
+<script src="{{ url_for('frontend.template', filename='basic.js') }}"></script>
+{% endmacro %}