Changeset 7458
- Timestamp:
- Oct 28, 2010, 2:48:57 PM (14 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r7394 r7458 113 113 info_theImage.borderwidth.top; 114 114 115 img_top = info_theImage.top + info_theImage.borderwidth.top 115 img_top = info_theImage.top + info_theImage.borderwidth.top; 116 116 return { marge_top: marge_top, img_top: img_top }; 117 117 … … 124 124 jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px " 125 125 }); 126 // jQuery("#" + Parent + " p:not(:contains(' ')) ").remove(); 127 var inter_ligne = jQuery("#" + Parent + " p").css("lineHeight"); 128 129 jQuery("#" + Parent).css({ padding: "0px", 130 marginLeft: "auto", 131 marginRight: "auto", 132 marginTop: "0px", 133 marginBottom: "0px" 134 }); 135 126 // jQuery("#" + Parent + " p:not(:contains(' ')) ").remove(); 127 128 129 130 //============================================================================= 136 131 var info_description = { top: 0, bottom: 0, height: 0 }; 137 //============================================================================= 138 info_img = jQuery("#" + Parent + " img").info(); 139 info_description.top = info_img.bottom; 132 133 if (theme.match(RegExp("simple", "gi"))) { 134 jQuery("#" + Parent).css({ padding: "0px", 135 marginLeft: "0px", 136 marginRight: "auto", 137 marginTop: "0px", 138 marginBottom: "0px" 139 }); 140 } else { 141 jQuery("#" + Parent).css({ padding: "0px", 142 marginLeft: "auto", 143 marginRight: "auto", 144 marginTop: "0px", 145 marginBottom: "0px" 146 }); 147 } 148 149 if (theme.match(RegExp("luciano", "g"))) { 150 info_img = jQuery("#" + Parent + " #theImg").info(); 151 } else { 152 153 info_img = jQuery("#" + Parent + " img").info(); 154 } 155 156 info_description.marge = { bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom, 157 top: info_img.padding.top + info_img.borderwidth.top 158 } 159 160 info_description.top = info_img.bottom + info_img.margin.bottom + info_img.borderwidth.bottom; 140 161 //============================================================================= 141 162 info_gbo = jQuery("#gbo").info(); … … 143 164 info_description.top = info_gbo.bottom; 144 165 //============================================================================= 145 146 info_desc = jQuery("#" + Parent + " p:last").info(); 147 info_description.bottom = info_desc.bottom; 166 info_desc = jQuery("#" + Parent + " p:first").info(); 167 // if (info_desc.top > info_img.bottom) 168 // info_description.top = info_desc.top; 169 170 171 info_table = jQuery(".infoTable").info(); 172 173 if (info_table.top > info_description.bottom) 174 info_description.bottom = info_table.top; 175 //=========================================================================== 148 176 149 177 info_licencetag = jQuery(".licencetag").info(); 150 178 151 179 152 if (info_licencetag.bottom > info_description.bottom) { 153 jQuery(".licencetag").css("border", "solid 2px transparent"); 154 info_description.bottom = info_licencetag.bottom; 180 if (info_licencetag.bottom > 0) { 181 jQuery(".licencetag").css("border", "solid 5px transparent"); 182 if (info_licencetag.bottom > info_licencetag.height) 183 info_description.bottom = info_licencetag.bottom - 3; 184 else 185 info_description.bottom -= info_licencetag.padding.top + info_table.margin.top; 155 186 156 187 } 157 188 //============================================================================= 189 if (theme.match(RegExp("gally", "gi"))) { 190 if (!theme.match(RegExp("lapis", "gi"))) { 191 info_description.bottom = info_description.bottom 192 } 193 } 194 195 196 197 158 198 159 199 if (info_description.top < 1) … … 161 201 162 202 163 if (info_description.bottom < info_description.top) 164 info_description.bottom = info_description.top = 1; 165 166 info_description.height = info_description.bottom - info_description.top ; 203 if (info_description.bottom < info_description.top) { 204 info_description.bottom = info_description.top; 205 206 info_desc = jQuery("#" + Parent + " p:last").info(); 207 208 if (info_desc.bottom > info_img.bottom) 209 info_description.bottom = info_desc.bottom; 210 } 211 212 213 if (theme.match(RegExp("gally", "g"))) { 214 if (!theme.match(RegExp("lapis", "gi"))) { 215 info_copyright = jQuery("#copyright").info(); 216 info_description.bottom += info_copyright.height; 217 } 218 } 219 info_description.height = info_description.bottom - info_description.top; 220 221 if (0) { 222 /* jQuery("#Debug").text(jQuery("#Debug").text() + user_status); 223 224 jQuery("#Debug").hide(); 225 jQuery("#Debug1").hide(); 226 jQuery("#Debug2").hide(); 227 info_description.width = "800"; 228 */ 229 230 Bandeau_bas = info_description; 231 232 jQuery("#Debug").css({ 233 filter: 'alpha(opacity:50)', 234 position: "absolute", 235 width: "800px", 236 border: "solid 1px green", 237 top: Bandeau + "px" 238 }); 239 jQuery("#Debug").text("Debug:Bandeau : " + Bandeau); 240 241 jQuery("#Debug1").css({ 242 filter: 'alpha(opacity:50)', 243 position: "absolute", 244 border: "solid 1px green", 245 top: Bandeau_bas.top + "px", 246 width: (200) + "px", 247 height: Bandeau_bas.height + "px" 248 }); 249 jQuery("#Debug1").text("Debug1:Bandeau_bas top : " + Bandeau_bas.top + " height:" + Bandeau_bas.height); 250 251 jQuery("#Debug2").css({ 252 filter: 'alpha(opacity:50)', 253 position: "absolute", 254 left: '50px', 255 width: (300) + "px", 256 border: "solid 1px green", top: Bandeau_bas.bottom + "px" 257 }); 258 jQuery("#Debug2").text("Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom); 259 // cl_visible = false; 260 } 167 261 168 262 if (check_desc_v != 'checked="checked"') { … … 213 307 var Bandeau_t = Info_entete("theImage") 214 308 Bandeau = Bandeau_t.img_top; 215 216 217 309 var Bandeau_bas = 0; 218 310 Bandeau_bas = Info_description("theImage"); 219 220 221 311 //=================================================================== 222 223 224 225 226 312 /* 227 313 * window .resize … … 230 316 if (typeof (event) == 'undefined') return; 231 317 if (!cl_visible) return; 232 318 if (eval(user_status + "_enabled") == "") return; 233 319 var chk = eval(user_status + "_enabled"); 234 /* jQuery("#Debug").text(jQuery("#Debug").text() + user_status); 235 236 jQuery("#Debug").hide(); 237 jQuery("#Debug1").hide(); 238 jQuery("#Debug2").hide(); 239 240 jQuery("#Debug").css({ position: "absolute", width: "200px", border: "solid 1px green", top: Bandeau + "px" }); 241 jQuery("#Debug").text(Bandeau); 242 243 jQuery("#Debug1").css({ position: "absolute", 244 border: "solid 1px green", 245 top: Bandeau_bas.top + "px", 246 width: (Bandeau_bas.width / 5) + "px", 247 height: Bandeau_bas.height + "px" 248 }); 249 jQuery("#Debug1").text(Bandeau_bas.top + " height:" + Bandeau_bas.height); 250 251 jQuery("#Debug2").css({ position: "absolute", 252 left: '200px', 253 border: "solid 1px green", top: Bandeau_bas.bottom + "px" 254 }); 255 jQuery("#Debug2").text(Bandeau_bas.bottom); 256 257 */ 258 320 321 259 322 260 323 //========================================================================== … … 309 372 var info_titrePage = jQuery("#titrePage").info(); 310 373 311 374 312 375 var Zone_Affichage = jQuery("#theImage").info(); 313 376 … … 316 379 var info_theHeader = jQuery("#theHeader").info(); 317 380 318 var marge = 0;381 var marge = (Zone_Affichage.width - info_ToolBar.width) / 2; 319 382 320 383 var marge_right = marge; 321 384 var marge_left = marge; 385 322 386 if (info_content.width > 100) { 387 marge_left = 0; 323 388 marge_right = info_imageInfoBar.margin.left + info_imageInfoBar.margin.right; 324 389 winwidth = info_content.width; … … 330 395 winwidth -= (marge_right + marge_left); 331 396 332 //======================================================================333 397 334 398 … … 378 442 379 443 var TheImg = jQuery("#map").get(0); 380 381 444 img_reelle.height = info_image.height; 445 img_reelle.width = winwidth - marge_right - marge_right; 382 446 Bandeau_bas.height = 10; 383 447 marge_right = 10; 384 448 385 449 info_the_page = jQuery("#the_page").info(); 386 450 ; … … 505 569 Zone_Affichage.width = winwidth - borderW; 506 570 571 572 573 var Licence = jQuery(".licencetag"); 574 info_Licence = jQuery(".licencetag").info(); 507 575 //================================================================================== 508 576 jQuery("#theImage #theImg IMG").css("marginTop", "0px") 509 577 510 var h= 0;578 var correction = 0; 511 579 if (theme.match(RegExp("sobre", "g"))) { 512 h += 0; //?? 580 581 correction = -info_Licence.padding.top; 582 513 583 } else if (theme.match(RegExp("Pure", "g"))) { 514 h+= 0; //??584 correction += 0; //?? 515 585 } else if (theme.match(RegExp("luciano", "g"))) { 516 h+= 0; //??586 correction += 0; //?? 517 587 } else if (theme.match(RegExp("simple", "g"))) { 518 h+= 0; //??588 correction += 0; //?? 519 589 } else if (theme.match(RegExp("gally", "g"))) { 520 h+= 0; //??590 correction += 0; //?? 521 591 522 592 } 523 593 //================ Licence ======================== 524 var Licence = jQuery(".licencetag"); 594 525 595 if (Licence.length > 0) { 526 596 jQuery(".licencetag").css("padding", "0px"); … … 531 601 532 602 533 //========================================================================= 603 534 604 img_top = Bandeau; 535 //============ Padding image ? ===============536 537 img_padding_top = (info_img.padding.top);538 img_padding_top += (info_img.padding.bottom);539 img_padding_top += (info_img.borderwidth.top);540 img_padding_top += (info_img.borderwidth.bottom);541 542 margin_top = (info_Cadre.margin.top);543 padding_top = (info_Cadre.padding.top);544 padding_top += (info_Cadre.padding.bottom);545 605 546 606 Marge_Basse = parseInt(marge_basse || 0); // hors bandeau 547 607 //========================================================================== 548 608 h = 0; 549 Zone_Affichage.height = winheight - Bandeau - Marge_Basse; 550 var Image_height = Zone_Affichage.height - Bandeau_bas.height; 551 552 // jQuery("#Debug1").css("top", Image_height + "px"); 609 Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction; 610 var Image_height = Zone_Affichage.height - Bandeau_bas.height - Bandeau_bas.marge.top - Bandeau_bas.marge.bottom; 611 553 612 //============================================================= 554 613 var height_user = eval(user_status + "_height"); … … 612 671 613 672 // } 673 //=================================================== 674 614 675 615 676 … … 617 678 //=============LLGBO2 =========================== 618 679 619 t1 = { top: 0 }; 680 620 681 if (marges_llgbo > 0) { 621 682 … … 625 686 if (TheImg.src) { 626 687 627 628 if ((winwidth) < Image_width) { 629 _width = maxWidth; 688 Image_width -= marges_llgbo; // réduction frame 689 Image_height -= marges_llgbo; // réduction frame 690 if (rapport > 1) { 691 jQuery("#gbo").outerWidth(Image_width); 692 jQuery("#gbo").css("width", Image_width + "px"); 693 694 695 t1 = jQuery("#gbo div:last").info(); 696 697 Image_width = jQuery("#gbo div:last").innerWidth(); 698 Image_height = parseInt(Image_width / rapport); 699 700 jQuery("#gbo").outerHeight(Image_height + marges_llgbo); 701 jQuery("#gbo").css("height", (Image_height + marges_llgbo) + "px"); 702 if ( jQuery.browser.msie) { 703 jQuery("#gbo").css("paddingBottom", 18 + "px"); 704 } 705 630 706 } else { 631 _width = Image_width; 707 Image_height -= 4; 708 Image_width -= 4; 709 jQuery("#gbo").css("height", (Image_height + marges_llgbo) + "px"); 710 jQuery("#gbo").css("width", Image_width + marges_llgbo + "px"); 711 712 Image_width = jQuery("#gbo div:last").innerWidth(); 713 Image_height = parseInt(Image_width / rapport); 714 632 715 } 633 _width -= marges_llgbo; // réduction frame 634 jQuery("#gbo").outerWidth(_width); 635 jQuery("#gbo").css("width", (_width) + "px"); 636 637 638 639 Image_width = jQuery("#gbo div:last").innerWidth(); 640 Image_height = parseInt(Image_width / rapport); 641 jQuery("#gbo").outerHeight(Image_height + marges_llgbo + 10); 642 jQuery("#gbo").css("height", (Image_height + marges_llgbo + 10) + "px"); 643 644 } else { 645 646 jQuery("#gbo").width(Zone_Affichage.width - marges); 647 jQuery("#gbo").height(Image_height + marges) 648 jQuery("#gbo").css("width", Zone_Affichage.width - marges + "px"); 649 jQuery("#gbo").css("height", Image_height - marges + "px") 716 717 a1 = jQuery("area[rel=prev]"); 718 a2 = jQuery("area[rel=next]"); 719 720 if (a1.length == 0) { 721 jQuery("area[rel=prev]").attr({ coords: "'" + 0 + ",0," + 0 + "," + 0 + "'" }); 722 jQuery("area[rel=up]").attr({ coords: "'" + 0 + ",0," + Image_width / 2 + "," + Image_height + "'" }); 723 jQuery("area[rel=next]").attr({ coords: "'" + Image_width / 2 + ",0," + (Image_width) + "," + Image_height + "'" }); 724 725 } else if (a2.length == 0) { 726 jQuery("area[rel=prev]").attr({ coords: "'" + 0 + ",0," + (Image_width) / 2 + "," + Image_height + "'" }); 727 jQuery("area[rel=up]").attr({ coords: "'" + Image_width / 2 + ",0," + (Image_width * 2) / 2 + "," + Image_height + "'" }); 728 jQuery("area[rel=next]").attr({ coords: "'" + 0 + ",0," + 0 + "," + 0 + "'" }); 729 730 } else { 731 732 jQuery("area[rel=prev]").attr({ coords: "'" + 0 + ",0," + (Image_width) / 3 + "," + Image_height + "'" }); 733 jQuery("area[rel=up]").attr({ coords: "'" + Image_width / 3 + ",0," + (Image_width * 2) / 3 + "," + Image_height + "'" }); 734 jQuery("area[rel=next]").attr({ coords: "'" + (Image_width * 2) / 3 + ",0," + (Image_width) + "," + Image_height + "'" }); 735 } 736 650 737 651 738 } 652 653 654 655 if (jQuery("area").length > 0) { 656 jQuery("area").each(function (i) { 657 658 obj1 = this.rel; 659 obj2 = this.coords; 660 if (obj1 == "up") 661 this.coords = (Image_width / 3) + "," + 0 + "," + (Image_width * 2 / 3) + "," + Image_height; 662 else if (obj1 == "prev") 663 this.coords = 0 + "," + 0 + "," + (Image_width / 3) + "," + Image_height; 664 else if (obj1 == "next") 665 this.coords = (Image_width * 2) / 3 + "," + 0 + "," + (Image_width * 3 / 3) + "," + Image_height; 666 667 }); 668 669 670 671 672 673 674 } 675 739 } 740 741 //================ Zone affichage ========================= 742 // Image_height, Image_width = valeur a atteindre. 743 if (theme.match(RegExp("luciano", "g"))) { 744 Zone_Affichage.height -= Bandeau_bas.height; 745 jQuery(Cadre).height(Zone_Affichage.height); 676 746 677 747 } … … 683 753 jQuery("#comments").css("top", 0 + "px"); 684 754 685 //================ Zone affichage =========================686 // Image_height, Image_width = valeur a atteindre.687 if (theme.match(RegExp("luciano", "g"))) {688 Zone_Affichage.height -= Bandeau_bas;689 }690 691 755 692 756 jQuery(Cadre).width(Zone_Affichage.width); 757 693 758 //============================================================== 694 759 695 760 img_finale.height = Image_height; 696 761 img_finale.width = Image_width; 697 //============================================================== 762 763 //========================================================================= 764 698 765 699 766 if (typeof (gmaps) != "undefined") { 700 767 Gmap_ = gmaps.maps[0]; 701 if (Gmap_.sizeMode == 'A') 702 { 768 if (Gmap_.sizeMode == 'A') { 703 769 jQuery("#iGMapsIcon").css({ width: old_w * 0.8 + "px", height: old_h * 0.8 + "px" }); 704 770 … … 790 856 } 791 857 858 /* 859 jQuery("#Debug1").css({ 860 position: "absolute", 861 top: Bandeau + "px", 862 textAlign: align_auto, 863 margin: "0px auto", 864 865 866 border: "solid 1px red", 867 868 width: Image_width + "px", 869 height: Image_height + "px" 870 871 }); 872 //=================================================== 873 jQuery("#Debug2").css({ position: "absolute", 874 left: Zone_Affichage.left + 'px', 875 border: "solid 1px green", 876 top: Zone_Affichage.top + "px", 877 width: Zone_Affichage.width / 2 + "px", 878 height: Zone_Affichage.height + "px" 879 880 }); 881 jQuery("#Debug2").text(info_Cadre.bottom); 882 */ 792 883 793 884 try { 794 885 if (theme.match(RegExp("gally", "g"))) { 795 886 887 //=========================================================================== 888 889 if (jQuery("#navThumbPrev").length > 0) { 890 jQuery("#navThumbPrev").css({ height: info_img.height + "px", 891 top: info_img.top 892 }); 893 } 894 if (jQuery("#navThumbNext").length > 0) { 895 jQuery("#navThumbNext").css({ height: info_img.height + "px", 896 top: info_img.top 897 }); 898 } 899 if (!theme.match(RegExp("lapis", "gi"))) { } 900 } else if (theme.match(RegExp("simple", "g"))) { 796 901 797 902 } else { … … 841 946 842 947 } // function 843 ); // ready948 ); // ready 844 949 /* 845 950 * -
extensions/Autosize/main.inc.php
r7394 r7458 8 8 Author URI:http://cljosse.free.fr 9 9 */ 10 10 /*| Ajoute l' option validation de l'autotaille en fonction du statut */ 11 11 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 12 12 if (!defined('AUTOSIZE_PATH')) … … 16 16 17 17 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 45 ); 18 //---- avant pamooramics --- 19 //add_event_handler('render_element_content', array(&$autosize_controler, 'cl_autosize_aff_infos_plus'),40,2); 18 20 19 21 20 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin') );
Note: See TracChangeset
for help on using the changeset viewer.