wip drop down menu
This commit is contained in:
@@ -39,12 +39,18 @@ function fill_filters(filters_div) {
|
|||||||
let content = "";
|
let content = "";
|
||||||
let keys = Object.keys(filters);
|
let keys = Object.keys(filters);
|
||||||
keys.forEach((key) => {
|
keys.forEach((key) => {
|
||||||
|
//content += `
|
||||||
|
// <div class="filter_menu">
|
||||||
|
// <input id="filter_menu_title_${key}" class="filter_menu_title" type="checkbox">
|
||||||
|
// <label for="filter_menu_title_${key}" class="filter_menu_title"><p>${key}</p></label>
|
||||||
|
// <div class="filter_menu_drop">
|
||||||
|
//`;
|
||||||
content += `
|
content += `
|
||||||
<div class="filter_menu">
|
<div class="filter_menu">
|
||||||
<div class="filter_menu_title">
|
<div class="filter_menu_title" tabindex=0>
|
||||||
<p>${key}</p>
|
<p>${key}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="filter_menu_drop">
|
<div class="filter_menu_drop" tabindex=0>
|
||||||
`;
|
`;
|
||||||
for (value of filters[key]) {
|
for (value of filters[key]) {
|
||||||
content += `
|
content += `
|
||||||
|
|||||||
@@ -4,9 +4,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ljdp_map_filters {
|
#ljdp_map_filters,
|
||||||
|
#ljdp_map_filters * {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
position: relative;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ljdp_map_filters {
|
||||||
position: relative;
|
position: relative;
|
||||||
border: 1px solid red;
|
border: 1px solid red;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -14,45 +20,74 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ljdp_map_filters .filter_menu {
|
#ljdp_map_filters .filter_menu {
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: relative;
|
|
||||||
margin: auto;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: 1px solid blue;
|
border: 1px solid blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ljdp_map_filters .filter_menu:hover .filter_menu_drop {
|
/*
|
||||||
display: flex;
|
#ljdp_map_filters .filter_menu input.filter_menu_title {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ljdp_map_filters .filter_menu label.filter_menu_title {
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid green;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
#ljdp_map_filters .filter_menu .filter_menu_title {
|
#ljdp_map_filters .filter_menu .filter_menu_title {
|
||||||
display: flex;
|
width: 100%;
|
||||||
position: relative;
|
cursor: pointer;
|
||||||
margin: auto;
|
|
||||||
width: auto;
|
|
||||||
border: 1px solid green;
|
border: 1px solid green;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ljdp_map_filters .filter_menu .filter_menu_drop {
|
#ljdp_map_filters .filter_menu .filter_menu_drop {
|
||||||
|
/*
|
||||||
display: none;
|
display: none;
|
||||||
|
*/
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 100%;
|
top: 0%;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
margin: auto;
|
margin: 0px;
|
||||||
padding: 10px 0px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
overflow-y: scroll;
|
cursor: pointer;
|
||||||
background-color: white;
|
|
||||||
border: 1px solid pink;
|
border: 1px solid pink;
|
||||||
|
/* padding-top must be sufficient to hide the menu */
|
||||||
|
padding: 100px 0px 0px 0px;
|
||||||
|
height: 0px;
|
||||||
|
background-color: transparent;
|
||||||
|
overflow: hidden;
|
||||||
|
border: none;
|
||||||
|
/*
|
||||||
|
overflow: visible;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
#ljdp_map_filters .filter_menu input.filter_menu_title:checked
|
||||||
|
~ .filter_menu_drop {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ljdp_map_filters .filter_menu .filter_menu_drop:focus {
|
||||||
|
top: 100%;
|
||||||
|
background-color: #ffffff;
|
||||||
|
overflow: scroll;
|
||||||
|
height: auto;
|
||||||
|
padding: 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ljdp_map_filters .filter_menu .filter_menu_drop p {
|
#ljdp_map_filters .filter_menu .filter_menu_drop p {
|
||||||
display: flex;
|
|
||||||
position: relative;
|
|
||||||
margin: 0px auto 0px 0px;
|
margin: 0px auto 0px 0px;
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ljdp_map_filters .filter_menu .filter_menu_drop p:hover {
|
||||||
|
background-color: #dddddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user