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

Last change on this file since 11961 was 11961, checked in by cljosse, 13 years ago

[extensions] Autosize fix compatibility with 'charlies video'

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