Define static_url in JS env for easier static working.

This commit is contained in:
2013-04-01 12:06:11 +01:00
parent cb366fe998
commit 51d198fa47
2 changed files with 5 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
var store_icon = '/static/img/map_icons/home-2.png'
var online_icon = '/static/img/map_icons/wifi.png'
var geolocation_icon = '/static/img/map_icons/home-2-green.png'
var store_icon = static_url + 'img/map_icons/home-2.png'
var online_icon = static_url + 'img/map_icons/wifi.png'
var geolocation_icon = static_url + '/img/map_icons/home-2-green.png'
function lookup_marker(id) {
if (id == null || id == 1) {

View File

@@ -19,7 +19,8 @@
<![endif]-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
//
var static_url = '{{ STATIC_URL }}';
var django = {'jQuery': $};
</script>
{% block style %}
{% endblock %}