Changeset 12773 for extensions/Autosize


Ignore:
Timestamp:
Dec 21, 2011, 8:32:39 AM (12 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix bug compatibility with charlie, facebook, iframe, and rvmap

File:
1 edited

Legend:

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

    r12692 r12773  
    11201120           //=========================================================================
    11211121           //=== cadre = theImage
    1122            jQuery(Cadre).css({ marginLeft: "auto" });
    11231122           if (theme.match(RegExp("simple", "gi"))) {
    11241123             jQuery(Cadre).width(Zone_Affichage.width); //centrer simple black
     1124             jQuery(Cadre).css({ width: Zone_Affichage.width + "px",
     1125               marginLeft: "auto"
     1126             });
     1127
    11251128           } else if (theme.match(RegExp("sobre", "gi")) || theme.match(RegExp("hr_", "gi")) || theme.match(RegExp("Mont", "gi"))) {
    1126              jQuery(Cadre).css("width", "auto");
     1129             jQuery(Cadre).css({ width: "auto", marginLeft: "auto" });
     1130           } else if (theme.match(RegExp("saruka", "gi"))) {
     1131
     1132             jQuery(Cadre).css({ width: Zone_Affichage.width + "px" });
     1133
    11271134           } else {
    11281135             jQuery(Cadre).css("width", "auto");
     
    11881195
    11891196               jQuery("embed").css({ width: img_finale.width + "px",
    1190                                     height: img_finale.height + "px" });
     1197                 height: img_finale.height + "px"
     1198               });
    11911199               jQuery("object").css({ width: img_finale.width + "px",
    11921200                                    height: img_finale.height + "px"
     
    16021610    } else if (jQuery("#pamoorama").length) {
    16031611        Type_Img = "pamoorama";
    1604 
     1612     } else if (jQuery("#map").length) {
     1613        Type_Img = "map";
     1614     } else if (jQuery("#Panorama").length) {
     1615        Type_Img = "panorama";
    16051616    } else if (jQuery(Parent + " object").length > 0) {
    16061617        Type_Img = "charlie";
     
    16201631
    16211632      } else if (jQuery(Parent + " iframe").length > 0) {
     1633
    16221634        Type_Img = "charlie";
    1623         if (jQuery(Parent + " div").length > 0)
    1624           jQuery(Parent + " div").attr("id", "charlie");
    1625         else
    1626           jQuery(Parent + " iframe").attr("id", "charlie");
     1635
     1636        //'fb - xfbml - like - button
     1637        nbf = jQuery(Parent + " iframe").length;
     1638        frm1 = jQuery(Parent + " iframe").get(0) ;
     1639        objs = jQuery(Parent + " div").get(0);
     1640        if (jQuery(objs).length > 0) {
     1641          id_0 = jQuery(objs).attr("id");     
     1642        if (id_0 == "") {
     1643          jQuery(objs).attr("id", "charlie");
     1644        } else {
     1645          if (nbf > 1) {
     1646            jQuery(frm1).attr("id", "charlie");
     1647          } else {
     1648            Type_Img = "img";
     1649          }           
     1650        }
     1651        } else {
     1652         jQuery(frm1).attr("id", "charlie");
     1653        }
    16271654        type_src = "iframe";
    16281655
    1629     } else if (jQuery("#map").length) {
    1630         Type_Img = "map";
    1631 
    1632     } else if (jQuery("#Panorama").length) {
    1633         Type_Img = "panorama";
    16341656    } else if (jQuery(Parent).find("img").length > 0) {
    16351657        Type_Img = "img";
Note: See TracChangeset for help on using the changeset viewer.