diff options
Diffstat (limited to 'theme/javascript/core/sidebar.js')
-rwxr-xr-x | theme/javascript/core/sidebar.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/theme/javascript/core/sidebar.js b/theme/javascript/core/sidebar.js index 0d09b58..828dc73 100755 --- a/theme/javascript/core/sidebar.js +++ b/theme/javascript/core/sidebar.js @@ -1,11 +1,10 @@ define([ + "jQuery", "lodash", "utils/storage", "utils/platform", "core/state" -], function(_, storage, platform, state) { - var $summary = state.$book.find(".book-summary"); - +], function($, _, storage, platform, state) { // Toggle sidebar with or withour animation var toggleSidebar = function(_state, animation) { if (state != null && isOpen() == _state) return; @@ -38,6 +37,8 @@ define([ // Filter summary with a list of path var filterSummary = function(paths) { + var $summary = $(".book-summary"); + $summary.find("li").each(function() { var path = $(this).data("path"); var st = paths == null || _.contains(paths, path); @@ -48,7 +49,6 @@ define([ }; return { - $el: $summary, init: init, toggle: toggleSidebar, filter: filterSummary |