diff --git a/README.md b/README.md index 14eea01..7d408fc 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ - [/] dans categories, transformer fleches en "autres" - [/] effacer les fenetres, au moins sur le bouton effacer, ou sur mouvement - [/] zoom sur cluster problem +- [ ] transform names without space - [ ] change appearance of filter according to other filters - [ ] deal with error double event irl and online diff --git a/srcs/plugins/map_prof/scripts/mp_filter_events.js b/srcs/plugins/map_prof/scripts/mp_filter_events.js index c513a65..e0deaa0 100644 --- a/srcs/plugins/map_prof/scripts/mp_filter_events.js +++ b/srcs/plugins/map_prof/scripts/mp_filter_events.js @@ -115,6 +115,21 @@ function redraw_clusters(indexes) { g_marker_cluster.render(); } +/* + should iterate through all dom elements with class "menu_items" + and invert (if exist, suppress, else create) the class construct like this : + disabled_by_menu-name + where menu-name is not the name of the menu that contains the item, + but the name of the menu within wich the click provide. exemple : + - you click on menu-item:"france" in menu:"country" + - it disable menu-item:"conference-table-ronde" in menu:"category" + - by adding class "disabled_by_country" + + - and if you click again on menu-item:"france" in menu:"country" + - it will remove class "disabled_by_country" + - if it's the last class containing "disabled_by_" it will be re-enabled + see css attribute selectors : https://www.w3schools.com/css/css_attribute_selectors.asp +*/ function disable_menus(menu) { console.log("menu:"); console.log(menu); @@ -142,8 +157,6 @@ function filter_show_only(element, menu_name) { if (menu_index != "menu_name") indexes = menu.indexes; - disable_menus(menu); - add = false; reverse = false; if (element.type === "checkbox") { @@ -151,6 +164,8 @@ function filter_show_only(element, menu_name) { add = true; } + disable_menus(menu); + let index_array = filter_selection_indexes(menu_name, indexes, reverse, add); redraw_clusters(index_array);