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

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

[extensions] Autosize fix compatibility with gmaps

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