Ignore:
Timestamp:
Apr 26, 2013, 1:51:34 PM (11 years ago)
Author:
cljosse
Message:

[extensions] Autosize update to piwigo 2.5 (fix bugs in admin )

File:
1 edited

Legend:

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

    r22360 r22367  
    1 // problème avec GMaps+diaporama:
     1// problème avec GMaps+diaporama:
    22// corriger   gmaps_pip.class.inc.php ajouter ligne 90 if ( !isset($_GET['slideshow']))
    33//============================================================== 
     
    218218
    219219          }
    220           Zone_image.zoom = (Zone_image.image.height / Zone_image.image_init.height);
     220          Zone_image.zoom = Zone_image.image.height / Zone_image.image_init.height;
    221221          zoom_cl = parseInt(100 * Zone_image.zoom) + "%"; ;
    222222          if (!Valid) {
     
    448448        break;
    449449      }
     450    }
     451   
     452
     453    if (jQuery("#derivativeCheckedSelMaxi").length == 0) {
     454      m1 = '<span style="visibility: hidden;" id="derivativeCheckedSelMaxi" class="switchCheck">✔ </span>';
     455      m1 += '<a style="visibility: visible;" href=""> SelMaxi<span class="derivativeSizeDetails"> (800 x 600)</span> </a><br>';
     456      m1 += '<span style="visibility: hidden;" id="derivativeCheckedAutosize" class="switchCheck">✔ </span>';
     457      m1 += '<a style="visibility: visible;" href=""> Autosize<span class="derivativeSizeDetails"> (800 x 600)</span> </a><br>';
     458      jQuery("#derivativeSwitchBox").append(m1);
     459
    450460    }
    451461    options.liste_type = new_liste;
     
    10401050          return;
    10411051        }
    1042         // jQuery(theImg).width(Zone_image.image_init.width);
    1043         for (n in options.liste_type) {
    1044           if (options.liste_type[n][0] == options.pictureSelType) {
    1045             Zone_image.image_init.height = options.liste_type[n][3];
    1046             Zone_image.image_init.width = options.liste_type[n][2];
    1047             break;
    1048           }
    1049         }
    1050 
    1051 
    10521052        jQuery(theImg).height(Zone_image.image_init.height);
    10531053        set_cl("no");
     
    11151115            if (img_objs.length > 0) {
    11161116              jQuery(img_objs).each(function (e) {
    1117              //   init_h1 = jQuery(this).height();
    1118              //   init_w1 = jQuery(this).width();
    1119               }); 
     1117                //   init_h1 = jQuery(this).height();
     1118                //   init_w1 = jQuery(this).width();
     1119              });
    11201120            }
    11211121            dp1 = jQuery("#charlie").offset();
     
    11341134              w01 = Math.ceil(h01 * Zone_image.image.rapport);
    11351135            }
    1136             jQuery("#theMainImage").height(png_h );
     1136            jQuery("#theMainImage").height(png_h);
    11371137            jQuery("#theMainImage").width(w01 + wpng);
    11381138            jQuery("#theMainImage").css({ verticalAlign: "middle",
     
    11531153
    11541154
    1155        //     jQuery("#charlie object").attr("width", w01);
     1155            //     jQuery("#charlie object").attr("width", w01);
    11561156            jQuery("#charlie    object").attr("height", h01);
    1157         //    jQuery("#charlie embed").attr("width", w01); // firefox opera
     1157            //    jQuery("#charlie embed").attr("width", w01); // firefox opera
    11581158            jQuery("#charlie embed").attr("height", h01);
    11591159            jQuery("#charlie  embed").css("margin", "auto");
     
    14341434        options.pictureDeriv = last_id;
    14351435
    1436         return { url: pt[n][1], pictureDeriv: last_id, pictureMap: last_id, width: pt[n][2], height: pt[n][3] };
     1436        return { url: pt[n][1], pictureDeriv: last_id, pictureMap: last_id, width: parseInt(pt[n][2]), height: parseInt(pt[n][3]) };
    14371437      }
    14381438      return { imgSrc: "", pictureDeriv: "", width: "", height: "" };
     
    14451445    Select_Image = function () {
    14461446      memoire = options.imgSrc;
    1447       if (options.imgSrc.match(RegExp("gif", "gi")))
     1447      if (options.imgSrc.match(RegExp(".gif", "gi")))
    14481448        return;
    14491449      var pt = options.liste_type;
     
    14761476          return;
    14771477        }
    1478         Zone_image.zoom = Math.ceil(Zone_image.image.height / Zone_image.image_init.height);
     1478        Zone_image.zoom = Zone_image.image.height / Zone_image.image_init.height;
    14791479        if (!theImg.src)
    14801480          return true;
     
    19421942        }
    19431943
    1944         marges_llgbo = options.marges_llgbo;
     1944        marges_llgbo = options.marges_llgbo; // 48 !
    19451945      }
    19461946
     
    22112211    // ==========================================================
    22122212
    2213   });                                                 // ready
     2213  });                                                         // ready
    22142214  jQuery("#derivativeSwitchBox a").click(function (e) {
    22152215    k1 = 0;
Note: See TracChangeset for help on using the changeset viewer.