feat: replacing jquery.scrollbar by perfect-scrollbar

This commit is contained in:
Leclerc Gwendal 2016-03-25 11:53:03 +01:00
parent fb77b7e737
commit 6686e925c0
9 changed files with 48 additions and 186 deletions
static/js

View file

@ -27,6 +27,7 @@ function getScrollBarWidth() {
function setMenuHeight() {
$('#sidebar .highlightable').height($('#sidebar').innerHeight() - $('#header-wrapper').height() - 40);
$('#sidebar .highlightable').perfectScrollbar('update');
}
function fallbackMessage(action) {
@ -83,7 +84,7 @@ $(window).resize(function() {
jQuery(document).ready(function() {
var sidebarStatus = searchStatus = 'open';
$('#sidebar .highlightable').perfectScrollbar();
// set the menu height
setMenuHeight();
@ -94,8 +95,6 @@ jQuery(document).ready(function() {
return false;
});
jQuery('.scrollbar-inner').scrollbar();
jQuery('[data-sidebar-toggle]').on('click', function() {
jQuery(document.body).toggleClass('sidebar-hidden');
sidebarStatus = (jQuery(document.body).hasClass('sidebar-hidden') ? 'closed' : 'open');