PopUp-Menu of Promotion Page doesn't appear

Locked
71m024
Posts: 4
Joined: 11 Nov 2015, 19:56

09 Jul 2016, 19:12

On the normal empty-page.xhtml the mobile-menu is working like it should. But on the promotion-page.xhtml the PopUp menu doesn't appear.
When i inspect the page, there isn't any Event-Listener attached to the <a> element of the menu-button.
Am i the only one with this Problem or is it a known issue?

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

11 Jul 2016, 16:36

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

Code: Select all

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

</h:head>
- please create promotionpage.js in webapp/resources/venture-layout/js/;

Code: Select all

$(document).ready(function() {
    var menuWrapper = $('#layout-menu-cover'),
    menuScrollContent = $('#layout-menu-cover-scroll-content'),
    menu = $('#layout-menu'),
    menuPopupButton = $('#mobile-menu-btn'),
    layoutMenuClick = false;
    
    menuWrapper.addClass('nano');
    menuScrollContent.addClass('nano-content');
    $(".nano").nanoScroller();
    setTimeout(function(){menuWrapper.addClass("Animated03");},500);
    
    // 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) {
            var activeMenuParent = menu.children('li.active-menu-parent');
            menuWrapper.removeClass('active');
            activeMenuParent.children('a').removeClass('active-menu');
            activeMenuParent.removeClass('active-menu-parent').children('ul').removeClass('active-menu');
            menuPopupButton.removeClass('active');
        }

        layoutMenuClick = false;
    });
});

71m024
Posts: 4
Joined: 11 Nov 2015, 19:56

17 Jul 2016, 18:20

Thank you aragorn, this works for me :)

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

21 Jul 2016, 14:56

You're welcome!

Locked

Return to “Venture”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests