Changeset 7355


Ignore:
Timestamp:
Oct 23, 2010, 7:21:37 PM (14 years ago)
Author:
cljosse
Message:

[Autosize][beta] fix bug on "height page".


Location:
extensions/Autosize
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/js/Affiche_script.js

    r7354 r7355  
    121121              */
    122122
    123 
    124123              if (info_theImage.position == "absolute") {
    125124                  var Bandeau = info_theImage.top -
     
    206205                  info_description.bottom = info_description.top = 1;
    207206
    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;
    209218              // info_description.bottom 739 ;
    210219              //  info_description.height 277 ;
    211220              //      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             
    213223              if (check_desc_v != 'checked="checked"') {
    214224                  info_description.height = 0;
     
    320330          var Bandeau_bas = Info_description("theImage");
    321331
    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               };
    328332          //===================================================================
    329333
     
    579583
    580584              //=============== 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);
    582586              miniHeight = Get_Val_int(jQuery(TheImg).css("min-height"), mini_height);
    583587
     
    621625              zone_affichage.height = winheight - marge_top;
    622626
    623 
    624 
    625               //=========================================================================== 
    626               var sel0 = { top: 0 };
    627 
    628 
    629 
    630 
    631 
    632627              //==================================================================================
    633628              jQuery("#theImage #theImg IMG").css("marginTop", "0px")
    634629
    635               var h = 15;
     630              var h = 0;
    636631              if (theme.match(RegExp("sobre", "g"))) {
    637632                  h += 0; //??
     
    678673              //=============================================================
    679674              var height_user = eval(user_status + "_height");
    680 
    681 
    682675              var reg1 = new RegExp("%", "g");
    683676              if (height_user.match(reg1))
     
    685678              else
    686679                  Image_height = parseInt(height_user);
    687 
    688               //============================================================
     680             
    689681              echelle_max = parseFloat(echelle_max, '3');
    690682              var echelle = parseFloat(Image_height / img_reelle.height, 3);
     
    692684              if (echelle > echelle_max) { echelle = echelle_max; }
    693685              Image_height = parseInt(img_reelle.height * echelle);
     686              //============================================================
    694687
    695688              var Image_width;
    696689              if (rapport > 0)
    697690                  Image_width = parseInt(Image_height * rapport);
    698 
    699691              else if (Type_Img == "map") {
    700692                  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 {
    707694                  Image_width = zone_affichage.width;
    708695              }
     
    721708                  if (width_user.match(reg1))
    722709                  // pourcentage
    723                       widthmin = maxWidth * parseInt(width_user) / 100;
     710                      widthmin = widthmin * parseInt(width_user) / 100;
    724711                  else
    725712                      widthmin = parseInt(width_user);
     
    727714                  widthmin -= Get_Val_int(info_img.borderwidth.left);
    728715                  widthmin -= Get_Val_int(info_img.borderwidth.right);
    729 
    730 
    731 
    732716                  if (Image_width > widthmin) {
    733717                      //   Image_width largeur à atteindre
    734718                      //  Calcul du rapport d'agrandissement
    735                       var echelle_w = parseFloat((widthmin  ) / img_reelle.width, 3);
     719                      var echelle_w = parseFloat((widthmin) / img_reelle.width, 3);
    736720                      if (echelle_w > echelle_max) { echelle_w = echelle_max; }
    737721                      Image_width = parseInt(img_reelle.width * echelle_w);
     
    819803
    820804              //=========================================================
    821               //     jQuery(Cadre).css("position", "relative");
    822805
    823806              jQuery(Cadre).css("top", "0px");
     
    825808              jQuery("#comments").css("top", 0 + "px");
    826809
    827 
    828               //jQuery("#copyright").css("top", 0 + "px");
    829 
    830 
    831               jQuery("#linkNext").height(Image_height);
    832               jQuery("#linkPrev").height(Image_height);
    833810              //================ Zone affichage =========================
    834811              //  Image_height, Image_width = valeur a atteindre.
     
    942919                  if (theme.match(RegExp("gally", "g"))) {
    943920
    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);
    951921
    952922                  } else {
     
    973943
    974944      } // function
    975 );                                                                                                                                                                                                                                                                                                         // ready
     945);                                                                                                                                                                                                                                                                                                            // ready
    976946    /*
    977947*
  • extensions/Autosize/main.inc.php

    r7354 r7355  
    22/*
    33Plugin Name: AutoSize
    4 Version: 1.2.4
     4Version: 1.2.5
    55Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448
Note: See TracChangeset for help on using the changeset viewer.