source: extensions/Autosize/template/picture.tpl @ 27153

Last change on this file since 27153 was 22467, checked in by cljosse, 11 years ago

[extensions] Autosize update to piwigo 2.5 (fix bugs with jquery 1.9 )

File size: 2.0 KB
Line 
1 <style type="text/css">
2         #bp_cla {ldelim}
3  cursor:pointer;
4}
5     </style>
6
7{php}
8global $picture;
9$zoom=$_POST['zoom'];
10$this->assign('zoom', $zoom );
11
12{/php}
13 <a onclick = "Toggle_bp()"  id="bp_cla"
14    title="{'cl_autosize_info_2'|@translate}"
15    alt="{'cl_autosize_info_2'|@translate}" />
16    <img class="button" id="bp_img_cla" alt="{'cl_autosize_info_2'|@translate}"  src="{$cl_autosize_button.ICON}"  complete="complete"/><span></span>
17  </a>
18
19
20
21 <script language="JavaScript" type="text/javascript">
22   var src1="{$cl_autosize_button.ICON}";
23   var src2="{$cl_autosize_button.ICON2}";
24   var src3="{'cl_autosize_info_2'|@translate}";
25   var src4 = "{'cl_autosize_info'|@translate}";
26   var src5 = "{'cl_autosize_info_1'|@translate}";
27   var src6 = "{$cl_autosize_button.ICON1}";
28   var asp_options = null;
29
30   {if $ASP.width}
31   jQuery(window).on("load", function () {ldelim}
32   asp_options ={ldelim} };
33   if(typeof $("#imageToolBar") !="undefined" )
34   var w = $("#imageToolBar").width();
35   if (w === null) {ldelim} w = $("#theImage").width(); }
36   if (w < {$ASP.min_viewport_width}) {ldelim} w = .75 * $("#theImage").width(); }
37        var m = w;
38        w = w * ( Math.min( Math.max({$ASP.viewport_width} / 100, .5) , 1 ));
39        w = Math.round(Math.min( {$ASP.max_viewport_width} , Math.max( {$ASP.min_viewport_width}, w) ));
40        var s = (100 - {$ASP.speed}) * 2000;
41        var p = Math.round(Math.min(Math.max({$ASP.width} * ( {$ASP.start_position} / 100 ), 0), {$ASP.width}));
42        if ({$ASP.width} > w) {ldelim}
43                $("#theImage img").eq(0).removeAttr("style").attr({ldelim}width:{$ASP.width},height:{$ASP.height}}).addClass("simple_panorama");
44                asp_options = {ldelim}
45                                         viewport_width: w,
46                                         speed: s,
47                                         direction: '{$ASP.direction}',
48                                         control_display: '{$ASP.control_display}',
49                                         start_position : p,
50                                         auto_start : {$ASP.auto_start},
51                                         mode_360 : {$ASP.mode_360},
52                                         loop_180 : {$ASP.loop_180}
53                         };
54
55                // $("#theImage img.simple_panorama").panorama(asp_options);
56        };
57 });
58  {/if}
59 </script>
60
Note: See TracBrowser for help on using the repository browser.