From 281e00d427ec12a5b100e3eb0447ec9db049d4f2 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Wed, 10 Mar 2021 16:44:06 +0200 Subject: [PATCH] Automatically load rest of alphabetical index on vocabulary home page. Fixes #1108 --- resource/js/docready.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/resource/js/docready.js b/resource/js/docready.js index 2300065e3..a8c3442ef 100644 --- a/resource/js/docready.js +++ b/resource/js/docready.js @@ -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) {