Changeset 18949 for extensions/Autosize/js/Affiche_script.js
- Timestamp:
- Nov 6, 2012, 3:30:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r18946 r18949 299 299 } 300 300 //__________ Set_llbgo _______________ 301 301 var wpng = 0; 302 302 /******************************************** 303 303 * window LOAD … … 310 310 infos_theMainImage = jQuery(theMainImage_id).infos({ absolute: true }); 311 311 infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general 312 infos_theMainImage_obj = jQuery("#" + "theMainImage_obj").infos(); 312 theMainImage_obj = "theMainImage_obj"; 313 infos_theMainImage_obj = jQuery("#" + theMainImage_obj).infos({ absolute: true }); 314 313 315 infos_theMainImage_obj.rapport = infos_theMainImage_obj.width / infos_theMainImage_obj.height; 314 315 316 if (infos_theMainImage.width == 0) { 316 if (Type_Img == "charlie") { 317 if (Type_Img == "pamoorama") { 318 infos_theMainImage = jQuery("#pamoorama").infos(true); 319 theMainImage_id = "#pamoorama"; 320 options.valide = true; 321 } else if (Type_Img == "charlie") { 317 322 infos_theMainImage = jQuery("#charlie").infos(true); 318 323 theMainImage_id = "charlie"; … … 331 336 jQuery("#iframe").height(infos_theMainImage.height); 332 337 333 } else if (Type_Img == "pamoorama") { 334 infos_theMainImage = jQuery("#pamoorama").infos(true); 335 theMainImage_id = "#pamoorama"; 336 options.valide = true; 338 337 339 338 340 } else { 339 340 341 jQuery("img").each(function (i) { 341 342 342 imgSrc = options.imgSrc; 343 344 345 343 }); 346 344 infos_theMainImage = jQuery("#theImage img").infos(); 347 348 345 } 349 346 if (infos_theMainImage.id == "") … … 873 870 874 871 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 }); 872 873 874 if (Type_Img == "charlie") { 875 dp1 = jQuery("#charlie").offset(); 876 dp = jQuery("#" + theMainImage_obj).offset(); 877 if (dp) { 878 if (wpng == 0) 879 wpng = (dp.left - dp1.left) * 2; 880 } 881 mrgl = (jQuery("#" + "theImage").width() - Zone_image.image.width) / 2; 882 png_h = jQuery("#" + Type_Img + " div").height(); 883 jQuery("#" + Type_Img).css({ marginLeft: mrgl + "px" }); 884 jQuery("#" + Type_Img).width(Zone_image.image.width); 885 jQuery("#" + Type_Img).height(Zone_image.image.height); 886 887 w01 = jQuery("#" + theMainImage_obj).width(); 888 jQuery("#" + theMainImage_obj).attr("width", Zone_image.image.width - wpng); 889 jQuery("#" + theMainImage_obj).attr("height", Zone_image.image.height); 890 jQuery("#theMainImage_emb").attr("width", Zone_image.image.width - wpng); 891 jQuery("#theMainImage_emb").attr("height", Zone_image.image.height); 892 jQuery("#theMainImage").height(png_h); 893 jQuery("#" + Type_Img).height(png_h); 894 895 896 } else { 897 jQuery("#" + theMainImage_obj).attr("width", Zone_image.image.width); 898 jQuery("#" + theMainImage_obj).attr("height", Zone_image.image.height); 899 jQuery("#" + Type_Img).attr("width", Zone_image.image.width); 900 jQuery("#" + Type_Img).attr("height", Zone_image.image.height); 901 } 902 903 904 905 jQuery("#" + Type_Img).show(options.fade_in); 880 906 } 881 907 … … 1335 1361 options.theImageMargeZone = Zone_image.marges; 1336 1362 if (Type_Img != 'charlie') { 1337 /*1338 if (options.pictureSelType != "SelMaxi" && options.pictureSelType != "Autosize") {1339 options.pictureMap = options.pictureDeriv;1340 1341 imgSrc = options.liste_type[6];1342 changeImgSrc(imgSrc, options.pictureDeriv, options.pictureMap, options.pictureSelType);1343 src = theImg.src;1344 return;1345 } else {1346 IMg = Get_Maxi(Zone_image.image);1347 }1348 */1349 1363 IMg = Get_Maxi(Zone_image.image); 1350 1364 imgSrc = IMg.url; … … 1374 1388 identique = Zone_image.src.match(RegExp(imgSrc, "gi")); 1375 1389 if (identique) return; 1376 href_path = "javascript:changeImgSrc('" + imgSrc + IMg.pictureDeriv + "', '"+ "', '" + IMg.pictureMap + "', '" + options.pictureSelType + "')";1390 href_path = "javascript:changeImgSrc('" + imgSrc + "', '" + IMg.pictureDeriv + "', '" + IMg.pictureMap + "', '" + options.pictureSelType + "')"; 1377 1391 jQuery(".linkAutosize").attr("href", href_path); 1378 1392 theImg = document.getElementById(theMainImage_id.replace("#", "")); … … 1635 1649 } 1636 1650 if (Type_Img == "charlie") { 1651 width_theMainImage = height_theMainImage * options.ratio; 1652 Zone_image.image_init.rapport = options.ratio; 1637 1653 1638 1654 } else if (Type_Img == "pamoorama") { … … 1769 1785 case "charlie": 1770 1786 1787 Zone_image.zoom = 1; 1788 1771 1789 break 1772 1790 1773 1791 case "iframe": 1792 wpng = 0; 1774 1793 Zone_image.image.width = options.theImageWidth; 1775 1794 Zone_image.image.height = options.theImageHeight; … … 2128 2147 2129 2148 2130 }); // ready2149 }); // ready 2131 2150 2132 2151
Note: See TracChangeset
for help on using the changeset viewer.