Changeset 19909 for extensions/Autosize


Ignore:
Timestamp:
Jan 6, 2013, 4:41:29 PM (11 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix bug crop

File:
1 edited

Legend:

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

    r19859 r19909  
    744744
    745745    jQuery("#theImage").resize(function (e) {
    746 
     746      nu_img = 0;
    747747    });
    748748
     
    828828      theImg = document.getElementById(theMainImage_id.replace("#", ""));
    829829      if (theImg) {
    830         // options.pictureDeriv = retour.pictureDeriv;
    831         options.pictureSelType = retour.pictureSelType;
     830        // options.pictureDeriv = retour.pictureDeriv;       
     831        if (this.name) {
     832          options.pictureSelType = this.name;
     833        } else {
     834          options.pictureSelType = retour.pictureSelType;
     835        }
    832836        options.pictureDeriv = retour.pictureDeriv;
    833837        options.pictureMap = retour.pictureDeriv;
    834 
    835         if (this.name) {
    836           options.pictureSelType = this.name;
    837           // n = Get_dimensions(true, options);
    838         } else {
    839 
    840         }
    841838        Autosize_resize(true, options);
    842839      }
     
    14721469          if (options.imgSrc.match(RegExp(imgSrc, "gi")))
    14731470            options.imgSrc = imgSrc;
    1474 
     1471          // dimension image
    14751472          img_width = IMg.width;
    14761473          img_height = IMg.height;
     
    14931490        if (typeof Zone_image.src == "undefined") Zone_image.src = " ";
    14941491
    1495         identique = Zone_image.src.match(RegExp(imgSrc, "gi"));
     1492        identique = Zone_image.src.match(RegExp(imgSrc.replace("./",""), "gi"));
    14961493        if (identique) return;
    14971494        href_path = get_href(IMg.pictureDeriv);
    1498         jQuery(".linkAutosize").attr("href", "javascript:" + href_path);
     1495        if (options.pictureSelType == "Autosize" || options.pictureSelType == "SelMaxi") {
     1496          jQuery(".linkAutosize").attr("href", "javascript:" + href_path);
     1497          nobj = jQuery(".linkAutosize");
     1498          nlien = jQuery(".linkAutosize").attr("href");
     1499        }
    14991500        theImg = document.getElementById(theMainImage_id.replace("#", ""));
    15001501
     
    15051506        } else {
    15061507          last_id = IMg.pictureDeriv;
    1507           eval(href_path);
    1508           // changeImgSrc(imgSrc.replace("./",""), last_id, IMg.pictureMap, options.pictureSelType);
     1508          //    eval(href_path);
     1509          changeImgSrc(imgSrc.replace("./", ""), last_id, IMg.pictureMap, options.pictureSelType);
    15091510        }
    15101511
     
    22932294
    22942295
    2295   });                                                                                                                       // ready
     2296  });                                                                                                                           // ready
    22962297
    22972298
Note: See TracChangeset for help on using the changeset viewer.