The Prestige layout theme does not update currently selected tab.
1) When initially opening prestige layout live demo, the following tabs show as follows:
[*DASHBOARD][COMPONENTS][PAGES][HIERARCHY][DOCUMENTATION][BUY NOW]
The dashboard tab correctly shows as selected/active.
2) Now, open prestige layout live demo on another browser tab and select the documentation tab
[DASHBOARD][COMPONENTS][PAGES][HIERARCHY][*DOCUMENTATION][BUY NOW]
Now, the documentation tab correctly shows as selected/active.
3) Go back to first browser tab and refresh.
[DASHBOARD][COMPONENTS][PAGES][HIERARCHY][*DOCUMENTATION][BUY NOW]
Tabs continue showing the documentation tab as selected/active, but with the dashboard contents inside.
Tested it on latest version of chrome, internet explorer and edge.
Incorrectly selecting/activating menu tab
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Thanks a lot for the feedback. We are using cookie to store selected menuitem. Maybe, we can add different options for this work. Exp; local-storage, session-storage and cookie
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Please try;
Best Regards,
Code: Select all
<script type="text/javascript">
//<![CDATA[
/**
* PrimeFaces Prestige Layout
*/
PrimeFaces.widget.Prestige = PrimeFaces.widget.Prestige.extend({
saveMenuState: function() {
sessionStorage.setItem('prestige_expandeditems', this.expandedMenuitems.join(','));
//$.cookie('paradise_expandeditems', this.expandedMenuitems.join(','), {path: '/'});
},
saveScrollState: function (value) {
sessionStorage.setItem('prestige_scroll', value);
//$.cookie('prestige_scroll', value, { path: '/' });
},
clearMenuState: function() {
sessionStorage.removeItem('prestige_expandeditems');
sessionStorage.removeItem('prestige_scroll');
//$.removeCookie('prestige_expandeditems', {path: '/'});
//$.removeCookie('prestige_scroll', { path:'/' });
},
restoreMenuState: function() {
//var menucookie = $.cookie('paradise_expandeditems');
var menucookie = sessionStorage.getItem('prestige_expandeditems');
if (menucookie) {
var isHorizontal = this.wrapper.hasClass('layout-menu-horizontal');
this.expandedMenuitems = menucookie.split(',');
for (var i = 0; i < this.expandedMenuitems.length; i++) {
var id = this.expandedMenuitems[i];
if (id) {
var menuitem = $("#" + this.expandedMenuitems[i].replace(/:/g, "\\:"));
menuitem.addClass('active-menuitem');
var submenu = menuitem.children('ul');
if (submenu.length) {
var isRootMenuitem = menuitem.parent().is(this.jq);
if (isHorizontal && isRootMenuitem) {
submenu.hide();
}
else {
submenu.show();
}
}
}
}
}
else if (this.isHorizontalMenu()) {
var firstRootItem = this.rootMenuitems.eq(0);
firstRootItem.addClass('active-menuitem');
this.addMenuitem(firstRootItem.attr('id'));
}
}
});
//]]>
</script>
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 6 guests