wip disable filters strategy is written in comments
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
- [/] dans categories, transformer fleches en "autres"
|
- [/] dans categories, transformer fleches en "autres"
|
||||||
- [/] effacer les fenetres, au moins sur le bouton effacer, ou sur mouvement
|
- [/] effacer les fenetres, au moins sur le bouton effacer, ou sur mouvement
|
||||||
- [/] zoom sur cluster problem
|
- [/] zoom sur cluster problem
|
||||||
|
- [ ] transform names without space
|
||||||
- [ ] change appearance of filter according to other filters
|
- [ ] change appearance of filter according to other filters
|
||||||
- [ ] deal with error double event irl and online
|
- [ ] deal with error double event irl and online
|
||||||
|
|
||||||
|
|||||||
@@ -115,6 +115,21 @@ function redraw_clusters(indexes) {
|
|||||||
g_marker_cluster.render();
|
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) {
|
function disable_menus(menu) {
|
||||||
console.log("menu:");
|
console.log("menu:");
|
||||||
console.log(menu);
|
console.log(menu);
|
||||||
@@ -142,8 +157,6 @@ function filter_show_only(element, menu_name) {
|
|||||||
if (menu_index != "menu_name")
|
if (menu_index != "menu_name")
|
||||||
indexes = menu.indexes;
|
indexes = menu.indexes;
|
||||||
|
|
||||||
disable_menus(menu);
|
|
||||||
|
|
||||||
add = false;
|
add = false;
|
||||||
reverse = false;
|
reverse = false;
|
||||||
if (element.type === "checkbox") {
|
if (element.type === "checkbox") {
|
||||||
@@ -151,6 +164,8 @@ function filter_show_only(element, menu_name) {
|
|||||||
add = true;
|
add = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disable_menus(menu);
|
||||||
|
|
||||||
let index_array = filter_selection_indexes(menu_name, indexes, reverse, add);
|
let index_array = filter_selection_indexes(menu_name, indexes, reverse, add);
|
||||||
|
|
||||||
redraw_clusters(index_array);
|
redraw_clusters(index_array);
|
||||||
|
|||||||
Reference in New Issue
Block a user