diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-17 18:18:34 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-10-17 18:18:34 +0200 |
commit | 05c785a26b021bd0cb0c450f7517ba92f9b07335 (patch) | |
tree | 44c6ac950f0f2456f443893bbd7bdc3f97eb5b13 | |
parent | cf4c291a623f708043909cb6a489828908fcc32f (diff) | |
download | Chimère - projet Saclay-05c785a26b021bd0cb0c450f7517ba92f9b07335.tar.bz2 Chimère - projet Saclay-05c785a26b021bd0cb0c450f7517ba92f9b07335.zip |
Adapt forms to new API
-rw-r--r-- | templates/chimere/edit.html | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/templates/chimere/edit.html b/templates/chimere/edit.html index 8611073..ff832e5 100644 --- a/templates/chimere/edit.html +++ b/templates/chimere/edit.html @@ -145,11 +145,17 @@ Les évènements à caractère politique, confessionnel ainsi que ceux relevant toolbar2: "", toolbar3: "" }); - - {% if route and itinerary_form %} + {% if route %} + var edition_type = 'route'; + {% if itinerary_form %} $("#chimere_itinerary_form").appendTo($("#itinerary_field")); - $('#main_map').chimere('updateRoutingInput'); - {% else %}$('#main_map').chimere('updateMarkerInput');{% endif %} + $('#main_map').chimere('updateRoutingInput');{% endif%} + {% else %} + var edition_type = 'marker'; + $('#main_map').chimere('updateMarkerInput'); + {% endif %} + $('#main_map').chimere('activateEdition', edition_type); + $('#main_map').chimere('activateDraw'); $('.toggle').click(function(){ var div_item = $(this).next(); div_item.toggle(); |