diff options
-rw-r--r-- | chimere/templates/chimere/blocks/edit_widget.html | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/chimere/templates/chimere/blocks/edit_widget.html b/chimere/templates/chimere/blocks/edit_widget.html index 79c3884..a2b9e48 100644 --- a/chimere/templates/chimere/blocks/edit_widget.html +++ b/chimere/templates/chimere/blocks/edit_widget.html @@ -1,4 +1,12 @@ {% load unescape i18n %}<script type='text/javascript'> +</script> + +<div id='popup'></div> +<div id='map_edit'></div> +<div class='help'>{% trans "To delete a vertice, hold the SHIFT key and click." %}</div> + <input type='hidden' name='{{name}}' id='id_{{name}}' value='{{value}}'/> + +<script type="text/javascript"> var resolutions; var zoomOffset; image_path = '{static_url}chimere/img/'; @@ -16,20 +24,12 @@ chimere_init_options['edition_type'] = '{edition_type}'; chimere_init_options["checked_categories"] = []; {% if default_area %} chimere_init_options['selected_map_layer'] = {{default_area}};{% endif %} -</script> - -<div id='popup'></div> -<div id='map_edit'></div> -<div class='help'>{% trans "To delete a vertice, hold the SHIFT key and click." %}</div> - <input type='hidden' name='{{name}}' id='id_{{name}}' value='{{value}}'/> - -<script type="text/javascript"> - function init_map_edit(){% raw %}{{{% endraw %} - $('#map_edit').chimere(chimere_init_options); - $('#map_edit').chimere('activateDraw'); - $('#map_edit').chimere('zoom', {% raw %} {{ 'area':{zoom} }} {% endraw %}); - {% if value %}$('#map_edit').chimere('initFeature', '{{value}}'); - {% endif %} - {% raw %}}}{% endraw %} - {% if initialized %}init_map_edit();{% endif %} + function init_map_edit(){% raw %}{{{% endraw %} + $('#map_edit').chimere(chimere_init_options); + $('#map_edit').chimere('activateDraw'); + $('#map_edit').chimere('zoom', {% raw %} {{ 'area':{zoom} }} {% endraw %}); + {% if value %}$('#map_edit').chimere('initFeature', '{{value}}'); + {% endif %} + {% raw %}}}{% endraw %} + {% if initialized %}init_map_edit();{% endif %} </script> |