I am using a pv:menu in the toolbar of my application.
How can I highlight the toolbar menuitem corresponding to a page, when this page has not been loaded as the result of clicking on that menuitem.
My problem is that I want to show a page after login but the highlight always is on the last clicked menuitem. Even the highlighted menuitem is remembered between server runs.
Thank you in advance.
Jose M Beleta
How to force the highlight of a concrete pv:menu menuitem
I forgot to say that this behavior shows up in your own demo. Enter Venture Live Preview select Documentation and close the tab. Then enter Live Preview again, the Documentation menuiten is still highlighted but your are looking at Dashboard not Documentation.
Best regards,
Jose M Beleta
Best regards,
Jose M Beleta
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Thanks! I'll check and get back to you.
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Please add the following line into layout.js on new venture version;
I'll add this fix to next release.
Code: Select all
...
bindTopbarMenuEvents: function() {
...
this.clickNS = 'click.' + this.id;
$(document.body).off(this.clickNS).on(this.clickNS, function (e) {
if(!$this.layoutMenuClick) {
var activeMenuParent = $this.menu.children('li.active-menu-parent');
if($this.isPopupMenu()) {
$this.menuWrapper.removeClass('active');
activeMenuParent.children('a').removeClass('active-menu');
}
activeMenuParent.removeClass('active-menu-parent').children('ul').removeClass('active-menu');
$this.menuPopupButton.removeClass('active');
$this.menubarActive = false;
/************* ADDED THIS LINE **************/
if(!$this.isPopupMenu()) {
$this.clearMenuState();
}
/****************************************/
}
....
});
},
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 9 guests