Changeset 22219 for extensions/Autosize


Ignore:
Timestamp:
Apr 15, 2013, 3:32:36 PM (11 years ago)
Author:
cljosse
Message:

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

File:
1 edited

Legend:

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

    r22218 r22219  
    525525    var infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos();  // Cadre
    526526    // general 
    527     var infos_content=jQuery("#content").infos(true);
     527    var infos_content = jQuery("#content").infos(true);
    528528    var infos_the_page = jQuery("#the_page").infos(true);
    529529    var nopano = false;
     
    808808          spans = jQuery("#derivativeChecked" + this.name).next();
    809809          if (retour.pictureSelType != this.name)
    810             spans.attr("href", "javascript:" + "ChangeImgSrc('" + retour.source + "," + retour.pictureDeriv + "," + retour.pictureMap + "," + this.name + "')");
     810            spans.attr("href", "javascript:" +
     811                        "ChangeImgSrc('" + retour.source + "," +
     812                        retour.pictureDeriv + "," +
     813                        retour.pictureMap + "," + options.COOKIE_PATH + "')");
    811814        }
    812815        options.pictureSelType = retour.pictureSelType;
     
    13731376          Zone_image.path = " ";
    13741377
    1375         identique = Zone_image.src.match(RegExp(imgSrc.replace("./", ""), "gi"));
     1378
     1379        imgSrcS = imgSrc.split('/');
     1380        imgSrcS = imgSrcS[imgSrcS.length - 1];
     1381        identique = theImg.src.match(RegExp(imgSrc, "gi"));
     1382        if (identique)
     1383           identique = theImg.src.match(RegExp("loadajax", "gi")) ;
    13761384        if (identique) return true;
    13771385        href_path = get_href(IMg.pictureDeriv);
     
    13881396          last_id = IMg.pictureDeriv;
    13891397          // eval(href_path);
    1390           changeImgSrc(imgSrc.replace("./", ""), last_id, IMg.pictureMap, options.pictureSelType);
     1398          data_src = jQuery(theImg).attr("data-src");
     1399          if (typeof data_src != "undefined") {
     1400            changeImgSrc(data_src + "&loadajax=true",
     1401           last_id,
     1402           IMg.pictureMap,
     1403           options.COOKIE_PATH);
     1404          } else {
     1405            changeImgSrc(imgSrc.replace("./", ""),
     1406           last_id,
     1407           IMg.pictureMap,
     1408           options.COOKIE_PATH);
     1409          }
    13911410        }
    13921411        theImg.useMap = "#map" + IMg.pictureMap;
     
    21642183    } // Debug_pos
    21652184    // ==========================================================
    2166   });                                                                                                                                                               // ready
     2185  });                                                                                                                                                                  // ready
    21672186  jQuery("#derivativeSwitchBox a").click(function (e) {
    21682187    k1 = 0;
Note: See TracChangeset for help on using the changeset viewer.