test
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • brunus Friend
    #149051

    Hi all.

    I’m switching my 1.1 template to 1.2 and I would enjoy to be able to tune the fade-out time (or slide-out) for mega-menu.

    It’s very nice to see the menus slide-in or fade-in but quite annoying to wait for the fade-out or slide-out. Then I think it could be nice to have a parameter to tune this also. Having a fade-in or slide-in duration, like actually, but also a fade-out or slade-out.

    I’m digging the code to find a way to tune this harcoded but until now I did not find the variable to tweek.

    EDIT : found it in libs/menu/mega.class.php

    var megamenu = new jaMegaMenuMoo ('ja-mainnav', {
    'bgopacity': 0,
    'delayHide': 200,
    'slide': <?php echo $slide ?>,
    'fading': <?php echo $fade ?>,
    'direction':'down',
    'action':'mouseover',
    'tips': false,
    'duration': <?php echo $duration ?>,
    'hidestyle': 'fast'
    });

    It’s quite strange because delayHide is set two time in the code. Once in this file and once in the mega.js file.
    Trying to figure out how to add delayHide and hidestyle parameters in the admin backend…

    Sincerely.

    pepperstreet Friend
    #395705

    Just head a request for this issue and found this older thread. Would be nice to have all the parameters in backend!

    chavan Friend
    #396050

    Hi brunus

    You could configure delayHide parameter in newest version of T3.

    You can do above describe to configure hideStyle parameters in the admin backend (I hacked it in T3 1.2.7)
    Note: Above step will describe you hacked T3 core, so if you update T3, it may be lose what you did.
    Step 1: Open file plugins/system/jat3/jat3/core/admin/params.xml
    Paste code


    <field name="ja_menu_mega_hidestyle" type="list" default="fastwhenshow" label="HIDE_STYLE" description="HIDE_STYLE_DESC">
    <option value="normal">Normal</option>
    <option value="fast">Fast</option>
    <option value="fastwhenshow">Fast when show</option>
    </field>

    below code


    <field name="ja_menu_mega_duration" type="text" default="300" label="ANIMATION_DURATION" description="ANIMATION_DURATION_DESC" />
    <field name="ja_menu_mega_delayhide" type="text" default="300" label="DELAY_HIDE_TIME" description="DELAY_HIDE_TIME_DESC" />

    Save file.
    Step 2: Open file plugins/system/jat3/jat3/core/menu/mega.class.php. Find function endMenu.
    Paste this code


    $hideStyle = $this->_tmpl->getParam('ja_menu_mega_hidestyle', 'fastwhenshow');

    below code


    $duration = $this->_tmpl->getParam ('ja_menu_mega_duration', 300);
    $delayHide = $this->_tmpl->getParam ('ja_menu_mega_delayhide', 300);

    Fix code render javascript mega menu like this


    <script type="text/javascript">
    var megamenu = new jaMegaMenuMoo ('<?php echo $this->getParam('menuname') ?>', {
    'bgopacity': 0,
    'delayHide': <?php echo $delayHide ?>,
    'slide': <?php echo $slide ?>,
    'fading': <?php echo $fade ?>,
    'direction':'down',
    'action':'mouseover',
    'tips': false,
    'duration': <?php echo $duration ?>,
    'hidestyle': '<?php echo $hideStyle; ?>' // <=== fix here
    });
    </script>

    Save file.
    Step3: Login admin site and configure.

    Result will show as attached image

    Good luck!

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 3 voices, and was last updated by  chavan 13 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum