From db07f1e4cfc0dc5c45fa0e5dcfc546057cb7dc2c Mon Sep 17 00:00:00 2001 From: Ere Maijala <ere.maijala@helsinki.fi> Date: Wed, 28 Sep 2016 16:42:03 +0300 Subject: [PATCH] Fixed facet collapse state handling to work with hierarchical facets too. --- themes/bootstrap3/js/common.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/bootstrap3/js/common.js b/themes/bootstrap3/js/common.js index 80dcab03b6c..8ac5b6864e5 100644 --- a/themes/bootstrap3/js/common.js +++ b/themes/bootstrap3/js/common.js @@ -307,10 +307,10 @@ function setupFacets() { var storedItem = sessionStorage.getItem('sidefacet-' + source + item.id); if (storedItem) { item.className = storedItem; - if (item.className.indexOf('in') < 0) { - $(item).siblings('.title').addClass('collapsed'); + if ($(item).hasClass('in')) { + $(item).collapse('show'); } else { - $(item).siblings('.title').removeClass('collapsed'); + $(item).collapse('hide'); } } }); -- GitLab