Load blueslip as early as possible

This will help us track down errors in third-party javascript
libraries.

blueslip needs jQuery and the page_params, so those must come first.

(imported from commit f53f67d758298d4e1c2784ec27e09d6abf0b3223)
This commit is contained in:
Zev Benjamin 2013-05-16 16:42:28 -04:00 committed by Leo Franchi
parent 39bb10a24a
commit b46bc6004f
3 changed files with 20 additions and 8 deletions

View File

@ -274,7 +274,6 @@ PIPELINE_JS = {
},
'app': {
'source_filenames': [
'js/blueslip.js',
'js/util.js',
'js/setup.js',
'js/viewport.js',
@ -305,6 +304,10 @@ PIPELINE_JS = {
],
'output_filename': 'min/app.js'
},
'blueslip': {
'source_filenames': ('js/blueslip.js',),
'output_filename': 'min/blueslip.js'
},
}
if PIPELINE:

View File

@ -21,6 +21,13 @@
<link href="/static/favicon.ico?v=2" rel="shortcut icon">
{# We need to import jQuery before Bootstrap #}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
{% block page_params %}
{# blueslip needs page_params.debug_mode. Set it to false by default. #}
<script type="text/javascript">
var page_params = {debug_mode: false};
</script>
{% endblock %}
{% compressed_js 'blueslip' %}
<script src="/static/third/bootstrap/js/bootstrap.min.js"></script>
{% compressed_js 'common' %}
{% block customhead %}

View File

@ -5,6 +5,15 @@
{% load compressed %}
{% block page_params %}
{# Insert parameters, which have been encoded with JSONEncoderForHTML. #}
<script type="text/javascript">
{% autoescape off %}
var page_params = {{ page_params }};
{% endautoescape %}
</script>
{% endblock %}
{% block customhead %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -30,13 +39,6 @@
<script type="text/javascript" src="/static/third/handlebars/handlebars.runtime.js"></script>
{% endif %}
{# Insert parameters, which have been encoded with JSONEncoderForHTML. #}
<script type="text/javascript">
{% autoescape off %}
var page_params = {{ page_params }};
{% endautoescape %}
</script>
{% compressed_js 'app' %}
{% if debug %}