Changeset 7353


Ignore:
Timestamp:
Oct 23, 2010, 11:47:25 AM (10 years ago)
Author:
cljosse
Message:

[Autosize][beta] fix bug with Opera.


Location:
extensions/Autosize
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/admin/template/admin.tpl

    r7316 r7353  
    2525     var normal_height = '{$normal_height}';
    2626     var user_status = '{$user_status}';
    27      var user_status = '{$user_status}';
     27
    2828     var check_auto_w = '{$check_auto_w}';
    2929
     
    4242{known_script id="jquery.ui.slider" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.slider.js"}
    4343{known_script id="jquery.ui.draggable" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.draggable.js"}
     44{literal}
     45<script type="text/javascript">
    4446
    45 <script type="text/javascript">
    46 jQuery().ready(function(){ldelim}
    47   jQuery('.cluetip').cluetip({ldelim}
     47jQuery().ready(function(){
     48  jQuery('.cluetip').cluetip({
    4849    width: 300,
    4950    splitTitle: '|'
    5051  });
    5152});
     53
    5254</script>
    53 
     55{/literal}
    5456<!--============== assign visible =======================-->   
    5557{assign var="affiche_cde" value="true"}
  • extensions/Autosize/include/affiche.php

    r7316 r7353  
    22
    33$visible=(isset($visible))?$visible:false;
    4 
    5 
    6 
    74$img_width=isset($picture['current']['width'])?$picture['current']['width']:480;
    85$img_height=isset($picture['current']['height'])?$picture['current']['height']:320;
    96$version=isset($version)?$version:"";
    107$theme=$user['theme'];
    11  $user_status = $user['status'] ;
     8$user_status = $user['status'] ;
    129
    1310        $template->assign(
  • extensions/Autosize/js/Affiche_script.js

    r7316 r7353  
    1 /*
    2 var thumbnail= '{$thumbnail}';
    3 var theme = '{$theme}';
    4 var version = '{$version}';
    5 var scaled_width = '{$SCALED_WIDTH}'; // valeur par defaut
    6 var scaled_height = '{$SCALED_HEIGHT}'; // valeur par defaut
    7 var img_width = '{$IMG_WIDTH }';
    8 var img_height = '{ $IMG_HEIGHT }';$picture['current']['height']
    9 
    10 var marge_basse = '{ $MARGE_BASSE }';
    11 var echelle_max = '{ $ECHELLE_MAX }';
    12 var mini_width = '{ $MINI_WIDTH   }';
    13 var mini_height = '{ $MINI_HEIGHT   }';
    14 
    15 var webmaster_width = '{$webmaster_width   }';
    16 var webmaster_height = '{ $webmaster_height   }';
    17 var admin_width = '{ $admin_width   }';
    18 var admin_height = '{ $admin_height   }';
    19 var generic_width = '{ $generic_width   }';
    20 var generic_height = '{ $generic_height   }';
    21 var guest_width = '{ $guest_width   }';
    22 var guest_height = '{$guest_height}';
    23 var normal_width = '{$normal_width}';
    24 var normal_height = '{$normal_height}';
    25 var user_status = '{$user_status}';
    26 var user_status = '{$user_status}';
    27 var check_auto_w = '{$check_auto_w}';
    28 var check_desc_v = '{$check_desc_v}';
    29 */
    30 
    31 
    32 var img_top = "0";
    33 var cl_visible = true;
    34 
    35   function Toggle_bp()
     1jQuery(document).ready(
     2      function (jQuery) {
     3        var img_top = "0";
     4        var cl_visible = true;
     5        var old_h = 0;
     6        var rapport = -1;
     7        var old_w = 0;
     8
     9 function Toggle_bp()
    3610 {
    37  cl_visible = !cl_visible ;
    38    if (cl_visible) src=src1 ;
    39   else src=src2 ;
    40      if (cl_visible)  src_info=src3 ;
    41   else src_info=src4 ;
     11     cl_visible = !cl_visible ;
     12       if (cl_visible) src=src1 ;
     13      else src=src2 ;
     14         if (cl_visible)  src_info=src3 ;
     15      else src_info=src4 ;
    4216 
    43         jQuery('#bp_cla').attr('alt',src_info);
    44         jQuery('#bp_cla').attr('title', src_info);
    45 
    46         jQuery('#bp_img_cla').get(0).src=src ;
    47         jQuery('#bp_img_cla').attr('alt',src_info);
    48         jQuery('#bp_img_cla').attr('title',src_info);
    49         jQuery('#bp_cla').attr('Stitle', src_info);
    50         jQuery('#bp_cla').attr('Stip'," ");
    51         old_w = 0;
    52         jQuery(window).resize();
     17            jQuery('#bp_cla').attr('alt',src_info);
     18            jQuery('#bp_cla').attr('title', src_info);
     19
     20            jQuery('#bp_img_cla').get(0).src=src ;
     21            jQuery('#bp_img_cla').attr('alt',src_info);
     22            jQuery('#bp_img_cla').attr('title',src_info);
     23            jQuery('#bp_cla').attr('Stitle', src_info);
     24            jQuery('#bp_cla').attr('Stip'," ");
     25            old_w = 0;
     26            jQuery(window).resize();
    5327    }
    5428    //=========================================================
    55     var old_w = 0;
     29
    5630     function wait_Timer() {
    5731         old_w = 0
     
    214188        * return: valeur entiere
    215189        */
    216         function Get_Val_int(myObj, Maxi_val, Obj) {
     190        function Get_Val_int(myObj, Maxi_val, Mini_val) {
    217191            var val = 0;
    218192            var reg1 = new RegExp("%", "g")
     
    231205            }
    232206            if (typeof (myObj) == "string") {
     207                if (myObj == "none") return Maxi_val;
     208                if (myObj == "auto") return Maxi_val;
     209                if (Mini_val)
     210                    if (myObj < Mini_val) return Maxi_val;
    233211                switch (myObj) {
    234212                    case 'thin':
     
    254232
    255233
    256                 if (myObj == "none") return Maxi_val;
    257                 if (myObj == "auto") return Maxi_val;
     234
    258235
    259236                if (myObj.match(reg1)) val = myObj * Maxi_val / 100;
     
    287264
    288265
    289         jQuery(document).ready(
    290        function (jQuery) {
     266
     267     
     268
     269
     270   
    291271           /* jQuery */
    292272           var img_init = { height: img_height, width: img_width };  // taille initiale
     
    313293           //===================================================================       
    314294
    315            var old_h = 0;
    316            var rapport = -1;
     295
    317296
    318297
     
    569548
    570549
    571                maxWidth = Get_Val_int(jQuery(TheImg).css("max-width"), winwidth);
    572                maxHeight = Get_Val_int(jQuery(TheImg).css("max-height"), winheight);
     550              var maxWidth = Get_Val_int(jQuery(TheImg).css("max-width"), winwidth,"0");
     551               maxHeight = Get_Val_int(jQuery(TheImg).css("max-height"), winheight,"0");
    573552
    574553               mini_width = parseInt(miniWidth);
  • extensions/Autosize/template/autosize.tpl

    r7316 r7353  
    44  {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1}
    55  {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"}
    6    {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.min.js"}
     6   {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"}
    77{*jQuery is always available by default*}
    88 <script type="text/javascript">
     
    1111    var visible = '{$visible}';
    1212    var version = '{$version}';
     13
    1314    var scaled_width =  '{$SCALED_WIDTH}'; // valeur par defaut
    1415    var scaled_height = '{$SCALED_HEIGHT}'; // valeur par defaut
     
    3233    var normal_height='{$normal_height}';
    3334    var user_status='{$user_status}';
    34     var user_status = '{$user_status}';
     35   
    3536    var check_auto_w = '{$check_auto_w}';
    3637    var check_desc_v = '{$check_desc_v}';
Note: See TracChangeset for help on using the changeset viewer.