acp menu - accordion effect

v1.18.x
psychobunny 11 years ago
parent 660cd184f4
commit 2f6a123d32

@ -29,6 +29,15 @@
.sidebar-nav { .sidebar-nav {
margin-top: 1px; margin-top: 1px;
overflow: hidden;
.transition(.4s ease-in-out height);
height: 250px;
max-height: 100%;
cursor: pointer;
&.closed {
height: 38px;
}
.nav-header { .nav-header {
color: #fff; color: #fff;

@ -26,8 +26,16 @@ define('forum/admin/footer', ['forum/admin/settings'], function(Settings) {
$(window).on('action:ajaxify.end', function() { $(window).on('action:ajaxify.end', function() {
setupPills(); setupPills();
}); });
setupMainMenu();
}); });
function setupMainMenu() {
$('.sidebar-nav').on('click', function() {
$(this).toggleClass('closed');
});
}
function setupPills() { function setupPills() {
$('.navigation.nav-pills li').removeClass('active'); $('.navigation.nav-pills li').removeClass('active');

Loading…
Cancel
Save