diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-03-06 19:07:33 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-03-06 19:07:33 +0100 |
| commit | ec9676ef71f859a85707ab712568bf9d7f83b392 (patch) | |
| tree | 21e3fda8cc4d1955c5453fcc9fcb4731f966dc09 /chimere/templates | |
| parent | 4d483ae06f8e7f90c76d2f4c6bb2745dc573c89e (diff) | |
| download | Chimère-ec9676ef71f859a85707ab712568bf9d7f83b392.tar.bz2 Chimère-ec9676ef71f859a85707ab712568bf9d7f83b392.zip | |
Admin: polygon edition
Diffstat (limited to 'chimere/templates')
| -rw-r--r-- | chimere/templates/chimere/blocks/polygon_edit.html | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/chimere/templates/chimere/blocks/polygon_edit.html b/chimere/templates/chimere/blocks/polygon_edit.html index 7c773b4..98d5f7f 100644 --- a/chimere/templates/chimere/blocks/polygon_edit.html +++ b/chimere/templates/chimere/blocks/polygon_edit.html @@ -20,27 +20,16 @@ </div> <div id='popup'></div> -<div id='map_edit'> -<div class='map_button'> - <a href='#' id='polygon_move' class='toggle-button toggle-button-active'>{% trans "Move on the map" %}</a> - <a href='#' id='polygon_draw' class='toggle-button toggle-button-inactive'>{% trans "Draw" %}</a> -</div> -</div> - <input type='hidden' name='{{name}}' id='id_{{name}}' value='{{val}}'/> +<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'); + {% if value %}$('#map_edit').chimere('initFeature', '{{value}}'); + {% endif %} {% raw %}}}{% endraw %} {% if initialized %}init_map_edit();{% endif %} - $('#polygon_draw').click(function(){% raw %}{{{% endraw %} - $('#polygon_move').removeClass('toggle-button-active').addClass('toggle-button-inactive'); - $('#polygon_draw').removeClass('toggle-button-inactive').addClass('toggle-button-active'); - $('#map_edit').chimere('activateDraw'); - {% raw %}}}{% endraw %}); - $('#polygon_move').click(function(){% raw %}{{{% endraw %} - $('#polygon_draw').removeClass('toggle-button-active').addClass('toggle-button-inactive'); - $('#polygon_move').removeClass('toggle-button-inactive').addClass('toggle-button-active'); - $('#map_edit').chimere('deactivateDraw'); - {% raw %}}}{% endraw %}); </script> |
