Topbar top-menu href does not link (2.1.2)

Locked
ogivadon
Posts: 9
Joined: 29 Oct 2013, 19:45

19 Jul 2016, 12:50

Hi,

Modena 2.1.2 topbar top-menu href does not link to the given page while Modena 2.1.1 and previous versions do it well with the same code.
This is similar to the topic "Top Menu Point as href" except that I use the same code under different Modena versions.

How is it possible to link using Modena 2.1.2 ?

Regards: János

Code: Select all

        <ul id="top-menu">
            <li>
                <a href="logout.xhtml" class="ripplelink">
                    <i class="icon-power"></i>
                    <span class="ShowOnMobile"> Exit</span>
                </a>
            </li>
        </ul
  • Primefaces 6.0.1
    JSF 2.2.8-16
    Glassfish 4.1.1
    Java 8

iwelt
Posts: 12
Joined: 18 Mar 2013, 10:23

26 Jul 2016, 10:49

Hi,

same problem for us.

Please provide a fix as soon as possible.

Greetings,

Tom

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

26 Jul 2016, 16:22

Please remove e.preventDefault(); in layout.js;

Code: Select all

bindEvents: function() {
        ...

        //topbar
        this.topMenu.find('a').off('click.topmenu mouseenter.topmenu').on('click.topmenu', function(e) {
            var link = $(this),
            submenu = link.next('ul');
            
            if(submenu.length) {
                if(submenu.hasClass('active-menu')) {
                    submenu.removeClass('active-menu');
                    link.removeClass('active-menu');
                    $this.topMenuActive = false;
                }
                else {
                    $this.topMenu.find('> li > ul.active-menu').removeClass('active-menu').prev('a').removeClass('active-menu');
                    link.addClass('active-menu').next('ul').addClass('active-menu');
                    $this.topMenuActive = true;
                }
            }
            else {
                if($(e.target).is(':not(:input)')) {
                    $this.topMenu.find('.active-menu').removeClass('active-menu');
                    $this.topMenuActive = false;
                }
            }
            //e.preventDefault(); // PLEASE REMOVE THIS LINE
        })
        .on('mouseenter.topmenu', function() {
....

ogivadon
Posts: 9
Joined: 29 Oct 2013, 19:45

27 Jul 2016, 09:01

Thanks, it works fine.

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

27 Jul 2016, 09:07

Thanks for the update! I'll add this fix into next release.

Locked

Return to “Modena”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests