topbar.xhtml profile anchor href attribute not working

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
bikrambarua
Posts: 15
Joined: 15 May 2013, 19:00

30 Apr 2018, 22:51

Code: Select all

<ul id="topbar-profile-menu">
                <li role="menuitem">
                    <a href="https://www.primefaces.org/">
                        <i class="topbar-icon fa fa-fw fa-paint-brush"></i>
                        <span class="topbar-item-name">Link</span>
                    </a>
                 </li>
            </ul>
The href attribute for list item is not working in topbar.xhtml under profile. Please try the attached code and let me know what's wrong with the code.
Its working for ultima and other templates

kubrasulukan
Posts: 87
Joined: 10 Jan 2018, 16:04

02 May 2018, 08:04

We'll check and get back to you.

Best Regards,

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

13 Aug 2018, 09:24

Sorry for the delayed response. Fixed for next version. Please make the following changes in layout.js for now;

Code: Select all

//line 153
     this.profileMenuLinks.off('click').on('click', function (e) {
            var link = $(this);
            var item = link.parent();
            var submenu = item.children('ul');

            if(item.hasClass('menuitem-active')) {
                item.removeClass('menuitem-active');
                submenu.slideUp();
            }
            else {
                item.siblings('.menuitem-active').removeClass('menuitem-active').children('ul').slideUp();
                item.addClass('menuitem-active');
                submenu.slideDown();
            }
            
            /********************** ADD THESE LINES *********************/
                  var href = link.attr('href');
                  if(href && href !== '#') {
                      window.location.href = href;
                  }
            /***************************************************************/

            e.preventDefault();
        });

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

07 Sep 2018, 08:27

Thanks ;)

Post Reply

Return to “Harmony - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests