Modena 2.1.3 issue with topbar

UI Components for JSF
Post Reply
grburgos
Posts: 180
Joined: 30 Sep 2010, 00:45

21 Jul 2017, 21:33

I just upgraded my code to use the latest version of Modena. I found out that the topbar is not working properly.

If I place this code or just change the # href reference in the Modena demo project to a page link. The link will not redirect when clicked. There is an extra event placed on it that prevents this.

Code: Select all

<ul id="top-menu">
            <li>
                <a href="/b/cart.xhtml"><i class="icon-shopping_cart Fs30 DispInlBlock Fright HoverEffect">                        
                        <h:outputText class="CartText White Fright" value="#{cartController.cart.itemCount()}"/>
                    </i>    
                    <span class="ShowOnMobile">shoppingCart</span>
                </a>
            </li>
            <li>
                <a class="ripplelink"><i class="icon-cog"></i> <span class="ShowOnMobile">settings</span></a>
                <ul>
                    <li><a href="/s/lang.xhtml"><i class="icon-flag2"></i>languageSettings</a></li>
                    <li><a href="/s/chg.xhtml"><i class="icon-verified_user"></i>securitySettings</a></li>
                    <li><a href="/s/user-settings.xhtml"><i class="icon-assignment_ind"></i>userSettings</a></li>
                </ul>
            </li>
            <li>
                <a href="/login.xhtml" class="active-menu"><i class="icon-vpn_key Fs30 DispBlock"></i> <span class="ShowOnMobile">signout</span></a>       
            </li>
        </ul>
Any help is appreciated.
Netbeans 14, Apache Tomcat 9, JDK 11, PrimeFaces 11

grburgos
Posts: 180
Joined: 30 Sep 2010, 00:45

25 Jul 2017, 04:40

Here is the fix:
Need to add "a.ripplelink" instead of "a". Line 112 in the layout.js inside of the modena-layout folder.

Code: Select all

 this.topMenu.find('a.ripplelink').off('click.topmenu mouseenter.topmenu').on('click.topmenu', function(e) {
Netbeans 14, Apache Tomcat 9, JDK 11, PrimeFaces 11

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests