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

Last change on this file since 16931 was 16931, checked in by cljosse, 12 years ago

[extensions] Autosize fix compatibility with 2.4, new options

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>
17    </span>
18  </a>
19
20
21
22 <script language="JavaScript" type="text/javascript">
23 {if $ASP.width}
24   jQuery(window).load(function () {ldelim}
25 var asp_options ={ldelim} };
26   if(typeof $("#imageToolBar") !="undefined" )
27    var w = $("#imageToolBar").width();
28        if (w === null) {ldelim} w = $("#theImage").width(); }
29        if (w < {$ASP.min_viewport_width}) {ldelim} w = .75 * $("#theImage").width(); }
30        var m = w;
31        w = w * ( Math.min( Math.max({$ASP.viewport_width} / 100, .5) , 1 ));
32        w = Math.round(Math.min( {$ASP.max_viewport_width} , Math.max( {$ASP.min_viewport_width}, w) ));
33        var s = (100 - {$ASP.speed}) * 2000;
34        var p = Math.round(Math.min(Math.max({$ASP.width} * ( {$ASP.start_position} / 100 ), 0), {$ASP.width}));
35        if ({$ASP.width} > w) {ldelim}
36                $("#theImage img").eq(0).removeAttr("style").attr({ldelim}width:{$ASP.width},height:{$ASP.height}}).addClass("simple_panorama");
37                asp_options = {ldelim}
38                                         viewport_width: w,
39                                         speed: s,
40                                         direction: '{$ASP.direction}',
41                                         control_display: '{$ASP.control_display}',
42                                         start_position : p,
43                                         auto_start : {$ASP.auto_start},
44                                         mode_360 : {$ASP.mode_360},
45                                         loop_180 : {$ASP.loop_180}
46                         };
47                //$("#theImage img.simple_panorama").panorama(asp_options);
48        };
49 });
50  {/if}
51
52 var src1="{$cl_autosize_button.ICON}";
53 var src2="{$cl_autosize_button.ICON2}";
54 var src3="{'cl_autosize_info_2'|@translate}";
55 var src4 = "{'cl_autosize_info'|@translate}";
56 var src5 = "{'cl_autosize_info_1'|@translate}";
57 var src6 = "{$cl_autosize_button.ICON1}";
58 </script>
59
Note: See TracBrowser for help on using the repository browser.