Page 1 of 1

topbar.xhtml profile anchor href attribute not working

Posted: 30 Apr 2018, 22:51
by bikrambarua

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

Re: topbar.xhtml profile anchor href attribute not working

Posted: 02 May 2018, 08:04
by kubrasulukan
We'll check and get back to you.

Best Regards,

Re: topbar.xhtml profile anchor href attribute not working

Posted: 13 Aug 2018, 09:24
by mert.sincan
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();
        });

Re: topbar.xhtml profile anchor href attribute not working

Posted: 07 Sep 2018, 08:27
by mert.sincan
Thanks ;)