Changeset 3690 for extensions/AMenuManager/menu_templates
- Timestamp:
- Jul 27, 2009, 12:01:10 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMenuManager/menu_templates/menubar_randompic.tpl
r3681 r3690 6 6 {literal} 7 7 <script type="text/javascript"> 8 //var divnum = 1; 9 //var divprec = 0; 8 var fixedHeight = {/literal}{$block->data.blockHeight}{literal}; 10 9 11 10 function init() 12 11 { 13 $("#iamm_ill0").hide(); 14 //$("#iamm_ill1").hide(); 12 {/literal} 13 {if $block->data.blockHeight>0} 14 $("#irandompicinner").height(fixedHeight); 15 {literal}$("#iammrpic").load( function () { computePositionTop(); } );{/literal} 16 {else} 17 {literal} 18 $("#iammrpic").load( function () { $("#irandompicinner").animate({height: ($("#iamm_ill0").innerHeight())+"px"}, "normal"); } ); 19 {/literal} 20 {/if} 21 {literal} 22 } 23 24 function computePositionTop() 25 { 26 $("#iamm_ill0").css({top:(fixedHeight-$("#iamm_ill0").innerHeight())/2}); 15 27 } 16 28 17 29 function getRandomPicture() 18 30 { 19 //divprec=divnum;20 //divnum=1-divnum;21 31 $.get("./index.php", {ajaxfct:"randompic"}, 22 32 function (data) … … 25 35 { 26 36 $("#iamm_ill0").html(data); 27 $("#iammrpic").load( function () { 28 $("#irandompicdd").animate({height: ($("#iamm_ill0").height())+"px"}, "normal", function () 29 { 30 $("#iamm_ill0").fadeTo('slow', 1, function () 37 38 {/literal} 39 {if $block->data.blockHeight>0} 40 {literal} 41 $("#iammrpic").load( function () { 42 computePositionTop(); 43 $("#iamm_ill0").fadeTo('slow', 1); 44 } ); 45 {/literal} 46 {else} 47 {literal} 48 $("#iammrpic").load( function () { 49 $("#irandompicinner").animate({height: ($("#iamm_ill0").innerHeight())+"px"}, "normal", function () 31 50 { 32 $("#irandompicdd").animate({height: this.clientHeight+"px"}, "normal"); 51 $("#iamm_ill0").fadeTo('slow', 1, function () 52 { 53 $("#irandompicinner").animate({height: this.clientHeight+"px"}, "normal"); 54 }); 33 55 }); 34 }); 35 } ); 56 } ); 57 {/literal} 58 {/if} 59 {literal} 60 36 61 } ); 37 62 } 38 63 ); 39 64 } 65 66 40 67 </script> 41 68 {/literal} 42 69 43 70 <dd id="irandompicdd" class="randompicdd"> 44 <div id="iamm_ill0" class="illustration ammillustration"></div> 45 <!--<div id="iamm_ill1" class="illustration ammillustration"></div>--> 71 <div id="irandompicinner" class="illustration"> 72 <div class="ammillustrationc"> 73 <div id="iamm_ill0" class="ammillustration">{$block->data.firstPicture}</div> 74 </div> 75 </div> 46 76 </dd> 47 77 48 78 <script type="text/javascript"> 49 getRandomPicture();79 init(); 50 80 {if $block->data.delay > 0 } 51 81 var vIntervalID = window.setInterval(getRandomPicture, {$block->data.delay});
Note: See TracChangeset
for help on using the changeset viewer.