-
AuthorPosts
-
brunus Friend
brunus
- Join date:
- November 2009
- Posts:
- 31
- Downloads:
- 0
- Uploads:
- 0
- Thanked:
- 6 times in 1 posts
February 26, 2010 at 2:49 pm #149051Hi 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 Friendpepperstreet
- Join date:
- April 2011
- Posts:
- 55
- Downloads:
- 223
- Uploads:
- 7
- Thanks:
- 21
- Thanked:
- 4 times in 1 posts
June 10, 2011 at 10:21 am #395705Just head a request for this issue and found this older thread. Would be nice to have all the parameters in backend!
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
June 13, 2011 at 8:12 am #396050Hi 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!
2 users say Thank You to chavan for this useful post
-
AuthorPosts
This topic contains 3 replies, has 3 voices, and was last updated by chavan 13 years, 5 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum