Changeset 8006 for extensions/Autosize/js
- Timestamp:
- Dec 6, 2010, 12:10:30 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r7964 r8006 405 405 //=============== Vérification taille minimale autorizée ====================== 406 406 var miniWidth = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-width"), mini_width); 407 miniHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-height"), mini_height);407 var miniHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-height"), mini_height); 408 408 409 409 var miniWidth2 = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-width"), mini_width2); … … 459 459 // correction = -info_Licence.padding.top; 460 460 if (Type_Img == 'img') { 461 if (msie == true) correction = 20;462 else correction = 30;461 if (msie == true) correction = 0; 462 else correction = 0; 463 463 } 464 464 … … 485 485 Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction - h; 486 486 //========================================================================= 487 if (Zone_Affichage.height < mini_height )487 if (Zone_Affichage.height < mini_height2) 488 488 Zone_Affichage.height = mini_height2; 489 if (Zone_Affichage.width < mini_width )489 if (Zone_Affichage.width < mini_width2) 490 490 Zone_Affichage.width = mini_width2; 491 491 //========================================================================= … … 541 541 widthmin = parseInt(width_user); 542 542 543 var marges = marges_llgbo;543 var marges = 0; 544 544 545 545 if (typeof (info_img) != "undefined") { … … 570 570 img_finale.height = Image_height; 571 571 img_finale.width = Image_width; 572 572 if (theme.match(RegExp("stripped", "gi"))) { 573 img_finale.width -= llgboframe.top; 574 img_finale.height = img_finale.width/rapport; 575 } 573 576 zoom = echelle; 574 //=============LLGBO2 =========================== 575 576 577 if (marges_llgbo > 0) { 578 579 t1 = jQuery(llgboframe).infos(); 577 if (llgboframe.height > 0) { 578 //=============LLGBO2 =========================== 579 t1 = llgboframe; 580 580 if (!TheImg.src) { 581 581 TheImg = jQuery(TheImg).find("img").get(0) … … 583 583 if (TheImg.src) { 584 584 585 img_finale.width -= (marges_llgbo); // réduction frame 586 img_finale.height -= (marges_llgbo); // réduction frame 587 588 if (rapport > 1) { 589 if (img_finale.width > winwidth) { 590 jQuery("#gbo").width(winwidth); 591 jQuery("#gbo").height(winheight); 592 jQuery("#gbo").css("width", winwidth + "px"); 593 jQuery("#gbo").css("height", winheight + "px"); 594 } 595 else { 596 jQuery("#gbo").width(img_finale.width); 597 jQuery("#gbo").height(img_finale.height); 598 jQuery("#gbo").css("width", img_finale.width + "px"); 599 jQuery("#gbo").css("height", img_finale.height + "px"); 600 } 601 602 t1 = jQuery("#gbo div:last").infos(); 603 604 img_finale.width = t1.width - (t1.borderwidth.left + t1.borderwidth.right); 605 img_finale.height = parseInt(img_finale.width / rapport); 606 607 jQuery("#gbo").height(Image_height); 608 jQuery("#gbo").css("height", (Image_height) + "px"); 609 610 611 } else { 612 img_finale.width -= (marges_llgbo / 2); // réduction frame 613 img_finale.height -= (marges_llgbo / 2); // réduction frame 614 if (Image_width > winwidth) { 615 jQuery("#gbo").width(winwidth); 616 jQuery("#gbo").height(winheight); 617 jQuery("#gbo").css("width", winwidth + "px"); 618 jQuery("#gbo").css("height", winheight + "px"); 619 } 620 else { 621 jQuery("#gbo").width(img_finale.width); 622 jQuery("#gbo").height(img_finale.height); 623 jQuery("#gbo").css("width", img_finale.width + "px"); 624 jQuery("#gbo").css("height", img_finale.height + "px"); 625 } 626 627 628 jQuery("#gbo").css("height", (img_finale.height + marges_llgbo) + "px"); 629 jQuery("#gbo").height(img_finale.height + marges_llgbo); 630 631 jQuery("#gbo").css("width", img_finale.width + marges_llgbo + "px"); 632 jQuery("#gbo").width(img_finale.width + marges_llgbo); 633 634 635 } 636 Zone_Affichage.height = jQuery("#gbo").outerHeight(true) 637 638 //============================================================= 639 // jQuery(Parent + " p:not(:contains(' ')) ").remove(); 585 586 wingbo = img_finale.width; 587 heightgbo = img_finale.height; 588 img_finale.width -= marges_llgbo ; 589 img_finale.height -= marges_llgbo; 590 591 if (wingbo > winwidth) { 592 jQuery("#gbo").width(winwidth); 593 jQuery("#gbo").height(winheight); 594 jQuery("#gbo").css("width", winwidth + "px"); 595 jQuery("#gbo").css("height", winheight + "px"); 596 } 597 else { 598 jQuery("#gbo").width(wingbo); 599 jQuery("#gbo").height(heightgbo); 600 jQuery("#gbo").css("width", wingbo + "px"); 601 jQuery("#gbo").css("height", heightgbo + "px"); 602 } 603 640 604 a0 = jQuery("area[rel!=up][rel!=prev][rel!=next]"); 641 605 a1 = jQuery("area[rel=prev]"); … … 766 730 767 731 img_height = myPamoorama.imageHeight 768 769 732 marge_left += 2; 770 733 … … 773 736 } 774 737 new_width = Zone_Affichage.width - marge_right - marge_left; 775 776 myPamoorama.options.width = new_width; 777 info_theImage.height = img_reelle.height + info_pamoorama_footer.height 738 info_theImage.height = Zone_Affichage.height; 739 740 Zone_Affichage.height += info_pamoorama_footer.height; 741 742 743 zoom = info_theImage.height / img_height; 744 myPamoorama.options.width = new_width * zoom; 745 746 747 jQuery("#pamoorama_inner ").css({ zoom: zoom }); 778 748 //==================================================== 779 749 jQuery("#pamoorama").css({ 780 750 marginLeft: "auto", 781 751 marginRight: "auto", 782 height: info_theImage.height + "px",752 height: Zone_Affichage.height + "px", 783 753 width: new_width + "px" 784 754 }); … … 889 859 jQuery(".navThumb img").css({ height: "80px", width: "", overflow: "hidden" }); 890 860 } 891 info_frame = jQuery( "#the_page").infos();861 info_frame = jQuery(Cadre).infos(); 892 862 893 863 if (DEBUG == "true") { … … 905 875 jQuery("#Debug5").css({ background: "transparent", 906 876 position: pos, 907 border: " redsolid 2px",877 border: "green solid 2px", 908 878 textAlign: align_auto, 909 879 margin: "4px", … … 979 949 info_theImage = jQuery(Parent).infos(); 980 950 info_thePicturePage = jQuery("#thePicturePage").infos(); 981 951 if ( theme.match(RegExp("stripped", "gi"))) 952 { 953 optiontop = info_imageInfoBar.bottom + llgboframe.top; 954 } 982 955 983 956 if (info_theImage.position == "relative") { … … 987 960 988 961 } else { 989 if ( theme.match(RegExp("stripped", "gi"))) 990 { 991 optiontop = info_imageInfoBar.bottom; 992 } 962 993 963 } 994 964 if (info_theImage.position == "absolute") { … … 1005 975 ); 1006 976 1007 img_top = Math.ceil(info_theImage.top + 1008 info_theImage.borderwidth.top + 1009 info_thePicturePage.margin.top + optiontop); 1010 result = info_imageToolBar; 1011 result.width = "20%"; 1012 result.left = "40%"; 1013 result.marge_top = marge_top; 1014 result.img_top = img_top; 1015 977 img_top = Math.ceil(info_theImage.top + 978 info_theImage.borderwidth.top + 979 info_thePicturePage.margin.top + optiontop); 980 result = info_imageToolBar; 981 result.width = "20%"; 982 result.left = "40%"; 983 result.marge_top = marge_top; 984 result.img_top = img_top; 985 //=== Afficher le titre de l'image sur le cadre === 986 llgboh2 = jQuery("#gboh2").infos(); 987 result.img_top += llgboh2.height ; 1016 988 return result; 1017 989 … … 1056 1028 1057 1029 1058 llgboframe = jQuery("#gbo div:first");1030 llgboframe = jQuery("#gbo").infos(); 1059 1031 marges_llgbo = 0; 1060 1032 //========================================================= 1061 1033 1062 if (llgboframe. length> 0) {1063 ll0 = jQuery("#gbo").infos();1034 if (llgboframe.height > 0) { 1035 1064 1036 ll1 = jQuery("#gbo div:first").infos(); 1065 ll12 = jQuery("#gbo div:last").infos(); ; 1066 ll1 = jQuery("#"+ll1.id).outerWidth(true); 1067 ll2 = jQuery("#" + ll12.id).outerWidth(true); 1068 marges_llgbo = ((ll1 - ll2)*2) + ll0.borderwidth.left + ll0.borderwidth.right; 1069 } 1037 ll2 = jQuery("#gbo div:last").infos(); ; 1038 ll1 = ll1.width; 1039 ll2 = ll2.width - ll2.borderwidth.left - ll2.borderwidth.right; 1040 marges_llgbo = (ll1 - ll2) ; 1041 1042 } 1043 1070 1044 1071 1045 Bandeau_t = Info_entete(Parent) … … 1161 1135 } 1162 1136 marges_ = info_img.margin.bottom + info_img.borderwidth.bottom; 1163 if (marges_llgbo > 0) {1164 info_img.top -= marges_llgbo / 2;1165 info_img.left -= marges_llgbo / 2;1166 1167 info_img.right += marges_llgbo / 2;1168 info_img.bottom += marges_llgbo / 2;1169 info_img.width += marges_llgbo;1170 marges_ += ll0.borderwidth.left + ll0.borderwidth.right;1171 }1172 1137 1173 1138 info_img.bottom += marges_ * 2; 1139 info_img.bottom += marges_llgbo / 2; 1140 info_img.bottom += info_description.marge.top + info_description.marge.bottom; 1141 1174 1142 info_img.right += marges_ * 2; 1175 1143 info_img.width += marges_ * 2;
Note: See TracChangeset
for help on using the changeset viewer.