Changeset 19859


Ignore:
Timestamp:
Jan 5, 2013, 6:28:07 PM (11 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix bug crop

Location:
extensions/Autosize
Files:
2 edited

Legend:

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

    r19844 r19859  
    421421        echo $set_var ;       
    422422        echo $autoscript;       
    423   //      self::Fin_php("#411: ".$DEBUG_autosize);
     423        if (!isset($_COOKIE['autosize_reload'])  ){ 
     424            self::Fin_php("#424: ".$DEBUG_autosize);
     425    } 
     426  //     
    424427       
    425428}
  • extensions/Autosize/js/Affiche_script.js

    r19764 r19859  
    835835        if (this.name) {
    836836          options.pictureSelType = this.name;
    837           n = Get_dimensions(true, options);
     837          // n = Get_dimensions(true, options);
    838838        } else {
    839839
     
    904904          return;
    905905        }
    906         jQuery(theImg).width(Zone_image.image_init.width);
     906        //  jQuery(theImg).width(Zone_image.image_init.width);
    907907        jQuery(theImg).height(Zone_image.image_init.height);
    908908        set_cl("no");
     
    916916        img_finale = { width: Zone_image.image.width, height: Zone_image.image.height };
    917917      }
    918       r1 = Zone_image.image.width / Zone_image.image.height;
     918
    919919      //======================================================
    920920
     
    943943
    944944        //jQuery(theMainImage_id).height(Zone_image.image.height);
    945         } else if (Type_Img == "panorama") {
    946          // jQuery("#pamoorama").width(img_finale.width);
    947          // jQuery("#pamoorama").height(img_finale.height);
    948 
    949            
    950      
    951      //   jQuery("#theImage img.simple_panorama").panorama(asp_options);
     945      } else if (Type_Img == "panorama") {
     946        // jQuery("#pamoorama").width(img_finale.width);
     947        // jQuery("#pamoorama").height(img_finale.height);
     948
     949
     950
     951        //   jQuery("#theImage img.simple_panorama").panorama(asp_options);
    952952      } else {
    953953        if (options.imageAutosize == false)
    954954          if (options.pictureSelType == "Autosize" || options.pictureSelType == "SelMaxi") {
    955955            jQuery(theMainImage_id).height(Zone_image.image.height);
    956             jQuery(theMainImage_id).width(Zone_image.image.width);
    957 
     956            r1 = infos_theImage.width / infos_theImage.height;
     957            // jQuery(theMainImage_id).width(Zone_image.image.width/r1);
    958958            jQuery(theMainImage_id).css("margin-top", options.marge_haute);
     959
    959960
    960961          } else {
     
    10321033    ******************/
    10331034    changeImgSrc = function (url, typeSave, typeMap, type) {
    1034 
     1035      if (type == "Autosize" || type == "SelMaxi") {
     1036
     1037      }
    10351038      if (COOKIE_PATH == type) {
    10361039        type = options.pictureSelType;
     
    10481051
    10491052      url_old = jQuery("#theMainImage").attr("src");
    1050       if (url != url_old) {
    1051         jQuery("#theMainImage").attr("src", url);
    1052       }
     1053
    10531054      jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden');
    10541055      if (typeof type != "undefined" && (type == "Autosize" || type == "SelMaxi")) {
     
    10601061        jQuery.cookie('picture_sel_type', typeSave, { path: COOKIE_PATH });
    10611062      }
    1062 
     1063      if (url != url_old) {
     1064        jQuery("#theMainImage").attr("src", url);
     1065      }
    10631066      // jQuery("#theMainImage," + theMainImage_id + ",.preload, .next1 , ")
    10641067      jQuery("#theMainImage").removeAttr("width height")
     
    11361139    *      pamoorama
    11371140    ******************************/
    1138    
    1139    
     1141
     1142
    11401143    jQuery("#pamoorama").bind("on", function () { alert($(this).text()); });
    11411144    jQuery("#pamoorama").bind("on", function (e) {
     
    13261329      }
    13271330      name_src = theImg.src;
     1331      stx = name_src.match(RegExp(Zone_image.src, "gi"));
     1332      if (stx == null) {
     1333        return false;
     1334      }
    13281335      img_init = { width: jQuery(theImg).width(), height: jQuery(theImg).height() }
    13291336
     
    22862293
    22872294
    2288   });                                                                                                                   // ready
     2295  });                                                                                                                       // ready
    22892296
    22902297
Note: See TracChangeset for help on using the changeset viewer.