summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chimere/settings.sample.py5
-rw-r--r--chimere/templates/base.html2
-rw-r--r--chimere/templates/chimere/blocks/head_chimere.html6
-rw-r--r--chimere/templatetags/chimere_tags.py4
4 files changed, 9 insertions, 8 deletions
diff --git a/chimere/settings.sample.py b/chimere/settings.sample.py
index 16de0f1..9afa90f 100644
--- a/chimere/settings.sample.py
+++ b/chimere/settings.sample.py
@@ -227,7 +227,6 @@ INSTALLED_APPS += [
'chimere',
]
-LOG_PATH = '/var/log/django/'
MOBILE_DOMAINS = [] # if you have specific domains for mobile access
LOGFILENAME = '/var/log/django/chimere.log'
@@ -300,7 +299,7 @@ if 'OSM_JS_URLS' not in globals():
STATIC_URL + "openlayers/SimplePanZoom.js",
"http://www.openstreetmap.org/openlayers/OpenStreetMap.js"]
if 'OSM_MOBILE_JS_URLS' not in globals():
- global OSM_MOBILE_URLS
- OSM_JS_MOBILE_URLS = [STATIC_URL + "openlayers/OpenLayers.mobile.js",
+ global OSM_MOBILE_JS_URLS
+ OSM_MOBILE_JS_URLS = [STATIC_URL + "openlayers/OpenLayers.mobile.js",
STATIC_URL + "openlayers/SimplePanZoom.js",
"http://www.openstreetmap.org/openlayers/OpenStreetMap.js"]
diff --git a/chimere/templates/base.html b/chimere/templates/base.html
index 619aa0b..a346878 100644
--- a/chimere/templates/base.html
+++ b/chimere/templates/base.html
@@ -3,6 +3,8 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>{% block title %}{{PROJECT_NAME}}{% endblock %}</title>
+ {% if MOBILE %}<meta name="apple-mobile-web-app-capable" content="yes">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">{% endif %}
{% block extra_head %}
{% endblock %}
</head>
diff --git a/chimere/templates/chimere/blocks/head_chimere.html b/chimere/templates/chimere/blocks/head_chimere.html
index 2194e93..147d05b 100644
--- a/chimere/templates/chimere/blocks/head_chimere.html
+++ b/chimere/templates/chimere/blocks/head_chimere.html
@@ -1,9 +1,7 @@
{% for css_url in OSM_CSS_URLS %}
<link rel="stylesheet" href="{{ css_url }}" />{% endfor %}
-{% if MOBILE %}{% for js_url in OSM_MOBILE_JS_URLS %}
-<script src="{{ js_url }}" type="text/javascript"></script>{% endfor %}{% endif %}
-{%else%}{% for js_url in OSM_JS_URLS %}
-<script src="{{ js_url }}" type="text/javascript"></script>{% endfor %}{% endif %}
+{% for js_url in OSM_JS_URLS %}
+<script src="{{ js_url }}" type="text/javascript"></script>{% endfor %}
{% if routing %}<script src="{{ STATIC_URL }}chimere/js/routing-widget.js" type="text/javascript"></script>{% endif %}
<script src="{{ STATIC_URL }}chimere/js/clustering.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}chimere/js/jquery.chimere.js" type="text/javascript"></script>
diff --git a/chimere/templatetags/chimere_tags.py b/chimere/templatetags/chimere_tags.py
index 31c8f04..7a3f48e 100644
--- a/chimere/templatetags/chimere_tags.py
+++ b/chimere/templatetags/chimere_tags.py
@@ -142,11 +142,13 @@ def head_chimere(context):
"DEFAULT_ZOOM": settings.CHIMERE_DEFAULT_ZOOM,
"MAP_LAYER": settings.CHIMERE_DEFAULT_MAP_LAYER,
"OSM_CSS_URLS": settings.OSM_CSS_URLS,
- "OSM_JS_URLS": settings.OSM_JS_URLS,
'MOBILE':context['MOBILE'],
'routing': settings.CHIMERE_ENABLE_ROUTING \
if hasattr(settings, 'CHIMERE_ENABLE_ROUTING') else False
}
+ context_data['OSM_JS_URLS'] = settings.OSM_JS_URLS
+ if context['MOBILE']:
+ context_data['OSM_JS_URLS'] = settings.OSM_MOBILE_JS_URLS
return context_data
@register.inclusion_tag('chimere/blocks/head_form.html')