Ignore:
Timestamp:
Nov 17, 2010, 5:04:11 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] save

File:
1 edited

Legend:

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

    r7741 r7805  
     1if (typeof jQuery == 'undefined') { 
     2    // jQuery n'est pas chargé
     3} else {
     4    // jQuery est chargé
     5}
     6 
    17function Toggle_bp() {
    28    cl_visible = !cl_visible;
     
    1319    jQuery('#bp_img_cla').attr('title', src_info);
    1420    jQuery('#bp_cla').attr('Stitle', src_info);
    15     jQuery('#bp_cla').attr('Stip', " ");
    16 
    17     jQuery(window).resize( );
     21    jQuery('#bp_cla').attr('Stip', " ");       
     22     jQuery().newResize();
     23   
    1824}
    1925//=================================================================================================
    20 
    21 function wait_Timer() {
    22 
    23     jQuery(window).resize();
    24 
     26new_width=0;
     27function Wait_Pamoorama() {
     28               mypanorama = window.myPamoorama;
     29               if (!mypanorama) setTimeout("Wait_Pamoorama()", 500);
     30                 if ( mypanorama.skipInit==false) setTimeout("Wait_Pamoorama()", 500);
     31             
     32              if(! jQuery().newResize()) setTimeout("Wait_Pamoorama()", 500);
     33                 if (  myPamoorama.options.width == new_width ) return
    2534}
     35 
     36 
     37//=========================================================
    2638
    2739jQuery(document).ready(
     
    3547                 jQuery("#Debug2").hide();
    3648             }
    37              var img_top = "0";
    38 
    39              var rapport = -1;
    40 
    41              var llgboframe = jQuery("#gbo div:first");
    42              var marges_llgbo = 0;
     49 
     50             img_top = "0";
     51             rapport = -1;
     52             llgboframe = jQuery("#gbo div:first");
     53             marges_llgbo = 0;
     54             pos = 0;
     55 
     56          //=========================================================
     57
    4358             if (llgboframe.length > 0) {
    4459                 ll1 = jQuery(llgboframe).infos();
     
    4661                 marges_llgbo = (ll1.width - ll2.width) + ll2.borderwidth.left + ll2.borderwidth.right;
    4762             }
    48              //=========================================================
    49 
    50 
     63                   
    5164             //=============================================================
    5265             function cl_Timer() {
     
    6376                 setTimeout("cl_Timer()", 500);
    6477             }
    65              //=============================================================
    66              function onPropertyChange(e) {
    67                  var el = e.srcElement;
    68                  var new_class = el.className;
    69                  ID = el.id;
    70                  Prop = e.propertyName.split(".");
    71                  Property = Prop[1];
    72                  if (Property == "display") {
    73                      Valeur = parseInt(el.currentStyle[Property]);
    74                      if (Valeur == "block") {
    75 
    76 
    77                      }
    78                  }
    79                  return;
    80              }
     78
     79           
    8180             //============================================================
    8281             /*
     
    153152                 }
    154153
    155                  info_description.top = info_img.bottom + info_img.margin.bottom + info_img.borderwidth.bottom;
     154                 info_description.top = Bandeau + info_img.top + info_img.bottom + info_img.margin.bottom + info_img.borderwidth.bottom;
    156155                 //=============================================================================
    157156                 info_gbo = jQuery("#gbo").infos();
     
    227226
    228227                 if (DEBUG == "true") {
    229 
    230                      /*  jQuery("#Debug").text(jQuery("#Debug").text() + user_status);   
    231        
    232 
    233                      info_description.width = "800";
    234                      */
    235                      jQuery("#Debug").css('display', 'block');
     228                        jQuery("#Debug").css('display', 'block');
     229                         jQuery("#Dragg").css('display', 'block');
    236230                     jQuery("#Debug1").show();
    237                      jQuery("#Debug2").show();
    238                      Bandeau_bas = info_description;
    239 
    240                      jQuery("#Debug").css({ opacity: 0.5,
     231                     jQuery("#Debug2").show();             
     232                 Bandeau_bas = info_description;
     233                     jQuery().affiche_debug({ debug: {texte:"Debug:Bandeau : " + Bandeau,
     234                     css:{
     235                         opacity: 0.5,
    241236                         filter: 'alpha(opacity:50)',
    242237                         position: "absolute",
    243238                         width: "800px",
    244239                         border: "solid 1px green",
    245                          top: Bandeau + "px"
    246                      });
    247                      jQuery("#Debug").text("Debug:Bandeau : " + Bandeau);
    248 
    249                      jQuery("#Debug1").css({ opacity: 0.5,
     240                         top: Bandeau + "px"}
     241                     },
     242                         debug1:{ texte:"Debug1:Bandeau_bas top : " + Bandeau_bas.top + " height:" + Bandeau_bas.height,
     243                         css:{
     244                         opacity: 0.5,
    250245                         filter: 'alpha(opacity:50)',
    251246                         position: "absolute",
    252247                         border: "solid 1px green",
    253248                         top: Bandeau_bas.top + "px",
    254                          width: (200) + "px",
     249                         width: (800) + "px",
    255250                         height: Bandeau_bas.height + "px"
    256                      });
    257                      jQuery("#Debug1").text("Debug1:Bandeau_bas top : " + Bandeau_bas.top + " height:" + Bandeau_bas.height);
    258 
    259                      jQuery("#Debug2").css({ opacity: 0.5,
     251                     }
     252                     },
     253                         debug2: { texte: "Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom ,
     254                         css:{
     255                         opacity: 0.5,
    260256                         filter: 'alpha(opacity:50)',
    261257                         position: "absolute",
    262258                         left: '50px',
    263                          width: (300) + "px",
     259                         width: (800) + "px",
    264260                         border: "solid 1px green", top: Bandeau_bas.bottom + "px"
     261                         }
     262                         }
    265263                     });
    266                      jQuery("#Debug2").text("Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom);
     264
    267265
    268266                 }
     
    283281             */
    284282
    285              //============================================================//==
    286              jQuery("#pamoorama_outter").bind('resize', function () {
    287                  //   setTimeout("wait_Timer()", 200);
    288 
    289              })
    290 
    291 
    292 
    293283             //============================================================
    294              jQuery("#iGMapsIcon").bind('resize', function () {
    295                  jQuery().recentrage_widget();
    296              })
    297              jQuery("#icon_gmaps").bind('click', function () {
    298                  jQuery().recentrage_widget();
    299              })
    300 
    301 
    302 
    303 
    304 
    305284
    306285             /* jQuery */
    307              var img_init = { height: img_height, width: img_width };  // taille initiale
    308              var img_defaut = { height: scaled_height, width: scaled_width };
    309              var img_reelle = { height: img_height, width: img_width };
    310              var img_finale = { height: 0, width: 0 };
    311              var Zone_Affichage = { height: 0, width: 0 };
     286             img_init = { height: img_height, width: img_width };  // taille initiale
     287             img_defaut = { height: scaled_height, width: scaled_width };
     288             img_reelle = { height: img_height, width: img_width };
     289             img_finale = { height: 0, width: 0 };
     290             Zone_Affichage = { height: 0, width: 0 };
    312291
    313292             //============================================================
    314293
    315              var Info_the_page = jQuery("#the_page").infos();
    316              var Zone_Affichage = jQuery("#theImage").infos();
    317 
    318              var Bandeau = 0;
    319              var Bandeau_t = Info_entete("theImage")
     294             Info_the_page = jQuery("#the_page").infos();
     295             Zone_Affichage = jQuery("#theImage").infos();
     296
     297             Bandeau = 0;
     298             Bandeau_t = Info_entete("theImage")
    320299             Bandeau = Bandeau_t.img_top;
    321              var Bandeau_bas = 0;
     300             Bandeau_bas = 0;
    322301             Bandeau_bas = Info_description("theImage");
    323302             var old_window = { width: 0, height: 0 };
     
    331310
    332311             jQuery(window).resize(
    333                function (event, ui) {
    334                    if (event.type == "resize")
    335 
    336 
    337                        myevent = arguments[0] = jQuery.event.fix(event || window.event);
    338                    myevent.currentTarget = this;
    339 
    340                    // Namespaced event handlers
     312               function (event, ui) {       
     313               event = event || window.event;
     314       
     315                   if (event.type == "resize")                     
     316                 
     317                    myevent = arguments[0] = jQuery.event.fix(event || window.event);
     318                    myevent.currentTarget = this;
     319                     // Namespaced event handlers
    341320                   var namespaces = myevent.type.split(".");
    342                    myevent.type = namespaces.shift();
     321                     myevent.type = namespaces.shift();
     322                   }
    343323                   if (typeof (init_resize) == "undefined") init_resize = false;
    344324
     
    351331                   if (init_resize == false)
    352332                       init_resize = Resize(); ;
    353 
    354 
    355 
    356333               });
    357334
    358              var chk = eval(user_status + "_enabled");
    359              function Resize(Force) {
    360 
    361                  if (!cl_visible == true) return true;
    362                  if (chk == "") return true;
     335             //============== initialisation ===================
     336             fade_in = parseInt(fade_in);
     337            if (fade_in==0 )
     338                 {
     339                 jQuery("#theImage").css({
     340                         opacity: 1,
     341                         filter: 'alpha(opacity:100)'}
     342                 )}else{
     343                 jQuery("#theImage").animate(
     344                         { opacity: 1 }, fade_in   , "swing"
     345                        );
     346             }
     347
     348             var pos;
     349             var set_p = false;
     350             function Resize() {
     351
     352                  jQuery().newResize();
     353                     
     354               
     355             }
     356
     357             //===================================================
     358             elem=jQuery("#pamoorama").get(0) ;
     359if(elem)
     360{           type="propertychange";
     361            handle=jQuery().onPropertyChange;
     362
     363                        if (elem.addEventListener) {// Firefox, Opera, Google Chrome and Safari
     364                            elem.addEventListener('DOMAttrModified', handle, false);
     365                        } else if (elem.attachEvent) {
     366                            elem.attachEvent("on" + type, handle);
     367                        }
     368    }
     369             jQuery().newResize();
     370     
     371 
     372         }); // window.onload
     373         /* Extension
     374         * affiche_debug
     375
     376         * resize
     377         * :
     378         */
     379         //=========================================================
     380 
     381
     382         jQuery.fn.extend({
     383                      //=============================================================
     384           onPropertyChange:  function (e) {
     385           return ;
     386
     387                 if(jQuery.browser.msie)
     388                 {    var el = e.srcElement;
     389                        ID = el.id;               
     390                        Prop = e.propertyName.split(".");
     391                        if(Prop.length < 2) return ;                     
     392                          Property = Prop[1];
     393                 }
     394                 else
     395                 {ID =this.id ;
     396                     Prop = e.attrName ;
     397                     Property = e.newValue  ;
     398                 }
     399           jQuery().affiche_debug({ Dragg: {texte:"onPropertyChange : " + ID,
     400                     css:{
     401                         opacity: 0.5,
     402                         filter: 'alpha(opacity:50)',
     403                         position: "absolute",
     404                         width: "500px",
     405                         border: "solid 1px green",
     406                         top: 130 + "px"}
     407                     }
     408                     });
     409                  mypanorama = window.myPamoorama;
     410                 if (Property.match("width","gi")) {
     411                   
     412                 
     413                if(!mypanorama)
     414                  setTimeout("wait_Pamoorama()", 500);
     415                   
     416
     417
     418               if(jQuery("#pamoorama_outter").length == 0)
     419               {
     420               elem=jQuery("#pamoorama").get(0);
     421                 type="propertychange";
     422            handle=jQuery().onPropertyChange;
     423
     424                     if (elem.addEventListener) {// Firefox, Opera, Google Chrome and Safari
     425                            elem.addEventListener('DOMAttrModified', handle, false);
     426                        } else if (elem.attachEvent) {
     427                            elem.attachEvent("on" + type, handle);
     428                        }
     429                  setTimeout("wait_Timer()", 600);
     430                  }
     431               else if( jQuery("#pamoorama_footer").length == 0)
     432                   setTimeout("wait_Pamoorama()", 600);
     433                else if( jQuery("#pamoorama_frame").length == 0)
     434                    setTimeout("wait_Pamoorama()", 600);
     435                 }
     436                 return;
     437             },
     438                     /*
     439             * recherche la plus grande image (hauteur ou largeur)
     440             */
     441          Get_Img_Maxi:   function (myobj) {
     442                 var w00 = 0;
     443                 var TheImg = null;
     444                 jQuery(myobj).each(function (i) {
     445                     w0 = img_reelle.width;
     446                     h0 = img_reelle.height;
     447                     if (h0 > w0) w0 = h0;
     448                     if (w0 > w00) {
     449                         if (!this.src.match(RegExp(".png", "g")))
     450                             if (!this.src.match(RegExp(thumbnail, "g"))) {
     451                                 TheImg = this;
     452                                 w00 = w0;
     453                             }
     454
     455                     }
     456                 });
     457                 return TheImg;
     458             },
     459          //============================================================
     460           affiche_debug:  function (aff_infos) {
     461                 if (aff_infos.Dragg) {
     462                    jQuery("#Dragg").css( aff_infos.Dragg.css );
     463                     jQuery("#Dragg").text(aff_infos.Dragg.texte);
     464                 }
     465                 if (aff_infos.debug) {
     466                    jQuery("#Debug").css( aff_infos.debug.css );
     467                     jQuery("#Debug").text(aff_infos.debug.texte);
     468                 }
     469                 if (aff_infos.debug1) {
     470                     jQuery("#Debug1").css( aff_infos.debug1.css );
     471                     jQuery("#Debug1").text(aff_infos.debug1.texte);
     472                 }
     473                 //===================================================
     474                 if (aff_infos.debug2) {
     475                    jQuery("#Debug2").css( aff_infos.debug2.css );
     476                     jQuery("#Debug2").text(aff_infos.debug2.texte);
     477                 }
     478             },
     479//====================================================
     480             newResize: function () {
     481           
     482                 //_____________________________________________________
     483                 var chk = eval(user_status + "_enabled");
     484                 if (!cl_visible == true)  { return true; }
     485                 if (chk == "") { return true;  }
     486               
    363487                 //=================================================================
    364                  //var retour = (getStackTrace());
    365                  //   alert(retour);
    366                  //jQuery("#debug").text(retour);
    367                  //  return
    368                  //=================================================================
    369 
     488                 
    370489                 var winwidth = jQuery(window).width();
    371490                 var winheight = jQuery(window).height();
     
    374493                 //===========================================================================
    375494
    376 
     495                 
    377496                 var Type_Img = "";
    378497                 //====== détection du type d'images ======
     
    442561
    443562                 if (Type_Img == "pamoorama") {
    444                      var info_pamoorama = jQuery("#pamoorama").infos();
     563
     564                     mypanorama = window.myPamoorama;                   
     565                     //============================================================
     566                     if (typeof (mypanorama) == "undefined") return false;
     567                     var myPamoorama = mypanorama;
     568                     if (typeof (myPamoorama.skipInit) == "undefined") return false;
     569//
     570
     571                     if (myPamoorama.skipInit == false) {
     572                            setTimeout("Wait_Pamoorama()", 500);
     573                            return false;
     574                     }
     575
     576                        var info_pamoorama = jQuery("#pamoorama").infos();
    445577                     var info_pamoorama_outter = jQuery("#pamoorama_outter").infos();
    446578                     var info_pamoorama_inner = jQuery("#pamoorama_inner").infos();
     
    448580                     var info_pamoorama_frame = jQuery("#pamoorama_frame").infos();
    449581                     TheImg = jQuery("#pamoorama");
    450                      
    451                   var myPamoorama = this.myPamoorama;
    452                    //  myPamoorama = pamoorama;
     582                     obj = TheImg.get(0);             
     583                     //  myPamoorama = pamoorama;
    453584
    454585                     /*
     
    481612                     else IMG = Cadre;
    482613
    483                      TheImg2 = Get_Img_Maxi(IMG + " img");
     614                     TheImg2 = jQuery().Get_Img_Maxi(IMG + " img");
    484615                     //=================================================================
    485616                     if (TheImg2 == null) {
     
    488619
    489620
    490                              TheImg = Get_Img_Maxi("#theImage img");
     621                             TheImg = jQuery().Get_Img_Maxi("#theImage img");
    491622                         }
    492623                     } else {
     
    522653                         // return;
    523654
    524 
    525                          TheImg = Get_Img_Maxi("#Panorama img");
     655                       
     656                         TheImg = jQuery().Get_Img_Maxi("#Panorama img");
    526657                         info_theImage = jQuery(TheImg).infos();
    527658                         info_the_page = jQuery("#the_page").infos();
     
    578709                         break
    579710                     case "pamoorama":
    580                          //=========================================================
    581                          if (typeof (myPamoorama) == "undefined") return false;
    582                          if (typeof (myPamoorama.skipInit) == "undefined") return false;
    583                          if (myPamoorama.skipInit == false) {
    584                              // setTimeout("wait_Timer()",300);
    585                              return false;
    586                          }
     711
     712                        img_reelle = { height: img_height, width: img_width };
     713
    587714                         //=========================================================
    588715                         img_reelle.height = myPamoorama.imageHeight;
     
    672799
    673800
    674 
     801                 
    675802                 img_top = Bandeau;
    676803
     
    866993                 jQuery(Cadre).width(Zone_Affichage.width);
    867994
    868                  //==============================================================
     995                 //============= Remise à l'échelle =======================
    869996
    870997                 img_finale.height = Image_height;
     
    9241051                     }
    9251052                     new_width = Zone_Affichage.width - marge_right - marge_left;
    926                      new_width -= 4;
     1053                     
    9271054                     myPamoorama.options.width = new_width;
    9281055                     info_theImage.height = img_reelle.height + info_pamoorama_footer.height
     
    9351062                     });
    9361063                     jQuery("#pamoorama").width(new_width);
     1064
    9371065                     //====================================================
    938                      jQuery("#pamoorama_outter").css({
    939                          left: marge_left + "px",
    940                          height: myPamoorama.imageHeight + "px",
    941                          width: (new_width) + "px"
    942                      });
    943                      jQuery("#pamoorama_outter").width(new_width);
    944                      //====================================================
    945                      jQuery("#pamoorama_footer").width(new_width);
    946                      jQuery("#pamoorama_footer").css('width', new_width + "px");
     1066                 info_pamoorama = jQuery("#pamoorama").infos();
     1067                  img_finale.height=info_pamoorama.height-info_pamoorama_footer.height;
     1068                  img_finale.width=new_width;
     1069
     1070                 jQuery("#pamoorama_outter").width(new_width) ;
     1071                 jQuery("#pamoorama_outter").height(info_pamoorama.height-info_pamoorama_footer.height);
     1072                 jQuery("#pamoorama_fouter").width(new_width) ;
     1073
     1074                 jQuery("#pamoorama_outter").css({width:new_width+"px",
     1075                 height:info_pamoorama.height-info_pamoorama_footer.height+"px"
     1076                 } );
     1077                jQuery("#pamoorama_footer").css({width:new_width+"px"})
    9471078                     //====================================================
    9481079                     var info_pamoorama = jQuery("#pamoorama").infos();
     
    9521083                     var info_pamoorama_frame = jQuery("#pamoorama_frame").infos();
    9531084
    954                      //myPamoorama.dragHandle.options.limit.x = { 0: 0, 1: 400 }
    955                      /*   myPamoorama.frame.makeDraggable({
    956                      modifiers: { x: 'left', y: false },
    957                      limit: { x: [0, 200 - myPamoorama.frame.getStyle('width').toInt()] }
    958                      });
    959                      */
    960                      //myPamoorama.continueInit();
    961                      //myPamoorama.skipInit = false;
    962                      //pamoorama_thumb
    963                      //               img
    9641085                     info_frame = jQuery(myPamoorama.frame).infos();
    9651086                     myPamoorama.ratio = new_width / 200;
     
    9701091                     jQuery("#linkNext").css({ width: "200px", overflow: "hidden" });
    9711092                     jQuery("#linkPrev").css({ width: "200px", overflow: "hidden" });
     1093
     1094                     jQuery(TheImg).height(img_finale.height);
     1095                     jQuery(TheImg).width(img_finale.width);
     1096                     jQuery(TheImg).css("height", img_finale.height + "px ");
     1097                     jQuery(TheImg).css("width", img_finale.width + "px ");
     1098
    9721099                     zoom = Image_height / img_height;
    9731100
     
    9791106                     jQuery(TheImg).height(img_finale.height);
    9801107                     jQuery(TheImg).width(img_finale.width);
    981                      jQuery(TheImg).css("height", img_finale.height + "px");
    982                      jQuery(TheImg).css("width", img_finale.width + "px");
     1108                     jQuery(TheImg).css("height", img_finale.height + "px ");
     1109                     jQuery(TheImg).css("width", img_finale.width + "px ");
    9831110
    9841111                 } else {
     
    9861113                     jQuery(TheImg).height(img_finale.height);
    9871114                     jQuery(TheImg).width(img_finale.width);
    988                      jQuery(TheImg).css("height", img_finale.height + "px");
    989                      jQuery(TheImg).css("width", img_finale.width + "px");
     1115                     jQuery(TheImg).css("height", img_finale.height + "px ");
     1116                     jQuery(TheImg).css("width", img_finale.width + "px ");
    9901117
    9911118                 }
     
    9931120                 if (DEBUG == "true") {
    9941121
    995                      jQuery("#Debug1").css({
    996                          position: "absolute",
    997                          top: Bandeau + "px",
    998                          textAlign: align_auto,
    999                          margin: "0px auto",
    1000 
    1001 
    1002                          border: "solid 1px red",
    1003 
    1004                          width: Image_width + "px",
    1005                          height: Image_height + "px"
    1006 
     1122                     jQuery().affiche_debug({ debug3: { texte: "Debug:Bandeau : " + Bandeau,
     1123                         css: {
     1124                             opacity: 0.5,
     1125                             filter: 'alpha(opacity:50)',
     1126                             position: "absolute",
     1127 
     1128                         }
     1129                     },
     1130                     debug1: { texte: "Debug1:img_finale.height : " + img_finale.width + " height:" + img_finale.height,
     1131                             css: {
     1132                                 opacity: 0.5,
     1133                                 filter: 'alpha(opacity:50)',
     1134                                 position: "absolute",
     1135                   
     1136                             }
     1137                         },
     1138                         debug2: { texte: "Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom,
     1139                             css: {
     1140                                 opacity: 0.5,
     1141                                 filter: 'alpha(opacity:50)',
     1142                                 position: "absolute",
     1143                             
     1144                             }
     1145                         }
    10071146                     });
    1008                      jQuery("#Debug1").text("img_finale.heightt : " + img_finale.height);
    1009                      //===================================================
    1010                      jQuery("#Debug2").css({ position: "absolute",
    1011                          left: Zone_Affichage.left + 'px',
    1012                          border: "solid 1px green",
    1013                          top: Zone_Affichage.top + "px",
    1014                          width: Zone_Affichage.width / 2 + "px",
    1015                          height: Zone_Affichage.height + "px"
    1016 
    1017                      });
    1018                      jQuery("#Debug2").text("info_Cadre.height : " + info_Cadre.height);
     1147
    10191148                 }
    10201149                 jQuery("#navThumbPrev").css({ overflow: "hidden"
     
    10621191
    10631192                 }
    1064                  // 
    1065                  if (!pos) pos = jQuery("#copyright").infos();
     1193                 //  --- rglage de la hauteur de page en fonction du copyright-----------
     1194                 if (typeof (pos) == "undefined") pos = jQuery("#copyright").infos();
    10661195                 if (pos != jQuery("#copyright").infos())
    10671196                     pos = jQuery("#copyright").infos();
    10681197                 if (pos.top > 100) jQuery("#the_page").height(pos.top);
    1069                  jQuery("#theImage").animate(
    1070                { opacity: 1 }
    1071              , fade_in, "swing"
    1072              );
    1073                  return true;
    1074 
    1075              };  // Resize();
     1198                                 return true;
     1199
     1200
     1201
     1202
     1203
     1204                 //_____________________________________________________
     1205             } // Resize();
     1206
     1207
    10761208             //======================================================================
    1077              var pos;
    1078              var set_p = false;
    1079 
    1080              fade_in = parseInt(fade_in);
    1081              jQuery("#theImage").css({ opacity: 0,
    1082                  filter: 'alpha(opacity: 0)'
    1083 
    1084              });
    1085              resize_ok = Resize();
    1086 
    1087             if (!resize_ok )
    1088            jQuery("#theImage").animate(
    1089                 { opacity: 0 }
    1090              , 500, "swing", function () {
    1091                  resize_ok = Resize();
    1092                  if (!resize_ok)
    1093                     jQuery("#theImage").animate(
    1094                         { opacity: 0 }
    1095                         , 1000, "swing", function () {
    1096                             resize_ok = Resize();
    1097                             if (resize_ok)
    1098                                 jQuery("#theImage").animate(
    1099                                 { opacity: 1 }
    1100                                 , 1000, "swing", function () {
    1101                                     resize_ok = Resize();
    1102                                     });
    1103                                 });
    1104 
    1105              });
    1106              
    1107              resize_ok = Resize();
    1108 
    1109 
    1110 
    1111              /*
    1112              * recherche la plus grande image (hauteur ou largeur)
    1113              */
    1114 
    1115 
    1116              function Get_Img_Maxi(myobj) {
    1117                  var w00 = 0;
    1118                  var TheImg = null;
    1119                  jQuery(myobj).each(function (i) {
    1120                      w0 = img_reelle.width;
    1121                      h0 = img_reelle.height;
    1122                      if (h0 > w0) w0 = h0;
    1123                      if (w0 > w00) {
    1124                          if (!this.src.match(RegExp(".png", "g")))
    1125                              if (!this.src.match(RegExp(thumbnail, "g"))) {
    1126                                  TheImg = this;
    1127                                  w00 = w0;
    1128                              }
    1129 
    1130                      }
    1131                  });
    1132                  return TheImg;
    1133              }
    1134          }); // window.onload
    1135          /* Extension
    1136          * recentrage_widget:
    1137          * :
    1138          */
    1139          //=========================================================
    1140          jQuery.fn.extend({
    1141              recentrage_widget: function () {
    1142                  jQuery('html,body').stop().scrollTop(0);
    1143                  jQuery('html,body').stop().scrollLeft(0);
    1144                  jQuery(".ui-widget-overlay").css("opacity", "0.75");
    1145 
    1146                  l1 = (jQuery(window).width() - (jQuery(".gmapsPopup").width())) / 2;
    1147                  h1 = (jQuery(window).height() - (jQuery(".gmapsPopup").height())) / 2;
    1148 
    1149                  jQuery(".gmapsPopup").css("left", l1 + "px");
    1150                  jQuery(".gmapsPopup").css("top", h1 + "px");
    1151 
    1152              }
    1153              //=========================================================
     1209
     1210
    11541211         });            // fin extend
    11551212
    11561213     } // function
    1157 );                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   // ready
    1158     /*
    1159 *
    1160 */
    1161     jQuery.extend(jQuery.expr[':'], {
    1162         // Nom du sélecteur personnalisé
    1163         Description: function (a) {
    1164             n = jQuery(a).infos();
    1165             return a;
    1166 
    1167         }
    1168     });
    1169 
    1170     function set_opacite(opac) {
    1171         if (jQuery.browser.safari) {
    1172 
    1173             return { opacity: opac };
    1174 
    1175 
    1176         } else if (jQuery.browser.msie) {
    1177             return { opacity: opac };
    1178             Opacite = 'alpha(opacity=' + opac * 100 + ')';
    1179             return { filter: Opacite };
    1180 
    1181         } else if (jQuery.browser.opera) {
    1182             return { opacity: opac };
    1183 
    1184 
    1185         } else if (jQuery.browser.mozilla) {
    1186 
    1187             return { opacity: opac };
    1188 
    1189         }
    1190 
    1191          
    1192           }
     1214);   
     1215
Note: See TracChangeset for help on using the changeset viewer.