Changeset 8006


Ignore:
Timestamp:
Dec 6, 2010, 12:10:30 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] compatibility with llbgo


Location:
extensions/Autosize
Files:
2 edited

Legend:

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

    r7964 r8006  
    405405                 //=============== Vérification taille minimale  autorizée ======================
    406406                 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);
    408408
    409409                 var miniWidth2 = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-width"), mini_width2);
     
    459459                     //   correction = -info_Licence.padding.top;
    460460                     if (Type_Img == 'img') {
    461                          if (msie == true) correction = 20;
    462                          else correction = 30;
     461                         if (msie == true) correction = 0;
     462                         else correction = 0;
    463463                     }
    464464
     
    485485                 Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction - h;
    486486                 //=========================================================================
    487                  if (Zone_Affichage.height < mini_height)
     487                 if (Zone_Affichage.height < mini_height2)
    488488                     Zone_Affichage.height = mini_height2;
    489                  if (Zone_Affichage.width < mini_width)
     489                 if (Zone_Affichage.width < mini_width2)
    490490                     Zone_Affichage.width = mini_width2;
    491491                 //=========================================================================
     
    541541                         widthmin = parseInt(width_user);
    542542
    543                      var marges = marges_llgbo;
     543                     var marges = 0;
    544544
    545545                     if (typeof (info_img) != "undefined") {
     
    570570                 img_finale.height = Image_height;
    571571                 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                 }
    573576                 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;
    580580                     if (!TheImg.src) {
    581581                         TheImg = jQuery(TheImg).find("img").get(0)
     
    583583                     if (TheImg.src) {
    584584
    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
    640604                         a0 = jQuery("area[rel!=up][rel!=prev][rel!=next]");
    641605                         a1 = jQuery("area[rel=prev]");
     
    766730
    767731                     img_height = myPamoorama.imageHeight
    768 
    769732                     marge_left += 2;
    770733
     
    773736                     }
    774737                     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 });
    778748                     //====================================================
    779749                     jQuery("#pamoorama").css({
    780750                         marginLeft: "auto",
    781751                         marginRight: "auto",
    782                          height: info_theImage.height + "px",
     752                         height: Zone_Affichage.height + "px",
    783753                         width: new_width + "px"
    784754                     });
     
    889859                     jQuery(".navThumb img").css({ height: "80px", width: "", overflow: "hidden" });
    890860                 }
    891                  info_frame = jQuery("#the_page").infos();
     861                 info_frame = jQuery(Cadre).infos();
    892862
    893863                 if (DEBUG == "true") {
     
    905875                     jQuery("#Debug5").css({ background: "transparent",
    906876                         position: pos,
    907                          border: "red solid 2px",
     877                         border: "green solid 2px",
    908878                         textAlign: align_auto,
    909879                         margin: "4px",
     
    979949                     info_theImage = jQuery(Parent).infos();
    980950                 info_thePicturePage =   jQuery("#thePicturePage").infos();
    981 
     951                   if ( theme.match(RegExp("stripped", "gi"))) 
     952                     {
     953                         optiontop = info_imageInfoBar.bottom + llgboframe.top;
     954                    }
    982955
    983956                 if (info_theImage.position == "relative") {
     
    987960
    988961                 } else {
    989                    if ( theme.match(RegExp("stripped", "gi"))) 
    990                      {
    991                         optiontop = info_imageInfoBar.bottom;
    992                     }
     962
    993963                 }
    994964                     if (info_theImage.position == "absolute") {
     
    1005975                                     );
    1006976
    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  ;
    1016988                     return result;
    1017989
     
    10561028
    10571029
    1058                      llgboframe = jQuery("#gbo div:first");
     1030                     llgboframe = jQuery("#gbo").infos();
    10591031                     marges_llgbo = 0;
    10601032                     //=========================================================
    10611033
    1062                      if (llgboframe.length > 0) {
    1063                          ll0 = jQuery("#gbo").infos();
     1034                     if (llgboframe.height > 0) {
     1035                         
    10641036                         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                     
    10701044
    10711045                     Bandeau_t = Info_entete(Parent)
     
    11611135                     }
    11621136                     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                      }
    11721137
    11731138                     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
    11741142                     info_img.right += marges_ * 2;
    11751143                     info_img.width += marges_ * 2;
  • extensions/Autosize/main.inc.php

    r7963 r8006  
    22/*
    33Plugin Name: AutoSize
    4 Version: 1.3.9.7
     4Version: 1.3.9.9
    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.