Changeset 12535 for extensions/Autosize/js/Affiche_script.js
- Timestamp:
- Nov 1, 2011, 6:15:55 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r12527 r12535 111 111 112 112 // 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) { 117 118 118 119 if(typeof stb!="undefined") 119 120 stb.stop().fadeTo(3500, 0); 120 121 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(); 123 124 jQuery("#src_img_h").val(img_h); 124 125 jQuery("#src_img_w").val(img_w); … … 135 136 width: img_w, 136 137 height: img_h, 137 theImage: theImg,138 theImage: The_MainImage, 138 139 src_img: src_img, 139 140 window_height: Window_Affichage.height, … … 404 405 jQuery(window).unload(function () { 405 406 try { 406 if (typeof theImg!= "undefined") {407 jQuery.cookie('img', theImg.src); // créer un cookie avec une valeur408 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()); 411 412 412 413 if (typeof Window_Affichage != "undefined") { … … 467 468 //============================================================= 468 469 Type_Img = ""; 469 theImg = null;470 470 nopano = false; 471 471 … … 592 592 info_Licence = jQuery(".licencetag").infos(); 593 593 594 if (typeof Type_Img == 'undefined') {595 596 }597 598 599 594 // jQuery(".licencetag").addClass('imageComment'); 600 595 /* 601 596 hd_click = jQuery("#theImage a[href]"); 602 597 if (hd_click.length > 0) { … … 612 607 if (jQuery('#_Comment, ').length == 0) 613 608 jQuery('.imageComment, ').wrapAll('<div id="_Comment" />'); 609 */ 614 610 615 611 if (theme.match(RegExp("simple", "g"))) { … … 672 668 var info_pamoorama_footer = jQuery("#pamoorama_footer").infos(); 673 669 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); 676 672 677 673 } else { … … 710 706 711 707 //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) 715 711 return; 716 theImg= jQuery().Get_Img_Maxi("#Panorama img[alt]");712 The_MainImage = jQuery().Get_Img_Maxi("#Panorama img[alt]"); 717 713 // return; 718 if ( theImg.length > 0)719 theImg = theImg[0];714 if (The_MainImage.length > 0) 715 The_MainImage = The_MainImage[0]; 720 716 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(); 724 720 info_the_page = jQuery("#the_page").infos(); 725 721 jQuery("#theImage").height(info_theImage.height); … … 729 725 case "img": 730 726 731 if (! theImg) return true;727 if (!The_MainImage) return true; 732 728 if (theme.match(RegExp("luciano", "g"))) { 733 theImg = jQuery("#the_page #theImg");729 The_MainImage = jQuery("#the_page #The_MainImage"); 734 730 } 735 731 … … 739 735 break 740 736 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"); 743 739 return true; 744 740 745 741 } 746 info_theImage = jQuery( theImg).infos();742 info_theImage = jQuery(The_MainImage).infos(); 747 743 info_the_page = jQuery("#the_page").infos(); 748 744 … … 787 783 788 784 789 theImg= myPamoorama.image;785 The_MainImage = myPamoorama.image; 790 786 info_theImage = jQuery("#pamoorama").infos(); 791 787 //img_finale.height = info_theImage.height; … … 801 797 } 802 798 //================= Vérification taille image ================== 803 MinWidth = jQuery( theImg).css("minWidth");799 MinWidth = jQuery(The_MainImage).css("minWidth"); 804 800 if (MinWidth == "0px") 805 801 MinWidth = mini_width; 806 MinHeight = jQuery( theImg).css("minHeight");802 MinHeight = jQuery(The_MainImage).css("minHeight"); 807 803 if (MinHeight == "0px") 808 804 MinHeight = mini_height; 809 805 810 MaxWidth = jQuery( theImg).css("maxWidth");806 MaxWidth = jQuery(The_MainImage).css("maxWidth"); 811 807 if (MaxWidth == "0px") 812 808 MaxWidth = winwidth; 813 MaxHeight = jQuery( theImg).css("maxHeight");809 MaxHeight = jQuery(The_MainImage).css("maxHeight"); 814 810 if (MaxHeight == "0px") 815 811 MaxHeight = mwinheight; 816 812 817 813 //=============== 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); 820 816 if (winwidth < mini_width2) mini_width2 = winwidth; 821 817 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"); 828 824 829 825 … … 1015 1011 //=============LLGBO2 =========================== 1016 1012 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) 1021 1017 } 1022 1018 } 1023 if ( theImg.src) {1019 if (The_MainImage.src) { 1024 1020 wingbo = img_finale.width; 1025 1021 heightgbo = img_finale.height; … … 1171 1167 jQuery("object").height(img_finale.height); 1172 1168 jQuery(Cadre).height(img_finale.height + Bandeau_bas.height); //?? 1173 jQuery( theImg).height(img_finale.height);1169 jQuery(The_MainImage).height(img_finale.height); 1174 1170 jQuery(Cadre).css("height", "auto"); 1175 1171 } … … 1261 1257 1262 1258 1263 } else if ( theImg != null && theImg.src) {1259 } else if (The_MainImage != null && The_MainImage.src) { 1264 1260 //--- 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 ", 1268 1264 width: img_finale.width + "px " 1269 1265 }); … … 1272 1268 } else { 1273 1269 //===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 ", 1277 1273 width: img_finale.width + "px " 1278 1274 }); … … 1621 1617 if (theme.match(RegExp("luciano", "g"))) { 1622 1618 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(); 1625 1621 1626 1622 … … 1638 1634 }); 1639 1635 1640 theImg= jQuery("#map");1641 info_img = jQuery( theImg).infos();1636 The_MainImage = jQuery("#map"); 1637 info_img = jQuery(The_MainImage).infos(); 1642 1638 1643 1639 … … 1677 1673 1678 1674 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(); 1681 1677 } else { 1682 theImg= jQuery("#theMainImage");1683 info_img = jQuery( theImg).infos();1678 The_MainImage = jQuery("#theMainImage"); 1679 info_img = jQuery(The_MainImage).infos(); 1684 1680 1685 1681 } … … 1688 1684 } else if (jQuery(Parent + " embed").length > 0) { 1689 1685 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(); 1692 1688 jQuery(Parent + " embed").width({ width: info_img.width + "px", height: info_img.height + "px" }); 1693 1689 } else { 1694 theImg= jQuery("#theMainImage");1695 info_img = jQuery( theImg).infos();1690 The_MainImage = jQuery("#theMainImage"); 1691 info_img = jQuery(The_MainImage).infos(); 1696 1692 Type_Img == "charlie" 1697 1693 } … … 1702 1698 return info_description; 1703 1699 } 1704 theImg= jQuery("#pamoorama");1705 info_img = jQuery( theImg).infos();1700 The_MainImage = jQuery("#pamoorama"); 1701 info_img = jQuery(The_MainImage).infos(); 1706 1702 info_footer = jQuery("#pamoorama_footer").infos(); 1707 1703 info_img.height = parseInt(img_reelle.height) + parseInt(info_footer.height); … … 1711 1707 1712 1708 if (MainImage.length == 0) { 1713 theImg= jQuery(Parent + " img[alt]");1709 The_MainImage = jQuery(Parent + " img[alt]"); 1714 1710 } else { 1715 theImg = jQuery("#theMainImage");1711 The_MainImage = MainImage; 1716 1712 } 1717 1713 1718 //theImg = Get_Img_Maxi(theImg);1719 //theMainImage1720 1714 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]; 1725 1719 } 1726 1720 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(); 1730 1722 } 1731 1723 //=====================================================================================
Note: See TracChangeset
for help on using the changeset viewer.