Changeset 18726 for extensions/Autosize


Ignore:
Timestamp:
Oct 23, 2012, 3:26:03 PM (12 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix compatibility with 2.4 (charlie)

Location:
extensions/Autosize
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/autosize.inc.php

    r18725 r18726  
    194194if ( preg_match("|charlie|", $content, $val) ){   
    195195  $ncount=1;   
    196   $content=str_replace( "<object" ,  "<object id='theMainImage' name='theMainImage' "  ,$content,$ncount);
    197   $content=str_replace( "<embed" ,  "<embed id='theMainImage' name='theMainImage' "  ,$content,$ncount);
     196  $content=str_replace( "<object" ,  "<object id='theMainImage_obj' name='theMainImage' "  ,$content,$ncount);
     197  $content=str_replace( "<embed" ,  "<embed id='theMainImage_emb' name='theMainImage' "  ,$content,$ncount);
    198198  $content=  preg_replace($pattern, "", $content);
    199199  $content= "<div id='theMainImage' style='height:".$theImageHeight."px  ;width:".$theImageWidth."px' >". $content . "<img src='".AUTOSIZE_PATH . "images/transparent.gif' /></div>";
    200  $content= "<style>#theImageAndInfos{height:auto;width:auto;border:1px solid red;position:relative}
    201   #theImage{height:auto;border:1px solid blue;align:center;text-align:center;width:100%;position:relative}
    202   #theMainImage{height:auto;border:10px solid blue;align:center;text-align:center;position:static}   
     200 $content= "<style>#theImageAndInfos{height:auto;width:auto;position:relative}
     201  #theImage{height:auto;align:center;text-align:center;width:100%;position:relative}
     202  #theMainImage{height:auto;align:center;text-align:center;position:static}   
    203203 </style>".$content;
    204204return  $content;
  • extensions/Autosize/js/Affiche_script.js

    r18725 r18726  
    930930          jQuery(theMainImage_id).height(Zone_image.image.height);
    931931          jQuery(theMainImage_id).width(Zone_image.image.width);
     932
    932933        } else {
    933934          jQuery(theMainImage_id).height(Zone_image.image.height);
    934935          jQuery(theMainImage_id).width(Zone_image.image.width);
    935936        }
    936 
     937        if (Type_Img == "charlie") {
     938          swfobj = jQuery("#theMainImage").infos({ absolute: true });
     939
     940          jQuery("#theMainImage_obj").attr({height: Zone_image.image.height,width:Zone_image.image.width-50});
     941          jQuery("#theMainImage_emb").attr({ height: Zone_image.image.height, width: Zone_image.image.width });
     942
     943        }
    937944
    938945
     
    12181225      jQuery("#map").removeAttr("width");
    12191226      jQuery("#map").width(infos_theImage.width - (infos_mapPicture.width));
    1220       jQuery("#map").height(jQuery(window).height()-infos_theImage.top-infos_theImage.general.marges.height);
     1227      jQuery("#map").height(jQuery(window).height() - infos_theImage.top - infos_theImage.general.marges.height);
    12211228      return true;
    12221229    }
     
    16661673      if (chk == "") { return; }
    16671674
    1668       if (Type_Img == "img")
     1675      if (Type_Img != "map")
    16691676        Select_Image();
    16701677      infos_theMainImage = jQuery(theMainImage_id).infos({ absolute: true });
     
    21382145
    21392146
    2140   });                                                                                                                                                                                                                                                                                                                                                                                                                                                            // ready
     2147  });                                                                                                                                                                                                                                                                                                                                                                                                                                                              // ready
    21412148
    21422149
Note: See TracChangeset for help on using the changeset viewer.