Skip to content

Commit

Permalink
Merge pull request #1134 from NatLibFi/issue1108-fix-alphabetical-scr…
Browse files Browse the repository at this point in the history
…olling

Automatically load rest of alphabetical index on vocabulary home page
  • Loading branch information
osma authored Mar 11, 2021
2 parents a201ace + 281e00d commit 78dc205
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions resource/js/docready.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,14 @@ $(function() { // DOCUMENT READY
});
return removeThese.join(' ');
});
if (settings.url.indexOf('index/') !== -1) {
$(".sidebar-grey").mCustomScrollbar({
alwaysShowScrollbar: 1,
scrollInertia: 0,
mouseWheel:{ preventDefault: true, scrollAmount: 105 },
snapAmount: 15,
snapOffset: 1,
callbacks: { alwaysTriggerOffsets: false, onTotalScroll: alphaWaypointCallback, onTotalScrollOffset: 300 }
});
}
$(".sidebar-grey-alpha").mCustomScrollbar({
alwaysShowScrollbar: 1,
scrollInertia: 0,
mouseWheel:{ preventDefault: true, scrollAmount: 105 },
snapAmount: 15,
snapOffset: 1,
callbacks: { alwaysTriggerOffsets: false, onTotalScroll: alphaWaypointCallback, onTotalScrollOffset: 300 }
});
}
// Sidenav actions only happen when doing other queries than the autocomplete.
if (settings.url.indexOf('index') !== -1 || settings.url.indexOf('groups') !== -1) {
Expand Down

0 comments on commit 78dc205

Please sign in to comment.