From 2e9f6242ae5710faabcf7869e4f2c3671e87efa5 Mon Sep 17 00:00:00 2001 From: soufiane Date: Mon, 15 Apr 2024 17:08:10 +0200 Subject: [PATCH] wait #6854 fix git conflits --- .../packages/fluidbook/toolbox/js/bundle.js | 22 ++++++++++ resources/views/tools/sidebar.blade.php | 42 +++++++++---------- .../backpack/base/layouts/top_left.blade.php | 4 +- 3 files changed, 46 insertions(+), 22 deletions(-) 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') --}}