Hi,
Is there a possibility that the Overlay Menu on the left side will not open if you redirect to a new page?
So the menu in overlay mode will only open, if the user click on one of the icons from the menu.
I don´t like it that I will navigate from page to page, that the menu will always open.
How can this be changed?
Thanks
Overlay Menu not open automatically?
-
- Posts: 5229
- Joined: 29 Jun 2013, 12:38
Hi,
Please change the following method in layout.js
Best Regards,
Please change the following method in layout.js
Code: Select all
PrimeFaces.widget.Morpheus = PrimeFaces.widget.BaseWidget.extend({
....
restoreTabState: function() { // Please use this for your issue
this.expandedTab = $.cookie('morpheus_expandedtab');
if (this.expandedTab) {
var tab = $("#" + this.expandedTab.replace(/:/g, "\\:"));
this.fireTabContentLoadEvent(tab);
tab.addClass('active-item');
//this.openMenu(tab.children('a'), true);
}
else if(this.cfg.activeIndex) {
var active = this.tabMenuNavItems.eq(parseInt(this.cfg.activeIndex));
this.fireTabContentLoadEvent(active);
active.addClass('active-item');
//this.openMenu(active.children('a'), true);
}
}
}
Github Profile: https://github.com/mertsincan
-
- Posts: 5229
- Joined: 29 Jun 2013, 12:38
Please try;
Code: Select all
PrimeFaces.widget.Morpheus = PrimeFaces.widget.BaseWidget.extend({
....
restoreTabState: function() { // Please use this for your issue
this.expandedTab = $.cookie('morpheus_expandedtab');
if (this.expandedTab) {
var tab = $("#" + this.expandedTab.replace(/:/g, "\\:"));
this.fireTabContentLoadEvent(tab);
this.isOverlayMenu() ? tab.addClass('active-item') : this.openMenu(tab.children('a'), true);
}
else if(this.cfg.activeIndex) {
var active = this.tabMenuNavItems.eq(parseInt(this.cfg.activeIndex));
this.fireTabContentLoadEvent(active);
this.isOverlayMenu() ? active.addClass('active-item') : this.openMenu(active.children('a'), true);
}
}
}
Github Profile: https://github.com/mertsincan
-
- Posts: 5229
- Joined: 29 Jun 2013, 12:38
Glad to hear, thanks a lot for the update!
Best Regards,
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest