Sha256: 67003540aca3c40845ab49f1cf7f536563cc0d5ed2266828f0962b03c38afcd3
Contents?: true
Size: 667 Bytes
Versions: 31
Compression:
Stored size: 667 Bytes
Contents
Spree.ready(function() { var navHeight = function() { return $('.admin-nav-header').outerHeight() + $('.admin-nav-menu').outerHeight() + $('.admin-nav-footer').outerHeight(); }; var initStickyNavbar = function() { $(".admin-nav-sticky, .admin-nav").stick_in_parent(); }; var detachStickyNavbar = function() { $(".admin-nav-sticky, .admin-nav").trigger("sticky_kit:detach"); }; var checkSideBarFit = function() { var fits = navHeight() < $(window).height(); $('.admin-nav').toggleClass('fits', fits); fits ? initStickyNavbar() : detachStickyNavbar(); }; checkSideBarFit(); $(window).on('resize', checkSideBarFit); });
Version data entries
31 entries across 31 versions & 1 rubygems