From 5140a7ad602e246f8bf2449220ef5bc9d64436d6 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 3 Apr 2013 16:34:43 +0200 Subject: Allow conditions for CSS urls. --- settings.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'settings.py') diff --git a/settings.py b/settings.py index 2e5ad40..391c6e5 100644 --- a/settings.py +++ b/settings.py @@ -290,7 +290,8 @@ if 'MAP_JS_URLS' not in globals(): STATIC_URL + "openlayers/OpenLayers.js", STATIC_URL + "openlayers/SimplePanZoom.js", "http://www.openstreetmap.org/openlayers/OpenStreetMap.js", - STATIC_URL + "chimere/js/jquery.chimere-ol.js"], + STATIC_URL + "chimere/js/jquery.chimere-ol.js" + ], 'leaflet':[ STATIC_URL + "leaflet/leaflet.js", STATIC_URL + "chimere/js/jquery.chimere-leaflet.js" @@ -299,11 +300,13 @@ if 'MAP_JS_URLS' not in globals(): if 'MAP_CSS_URLS' not in globals(): global MAP_CSS_URLS + # key: [(url, condition)] MAP_CSS_URLS = { - 'openlayers':["http://www.openlayers.org/api/theme/default/style.css"], + 'openlayers':[("http://www.openlayers.org/api/theme/default/style.css", + None)], 'leaflet':[ - STATIC_URL + "leaflet/leaflet.css", - STATIC_URL + "leaflet/leaflet.ie.css" + (STATIC_URL + "leaflet/leaflet.css", None), + (STATIC_URL + "leaflet/leaflet.ie.css", 'lte IE 8') ] } -- cgit v1.2.3