Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Every categories are open #29

Open
Apfelzimt opened this issue Jul 10, 2019 · 1 comment
Open

Every categories are open #29

Apfelzimt opened this issue Jul 10, 2019 · 1 comment

Comments

@Apfelzimt
Copy link

Hi there,

I'm having an issue with the view. It is always open, all categories show up, they are not collapsed. We have a lot of categories, so it is an enourmos long side like this. The classes and everything seems to be correct: https://snag.gy/BGbw1p.jpg
"active" will be added and if I click on the very first "+" it closes everything else and looks fine, but in the initial everything is open.

Could somebody help what is the problem?

Thanks

@losttheplot
Copy link

Make the following changes to module.less to close the menu on load and tidy it up slightly:

line 8: display: block;
line 32: padding-top: 15px;
line 34: display: none;

If you would like the menu to open up to the active page on first load, change line 32 of sidebar.phtml to:

   require(['jquery', 'sidebarmodule'], function($) {
        $('.is-active').parents('ul').css('display','block');
        $('.is-active').parents('li').addClass('active');
        $('.is-active').parents('li').find('> span i').removeClass('fa-plus').addClass('fa-minus');
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants