diff options
author | QuentinAndre <quentin.andre@imt-atlantique.net> | 2021-07-26 20:30:30 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-09-01 12:36:46 +0200 |
commit | dccb0b5be17050731b352e8a7e422f31426cf884 (patch) | |
tree | 41bc4f6d3d87aab95fc1d4e921b26f5824d105be /ishtar_common/templates/ishtar/blocks/sheet_simple_map.html | |
parent | 5f1ccd67fbeb5fc1fe69765b639ce6bddb70e988 (diff) | |
download | Ishtar-dccb0b5be17050731b352e8a7e422f31426cf884.tar.bz2 Ishtar-dccb0b5be17050731b352e8a7e422f31426cf884.zip |
all in jquery and get_geo_items fixes
Diffstat (limited to 'ishtar_common/templates/ishtar/blocks/sheet_simple_map.html')
-rw-r--r-- | ishtar_common/templates/ishtar/blocks/sheet_simple_map.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/sheet_simple_map.html b/ishtar_common/templates/ishtar/blocks/sheet_simple_map.html index 2c9d49be2..b4e669a70 100644 --- a/ishtar_common/templates/ishtar/blocks/sheet_simple_map.html +++ b/ishtar_common/templates/ishtar/blocks/sheet_simple_map.html @@ -38,20 +38,20 @@ var display_geo_items = function(disp, get_polygons) { } var geo_items_displayed_once = false; -var disp = $("#display-geo-items")[0]; -var get_polygons = $("#get-polygons")[0]; -disp.addEventListener('change', (event) => { +var disp = $("#display-geo-items"); +var get_polygons = $("#get-polygons"); +disp.change( function () { if (geo_items_displayed_once) { disp_map(); } - if (disp.value !== "") { - display_geo_items(disp.value, get_polygons.value); + if (disp.val() !== "") { + display_geo_items(disp.val(), get_polygons.val()); geo_items_displayed_once = true; } }) -get_polygons.addEventListener('change', (event) => { +get_polygons.change( function () { disp_map(); - display_geo_items(disp.value, get_polygons.value); + display_geo_items(disp.val(), get_polygons.val()); }) {% endif %} </script> |