Changeset 16935


Ignore:
Timestamp:
Jul 23, 2012, 3:34:30 PM (12 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix compatibility with 2.4, new options

Location:
extensions/Autosize
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/js/Affiche_script.js

    r16931 r16935  
    10991099    if (n > pt.length - 1) n = pt.length - 1; // format le plus grand
    11001100    if (n < 0) n = 0; // format le plus grand
     1101    if (typeof pt[n] == "undefined") {
     1102
     1103      n = n - 1
     1104    }
     1105
    11011106    imgSrc = pt[n][1];
    11021107    last_map = pt[n][5];
     
    23542359
    23552360
    2356 });                                                                                                                                                     // ready
     2361});                                                                                                                                                      // ready
    23572362
    23582363  //=====================================================================
  • extensions/Autosize/template/picture.tpl

    r16931 r16935  
    2121
    2222 <script language="JavaScript" type="text/javascript">
    23  {if $ASP.width}
     23   var src1="{$cl_autosize_button.ICON}";
     24   var src2="{$cl_autosize_button.ICON2}";
     25   var src3="{'cl_autosize_info_2'|@translate}";
     26   var src4 = "{'cl_autosize_info'|@translate}";
     27   var src5 = "{'cl_autosize_info_1'|@translate}";
     28   var src6 = "{$cl_autosize_button.ICON1}";
     29
     30   {if $ASP.width}
    2431   jQuery(window).load(function () {ldelim}
    25  var asp_options ={ldelim} };
     32   var asp_options ={ldelim} };
    2633   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(); }
     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(); }
    3037        var m = w;
    3138        w = w * ( Math.min( Math.max({$ASP.viewport_width} / 100, .5) , 1 ));
     
    4956 });
    5057  {/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}";
    5858 </script>
    5959
Note: See TracChangeset for help on using the changeset viewer.