Changeset 18944
- Timestamp:
- Nov 5, 2012, 8:39:40 PM (11 years ago)
- Location:
- extensions/Autosize/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r18941 r18944 129 129 frm1 = jQuery("#theImage" + " " + type_src).get(0); 130 130 Type_Img = "iframe"; 131 132 131 //'fb - xfbml - like - button 133 134 132 objs = jQuery("#theImage" + " div").get(0); 135 133 if (jQuery(objs).length > 0) { … … 141 139 jQuery(frm1).attr("id", "charlie"); 142 140 } else { 143 Type_Img = "img";141 // Type_Img = "img"; 144 142 } 145 143 } 146 144 } else { 147 145 jQuery(frm1).attr("id", "iframe"); 146 jQuery(frm1).wrap('<div id="' + "theMainImage" + '" style="border:1px solid Transparent" />'); 148 147 } 149 148 … … 320 319 321 320 infos_theMainImage = jQuery("#iframe").infos(true); 322 theMainImage_id = "iframe"; 321 323 322 options.valide = true; 324 323 … … 868 867 869 868 870 if (Type_Img == "charlie" || Type_Img == "iframe") { 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); 871 874 swfobj = jQuery("#" + Type_Img).infos({ absolute: true }); 872 875 … … 911 914 document.cookie = 'picture_sel_type=' + type + ';path=' + COOKIE_PATH; 912 915 } else { 913 916 914 917 jQuery('#derivativeChecked' + typeSave).css('visibility', 'visible'); 915 918 document.cookie = 'picture_sel_type=' + typeSave + ';path=' + COOKIE_PATH; … … 1262 1265 vn = this; 1263 1266 size_derive = { w: parseInt(vn[2]), h: parseInt(vn[3]) }; 1264 if (vn[0] == options.pictureSelType || vn[0] == "Original" 1267 if (vn[0] == options.pictureSelType || vn[0] == "Original") { 1265 1268 maxi_size = size_derive; 1266 1269 maxi_size.idx = n; … … 1371 1374 identique = Zone_image.src.match(RegExp(imgSrc, "gi")); 1372 1375 if (identique) return; 1373 href_path = "javascript:changeImgSrc('" + imgSrc + IMg.pictureDeriv + "', '" + "', '" + IMg.pictureMap + "', '"+ options.pictureSelType + "')";1376 href_path = "javascript:changeImgSrc('" + imgSrc + IMg.pictureDeriv + "', '" + "', '" + IMg.pictureMap + "', '" + options.pictureSelType + "')"; 1374 1377 jQuery(".linkAutosize").attr("href", href_path); 1375 1378 theImg = document.getElementById(theMainImage_id.replace("#", "")); … … 1683 1686 options.theImageLeft = new_dim.left; 1684 1687 options.theImageRight = (new_win.width - new_dim.right); 1688 options.marge_bottom = Math.ceil(new_dim.out.bottom - new_img.out.bottom); 1689 if (Type_Img == "iframe") { } 1690 new_dim.out.bottom = new_win.height - options.marge_bottom; 1691 1685 1692 options.theImageBottom = new_win.height - new_dim.out.bottom; 1686 1693 options.marge_top = Math.ceil(new_img.top - new_dim.top); 1687 options.marge_bottom = Math.ceil(new_dim.out.bottom - new_img.out.bottom); 1694 1688 1695 if (options.theImageBottom < 0) { 1689 1696 options.theImageBottom = 0; … … 1694 1701 if (chk == "") { return; } 1695 1702 1696 if (Type_Img != "map" )1703 if (Type_Img != "map" && Type_Img != "iframe") 1697 1704 Select_Image(); 1698 1705 infos_theMainImage = jQuery(theMainImage_id).infos({ absolute: true }); … … 1767 1774 Zone_image.image.width = options.theImageWidth; 1768 1775 Zone_image.image.height = options.theImageHeight; 1776 Zone_image.zoom = 1; 1769 1777 break 1770 1778 case "pamoorama": … … 2120 2128 2121 2129 2122 }); // ready2130 }); // ready 2123 2131 2124 2132 -
extensions/Autosize/js/autosize_ajax.js
r18744 r18944 18 18 function progress(success,data) { 19 19 if (success) { 20 jQuery("#theMainImage").trigger("ON", [{ nb: derivatives.total - derivatives.done, total: derivatives.total, done: derivatives.done,status:"ok",src:data.url,Width:data.Width,Height:data.Height}]); 20 try { 21 jQuery("#theMainImage").trigger("ON", [{ nb: derivatives.total - derivatives.done, total: derivatives.total, done: derivatives.done, status: "ok", src: data.url, Width: data.Width, Height: data.Height}]); 22 } catch (e) { 23 24 } 21 25 } else { 22 26 … … 81 85 j = derivatives.done; 82 86 derivatives.done++; 83 for (var j = 0; j < params.src.length; j++) { 84 if (data.url.match(params.src[j])) { 85 params.src[j] = ""; break; 87 try { 88 for (var j = 0; j < params.src.length; j++) { 89 if (data.url.match(params.src[j])) { 90 params.src[j] = ""; break; 91 } 86 92 } 93 data.Width = Width; 94 data.Height = Height; 95 } catch (e) { 96 87 97 } 88 data.Width = Width;89 data.Height = Height;90 98 progress(true, data); 91 99 }),
Note: See TracChangeset
for help on using the changeset viewer.