Changeset 21212 for extensions/Back2Front/template/picture_content.tpl
- Timestamp:
- Mar 5, 2013, 4:53:11 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Back2Front/template/picture_content.tpl
r12363 r21212 1 1 {combine_css path=$B2F_PATH|@cat:"template/style.css"} 2 {combine_script id="jquery" load="header" path = "themes/default/js/jquery.min.js"} 2 3 {if !$verso.selected_derivative->is_cached() && $current.selected_derivative->is_cached} 4 {combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'} 5 {combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'} 6 {footer_script}var error_icon = "{$ROOT_URL}{$themeconf.icon_dir}/errors_small.png"{/footer_script} 7 {/if} 8 9 10 {if $b2f_position != "toolbar"}<div>{/if} 11 <a class="reverse" data-what="front" rel="nofollow" class="pwg-state-default pwg-button" title="{$b2f_see_back}" {if $b2f_position == "toolbar"}style="border:none !important;"{/if}> 12 <img src="{$ROOT_URL}{$B2F_PATH}template/rotate_1.png"/> {$b2f_see_back} 13 </a> 14 {if $b2f_position != "toolbar"}</div>{/if} 15 16 <img {if $verso.selected_derivative->is_cached()}src="{$verso.selected_derivative->get_url()}" {$verso.selected_derivative->get_size_htm()}{else}src="{$ROOT_URL}{$themeconf.img_dir}/ajax_loader.gif" data-src="{$verso.selected_derivative->get_url()}"{/if} alt="{$ALT_IMG}" id="theVersoImage" usemap="#map{$current.selected_derivative->get_type()}" title="{if isset($COMMENT_IMG)}{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}{else}{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}{/if}"> 17 3 18 4 19 {footer_script require="jquery"} 5 jQuery(document).ready(function () {ldelim} 20 jQuery("#derivativeSwitchLink").hide(); 21 jQuery(".reverse").css("display", "inline-block"); 22 jQuery("img#theVersoImage").insertAfter(jQuery("img#theMainImage")); 6 23 7 {if $b2f_switch_mode == 'click'}8 jQuery( '.reverse').click(function() {ldelim}9 if (jQuery(this). attr('rel') == 'front') {ldelim}24 {if $b2f_switch_mode == "click"} 25 jQuery(".reverse").click(function() {ldelim} 26 if (jQuery(this).data("what") == "front") {ldelim} 10 27 {else} 11 jQuery( '.reverse').hover(function() {ldelim}28 jQuery(".reverse").hover(function() {ldelim} 12 29 {/if} 13 30 14 /* picture switch */ 15 {if $b2f_transition == 'fade'} 16 jQuery('img#theMainImage').animate({ldelim} 17 opacity:0 18 }, 400, function() {ldelim} 19 jQuery(this).attr({ldelim} 20 src: '{$VERSO_URL}', 21 style: 'max-width:{$WIDTH_IMG}px;max-height:{$HEIGHT_IMG}px;', 22 }); 23 jQuery(this).animate({ldelim} 24 opacity:1 25 }, 400); 31 $("img#theVersoImage").hide(); 32 33 {if $b2f_transition == "fade"} 34 $("img#theMainImage").fadeOut(400, function() {ldelim} 35 $("img#theVersoImage").fadeIn(400); 26 36 }); 27 37 {else} 28 jQuery('img#theMainImage').attr({ldelim} 29 src: '{$VERSO_URL}', 30 style: 'max-width:{$WIDTH_IMG}px;max-height:{$HEIGHT_IMG}px;', 31 }); 38 $("img#theMainImage").hide(); 39 $("img#theVersoImage").show(); 32 40 {/if} 33 41 34 {if $b2f_switch_mode == 'click'} 35 /* hd link */ 36 {if isset($VERSO_HD)} 37 jQuery('img#theMainImage').parent('a').attr({ldelim} 38 href: "javascript:phpWGOpenWindow('{$VERSO_HD}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')" 39 }); 40 {/if} 41 42 /* B2F link content */ 43 jQuery(this).html('<img src="{$B2F_PATH}template/rotate_2.png"/> {$b2f_see_front}'); 44 jQuery(this).attr('rel', 'back'); 45 {/if} 46 47 {if $b2f_switch_mode == 'click'} 48 } else if (jQuery(this).attr('rel') == 'back') {ldelim} 42 $(this).data("what", "back"); 43 $(this).html('<img src="{$ROOT_URL}{$B2F_PATH}template/rotate_2.png"/> {$b2f_see_front}'); 44 45 {if $b2f_switch_mode == "click"} 46 } else if (jQuery(this).data("what") == "back") {ldelim} 49 47 {else} 50 48 }, function() {ldelim} 51 49 {/if} 52 53 /* picture switch */ 54 {if $b2f_transition == 'fade'} 55 jQuery('img#theMainImage').animate({ldelim} 56 opacity:0 57 }, 400, function() {ldelim} 58 jQuery(this).attr({ldelim} 59 src: '{$SRC_IMG}', 60 style: 'width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;', 61 }); 62 jQuery(this).animate({ldelim} 63 opacity:1 64 }, 400); 50 51 $("img#theMainImage").hide(); 52 53 {if $b2f_transition == "fade"} 54 $("img#theVersoImage").fadeOut(400, function() {ldelim} 55 $("img#theMainImage").fadeIn(400); 65 56 }); 66 57 {else} 67 jQuery('img#theMainImage').attr({ldelim} 68 src: '{$SRC_IMG}', 69 style: 'width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;', 70 }); 58 $("img#theVersoImage").hide(); 59 $("img#theMainImage").show(); 71 60 {/if} 72 73 {if $b2f_switch_mode == 'click'} 74 /* hd link */ 75 {if isset($high.U_HIGH)} 76 jQuery('img#theMainImage').parent('a').attr({ldelim} 77 href: "javascript:phpWGOpenWindow('{$high.U_HIGH}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')" 78 }); 79 {/if} 80 81 /* B2F link content */ 82 jQuery(this).html('<img src="{$B2F_PATH}template/rotate_1.png"/> {$b2f_see_back}'); 83 jQuery(this).attr('rel', 'front'); 84 {/if} 85 86 {if $b2f_switch_mode == 'click'} 61 62 $(this).data("what", "front"); 63 $(this).html('<img src="{$ROOT_URL}{$B2F_PATH}template/rotate_1.png"/> {$b2f_see_back}'); 64 65 {if $b2f_switch_mode == "click"} 87 66 } 88 67 }); … … 90 69 }); 91 70 {/if} 92 93 });94 71 {/footer_script} 95 96 <img src="{$VERSO_URL}" style="display:none;"/> {* <!-- force preload the verso --> *}97 98 {if $b2f_position != 'toolbar'}<div>{/if}99 <a class="reverse" rel="front" class="pwg-state-default pwg-button" title="{$b2f_see_back}" {if $b2f_position == 'toolbar'}style="border:none !important;"{/if}100 {if $b2f_switch_mode == 'hover' and isset($VERSO_HD)}href="javascript:phpWGOpenWindow('{$VERSO_HD}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')"{/if}>101 <img src="{$B2F_PATH}template/rotate_1.png"/> {$b2f_see_back}102 </a>103 {if $b2f_position != 'toolbar'}</div>{/if}
Note: See TracChangeset
for help on using the changeset viewer.