Changeset 22467


Ignore:
Timestamp:
May 2, 2013, 5:56:33 PM (11 years ago)
Author:
cljosse
Message:

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

Location:
extensions/Autosize
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/autosize.inc.php

    r22367 r22467  
    294294                                <script type='text/javascript' src='plugins/Autosize/js/autosizeDetect.js'></script>
    295295                                <script type='text/javascript' src='plugins/Autosize/js/autosize.cookie.js'></script>
    296                                 <script type='text/javascript' src='themes/default/js/plugins/jquery.ajaxmanager.js'></script>";
     296                        ";
    297297                $set_miniature .= "<script type='text/javascript' src='plugins/Autosize/js/autosize_ajax.js' id='autosize_ajax' >  </script >";
    298298                $set_var = "<script type='text/javascript'>\n var COOKIE_PATH =  '".cookie_path()."';\n";
     
    10051005                        //=======================================================================================
    10061006                        if($nosrc!=true  ){
    1007                                 $script_miniatures = "<script type='text/javascript' src='".PHPWG_ROOT_PATH."themes/default/js/plugins/jquery.ajaxmanager.js' ></script>";
     1007                                $script_miniatures = "";
    10081008                                $script_miniatures .= "<script type='text/javascript' src='".PHPWG_ROOT_PATH."plugins/Autosize/js/autosize_ajax.js' id='autosize_ajax' >  </script >";
    10091009                                $nosrc=true ;
  • extensions/Autosize/js/Affiche_script.js

    r22367 r22467  
    805805    // REPONSE TRIGGER
    806806    // ===========================================================
    807     jQuery('#ret_autosize').live('ON', function (e) {
     807    jQuery(document).on('ON','#ret_autosize', function (e) {
    808808      if (nu_img == "") nu_img = 8;
    809809      jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
     
    825825    // jQuery("#llgbo").trigger("ON");
    826826    // ==================================
    827     jQuery(llgbo_id).live('ON', function (e) {
     827    jQuery(window).on('ON',llgbo_id, function (e) {
    828828      n_id = this;
    829829      infos_llgbo = jQuery(llgbo_id).infos();
     
    845845    // jQuery("#mapPicture").trigger("ON");
    846846    // ==============================
    847     jQuery("#mapPicture").live('ON', function (e) {
     847    jQuery(window).on('ON',"#mapPicture", function (e) {
    848848      p2 = jQuery("#infoSwitcher").infos();
    849849    });
     
    851851    // jQuery("#map").trigger("ON");
    852852    // ==============================
    853     jQuery("#map").live('ON', function (e) {
     853    jQuery(window).on('ON', "#map", function (e) {
    854854      p2 = jQuery("#map").infos();
    855855    });
     
    857857    // jQuery(theImage_id).trigger("ON");
    858858    // ===================================
    859     jQuery("#imageInfos").live('on', function (e) {
     859    jQuery(window).on('ON', "#imageInfos", function (e) {
    860860      target = e.target.id;
    861861    });
     
    864864    // jQuery(theImage_id).trigger("ON");
    865865    // ===================================
    866     jQuery(theImage_id).live('ON', function (e) {
     866    jQuery(window).on('ON', theImage_id, function (e) {
    867867      target = e.target.id;
    868868
     
    871871    });
    872872
    873     jQuery("#theMainImage").load(function (e) {
     873    jQuery("#theMainImage").on("load",function (e) {
    874874      if (!e.target.src) return;
    875875      if (e.target.src.match(RegExp("gif", "gi"))) {
     
    878878
    879879    });
     880
     881
    880882    jQuery("#theMainImage").resize(function (e) {
    881883
     
    890892
    891893    // =================================================================
    892     jQuery(document).live('gallyInterfaceReady', function (e) {
     894    jQuery(document).on('on','gallyInterfaceReady', function (e) {
    893895      i = jQuery(this).text();
    894896      jQuery(this).trigger('ON');
     
    921923    // jQuery("#theImageAndInfos").trigger("ON");
    922924    // ===========================================
    923     jQuery("#theImageAndInfos").live('ON', function (e) {
     925    jQuery(window).on('ON', "#theImageAndInfos", function (e) {
    924926      infos_theImageAndInfos = jQuery("#theImageAndInfos").infos();
    925927      // setTimeout(function () { Autosize_resize(true) }, 100);
     
    10371039      nauto = Get_dimensions(true, parametres);
    10381040      if (nauto == "Wait") {
    1039         setTimeout(function (force, parametres) { Autosize_resize(force, parametres); }, 100);
     1041        setTimeout(function (force, parametres) { Autosize_resize(force,options); }, 100);
    10401042        return;
    10411043      }
     
    11901192      mypanorama = window.myPamoorama;
    11911193      if (mypanorama) {
    1192         jQuery(mypanorama).live('ON', function (e) {
     1194        jQuery(window).on('ON', mypanorama, function (e) {
    11931195          jQuery(jQuery('.debug').get(1)).trigger('ON');
    11941196          Autosize_resize(true, options);
     
    11991201        // jQuery(theImage_id).trigger("Start_right");
    12001202        // ===============================================
    1201         jQuery(mypanorama).live('Start_right', function (e) {
     1203        jQuery(window).on('Start_right', mypanorama, function (e) {
    12021204          if (typeof Zone_image == "undefined") return
    12031205          test_w = window.myPamoorama.autoSlideFx.to;
     
    12141216        // jQuery(theImage_id).trigger("Start_left");
    12151217        // ===============================================
    1216         jQuery(mypanorama).live('Start_left', function (e) {
     1218        jQuery(window).on('Start_left', mypanorama, function (e) {
    12171219          if (typeof Zone_image == "undefined") return
    12181220          jQuery(theImage_id).show(0);
     
    18231825      if (Type_Img != "map" && Type_Img != "iframe")
    18241826        if (Select_Image() == "Wait") {
    1825           return "Wait";
     1827          if (!Zone_image.src.match("error")) 
     1828        return "Wait";
    18261829        }
    18271830      useMap = options.pictureSelType;
     
    20242027    * DEBUG ....
    20252028    **************************************************************************/
    2026     /*
    2027     * if (DEBUG_autosize.match("true",gi)) { for (var i = 0; i < 10; i++) {
    2028     * jQuery('#adddebugs').click(); } jQuery(jQuery('.debug').get(i -
    2029     * 1)).click(); }
    2030     */
     2029    /**/
     2030      if (DEBUG_autosize.match(new RegExp( "true","gi") )) { for (var i = 0; i < 10; i++) {
     2031      jQuery('#adddebugs').click(); } jQuery(jQuery('.debug').get(i -
     2032      1)).click(); }
     2033   
    20312034
    20322035    // Custom Event, ON to turn on a debug.
    2033     jQuery('.debug').live('ON', function (e) {
     2036    jQuery(document).on('ON','.debug', function (e) {
    20342037
    20352038      nu_img = jQuery(this).text();
     
    20402043
    20412044    // On Click = debugs On
    2042     jQuery('.debug').live('click', function (e) {
     2045    jQuery(document).on('click','.debug', function (e) {
    20432046      i = jQuery(this).text();
    20442047      jQuery(this).trigger('ON');
     
    20462049
    20472050    // Custom Event, Turn off a debug
    2048     jQuery('.debug').live('OFF', function (e) {
     2051    jQuery('.debug').on('OFF', '.debug', function (e) {
    20492052      jQuery(this).removeClass('debugOn');
    20502053    });
    20512054
    20522055    // on Double Click, remove the debug from the DOM
    2053     jQuery('.debug').live('dblclick', function () {
     2056    jQuery('.debug').on('dblclick', '.debug', function (e) {
    20542057      jQuery(this).fadeOut(function () { jQuery(this).remove(); });
    20552058    });
  • extensions/Autosize/js/JScript.js

    r22360 r22467  
    2222
    2323jQuery(document).ready(function (jQuery) {
    24   jQuery(window).load(function () { 
     24  jQuery(window).on("load", function () { 
    2525    if (jQuery("#scrolltotop").length == 0)
    2626      jQuery('#scrolltobottom').before('<div id="scrolltotop" ><a title="Revenir en haut de la page" href="#"></a></div>');
  • extensions/Autosize/js/autosizeDetect.js

    r22360 r22467  
    11jQuery(document).ready(function (jQuery) {
    2   jQuery(window).load(function (e) {
     2  jQuery(window).on("load", function (e) {
    33    var myWidth = 0, myHeight = 0;
    44    if (typeof (window.innerWidth) == 'number') {
  • extensions/Autosize/js/autosize_ajax.js

    r22191 r22467  
    5656    jQuery("body").append("<div style='position:abosolute;left:-200;top:-200'>");
    5757  if (derivatives.elements.length) {
    58     if (derivatives.total - derivatives.done > 0)
    59       setTimeout("Set_images(params.src)", 500 * (derivatives.total - derivatives.done));
     58    //if (derivatives.total - derivatives.done > 0)
     59    //  setTimeout(function () { Set_images(params.src); }, 500 * (derivatives.total - derivatives.done));
    6060     }
    6161        } //ready
  • extensions/Autosize/js/conflit.js

    r22360 r22467  
    174174jQuery(document).ready(
    175175    function (jQuery) {
    176       jQuery(window).load(function () {
     176      jQuery(window).on("load", function () {
    177177        //==============================================================
    178178
  • extensions/Autosize/main.inc.php

    r22360 r22467  
    22/*
    33 Plugin Name: AutoSize
    4 Version: 3.1.3
     4Version: 3.1.4
    55Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448
  • extensions/Autosize/template/picture.tpl

    r19764 r22467  
    2929
    3030   {if $ASP.width}
    31    jQuery(window).load(function () {ldelim}
     31   jQuery(window).on("load", function () {ldelim}
    3232   asp_options ={ldelim} };
    3333   if(typeof $("#imageToolBar") !="undefined" )
Note: See TracChangeset for help on using the changeset viewer.