Ignore:
Timestamp:
Nov 1, 2011, 6:15:55 PM (12 years ago)
Author:
cljosse
Message:

[extensions] Autosize delete add class "image_comment"

File:
1 edited

Legend:

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

    r12527 r12535  
    111111
    112112    //   if (nu_img > 1) return;
    113   if (typeof theImg == "undefined") return true;
    114   if (theImg == null) return;
    115 
    116   if (jQuery(theImg).length > 0) {
     113
     114  if (typeof The_MainImage == "undefined") return true;
     115  if (The_MainImage == null) return;
     116
     117  if (jQuery(The_MainImage).length > 0) {
    117118
    118119  if(typeof stb!="undefined")
    119120 stb.stop().fadeTo(3500, 0);
    120121
    121     img_h = jQuery(theImg).height();
    122     img_w = jQuery(theImg).width();
     122    img_h = jQuery(The_MainImage).height();
     123    img_w = jQuery(The_MainImage).width();
    123124    jQuery("#src_img_h").val(img_h);
    124125    jQuery("#src_img_w").val(img_w);
     
    135136        width: img_w,
    136137        height: img_h,
    137         theImage: theImg,
     138        theImage: The_MainImage,
    138139        src_img: src_img,
    139140        window_height: Window_Affichage.height,
     
    404405       jQuery(window).unload(function () {
    405406         try {
    406            if (typeof theImg != "undefined") {
    407              jQuery.cookie('img', theImg.src); // créer un cookie avec une valeur
    408 
    409              jQuery.cookie('img_h', jQuery(theImg).height());
    410              jQuery.cookie('img_w', jQuery(theImg).width());
     407           if (typeof The_MainImage != "undefined") {
     408             jQuery.cookie('img', The_MainImage.src); // créer un cookie avec une valeur
     409
     410             jQuery.cookie('img_h', jQuery(The_MainImage).height());
     411             jQuery.cookie('img_w', jQuery(The_MainImage).width());
    411412
    412413             if (typeof Window_Affichage != "undefined") {
     
    467468         //=============================================================
    468469         Type_Img = "";
    469          theImg = null;
    470470         nopano = false;
    471471
     
    592592           info_Licence = jQuery(".licencetag").infos();
    593593
    594            if (typeof Type_Img == 'undefined') {
    595 
    596            }
    597 
    598 
    599594           // jQuery(".licencetag").addClass('imageComment');
    600 
     595 /*
    601596           hd_click = jQuery("#theImage a[href]");
    602597           if (hd_click.length > 0) {
     
    612607           if (jQuery('#_Comment, ').length == 0)
    613608             jQuery('.imageComment, ').wrapAll('<div id="_Comment"  />');
     609            */
    614610
    615611           if (theme.match(RegExp("simple", "g"))) {
     
    672668             var info_pamoorama_footer = jQuery("#pamoorama_footer").infos();
    673669             var info_pamoorama_frame = jQuery("#pamoorama_frame").infos();
    674              theImg = jQuery("#pamoorama");
    675              obj = theImg.get(0);
     670             The_MainImage = jQuery("#pamoorama");
     671             obj = The_MainImage.get(0);
    676672
    677673           } else {
     
    710706
    711707               //the theMainImage ??
    712                if (!theImg) {
    713                  theImg = jQuery("#theMainImage");
    714                  if (theImg.length > 0)
     708               if (!The_MainImage) {
     709                 The_MainImage = jQuery("#theMainImage");
     710                 if (The_MainImage.length > 0)
    715711                   return;
    716                  theImg = jQuery().Get_Img_Maxi("#Panorama img[alt]");
     712                 The_MainImage = jQuery().Get_Img_Maxi("#Panorama img[alt]");
    717713                 // return;
    718                  if (theImg.length > 0)
    719                    theImg = theImg[0];
     714                 if (The_MainImage.length > 0)
     715                   The_MainImage = The_MainImage[0];
    720716                 else
    721                    theImg = jQuery().Get_Img_Maxi("#Panorama img[alt]");
    722                }
    723                info_theImage = jQuery(theImg).infos();
     717                   The_MainImage = jQuery().Get_Img_Maxi("#Panorama img[alt]");
     718               }
     719               info_theImage = jQuery(The_MainImage).infos();
    724720               info_the_page = jQuery("#the_page").infos();
    725721               jQuery("#theImage").height(info_theImage.height);
     
    729725             case "img":
    730726
    731                if (!theImg) return true;
     727               if (!The_MainImage) return true;
    732728               if (theme.match(RegExp("luciano", "g"))) {
    733                  theImg = jQuery("#the_page #theImg");
     729                 The_MainImage = jQuery("#the_page #The_MainImage");
    734730               }
    735731
     
    739735               break
    740736             case "img_autre":
    741                if (!theImg) {
    742                  if (DEBUG_autosize == "true") alert("theImg=null");
     737               if (!The_MainImage) {
     738                 if (DEBUG_autosize == "true") alert("The_MainImage=null");
    743739                 return true;
    744740
    745741               }
    746                info_theImage = jQuery(theImg).infos();
     742               info_theImage = jQuery(The_MainImage).infos();
    747743               info_the_page = jQuery("#the_page").infos();
    748744
     
    787783
    788784
    789                theImg = myPamoorama.image;
     785               The_MainImage = myPamoorama.image;
    790786               info_theImage = jQuery("#pamoorama").infos();
    791787               //img_finale.height = info_theImage.height;
     
    801797           }
    802798           //================= Vérification taille image ==================
    803            MinWidth = jQuery(theImg).css("minWidth");
     799           MinWidth = jQuery(The_MainImage).css("minWidth");
    804800           if (MinWidth == "0px")
    805801             MinWidth = mini_width;
    806            MinHeight = jQuery(theImg).css("minHeight");
     802           MinHeight = jQuery(The_MainImage).css("minHeight");
    807803           if (MinHeight == "0px")
    808804             MinHeight = mini_height;
    809805
    810            MaxWidth = jQuery(theImg).css("maxWidth");
     806           MaxWidth = jQuery(The_MainImage).css("maxWidth");
    811807           if (MaxWidth == "0px")
    812808             MaxWidth = winwidth;
    813            MaxHeight = jQuery(theImg).css("maxHeight");
     809           MaxHeight = jQuery(The_MainImage).css("maxHeight");
    814810           if (MaxHeight == "0px")
    815811             MaxHeight = mwinheight;
    816812
    817813           //=============== Vérification taille minimale  autorizée ======================
    818            var miniWidth = jQuery(theImg).Get_Val_int(MinWidth, mini_width);
    819            var miniHeight = jQuery(theImg).Get_Val_int(MinHeight, mini_height);
     814           var miniWidth = jQuery(The_MainImage).Get_Val_int(MinWidth, mini_width);
     815           var miniHeight = jQuery(The_MainImage).Get_Val_int(MinHeight, mini_height);
    820816           if (winwidth < mini_width2) mini_width2 = winwidth;
    821817
    822            var miniWidth2 = jQuery(theImg).Get_Val_int(MinWidth, mini_width2);
    823            var miniHeight2 = jQuery(theImg).Get_Val_int(MinHeight, mini_height2);
    824 
    825 
    826            var maxWidth = jQuery(theImg).Get_Val_int(MaxWidth, winwidth, "0");
    827            maxHeight = jQuery(theImg).Get_Val_int(MaxHeight, winheight, "0");
     818           var miniWidth2 = jQuery(The_MainImage).Get_Val_int(MinWidth, mini_width2);
     819           var miniHeight2 = jQuery(The_MainImage).Get_Val_int(MinHeight, mini_height2);
     820
     821
     822           var maxWidth = jQuery(The_MainImage).Get_Val_int(MaxWidth, winwidth, "0");
     823           maxHeight = jQuery(The_MainImage).Get_Val_int(MaxHeight, winheight, "0");
    828824
    829825
     
    10151011             //=============LLGBO2 ===========================
    10161012             t1 = llgboframe;
    1017              if (!theImg.src) {
    1018                theImg = jQuery("#gbo").find("img").get(0)
    1019                if (!theImg.src) {
    1020                  theImg = jQuery(Parent).find("div").get(0)
     1013             if (!The_MainImage.src) {
     1014               The_MainImage = jQuery("#gbo").find("img").get(0)
     1015               if (!The_MainImage.src) {
     1016                 The_MainImage = jQuery(Parent).find("div").get(0)
    10211017               }
    10221018             }
    1023              if (theImg.src) {
     1019             if (The_MainImage.src) {
    10241020               wingbo = img_finale.width;
    10251021               heightgbo = img_finale.height;
     
    11711167               jQuery("object").height(img_finale.height);
    11721168               jQuery(Cadre).height(img_finale.height + Bandeau_bas.height); //??
    1173                jQuery(theImg).height(img_finale.height);
     1169               jQuery(The_MainImage).height(img_finale.height);
    11741170               jQuery(Cadre).css("height", "auto");
    11751171             }
     
    12611257
    12621258
    1263            } else if (theImg != null && theImg.src) {
     1259           } else if (The_MainImage != null && The_MainImage.src) {
    12641260             //--- background ?? ---
    1265              jQuery(theImg).height(img_finale.height);
    1266              jQuery(theImg).width(img_finale.width);
    1267              jQuery(theImg).css({ height: img_finale.height + "px ",
     1261             jQuery(The_MainImage).height(img_finale.height);
     1262             jQuery(The_MainImage).width(img_finale.width);
     1263             jQuery(The_MainImage).css({ height: img_finale.height + "px ",
    12681264               width: img_finale.width + "px "
    12691265             });
     
    12721268           } else {
    12731269             //===map ? luciano ===
    1274              jQuery(theImg).height(img_finale.height);
    1275              jQuery(theImg).width(img_finale.width);
    1276              jQuery(theImg).css({ height: img_finale.height + "px ",
     1270             jQuery(The_MainImage).height(img_finale.height);
     1271             jQuery(The_MainImage).width(img_finale.width);
     1272             jQuery(The_MainImage).css({ height: img_finale.height + "px ",
    12771273               width: img_finale.width + "px "
    12781274             });
     
    16211617    if (theme.match(RegExp("luciano", "g"))) {
    16221618        jQuery("#imageContainer").css({ height: "auto" });
    1623         theImg = jQuery(Parent + " #theImg img");
    1624         info_img = jQuery(theImg).infos();
     1619        The_MainImage = jQuery(Parent + " #theImg img");
     1620        info_img = jQuery(The_MainImage).infos();
    16251621
    16261622
     
    16381634        });
    16391635
    1640         theImg = jQuery("#map");
    1641         info_img = jQuery(theImg).infos();
     1636        The_MainImage = jQuery("#map");
     1637        info_img = jQuery(The_MainImage).infos();
    16421638
    16431639
     
    16771673
    16781674        if (MainImage.length == 0) {
    1679           theImg = jQuery("#charlie");
    1680           info_img = jQuery(theImg).infos();
     1675          The_MainImage = jQuery("#charlie");
     1676          info_img = jQuery(The_MainImage).infos();
    16811677        } else {
    1682           theImg = jQuery("#theMainImage");
    1683           info_img = jQuery(theImg).infos();
     1678          The_MainImage = jQuery("#theMainImage");
     1679          info_img = jQuery(The_MainImage).infos();
    16841680         
    16851681        }
     
    16881684    } else if (jQuery(Parent + " embed").length > 0) {
    16891685    if (jQuery("#theMainImage").lenght == 0) {
    1690       theImg = jQuery(Parent + " embed");
    1691       info_img = jQuery(theImg).infos();
     1686      The_MainImage = jQuery(Parent + " embed");
     1687      info_img = jQuery(The_MainImage).infos();
    16921688      jQuery(Parent + " embed").width({ width: info_img.width + "px", height: info_img.height + "px" });
    16931689    } else {
    1694       theImg = jQuery("#theMainImage");
    1695       info_img = jQuery(theImg).infos();
     1690      The_MainImage = jQuery("#theMainImage");
     1691      info_img = jQuery(The_MainImage).infos();
    16961692      Type_Img == "charlie"
    16971693    }
     
    17021698            return info_description;
    17031699        }
    1704         theImg = jQuery("#pamoorama");
    1705         info_img = jQuery(theImg).infos();
     1700        The_MainImage = jQuery("#pamoorama");
     1701        info_img = jQuery(The_MainImage).infos();
    17061702        info_footer = jQuery("#pamoorama_footer").infos();
    17071703        info_img.height = parseInt(img_reelle.height) + parseInt(info_footer.height);
     
    17111707
    17121708        if (MainImage.length == 0) {
    1713           theImg = jQuery(Parent + " img[alt]");
     1709          The_MainImage = jQuery(Parent + " img[alt]");
    17141710        } else {
    1715           theImg = jQuery("#theMainImage");   
     1711          The_MainImage = MainImage;   
    17161712        }
    17171713
    1718         //theImg = Get_Img_Maxi(theImg);
    1719         //theMainImage
    17201714     
    1721         if (!theImg)
    1722             theImg = jQuery(Parent);   // sans img ??
    1723         if (theImg.length > 1)
    1724           {theImg = theImg[0];
     1715        if (!The_MainImage)
     1716            The_MainImage = jQuery(Parent);   // sans img ??
     1717        if (The_MainImage.length > 1) {
     1718        The_MainImage = The_MainImage[0];
    17251719          }
    17261720
    1727         //theImg = Get_Img_Maxi(theImg);  //1.6.2
    1728         //if (!theImg) theImg = jQuery(Parent);   // 1.6.2sans img ??
    1729         info_img = jQuery(theImg).infos();
     1721        info_img = jQuery(The_MainImage).infos();
    17301722    }
    17311723    //=====================================================================================
Note: See TracChangeset for help on using the changeset viewer.