Changeset 7962 for extensions/Autosize/js
- Timestamp:
- Dec 1, 2010, 10:19:47 AM (13 years ago)
- Location:
- extensions/Autosize/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r7943 r7962 214 214 //================================================================= 215 215 216 216 217 var winwidth = jQuery(window).width(); 217 218 var winheight = jQuery(window).height(); … … 410 411 miniHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-height"), mini_height); 411 412 413 var miniWidth2 = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-width"), mini_width2); 414 var miniHeight2 = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-height"), mini_height2); 412 415 413 416 var maxWidth = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-width"), winwidth, "0"); 414 417 maxHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-height"), winheight, "0"); 418 415 419 416 420 mini_width = parseInt(miniWidth); … … 481 485 h = 0; 482 486 483 Zone_Affichage.height -= (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom); 484 Bandeau = Bandeau_t.bottom; 485 Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction; 487 h = (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom); 488 Bandeau = Bandeau_t.img_top; 489 Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction - h; 490 //========================================================================= 491 if (Zone_Affichage.height < mini_height) 492 Zone_Affichage.height = mini_height2; 493 if (Zone_Affichage.width < mini_width) 494 Zone_Affichage.width = mini_width2; 495 //========================================================================= 486 496 if (typeof (Bandeau_bas) != "undefined") { 487 var Image_height = Zone_Affichage.height - Bandeau_bas.height - Bandeau_bas.marge.top - Bandeau_bas.marge.bottom;497 Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom); 488 498 489 499 490 500 } else { 491 var Image_height = Zone_Affichage.height; 492 } 493 494 501 502 } 503 504 var Image_height = Zone_Affichage.height; 495 505 496 506 //============================================================= … … 534 544 else 535 545 widthmin = parseInt(width_user); 546 536 547 var marges = marges_llgbo; 548 537 549 if (typeof (info_img) != "undefined") { 538 550 widthmin -= info_img.borderwidth.left || 0; … … 540 552 } 541 553 widthmin -= marges; 554 widthmin -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left); 555 Image_width -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left); 542 556 if (Image_width > widthmin) { 543 557 // Image_width largeur à atteindre … … 558 572 //=================================================== 559 573 560 574 img_finale.height = Image_height; 575 img_finale.width = Image_width; 561 576 562 577 zoom = echelle; … … 572 587 if (TheImg.src) { 573 588 574 Image_width -= marges_llgbo; // réduction frame 575 Image_height -= marges_llgbo; // réduction frame 589 img_finale.width -= (marges_llgbo); // réduction frame 590 img_finale.height -= (marges_llgbo); // réduction frame 591 576 592 if (rapport > 1) { 593 if (img_finale.width > winwidth) { 594 jQuery("#gbo").width(winwidth); 595 jQuery("#gbo").height(winheight); 596 jQuery("#gbo").css("width", winwidth + "px"); 597 jQuery("#gbo").css("height", winheight + "px"); 598 } 599 else { 600 jQuery("#gbo").width(img_finale.width); 601 jQuery("#gbo").height(img_finale.height); 602 jQuery("#gbo").css("width", img_finale.width + "px"); 603 jQuery("#gbo").css("height", img_finale.height + "px"); 604 } 605 606 t1 = jQuery("#gbo div:last").infos(); 607 608 img_finale.width = t1.width - (t1.borderwidth.left + t1.borderwidth.right); 609 img_finale.height = parseInt(img_finale.width / rapport); 610 611 jQuery("#gbo").height(Image_height); 612 jQuery("#gbo").css("height", (Image_height) + "px"); 613 614 615 } else { 616 img_finale.width -= (marges_llgbo / 2); // réduction frame 617 img_finale.height -= (marges_llgbo / 2); // réduction frame 577 618 if (Image_width > winwidth) { 578 619 jQuery("#gbo").width(winwidth); … … 582 623 } 583 624 else { 584 jQuery("#gbo").width( Image_width);585 jQuery("#gbo").height( Image_height);586 jQuery("#gbo").css("width", Image_width + "px");587 jQuery("#gbo").css("height", Image_height + "px");625 jQuery("#gbo").width(img_finale.width); 626 jQuery("#gbo").height(img_finale.height); 627 jQuery("#gbo").css("width", img_finale.width + "px"); 628 jQuery("#gbo").css("height", img_finale.height + "px"); 588 629 } 589 630 590 t1 = jQuery("#gbo div:last").infos(); 591 592 Image_width = t1.width - (t1.borderwidth.left + t1.borderwidth.right); 593 Image_height = parseInt(Image_width / rapport); 594 595 jQuery("#gbo").height(Image_height + marges_llgbo); 596 jQuery("#gbo").css("height", (Image_height + marges_llgbo) + "px"); 597 598 599 } else { 600 Image_width -= (marges_llgbo / 2); // réduction frame 601 Image_height -= (marges_llgbo / 2); // réduction frame 602 if (Image_width > winwidth) { 603 jQuery("#gbo").width(winwidth); 604 jQuery("#gbo").height(winheight); 605 jQuery("#gbo").css("width", winwidth + "px"); 606 jQuery("#gbo").css("height", winheight + "px"); 607 } 608 else { 609 jQuery("#gbo").width(Image_width); 610 jQuery("#gbo").height(Image_height); 611 jQuery("#gbo").css("width", Image_width + "px"); 612 jQuery("#gbo").css("height", Image_height + "px"); 613 } 614 615 616 jQuery("#gbo").css("height", (Image_height + marges_llgbo) + "px"); 617 jQuery("#gbo").height(Image_height + marges_llgbo); 618 619 jQuery("#gbo").css("width", Image_width + marges_llgbo + "px"); 620 jQuery("#gbo").width(Image_width + marges_llgbo); 621 622 623 } 631 632 jQuery("#gbo").css("height", (img_finale.height + marges_llgbo) + "px"); 633 jQuery("#gbo").height(img_finale.height + marges_llgbo); 634 635 jQuery("#gbo").css("width", img_finale.width + marges_llgbo + "px"); 636 jQuery("#gbo").width(img_finale.width + marges_llgbo); 637 638 639 } 640 Zone_Affichage.height = jQuery("#gbo").outerHeight(true) 641 642 //============================================================= 624 643 // jQuery(Parent + " p:not(:contains(' ')) ").remove(); 625 644 a0 = jQuery("area[rel!=up][rel!=prev][rel!=next]"); … … 636 655 637 656 638 var Largeur_zone = ( Image_width / nb_zone);639 var Hauteur_zone = ( Image_height);657 var Largeur_zone = (img_finale.width / nb_zone); 658 var Hauteur_zone = (img_finale.height); 640 659 var init_zone = 0; 641 660 … … 647 666 } 648 667 649 coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: Image_height };668 coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: img_finale.height }; 650 669 651 670 if (a0.length > 0) { … … 658 677 659 678 if (a2.length > 0) { 660 coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: Image_height };679 coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: img_finale.height }; 661 680 jQuery("area[rel=next]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" }); 662 681 } … … 665 684 666 685 //================ Zone affichage ========================= 667 686 668 687 if (theme.match(RegExp("luciano", "g"))) { 669 688 //---- information en dehors du cadre … … 678 697 679 698 680 jQuery(Cadre).width(Zone_Affichage.width - 4); 681 682 //============= Remise à l'échelle ======================= 683 684 img_finale.height = Image_height; 685 img_finale.width = Image_width; 699 700 701 //========== Image Remise à l'échelle ======================= 702 703 Image_height = img_finale.height; 704 Image_width = img_finale.width; 705 706 686 707 687 708 //========================================================================= 688 709 jQuery(Cadre).width(Zone_Affichage.width); 710 // jQuery(Cadre).height(Zone_Affichage.height); 689 711 690 712 if (typeof (gmaps) != "undefined") { … … 712 734 pdf += p1.padding.right + p1.padding.left; 713 735 }); 714 736 img_finale.width -= pdf; 715 737 716 738 jQuery("#charlie").css({ 717 width: Image_width + pdf,718 height: Image_height,739 width: img_finale.width + pdf, 740 height: img_finale.height, 719 741 margin: "auto" 720 742 }); … … 722 744 723 745 724 jQuery("#player").css("width", Image_width + 100+ "px");725 jQuery("#player").css("height", Image_height);726 727 jQuery("#embedplayer").css("width", Image_width);728 jQuery("#embedplayer").css("height", Image_height);729 730 731 jQuery("object").width( Image_width);732 jQuery("object").height( Image_height);746 jQuery("#player").css("width", img_finale.width + "px"); 747 jQuery("#player").css("height", img_finale.height); 748 749 jQuery("#embedplayer").css("width", img_finale.width); 750 jQuery("#embedplayer").css("height", img_finale.height); 751 752 753 jQuery("object").width(img_finale.width); 754 jQuery("object").height(img_finale.height); 733 755 734 756 … … 738 760 // jQuery(TheImg).height(img_finale.height); 739 761 // jQuery(TheImg).width(img_finale.width); 740 jQuery("#Panorama div").height( Image_height);762 jQuery("#Panorama div").height(img_finale.height); 741 763 // class=simple_panorama 742 764 … … 790 812 info_frame = jQuery(myPamoorama.frame).infos(); 791 813 792 zoom = Image_height / img_height;814 zoom = img_finale.height / img_height; 793 815 794 816 … … 797 819 jQuery(TheImg).height(img_finale.height); 798 820 jQuery(TheImg).width(img_finale.width); 799 jQuery(TheImg).css({ height: img_finale.height + "px ", width: img_finale.width + "px " }); 821 jQuery(TheImg).css({ height: img_finale.height + "px ", 822 width: img_finale.width + "px " 823 }); 800 824 801 825 … … 804 828 jQuery(TheImg).height(img_finale.height); 805 829 jQuery(TheImg).width(img_finale.width); 806 jQuery(TheImg).css({ height: img_finale.height + "px ", width: img_finale.width + "px " }); 807 808 } 809 810 info_frame = Zone_Affichage; 811 h0 = jQuery(Cadre).outerHeight(true); 830 jQuery(TheImg).css({ height: img_finale.height + "px ", 831 width: img_finale.width + "px " 832 }); 833 834 } 835 836 812 837 813 838 … … 868 893 jQuery(".navThumb img").css({ height: "80px", width: "", overflow: "hidden" }); 869 894 } 895 info_frame = jQuery("#the_page").infos(); 896 870 897 if (DEBUG == "true") { 871 // jQuery(Parent).height(info_frame.height +info_description.height +"px"); 872 // info_Cadre = jQuery(Parent).infos(); 873 874 // jQuery("#Debug3").css({ top: info_Cadre.top + "px", height: info_Cadre.height + "px" }); //blue 898 if (theme.match(RegExp("stripped", "gi"))) { 899 pos = "absolute"; 900 t1 = info_imageInfoBar.bottom; 901 l1 = info_imageInfoBar.left; 902 } else { 903 pos = "absolute"; 904 t1 = info_frame.top; 905 l1 = info_frame.left; 906 } 907 // jQuery(Cadre).css("border", "solid green"); 908 margins = jQuery(Cadre).css("margin"); 875 909 jQuery("#Debug5").css({ background: "transparent", 910 position: pos, 876 911 border: "red solid 2px", 877 top: info_frame.top + "px", 878 left: info_frame.left + "px", 912 textAlign: align_auto, 913 margin: "4px", 914 top: t1 + "px", 915 left: l1 + "px", 879 916 width: info_frame.width + "px", 880 917 height: info_frame.height + "px" … … 930 967 * 931 968 */ 969 932 970 function Info_entete(Parent) { 933 971 if (typeof (marge_top) != "undefined") return result; 934 972 info_imageToolBar = jQuery("#imageToolBar").infos(); 935 973 if (info_imageToolBar.position == "absolute") { … … 937 975 jQuery("#imageToolBar").css("top", 0 + "px"); 938 976 } 939 977 optiontop = 0; 978 979 info_imageInfoBar = jQuery("#imageInfoBar").infos(); 980 981 982 info_theImgContainer = jQuery("#"+ "theImgContainer").infos(); 940 983 info_theImage = jQuery(Parent).infos(); 941 942 943 if (info_theImage.position == "relative") { 944 //--- passage relative ==> static ===/ 945 jQuery(Parent).css("position", "static"); 946 info_theImage = jQuery(Parent).infos(); 947 948 } 984 info_thePicturePage = jQuery("#thePicturePage").infos(); 985 986 987 if (info_theImage.position == "relative") { 988 //--- passage relative ==> static ===/ 989 jQuery(Parent).css("position", "static"); 990 info_theImage = jQuery(Parent).infos(); 991 992 } else { 993 if ( theme.match(RegExp("stripped", "gi"))) 994 { 995 optiontop = info_imageInfoBar.bottom; 996 } 997 } 949 998 if (info_theImage.position == "absolute") { 950 999 //--- passage absolute ==> static ===/ … … 956 1005 marge_top = Math.ceil(Info_the_page.top + 957 1006 Info_the_page.borderwidth.top + 958 info_theImage.borderwidth.top); 959 960 img_top = Math.ceil(info_theImage.top + info_theImage.borderwidth.top); 1007 info_theImage.borderwidth.top + 1008 info_thePicturePage.margin.top 1009 ); 1010 1011 img_top = Math.ceil(info_theImage.top + 1012 info_theImage.borderwidth.top + 1013 info_thePicturePage.margin.top + optiontop); 961 1014 result = info_imageToolBar; 962 1015 result.width = "20%"; … … 1006 1059 1007 1060 1008 Bandeau_t = Info_entete(Parent) 1009 Bandeau = Bandeau_t.img_top; 1061 1010 1062 llgboframe = jQuery("#gbo div:first"); 1011 1063 marges_llgbo = 0; … … 1014 1066 if (llgboframe.length > 0) { 1015 1067 ll0 = jQuery("#gbo").infos(); 1016 ll1 = jQuery("#llgboframe31").infos(); 1017 ll2 = jQuery("#llgboframe1").infos(); 1018 marges_llgbo = (ll1.width - ll2.width) + ll2.borderwidth.left + ll2.borderwidth.right; 1019 } 1020 1021 1068 ll1 = jQuery("#gbo div:first").infos(); 1069 ll12 = jQuery("#gbo div:last").infos(); ; 1070 ll1 = jQuery("#"+ll1.id).outerWidth(true); 1071 ll2 = jQuery("#" + ll12.id).outerWidth(true); 1072 marges_llgbo = ((ll1 - ll2)*2) + ll0.borderwidth.left + ll0.borderwidth.right; 1073 } 1074 1075 Bandeau_t = Info_entete(Parent) 1076 Bandeau = Bandeau_t.img_top; 1022 1077 1023 1078 if (theme.match(RegExp("simple", "gi"))) { -
extensions/Autosize/js/conflit.js
r7943 r7962 8 8 var init_tb = 0; 9 9 var dom = {}; 10 10 11 if (typeof jQuery == 'undefined') { 11 12 alert(" jQuery n'est pas chargé"); … … 14 15 } 15 16 17 try{ 18 if (DEBUG == "true") { 19 20 } 21 }catch(e) 22 { 23 DEBUG = "false"; 24 } 16 25 //=================================================== 17 26 var detect = navigator.userAgent.toLowerCase();
Note: See TracChangeset
for help on using the changeset viewer.