summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2012-05-09 16:33:51 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2012-05-09 16:33:51 +0200
commit3e5905baa8c30e82a296261287850c30f08376cf (patch)
treee3b3920af4adca34f3fe75774c48176bdf468aca
parente086e4b77a8d590ff071ad2f9ad0060db8d2a6ea (diff)
downloadChimère-3e5905baa8c30e82a296261287850c30f08376cf.tar.bz2
Chimère-3e5905baa8c30e82a296261287850c30f08376cf.zip
Use custom OL images in edition
-rw-r--r--chimere/widgets.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/chimere/widgets.py b/chimere/widgets.py
index 2029858..bfa4fe7 100644
--- a/chimere/widgets.py
+++ b/chimere/widgets.py
@@ -146,6 +146,7 @@ class PointChooserWidget(forms.TextInput):
value = None
map_layers = get_map_layers(area_name)
js = """
+ OpenLayers.ImgPath = '%schimere/img/';
var EPSG_DISPLAY_PROJECTION = epsg_display_projection = new OpenLayers.Projection('EPSG:%s');
var EPSG_PROJECTION = epsg_projection = new OpenLayers.Projection('EPSG:%s');
var chimere_init_options = {};
@@ -153,7 +154,7 @@ class PointChooserWidget(forms.TextInput):
chimere_init_options['dynamic_categories'] = false;
chimere_init_options['edition'] = true;
chimere_init_options["checked_categories"] = [];
- """ % (settings.CHIMERE_EPSG_DISPLAY_PROJECTION,
+ """ % (settings.STATIC_URL, settings.CHIMERE_EPSG_DISPLAY_PROJECTION,
settings.CHIMERE_EPSG_PROJECTION,
", ".join(map_layers))
#TODO: manage area
@@ -217,6 +218,7 @@ class RouteChooserWidget(forms.TextInput):
tpl = getMapJS(area_name)
map_layers = get_map_layers(area_name)
js = """
+ OpenLayers.ImgPath = '%schimere/img/';
var EPSG_DISPLAY_PROJECTION = epsg_display_projection = new OpenLayers.Projection('EPSG:%s');
var EPSG_PROJECTION = epsg_projection = new OpenLayers.Projection('EPSG:%s');
var chimere_init_options = {};
@@ -225,7 +227,7 @@ class RouteChooserWidget(forms.TextInput):
chimere_init_options['edition'] = true;
chimere_init_options['edition_type_is_route'] = true;
chimere_init_options["checked_categories"] = [];
- """ % (settings.CHIMERE_EPSG_DISPLAY_PROJECTION,
+ """ % (settings.STATIC_URL, settings.CHIMERE_EPSG_DISPLAY_PROJECTION,
settings.CHIMERE_EPSG_PROJECTION,
", ".join(map_layers))
tpl = u"<script type='text/javascript'><!--\n"\