summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2015-02-09 02:30:33 +0200
committerLV-426 <lv-426@taproot.org.il>2015-02-09 02:57:02 +0200
commitd34e320a4eb3bda06a2dbdb9101df9af407cb53e (patch)
tree7bf45b9810ad40a8f45091533ac472e05d7cc7e6
parent5eac4f25ce5b9be1a60cc98105929b33f4571989 (diff)
graph_view: adjust to new filter menu id's, use .toggle() for menu hiding
-rw-r--r--src/client/view/graph_view.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js
index 9f9bcc67..2682006a 100644
--- a/src/client/view/graph_view.js
+++ b/src/client/view/graph_view.js
@@ -105,7 +105,7 @@ function GraphView(spec) {
"missing spec variable");
function read_checkboxes() {
- var checkboxes = $('.dropdown-item label input').map(
+ var checkboxes = $('#menu__type-filter label input').map(
function (i, checkbox){
return checkbox.checked;
}
@@ -121,14 +121,13 @@ function GraphView(spec) {
function redraw__set_on_checkbox_change()
{
$(function () {
- var checkboxes = $('.dropdown-item label input').on('click', function (_) {
+ var checkboxes = $('#menu__type-filter li').on('click', function (e) {
read_checkboxes();
console.log(filter_states);
update_view(true);
});
- $('.dropdown-item.dropdown-menu-heading').on('click', function (_) {
- var hidden = $('.dropdown-item.dropdown-item-type[style="display:none"]').length > 0;
- $('.dropdown-item.dropdown-item-type').attr('style', 'display:' + (hidden ? '' : 'none'));
+ $('#btn_filter').on('click', function (e) {
+ $('#menu__type-filter').toggle();
});
});
}