source: extensions/Back2Front/template/picture_content.tpl @ 21213

Last change on this file since 21213 was 21213, checked in by mistic100, 8 years ago

fix language load, fix fatal error, (probably) fix jQuery issues

File size: 2.8 KB
Line 
1{combine_css path=$B2F_PATH|@cat:"template/style.css"}
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
18
19{footer_script require="jquery"}
20jQuery("#derivativeSwitchLink").hide();
21jQuery(".reverse").css("display", "inline-block");
22jQuery("img#theVersoImage").insertAfter(jQuery("img#theMainImage"));
23
24{if $b2f_switch_mode == "click"}
25  jQuery(".reverse").click(function() {ldelim}
26    if (jQuery(this).data("what") == "front") {ldelim}
27{else}
28  jQuery(".reverse").hover(function() {ldelim}
29{/if}
30
31    {if $b2f_transition == "fade"}
32      jQuery("img#theVersoImage").hide();
33      jQuery("img#theMainImage").fadeOut(400, function() {ldelim}
34        jQuery("img#theVersoImage").fadeIn(400);
35      });
36    {else}
37      jQuery("img#theMainImage").hide();
38      jQuery("img#theVersoImage").show();
39    {/if}
40   
41      jQuery(this).data("what", "back");
42      jQuery(this).html('<img src="{$ROOT_URL}{$B2F_PATH}template/rotate_2.png"/> {$b2f_see_front}');
43
44{if $b2f_switch_mode == "click"}
45    } else if (jQuery(this).data("what") == "back") {ldelim}
46{else}
47  }, function() {ldelim}
48{/if}
49   
50    {if $b2f_transition == "fade"}
51      jQuery("img#theMainImage").hide();
52      jQuery("img#theVersoImage").fadeOut(400, function() {ldelim}
53        jQuery("img#theMainImage").fadeIn(400);
54      });
55    {else}
56      jQuery("img#theVersoImage").hide();
57      jQuery("img#theMainImage").show();
58    {/if}
59   
60      jQuery(this).data("what", "front");
61      jQuery(this).html('<img src="{$ROOT_URL}{$B2F_PATH}template/rotate_1.png"/> {$b2f_see_back}');
62
63{if $b2f_switch_mode == "click"}
64    }
65  });
66{else}
67  });
68{/if}
69{/footer_script}
Note: See TracBrowser for help on using the repository browser.