Ignore:
Timestamp:
Oct 23, 2012, 12:08:16 PM (12 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix compatibility with 2.4 (setup picture)

File:
1 edited

Legend:

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

    r18716 r18723  
    591591    theMainImage_st = false;
    592592    jQuery("#theMainImage").error(function (e) {
    593       jQuery(".infos").show();
    594       // alert(this.src + ' Image does not exist !!');
    595     });
    596     $("#theMainImage").bind('ON', function (event, param1) {
    597 
    598     });
    599 
    600     jQuery("#theMainImage").live("ON", function (e, data) {
    601       d = (new Date()).getTime();     
    602       jQuery("#theMainImage").attr("src", this.src + "?" + data.total);
    603   //    jQuery("#infos_succes").text(data.done + " / " + data.total);
    604593      jQuery.noop();
    605       if (data.nb == 0) {
    606    //     jQuery(".infos").empty();
    607    //     jQuery(".infos").remove();
    608        if(typeof  imageInfos_id == "undefined") return ;
    609 
    610         Autosize_resize(true, options);
    611 
    612 
    613       }
    614       // alert(this.src + ' Image does not exist !!');
     594    });
     595    jQuery("#theMainImage").bind("ON", function (e, data) {
     596      if (!data.status != "ok") {
     597        return;
     598      }
     599
     600      if (data.done == 1)
     601        jQuery("#theMainImage").attr("src", nofile[data.done].file);
     602      jQuery.noop();
     603
     604    });
     605    jQuery("#theMainImage").bind("Finish", function (e, data) {
     606
     607      jQuery("#theMainImage").attr("src", nofile[1].file);
     608      if (typeof imageInfos_id == "undefined") return;
     609      Autosize_resize(true, options);
     610
    615611    });
    616612
     
    909905    + " IMG: " + img_finale.width
    910906    + " X " + img_finale.height
     907    + " mgw : " + Zone_image.marges.width
    911908    , "->")
    912909      });
     
    10631060    }
    10641061    //__________________ Wait_pamoorama ______________________
     1062    jQuery(".pwg-icon-clock-minus, .pwg-icon-clock-plus").click(function (i) {
     1063      n = window.myPamoorama;
     1064      n = this;
     1065    })
    10651066
    10661067    Wait_pamoorama_time = function () {
     
    12891290    Select_Image = function () {
    12901291      var pt = options.liste_type;
     1292
     1293
    12911294      if (pt.length > 0) {
    12921295        //===== calcul Image ===
     
    12951298        options.theImageMargeZone = Zone_image.marges;
    12961299        if (Type_Img != 'charlie') {
    1297           if (options.pictureSelType != "SelMaxi" && options.pictureSelType != "Autosize") {
     1300          if (options.pictureSelType != "SelMaxi" && options.pictureSelType != "Autosize" && Type_Img != 'pamoorama') {
    12981301            IMg = Get_Maxi(Zone_image.image_init);
    12991302          } else {
     
    14851488
    14861489      /****************************************/
    1487       if(typeof imageInfos_id == "undefined") return;
    1488       infos_imageInfos = jQuery(imageInfos_id).infos(true);             // information
    1489       infos_theMainImage = jQuery(theMainImage_id).infos(true);         // Image   
     1490      if (typeof imageInfos_id == "undefined") return;
     1491      infos_imageInfos = jQuery(imageInfos_id).infos({ absolute: true });             // information
     1492      infos_theMainImage = jQuery(theMainImage_id).infos({ absolute: true });         // Image   
    14901493      // commentContent
    14911494      // copyright
     1495   
    14921496
    14931497
     
    14981502      infos_theImage = jQuery(theImage_id).infos(true);   // container
    14991503      infos_window = jQuery(window).infos(true);   // window
     1504      w = infos_theImage.general.marges.width
    15001505
    15011506      container = {
     
    15591564      //===============================================================
    15601565      retrait_img.width = Math.ceil(infos_theMainImage.general.marges.width); // borderwidth+padding
     1566      retrait_img.width = Math.ceil(infos_theImage.general.marges.width); // borderwidth+padding
    15611567      retrait_img.width += Math.ceil(options.marges_llgbo || 0);
    15621568      retrait_img.width += 2;
     
    15881594      } else if (Type_Img == "pamoorama") {
    15891595        if (height_theMainImage > container.height_interne) {
    1590 
     1596          n = options.pictureSelType;
    15911597        }
    15921598      } else {
     
    21332139
    21342140
    2135   });                                                                                                                                                                                                                                                                                                                                                                                                                                              // ready
     2141  });                                                                                                                                                                                                                                                                                                                                                                                                                                                      // ready
    21362142
    21372143
Note: See TracChangeset for help on using the changeset viewer.