Skip to content

Commit

Permalink
Remove seemingly useless sb-admin code (#3566)
Browse files Browse the repository at this point in the history
It looks like this code causes the sidebar to immediately collapse on small screen sizes upon scrolling.
  • Loading branch information
supercrafter100 authored Dec 14, 2024
1 parent d4b1a7b commit 544e0c6
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions custom/panel_templates/Default/assets/js/sb-admin-2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
// @license-end

0 comments on commit 544e0c6

Please sign in to comment.