From c007eb0708f04b77a8a1246a8005d20ac1985009 Mon Sep 17 00:00:00 2001 From: Supercrafter100 <58982133+supercrafter100@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:41:37 +0100 Subject: [PATCH] Remove seemingly useless sb-admin code It looks like this code causes the sidebar to immediately collapse on small screen sizes upon scrolling. --- .../Default/assets/js/sb-admin-2.js | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/custom/panel_templates/Default/assets/js/sb-admin-2.js b/custom/panel_templates/Default/assets/js/sb-admin-2.js index 369d80639a..9d80204bdf 100644 --- a/custom/panel_templates/Default/assets/js/sb-admin-2.js +++ b/custom/panel_templates/Default/assets/js/sb-admin-2.js @@ -7,20 +7,6 @@ $('[data-toggle="tooltip"]').tooltip({ trigger: 'hover' - }) +}) - !(function (s) { - "use strict"; - s(window).resize(function () { - s(window).width() < 768 && s(".sidebar .collapse").collapse("hide"), - s(window).width() < 480 && !s(".sidebar").hasClass("toggled") && (s("body").addClass("sidebar-toggled"), s(".sidebar").addClass("toggled"), s(".sidebar .collapse").collapse("hide")); - }), - s("body.fixed-nav .sidebar").on("mousewheel DOMMouseScroll wheel", function (e) { - if (768 < s(window).width()) { - var o = e.originalEvent, - l = o.wheelDelta || -o.detail; - (this.scrollTop += 30 * (l < 0 ? 1 : -1)), e.preventDefault(); - } - }); - })(jQuery); -// @license-end \ No newline at end of file +// @license-end