Skip to content

Commit

Permalink
caret for filters #80
Browse files Browse the repository at this point in the history
  • Loading branch information
mondoboia committed Nov 8, 2022
1 parent bb07f4a commit 2546727
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,10 @@ hr {
color: #fff;
}

#map-ham {
color: #fff;
}

/**********************/
/* TEXT EDITOR */
/**********************/
Expand Down
7 changes: 7 additions & 0 deletions static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,8 @@ function showFilters(count) {
}
};

function collapseFilter(panel_id) { $("#" + panel_id + " p").toggle(); }

function test() {
console.log(document.querySelector('[role="tab"]'));
}
Expand Down Expand Up @@ -1514,7 +1516,11 @@ function createPanel(filter_id, filter_title, labels_values_count, checked_filte
var groupCheckboxes = document.createElement("section");
groupCheckboxes.id = filter_id + "_panel";
var group_title = document.createElement("h3");
var filterCaret = document.createElement('span');
filterCaret.className = 'caret';
filterCaret.setAttribute('onclick', 'collapseFilter("' + filter_id + '_panel")');
group_title.append(document.createTextNode(filter_title));
group_title.append(filterCaret);
groupCheckboxes.appendChild(group_title);

// create list of checkboxes
Expand Down Expand Up @@ -1556,6 +1562,7 @@ function tabMenu(tabHamburger) {
if (tabHamburger === null) {
let iTabElement = document.createElement('i');
iTabElement.className = 'fa fa-bars';
iTabElement.id = 'map-ham'
let aTab1 = document.querySelector('[role="tab"]');
aTab1.id = 'tab-hamburger';
aTab1.appendChild(iTabElement);
Expand Down

0 comments on commit 2546727

Please sign in to comment.