Changeset 18946 for extensions/Autosize


Ignore:
Timestamp:
Nov 6, 2012, 8:58:56 AM (11 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix compatibility with 2.4 (charlie's)

File:
1 edited

Legend:

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

    r18944 r18946  
    310310      infos_theMainImage = jQuery(theMainImage_id).infos({ absolute: true });
    311311      infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos();  // Cadre general
     312      infos_theMainImage_obj = jQuery("#" + "theMainImage_obj").infos();
     313      infos_theMainImage_obj.rapport = infos_theMainImage_obj.width / infos_theMainImage_obj.height;
    312314
    313315      if (infos_theMainImage.width == 0) {
     
    316318          theMainImage_id = "charlie";
    317319          options.valide = true;
     320
     321
    318322        } else if (Type_Img == "iframe") {
    319323
     
    530534    Get_type_img();
    531535
     536    var infos_theMainImage_obj;
    532537    var theMainImage_id = "#theMainImage";
    533538    var theImage_id = "#theImage";
     
    867872
    868873
    869           if (Type_Img == "charlie" || Type_Img == "iframe") {
    870             jQuery("#" + "theMainImage_obj").attr("width",Zone_image.image.width);
    871              jQuery("#" + "theMainImage_obj").attr("height",Zone_image.image.height);
    872           jQuery("#" + Type_Img).attr("width",Zone_image.image.width);
    873           jQuery("#" + Type_Img).attr("height",Zone_image.image.height);
    874           swfobj = jQuery("#" + Type_Img).infos({ absolute: true });
    875 
    876           //  jQuery("#" + Type_Img).attr({ height: Zone_image.image.height, width: Zone_image.image.width - 50 });
    877           //  jQuery(theMainImage_obj).attr({ height: Zone_image.image.height, width: Zone_image.image.width - 50 });
    878           //  jQuery(theMainImage_emb).attr({ height: Zone_image.image.height, width: Zone_image.image.width });
    879 
     874        if (Type_Img == "charlie" || Type_Img == "iframe") {
     875          jQuery("#" + "theMainImage_obj").attr("width", Zone_image.image.height * infos_theMainImage_obj.rapport);
     876          jQuery("#" + "theMainImage_obj").attr("height", Zone_image.image.height);
     877          jQuery("#" + Type_Img).attr("width", Zone_image.image.width);
     878          jQuery("#" + Type_Img).attr("height", Zone_image.image.height);
     879          swfobj = jQuery("#" + Type_Img).infos({ absolute: true });
    880880        }
    881881
     
    21282128
    21292129
    2130   });                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              // ready
     2130  });                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 // ready
    21312131
    21322132
Note: See TracChangeset for help on using the changeset viewer.