Ignore:
Timestamp:
Nov 4, 2012, 12:03:50 PM (11 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix compatibility with 2.4 (fix windowheigh...)

File:
1 edited

Legend:

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

    r18823 r18925  
    630630         .error(function (e) {
    631631           if (!this.complete) {
    632              src = jQuery(this).attr("src").replace("./_data/i/","",1);
     632             src = jQuery(this).attr("src").replace("./_data/i/", "", 1);
    633633             jQuery.ajax({
    634634               type: 'GET',
    635                url: 'i.php?' +  src + "&ajaxload=true",
     635               url: 'i.php?' + src + "&ajaxload=true",
    636636               dataType: 'json',
    637637               success: (function (data) {
     
    641641             });
    642642
    643          
     643
    644644
    645645           }
     
    648648         .bind("Finish", function (e, data) {
    649649           if (typeof imageInfos_id == "undefined") return;
    650          
     650
    651651         })
    652652          .bind("ON", function (e, data) {
     
    660660              return;
    661661            }
    662             if (data.src) { 
    663              if (typeof imageInfos_id == "undefined") return;
    664               if (data.src.match(RegExp(options.pictureDeriv.substr(0, 2) + ".jpg", "gi"))) {             
    665              //   Autosize_resize(true, options);
     662            if (data.src) {
     663              if (typeof imageInfos_id == "undefined") return;
     664              if (data.src.match(RegExp(options.pictureDeriv.substr(0, 2) + ".jpg", "gi"))) {
     665                //   Autosize_resize(true, options);
    666666              }
    667667            }
     
    965965        //jQuery(theMainImage_id).height(Zone_image.image.height);
    966966      } else {
    967       if (options.imageAutosize==false)
    968         if (options.pictureSelType == "Autosize" || options.pictureSelType == "SelMaxi") {
    969           jQuery(theMainImage_id).height(Zone_image.image.height);
    970           jQuery(theMainImage_id).width(Zone_image.image.width);
    971 
    972         } else {
    973           jQuery(theMainImage_id).height(Zone_image.image.height);
    974           jQuery(theMainImage_id).width(Zone_image.image.width);
    975         }
     967        if (options.imageAutosize == false)
     968          if (options.pictureSelType == "Autosize" || options.pictureSelType == "SelMaxi") {
     969            jQuery(theMainImage_id).height(Zone_image.image.height);
     970            jQuery(theMainImage_id).width(Zone_image.image.width);
     971
     972          } else {
     973            jQuery(theMainImage_id).height(Zone_image.image.height);
     974            jQuery(theMainImage_id).width(Zone_image.image.width);
     975          }
    976976
    977977
     
    10091009        url2 = this.src;
    10101010        jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden');
    1011         type = options.pictureSelType;
     1011        newtype = options.pictureSelType;
    10121012        if (typeof type != "undefined" && (type == "Autosize" || type == "SelMaxi")) {
    10131013
     
    10211021        options.pictureMap = typeMap;
    10221022        options.pictureDeriv = typeSave;
    1023 
    1024 
    10251023        document.cookie = 'picture_deriv=' + typeSave + ';path=' + COOKIE_PATH;
    10261024        Autosize_resize(true, options);
     1025        if (typeof type != "undefined" && (type == "Autosize" || type == "SelMaxi")) {
     1026
     1027        } else {
     1028          jQuery("#bp_img_cla").attr("src", "./plugins/Autosize/icons/button-maximize.png");
     1029          jQuery("#bp_cla span").text("");
     1030        }
    10271031      })
    10281032      .live("ON", function (e) {
     
    21962200
    21972201
    2198   });                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      // ready
     2202  });                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         // ready
    21992203
    22002204
Note: See TracChangeset for help on using the changeset viewer.