diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-01 18:46:09 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-01 18:46:09 +0200 |
commit | 85b51e5b56a7f71e7a6a18ebeb39eef1bb4076f7 (patch) | |
tree | 074f99bfb02743369c421d1b83e98450c245feeb /static/saclay/js/interface.js | |
parent | b759aeba6460c6e69d3b059c1da819ee2960f7e9 (diff) | |
download | Chimère - projet Saclay-85b51e5b56a7f71e7a6a18ebeb39eef1bb4076f7.tar.bz2 Chimère - projet Saclay-85b51e5b56a7f71e7a6a18ebeb39eef1bb4076f7.zip |
Manage different type of editions
Diffstat (limited to 'static/saclay/js/interface.js')
-rw-r--r-- | static/saclay/js/interface.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/static/saclay/js/interface.js b/static/saclay/js/interface.js index 3ddf749..229624a 100644 --- a/static/saclay/js/interface.js +++ b/static/saclay/js/interface.js @@ -1,6 +1,26 @@ var msg_edit_route = "Cliquez sur la carte pour tracer le trajet. Chaque nouveau clic rajoute un nœud. Double-cliquez pour terminer le trajet.<br/>Pour modifier le trajet sélectionnez un nœud puis glissez-déposez pour le déplacer."; var msg_edit = "Cliquez sur la carte pour placer le lieu. Pour modifier ce lieu sélectionnez-le puis glissez-déposez pour le déplacer."; +var register_subactions = function(){ + $('.subactions').click(function(){ + var link = $(this).attr("data-link"); + $.ajax({url: link, + dataType: "html", + success: function (data) { + $("#map-edit").remove(); + $("#modal-edit .modal-body").html(data); + $("#modal-edit .modal-body").find("script").each(function(i) { + eval($(this).text()); + }); + }, + error: function (data) { + $('#frm-edit-marker').html("<p class='warning'>"+ + default_error_message+"</p>"); + } + }); + }); +}; + var update_editmarker = function(){ /*$("#main-map").chimere('cleanRoute'); $('.map_button').hide(); |