Switching from Switching from Static menu to Slim menu on open and close of the side bar

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
snehakarthik
Posts: 5
Joined: 14 Jan 2019, 13:00

21 Jan 2019, 09:59

Dear Team,

Hope you are doing good.

I am using babylon layout in my application.
I am trying to implement a functionality where i need to show slim menu on closing the side bar(1.e onclick of '3 bar icon' on the top) and static menu when the side bar is opened.

Kindly suggest me the optimal way to do it.

Regards,
Sneha

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

23 Jan 2019, 14:44

Hi,

Please make the following changes in layout.js

Code: Select all

//line 90
              if ($this.isStaticMenu() || ($this.wrapper.hasClass('layout-slim') && $this.wrapper.hasClass('layout-static-inactive'))) {
                    $this.wrapper.toggleClass('layout-static-inactive');
                    $this.wrapper.toggleClass('layout-slim layout-static');
                    $this.saveStaticMenuState();
                }
                else {
                    $this.wrapper.toggleClass('layout-overlay-active');
                }
                
// line 435. please remove the following codes;
       var staticMenuCookie = $.cookie('babylon_static_menu_inactive');
        if (staticMenuCookie) {
            this.wrapper.addClass('layout-static-inactive layout-static-inactive-restore');
        }
And

Please add this css;

Code: Select all

<style type="text/css">
@media screen and (min-width: 897px) {
    .layout-wrapper.layout-slim.layout-static-inactive .layout-topbar .layout-menu-button {
        display: block;
    }
}
</style>
Best Regards,

Post Reply

Return to “Babylon - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests