From: soufiane Date: Mon, 15 Apr 2024 15:08:10 +0000 (+0200) Subject: wait #6854 fix git conflits X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=2e9f6242ae5710faabcf7869e4f2c3671e87efa5;p=fluidbook-toolbox.git wait #6854 fix git conflits --- diff --git a/public/packages/fluidbook/toolbox/js/bundle.js b/public/packages/fluidbook/toolbox/js/bundle.js index ca0146573..1ebfae6e4 100644 --- a/public/packages/fluidbook/toolbox/js/bundle.js +++ b/public/packages/fluidbook/toolbox/js/bundle.js @@ -52,6 +52,28 @@ $(function () { } }); }); + + + if($('.editview').length > 0) { + const section = $(".card-body") + + $(window).on("scroll", function (e) { + var top = window.scrollY + const nav = [] + section.each(function () { + if (top >= $(this).offset().top - 100) { + let data = $(this).children("[data-name]").data('name') + nav.push(data) + } + }) + + let current = nav.slice(-1) + + $("a:not([href='#s_" + current + "'])").removeClass("active") + $("a[href='#s_" + current + "']").addClass("active") + }) + } + }); function reloadPagePortions(callback) { diff --git a/resources/views/tools/sidebar.blade.php b/resources/views/tools/sidebar.blade.php index 7a1082d93..d7afdcff5 100644 --- a/resources/views/tools/sidebar.blade.php +++ b/resources/views/tools/sidebar.blade.php @@ -1,71 +1,71 @@ {{-- __('!! Outils') --}}