summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/blocks/sheet_simple_map.html
diff options
context:
space:
mode:
authorQuentinAndre <quentin.andre@imt-atlantique.net>2021-07-26 20:30:30 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-07-08 09:58:48 +0200
commit6a8dc71f4381c5b6b78dc23105ec5cdc3dc64dfb (patch)
treedf71647e2284f4dd834b98044046d6133c898b61 /ishtar_common/templates/ishtar/blocks/sheet_simple_map.html
parent499c5e4ee6cb3a47526798de55a5c00ca468d039 (diff)
downloadIshtar-6a8dc71f4381c5b6b78dc23105ec5cdc3dc64dfb.tar.bz2
Ishtar-6a8dc71f4381c5b6b78dc23105ec5cdc3dc64dfb.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.html14
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>