Changeset 10852 for extensions/Back2Front/template/picture_content.tpl
- Timestamp:
- May 11, 2011, 7:17:49 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Back2Front/template/picture_content.tpl
r10821 r10852 3 3 {footer_script require="jquery"} 4 4 jQuery(document).ready(function () {ldelim} 5 6 {if $b2f_switch_mode == 'click'} 5 7 jQuery('.reverse').click(function() {ldelim} 6 8 if (jQuery(this).attr('rel') == 'front') {ldelim} 7 /* picture attributes */ 8 jQuery('#theImage img:first-child').attr({ldelim} 9 {else} 10 jQuery('.reverse').hover(function() {ldelim} 11 {/if} 12 13 /* picture switch */ 14 {if $b2f_transition == 'fade'} 15 jQuery('img[alt="{$ALT_IMG}"]').animate({ldelim} 16 opacity:0 17 }, 400, function() {ldelim} 18 jQuery(this).animate({ldelim} 19 width:'{$VERSO_WIDTH}px', 20 height:'{$VERSO_HEIGHT}px' 21 }, 200, function() {ldelim} 22 jQuery(this).attr('src', '{$VERSO_URL}'); 23 jQuery(this).animate({ldelim} 24 opacity:1 25 }, 400); 26 }); 27 }); 28 {else} 29 jQuery('img[alt="{$ALT_IMG}"]').attr({ldelim} 9 30 src: '{$VERSO_URL}', 10 style: 'width: ;height:;',31 style: 'width:{$VERSO_WIDTH}px;height:{$VERSO_HEIGHT}px;', 11 32 }); 12 13 /* hd link atributes */ 33 {/if} 34 35 {if $b2f_switch_mode == 'click'} 36 /* hd link */ 14 37 {if isset($VERSO_HD)} 15 jQuery(' #theImage a:first-child').attr({ldelim}38 jQuery('img[alt="{$ALT_IMG}"]').parent().attr({ldelim} 16 39 href: "javascript:phpWGOpenWindow('{$VERSO_HD}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')" 17 40 }); 18 41 {/if} 19 42 20 43 /* B2F link content */ 21 44 jQuery(this).html('<img src="{$B2F_PATH}template/rotate_2.png"/> {'See front'|@translate}'); 22 45 jQuery(this).attr('rel', 'back'); 46 {/if} 23 47 48 {if $b2f_switch_mode == 'click'} 24 49 } else if (jQuery(this).attr('rel') == 'back') {ldelim} 25 jQuery('#theImage img:first-child').attr({ldelim} 50 {else} 51 }, function() {ldelim} 52 {/if} 53 54 {if $b2f_transition == 'fade'} 55 jQuery('img[alt="{$ALT_IMG}"]').animate({ldelim} 56 opacity:0 57 }, 400, function() {ldelim} 58 jQuery(this).animate({ldelim} 59 width:'{$WIDTH_IMG}px', 60 height:'{$HEIGHT_IMG}px' 61 }, 200, function() {ldelim} 62 jQuery(this).attr('src', '{$SRC_IMG}'); 63 jQuery(this).animate({ldelim} 64 opacity:1 65 }, 400); 66 }); 67 }); 68 {else} 69 jQuery('img[alt="{$ALT_IMG}"]').attr({ldelim} 26 70 src: '{$SRC_IMG}', 27 71 style: 'width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;', 28 72 }); 73 {/if} 29 74 30 {if isset($VERSO_HD)} 31 jQuery('#theImage a:first-child').attr({ldelim} 32 href: "javascript:phpWGOpenWindow('{$high.U_HIGH}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')')" 75 {if $b2f_switch_mode == 'click'} 76 {if isset($high.U_HIGH)} 77 jQuery('img[alt="{$ALT_IMG}"]').parent().attr({ldelim} 78 href: "javascript:phpWGOpenWindow('{$high.U_HIGH}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')" 33 79 }); 34 80 {/if} … … 36 82 jQuery(this).html('<img src="{$B2F_PATH}template/rotate_1.png"/> {'See back'|@translate}'); 37 83 jQuery(this).attr('rel', 'front'); 84 {/if} 85 86 {if $b2f_switch_mode == 'click'} 38 87 } 39 88 }); 89 {else} 90 }); 91 {/if} 92 40 93 }); 41 94 {/footer_script} 42 95 43 <a class="reverse" rel="front" href="#"> 44 <img src="{$B2F_PATH}template/rotate_1.png"/> 45 {'See back'|@translate} 96 <img src="{$VERSO_URL}" style="display:none;"> {* <!-- force preload the verso --> *} 97 98 <a class="reverse" rel="front" name="verso-link" {if $b2f_switch_mode == 'hover'}href="javascript:phpWGOpenWindow('{$VERSO_HD}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')"{/if}> 99 <img src="{$B2F_PATH}template/rotate_1.png"/> {'See back'|@translate} 46 100 </a> 101 <br/>
Note: See TracChangeset
for help on using the changeset viewer.