diff options
| -rw-r--r-- | chimere/templatetags/chimere_tags.py | 2 | ||||
| -rw-r--r-- | chimere/widgets.py | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/chimere/templatetags/chimere_tags.py b/chimere/templatetags/chimere_tags.py index 17cd435..6f1f3a8 100644 --- a/chimere/templatetags/chimere_tags.py +++ b/chimere/templatetags/chimere_tags.py @@ -227,7 +227,7 @@ def map(context, map_id='map'): else 'false' area_name = context['area_name'] if 'area_name' in context else 'area_name' map_layers, default_area = get_map_layers(area_name) - context_data['extra_js'] = ', '.join([ + context_data['extra_js'] = u'\n'.join([ extra_js for n, js, default, extra_js in map_layers if extra_js]) context_data['js_map_layers'] = ", ".join( [js for name, js, default, extra_js in map_layers diff --git a/chimere/widgets.py b/chimere/widgets.py index 2e43b26..3965256 100644 --- a/chimere/widgets.py +++ b/chimere/widgets.py @@ -404,7 +404,7 @@ class RouteChooserWidget(forms.TextInput): map_layers = [js for nm, js, default in map_layers] extra_js = [extra_js for n, js, default, extra_js in map_layers if extra_js] - js = """ + js = u""" var resolutions; var zoomOffset; @@ -430,10 +430,10 @@ class RouteChooserWidget(forms.TextInput): settings.CHIMERE_DEFAULT_CENTER[0], settings.CHIMERE_DEFAULT_CENTER[1], settings.CHIMERE_DEFAULT_ZOOM, - "\n".join(extra_js), - ", ".join(map_layers)) + u"\n".join(extra_js), + u", ".join(map_layers)) if default_area: - js += "chimere_init_options['selected_map_layer'] = %d;\n" % \ + js += u"chimere_init_options['selected_map_layer'] = %d;\n" % \ default_area tpl = u"<script type='text/javascript'><!--\n"\ u"%s// !--></script>\n" % js @@ -658,7 +658,7 @@ class PolygonChooserWidget(forms.TextInput): {'name': name, 'val': val, 'initialized': initialized, 'isvalue': bool(value), 'default_area': "true" if default_area else "false", - 'value': value, 'extra_js': "\n".join(extra_js), + 'value': value, 'extra_js': u"\n".join(extra_js), } ) return mark_safe(tpl.format( |
