Changeset 19936


Ignore:
Timestamp:
01/07/13 12:15:22 (7 years ago)
Author:
cljosse
Message:

[extensions] Autosize Minor corrections

Location:
extensions/Autosize/js
Files:
3 edited

Legend:

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

    r19909 r19936  
    510510    //===== marges suplémentaires en fonction theme === 
    511511    options.valide = jQuery(".Autosize").css("display") != "none"; 
    512     options.marge_haute = jQuery(".Autosize").Get_Val_int(jQuery(".Autosize").css("top")); 
     512    options.marge_haute = jQuery(".Autosize").Get_Val_int(jQuery("#form_autosize_picture").css("top")); 
    513513    options.marge_basse = Math.max( 
    514   jQuery(".Autosize").Get_Val_int(jQuery(".Autosize").css("bottom")), 
     514  jQuery(".Autosize").Get_Val_int(jQuery("#form_autosize_picture").css("bottom")), 
    515515  options.marge_basse 
    516516  ); 
    517517 
    518     options.marge_gauche = jQuery(".Autosize").Get_Val_int(jQuery(".Autosize").css("left")); 
    519     options.marge_droite = jQuery(".Autosize").Get_Val_int(jQuery(".Autosize").css("right")); 
     518    options.marge_gauche = jQuery(".Autosize").Get_Val_int(jQuery("#form_autosize_picture").css("left")); 
     519    options.marge_droite = jQuery(".Autosize").Get_Val_int(jQuery("#form_autosize_picture").css("right")); 
    520520 
    521521    jQuery(".Autosize").hide(); 
     
    831831        if (this.name) { 
    832832          options.pictureSelType = this.name; 
    833         } else { 
    834           options.pictureSelType = retour.pictureSelType; 
    835         } 
     833          spans = jQuery("#derivativeChecked" + this.name).next(); 
     834if(retour.pictureSelType != this.name) 
     835  spans.attr("href", "javascript:" + "ChangeImgSrc('" + retour.source + "," + retour.pictureDeriv + "," + retour.pictureMap + "," + this.name + "')"); 
     836        }  
     837        options.pictureSelType = retour.pictureSelType; 
    836838        options.pictureDeriv = retour.pictureDeriv; 
    837839        options.pictureMap = retour.pictureDeriv; 
    838         Autosize_resize(true, options); 
     840        Save_cookies(options); 
     841        setTimeout("Autosize_resize(false, options)", 500); 
     842        // Autosize_resize(true, options); 
    839843      } 
    840844    }); 
     
    888892    ***************************/ 
    889893    Autosize_resize = function (force, parametres) { 
    890  
     894      if (!force) { 
     895        cookis = Get_cookies(); 
     896        if (cookis.pictureSelType != options.pictureSelType) { 
     897          n = 0; 
     898        } 
     899      } 
    891900      nAuto = Get_dimensions(true, options); 
    892901 
     
    13941403          v_pictureDeriv = vn[0]; v_imgSrc = vn[1]; v_width = parseInt(vn[2]); v_height = parseInt(vn[3]); 
    13951404          size_derive = { w: v_width, h: v_height }; 
    1396           if (v_pictureDeriv == options.pictureSelType || v_pictureDeriv == "Original") { 
     1405          if (v_pictureDeriv == options.pictureSelType) { 
    13971406            maxi_size = size_derive; 
    13981407            maxi_size.idx = n; 
     
    14621471        //===== calcul Image === 
    14631472        if (typeof imageInfos_id == "undefined") return; 
    1464         Calcul_Image(); 
     1473        Calcul_Image(); // image en cours 
    14651474        options.theImageMargeZone = Zone_image.marges; 
    14661475        if (Type_Img != 'charlie') { 
     
    14901499        if (typeof Zone_image.src == "undefined") Zone_image.src = " "; 
    14911500 
    1492         identique = Zone_image.src.match(RegExp(imgSrc.replace("./",""), "gi")); 
     1501        identique = Zone_image.src.match(RegExp(imgSrc.replace("./", ""), "gi")); 
    14931502        if (identique) return; 
    14941503        href_path = get_href(IMg.pictureDeriv); 
    14951504        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"); 
     1505          spans = jQuery("#derivativeChecked" + options.pictureSelType).next(); 
     1506          spans.attr("href", "javascript:" + href_path);  
    14991507        } 
    15001508        theImg = document.getElementById(theMainImage_id.replace("#", "")); 
     
    22942302 
    22952303 
    2296   });                                                                                                                           // ready 
     2304  });                                                                                                                                   // ready 
    22972305 
    22982306 
  • extensions/Autosize/js/autosizeDetect.js

    r19910 r19936  
    4646 retval2=  jQuery.cookie('picture_deriv'); 
    4747  if (retval == "ok" && retval2) return; 
    48  
     48  // 
    4949  jQuery.cookie('autosize_reload', "ok", { path: COOKIE_PATH }); 
    50   if (reload=="true") { 
     50  if (reload == "true") { 
     51    document.location = document.location ; 
     52   
     53return ; 
    5154    //document.location.reload(false); // from cache 
    5255    try { 
     56 
    5357 
    5458      var retval = document.location.reload(true); 
  • extensions/Autosize/js/autosize_ajax.js

    r18975 r19936  
    5454            derivatives.elements = params.ids; 
    5555    derivatives.total += params.src.length; 
    56  
    57  
    58  
    59  
    6056    jQuery("body").append("<div style='position:abosolute;left:-200;top:-200'>"); 
    6157  if (derivatives.elements.length) { 
Note: See TracChangeset for help on using the changeset viewer.