Issue on layout.js after updating from Olympos 1.1.1 to1.1.2

Locked
cloud4288
Posts: 24
Joined: 16 Jun 2011, 11:10

07 Jul 2016, 16:15

Hi everyone,

I've updated my olympos theme from 1.1.1 to 1.1.2 as suggested that there are improvements for PrimeFaces 6.0.

After updating all my assets and theme jar, the menu on the promotion page seems to not work. If I revert back to the previous layout.js it seems to work. Other menus seems to be not affected.

Did anyone encounter this after upgrading?

Regards,
Philip

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

11 Jul 2016, 16:20

Hi Philip,

Thanks for this issue! I'll fix it for next release. You can use the following changes;
in promotion-page.xhtml

Code: Select all

<h:head>
        ....
        
        <h:outputScript name="js/maps.js" library="olympos-layout" />
        <h:outputScript name="js/nanoscroller.js" library="olympos-layout" />
        <h:outputScript name="js/promotionpage.js" library="olympos-layout" /> <!-- instead of layout.js -->
</h:head>

- please create promotionpage.js in webapp/resources/olympos-layout/js/;

Code: Select all

$(document).ready(function() {
    var menuWrapper = $('#layout-menu-cover'),
    menuPopupButton = $('#mobile-menu-btn'),
    layoutTabmenu = $('#layout-tab-menu'),
    layoutSubmenus = menuWrapper.find('.layout-tab-submenu'),
    layoutMenuClick = false;

    $(".nano").nanoScroller({flash: true});

    // open layout tab menu sub menus
    layoutTabmenu.find('a').on('click', function () {
        layoutTabmenu.find('li a').removeClass('active');
        $(this).addClass('active');
        layoutSubmenus.removeClass('active');
        $('#' + String($(this).attr('rel'))).addClass('active');
    });

    // show and hide popup main menu when click a menu button
    menuPopupButton.off('click.popupMenubutton').on('click.popupMenubutton', function(e){
        layoutMenuClick = true;

        if(menuWrapper.hasClass('active')) {
            $(this).removeClass('active');
            menuWrapper.removeClass('active');
        }
        else {
            $(this).addClass('active');
            menuWrapper.addClass('active');
        }
        e.preventDefault();
    });

    menuWrapper.on('click', function() {
        layoutMenuClick = true;
    });

    this.clickNS = 'click.' + this.id;
    $(document.body).off(this.clickNS).on(this.clickNS, function (e) {
        if(!layoutMenuClick) {
            menuPopupButton.removeClass('active');
            menuWrapper.removeClass('active');
        }

        layoutMenuClick = false;
    });
});

cloud4288
Posts: 24
Joined: 16 Jun 2011, 11:10

14 Jul 2016, 15:51

Thank you very much it works now.

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

17 Jul 2016, 14:38

You're welcome! I'll add this fix into next release.

Locked

Return to “Olympos”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests