Changeset 7355
- Timestamp:
- Oct 23, 2010, 7:21:37 PM (14 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r7354 r7355 121 121 */ 122 122 123 124 123 if (info_theImage.position == "absolute") { 125 124 var Bandeau = info_theImage.top - … … 206 205 info_description.bottom = info_description.top = 1; 207 206 208 info_description.top += Bandeau_t.marge_top; 207 var llgboframe = jQuery("#gbo div:first"); 208 var marges_llgbo = 0; 209 if (llgboframe.length > 0) { 210 211 marges_llgbo = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").outerWidth(); 212 } 213 if (theme.match(RegExp("gally", "g"))) { 214 marges_llgbo = 0; 215 } 216 217 info_description.top += Bandeau_t.marge_top - marges_llgbo; 209 218 // info_description.bottom 739 ; 210 219 // info_description.height 277 ; 211 220 // info_description.top 465 212 info_description.height = (info_description.bottom + Info_the_page.top) - info_description.top; 221 info_description.height = marges_llgbo + (info_description.bottom + Info_the_page.top) - info_description.top; 222 213 223 if (check_desc_v != 'checked="checked"') { 214 224 info_description.height = 0; … … 320 330 var Bandeau_bas = Info_description("theImage"); 321 331 322 var init_taille_thumblink = { height: 0, width: 0 };323 if (init_taille_thumblink.height == 0)324 init_taille_thumblink = {325 height: jQuery(".thumbLink").height(),326 width: jQuery(".thumbLink").width()327 };328 332 //=================================================================== 329 333 … … 579 583 580 584 //=============== Vérification taille minimale autorizée ====================== 581 miniWidth = Get_Val_int(jQuery(TheImg).css("min-width"), mini_width);585 var miniWidth = Get_Val_int(jQuery(TheImg).css("min-width"), mini_width); 582 586 miniHeight = Get_Val_int(jQuery(TheImg).css("min-height"), mini_height); 583 587 … … 621 625 zone_affichage.height = winheight - marge_top; 622 626 623 624 625 //===========================================================================626 var sel0 = { top: 0 };627 628 629 630 631 632 627 //================================================================================== 633 628 jQuery("#theImage #theImg IMG").css("marginTop", "0px") 634 629 635 var h = 15;630 var h = 0; 636 631 if (theme.match(RegExp("sobre", "g"))) { 637 632 h += 0; //?? … … 678 673 //============================================================= 679 674 var height_user = eval(user_status + "_height"); 680 681 682 675 var reg1 = new RegExp("%", "g"); 683 676 if (height_user.match(reg1)) … … 685 678 else 686 679 Image_height = parseInt(height_user); 687 688 //============================================================ 680 689 681 echelle_max = parseFloat(echelle_max, '3'); 690 682 var echelle = parseFloat(Image_height / img_reelle.height, 3); … … 692 684 if (echelle > echelle_max) { echelle = echelle_max; } 693 685 Image_height = parseInt(img_reelle.height * echelle); 686 //============================================================ 694 687 695 688 var Image_width; 696 689 if (rapport > 0) 697 690 Image_width = parseInt(Image_height * rapport); 698 699 691 else if (Type_Img == "map") { 700 692 Image_width = zone_affichage.width - marge_left - marge_right; 701 702 if (theme.match(RegExp("gally", "g"))) { 703 // Image_height -= "30"; 704 } 705 706 } else { 693 } else { 707 694 Image_width = zone_affichage.width; 708 695 } … … 721 708 if (width_user.match(reg1)) 722 709 // pourcentage 723 widthmin = maxWidth* parseInt(width_user) / 100;710 widthmin = widthmin * parseInt(width_user) / 100; 724 711 else 725 712 widthmin = parseInt(width_user); … … 727 714 widthmin -= Get_Val_int(info_img.borderwidth.left); 728 715 widthmin -= Get_Val_int(info_img.borderwidth.right); 729 730 731 732 716 if (Image_width > widthmin) { 733 717 // Image_width largeur à atteindre 734 718 // Calcul du rapport d'agrandissement 735 var echelle_w = parseFloat((widthmin 719 var echelle_w = parseFloat((widthmin) / img_reelle.width, 3); 736 720 if (echelle_w > echelle_max) { echelle_w = echelle_max; } 737 721 Image_width = parseInt(img_reelle.width * echelle_w); … … 819 803 820 804 //========================================================= 821 // jQuery(Cadre).css("position", "relative");822 805 823 806 jQuery(Cadre).css("top", "0px"); … … 825 808 jQuery("#comments").css("top", 0 + "px"); 826 809 827 828 //jQuery("#copyright").css("top", 0 + "px");829 830 831 jQuery("#linkNext").height(Image_height);832 jQuery("#linkPrev").height(Image_height);833 810 //================ Zone affichage ========================= 834 811 // Image_height, Image_width = valeur a atteindre. … … 942 919 if (theme.match(RegExp("gally", "g"))) { 943 920 944 jQuery("#navThumbNext").height(init_taille_thumblink.height * 2);945 jQuery("#navThumbPrev").height(init_taille_thumblink.height * 2);946 947 jQuery(".thumbLink").css("height", init_taille_thumblink.height + "px");948 jQuery(".thumbLink").css("width", init_taille_thumblink.width + "px");949 950 jQuery(Cadre).height(zone_affichage.height);951 921 952 922 } else { … … 973 943 974 944 } // function 975 ); // ready945 ); // ready 976 946 /* 977 947 * -
extensions/Autosize/main.inc.php
r7354 r7355 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.2. 44 Version: 1.2.5 5 5 Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448
Note: See TracChangeset
for help on using the changeset viewer.