Changeset 7867


Ignore:
Timestamp:
Nov 24, 2010, 12:42:36 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] fix bugs with FF

Location:
extensions/Autosize
Files:
5 edited

Legend:

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

    r7827 r7867  
    44    // jQuery est chargé
    55}
    6  
    76function Toggle_bp() {
    87    cl_visible = !cl_visible;
     
    2322   
    2423}
    25  
    26 //==========================================================================
    27 function Wait_Affichage() {
    28    if (jQuery("#pamoorama").length) {
    29                jQuery().newResize() ;
    30                mypanorama = window.myPamoorama;
    31                if (!mypanorama){
    32                     setTimeout("Wait_Affichage()", 500);
     24                   
     25function Wait_pamoorama() {
     26     if (jQuery("#pamoorama").length) {
     27                         mypanorama = window.myPamoorama;
     28                        if (!mypanorama){
     29                                setTimeout("Wait_pamoorama()", 500);
     30                                return false ;
     31                        }
     32                 if ( mypanorama.skipInit==false) {
     33                    setTimeout("Wait_pamoorama()", 500);
    3334                    return false ;
    3435               }
    35                  if ( mypanorama.skipInit==false) {
    36                     setTimeout("Wait_Affichage()", 500);
    37                     return false ;
    38                }
     36
    3937                     info_pamoorama = jQuery("#pamoorama").infos();
    4038                    new_width= info_pamoorama.width ;
    4139               
    4240                 if (  Math.abs(new_width - myPamoorama.options.width)>10  ) {
    43                  setTimeout("Wait_Affichage()", 500);
     41                 setTimeout("Wait_pamoorama()", 500);
    4442                 return false ;
    4543                 }
    46          
    47 
    48      }else  if(!jQuery().newResize()) {
     44
     45             nopano = true;
     46             jQuery('#pamoorama').trigger('ON');
     47           
     48                }
     49            }
     50            nu_img = 0;
     51
     52//==========================================================================
     53            function Wait_Affichage() {
     54                jQuery("#theImage").css({
     55                    opacity: 0
     56
     57                }
     58                 )
     59       if(!jQuery().newResize()) {
    4960                 setTimeout("Wait_Affichage()", 500);
    5061                 return
    5162    }
    52 
    5363
    5464      fade_in = parseInt(fade_in);
     
    6575                        );
    6676             }
    67 
    68 
    69                          
     77             nu_img += 1;
     78
     79             bp1 = jQuery('.debug').get(nu_img);
     80             if (!bp1) nu_img = 0;
     81             bp1 = jQuery('.debug').get(nu_img);
     82
     83             jQuery(bp1).trigger('ON');
    7084}
    7185 
     
    7993             //======= cl_conflit ======
    8094             if (DEBUG == "false") {
    81                  jQuery("#Debug").hide();
    82                  jQuery("#Debug1").hide();
    83                  jQuery("#Debug2").hide();
     95
    8496             }
    85  
     97
    8698             img_top = "0";
    8799             rapport = -1;
    88              llgboframe = jQuery("#gbo div:first");
     100
    89101             marges_llgbo = 0;
    90102             pos = 0;
    91  
    92           //=========================================================
    93 
    94              if (llgboframe.length > 0) {
    95                        ll1=jQuery("#llgboframe31").infos();
    96           ll2=jQuery("#llgboframe1" ).infos();
    97 
    98                  marges_llgbo = (ll1.width - ll2.width) + ll2.borderwidth.left + ll2.borderwidth.right;
    99              }
    100                    
     103
     104
    101105             //=============================================================
    102106             function cl_Timer() {
     
    114118             }
    115119
    116            
    117              //============================================================
    118              /*
    119              *
    120              */
    121              function Info_entete(Parent) {
    122 
    123                  var info_imageToolBar = jQuery("#imageToolBar").infos();
    124                  if (info_imageToolBar.position == "absolute") {
    125                      jQuery("#imageToolBar").css("position", "relative");
    126                      jQuery("#imageToolBar").css("top", 0 + "px");
    127                  }
    128 
    129                  var info_theImage = jQuery("#theImage").infos();
    130 
    131                  if (info_theImage.position == "relative") {
    132                      //--- passage relative ==> static ===/
    133                      jQuery("#theImage").css("position", "static");
    134                      info_theImage = jQuery("#theImage").infos();
    135 
    136                  }
    137                  if (info_theImage.position == "absolute") {
    138                      //--- passage absolute ==> static ===/
    139                      jQuery("#theImage").css("position", "static");
    140                      info_theImage = jQuery("#theImage").infos();
    141 
    142                  }
    143            
    144                  marge_top =Math.ceil( Info_the_page.top +
    145                                      Info_the_page.borderwidth.top +
    146                                      info_theImage.borderwidth.top);
    147 
    148                  img_top = Math.ceil( info_theImage.top + info_theImage.borderwidth.top);
    149                  return { marge_top: marge_top, img_top: img_top };
    150 
    151              }
    152 
    153              /* Récupère les informations sur la description.
    154              *
    155              */
    156              function Info_description(Parent) {
    157                  //  jQuery("#" + Parent + " p:not(:contains(' ')) ").remove();
    158                  //=============================================================================
    159                  var info_description = { top: 0, bottom: 0, height: 0 };
    160                  if (theme.match(RegExp("simple", "gi"))) {
    161                      jQuery("#" + Parent).css({ padding: "0px",
    162                          marginLeft: "0px",
    163                          marginRight: "auto",
    164                          marginTop: "0px",
    165                          marginBottom: "0px", position: "absolute", top: Bandeau + "px"
    166                      });
    167                  } else {
    168                
    169                      jQuery("#" + Parent).css({ padding: "0px",
    170                          marginLeft: "auto",
    171                          marginRight: "auto",
    172                          marginTop: "0px",
    173                          marginBottom: "0px"
    174                      });
    175 
    176 
    177                  }
    178                  //   jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px "    });
    179                  if (theme.match(RegExp("luciano", "g"))) {
    180                      info_img = jQuery("#" + Parent + " #theImg img").infos();
    181 
    182                  } else if (jQuery("#charlie").length > 0) {
    183                      
    184                       jQuery("#charlie").css({ padding: "0px",
    185                          marginLeft: "auto",
    186                          marginRight: "auto",
    187                          marginTop: "auto",
    188                          marginBottom:"auto", position: "relative", top: 0+ "px"
    189                      });
    190 
    191                        //    info_img = jQuery("#charlie").infos(); //charlie
    192                   info_img = jQuery('#charlie object').infos(); //player
    193                      
    194 
    195                    } else {
    196 
    197                      info_img = jQuery("#" + Parent + " img").infos();
    198                  }
    199                  info_description.marge = { bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom,
    200                      top: info_img.padding.top + info_img.borderwidth.top
    201                  }
    202                  if (( info_img.bottom-info_img.top) < 100 )
    203                  info_img.top =0 ;
    204 
    205                  info_description.top = Bandeau + info_img.top + info_img.bottom + info_img.margin.bottom + info_img.borderwidth.bottom;
    206                  //=============================================================================
    207                  info_gbo = jQuery("#gbo").infos();
    208                  if (info_description.top < info_gbo.bottom)
    209                      info_description.top = info_gbo.bottom;
    210                  //=============================================================================
    211                   info_desc = jQuery("#" + Parent + " p:first").infos();
    212                  //----> difference IE8/FF ====
    213                  /* borderwidth           2 | 0
    214                  margin top/booom       13  | 12
    215                  margin                  1  | 0
    216                  top                    101 | 104
    217                  */
    218                  if (info_desc.bottom < info_img.bottom)
    219                      info_desc.bottom = info_img.bottom;
    220 
    221                  //  if (info_desc.top > info_img.bottom)
    222                  //     info_description.top = info_desc.top;
    223                  info_table = jQuery(".infoTable").infos();
    224                    
    225                  if (info_table.top > info_description.bottom)
    226                      info_description.bottom = info_table.top;
    227                  //===========================================================================
    228 
    229                  info_licencetag = jQuery(".licencetag").infos();
    230 
    231 
    232                  if (info_licencetag.bottom > 0) {
    233                  if(jQuery.browser.msie == true)
    234                  jQuery(".licencetag").css("padding", "0px");
    235 
    236                      jQuery(".licencetag").css("border", "solid 5px transparent");
    237                      if (info_licencetag.bottom > info_description.bottom) {
    238                          info_description.bottom = info_licencetag.bottom;
    239                      }
    240                      else
    241                          info_description.bottom += info_table.margin.top + info_table.padding.top;
    242 
    243                  }
    244                  //=============================================================================
    245                  if (theme.match(RegExp("gally", "gi"))) {
    246                      if (!theme.match(RegExp("lapis", "gi"))) {
    247                          info_description.bottom = info_description.bottom
    248                      }
    249                  }
    250 
    251 
    252 
    253 
    254 
    255                  if (info_description.top < 1)
    256                      info_description.top = info_description.bottom;
    257 
    258 
    259                  if (info_description.bottom < info_description.top) {
    260                         top_tmp=  info_description.top;
    261                         info_description.top=info_description.bottom;
    262                         info_description.bottom =top_tmp;
    263 
    264                      info_desc = jQuery("#" + Parent + " p:last").infos();
    265 
    266                      if (info_desc.bottom > info_img.bottom)
    267                          info_description.bottom = info_desc.bottom;
    268                            if (info_description.bottom < info_description.top) {
    269                                 top_tmp=  info_description.top;
    270                                 info_description.top=info_description.bottom;
    271                                 info_description.bottom =top_tmp;
    272                      }
    273                        info_description.height =info_description.bottom-info_description.top;
    274 
    275                  }
    276 
    277 
    278                  if (theme.match(RegExp("gally", "g"))) {
    279                      if (!theme.match(RegExp("lapis", "gi"))) {
    280                          info_copyright = jQuery("#copyright").infos();
    281                          info_description.bottom += info_copyright.height;
    282                      }
    283                  }
    284 
    285                  if (theme.match(RegExp("luciano", "g"))) {
    286                  //info_description.bottom -= 30
    287                  }
    288                  if(jQuery.browser.msie!= true)
    289                 info_description.bottom +=4;
    290                  
    291                   info_description.height = info_description.bottom - info_description.top;
    292 
    293                  if (DEBUG == "true") {
    294                         jQuery("#Debug").css('display', 'block');
    295                          jQuery("#Dragg").css('display', 'block');
    296                      jQuery("#Debug1").show();
    297                      jQuery("#Debug2").show();             
    298                  Bandeau_bas = info_description;
    299                      jQuery().affiche_debug({ debug: {texte:"Debug:Bandeau : " + Bandeau,
    300                      css:{
    301                          opacity: 0.5,
    302                          filter: 'alpha(opacity:50)',
    303                          position: "absolute",
    304                          width: "800px",
    305                          border: "solid 1px green",
    306                          top: Bandeau + "px"}
    307                      },
    308                          debug1:{ texte:"Debug1:Bandeau_bas top : " + Bandeau_bas.top + " height:" + Bandeau_bas.height,
    309                          css:{
    310                          opacity: 0.5,
    311                          filter: 'alpha(opacity:50)',
    312                          position: "absolute",
    313                          border: "solid 1px green",
    314                          top: Bandeau_bas.top + "px",
    315                          width: (800) + "px",
    316                          height: Bandeau_bas.height + "px"
    317                      }
    318                      },
    319                          debug2: { texte: "Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom ,
    320                          css:{
    321                          opacity: 0.5,
    322                          filter: 'alpha(opacity:50)',
    323                          position: "absolute",
    324                          left: '50px',
    325                          width: (800) + "px",
    326                          border: "solid 1px green", top: Bandeau_bas.bottom + "px"
    327                          }
    328                          }
    329                      });
    330 
    331 
    332                  }
    333 
    334                  if (check_desc_v != 'checked="checked"') {
    335                      info_description.height = 0;
    336                  }
    337              
    338 
    339                  return info_description;
    340 
    341              }
     120
     121
     122             Type_Img = "";
     123             TheImg = null;
     124             nopano = false;
     125
     126
    342127
    343128             /*
     
    359144             Zone_Affichage = jQuery("#theImage").infos();
    360145
    361              Bandeau = 0;
    362              Bandeau_t = Info_entete("theImage")
    363              Bandeau = Bandeau_t.img_top;
    364              Bandeau_bas = 0;
    365              Bandeau_bas = Info_description("theImage");
     146
     147             //   
    366148             var old_window = { width: 0, height: 0 };
     149             if (Info_description("theImage")) {
     150                 Bandeau_bas = Info_description("theImage");
     151                 Bandeau = Bandeau_bas.top;
     152             }
     153             Wait_Affichage();
    367154
    368155
     
    374161
    375162             jQuery(window).resize(
    376                function (event, ui) {   
    377                
    378                    
    379                event = event || window.event;
    380 
    381                    if (event.type == "resize")                     
    382                   { 
    383                     myevent = arguments[0] = jQuery.event.fix(event || window.event);
    384                     myevent.currentTarget = this;
    385                      // Namespaced event handlers
    386                    var namespaces = myevent.type.split(".");
    387                      myevent.type = namespaces.shift();
     163               function (event, ui) {
     164
     165
     166                   event = event || window.event;
     167
     168                   if (event.type == "resize") {
     169                       myevent = arguments[0] = jQuery.event.fix(event || window.event);
     170                       myevent.currentTarget = this;
     171                       // Namespaced event handlers
     172                       var namespaces = myevent.type.split(".");
     173                       myevent.type = namespaces.shift();
    388174                   }
    389175                   if (typeof (init_resize) == "undefined") init_resize = false;
     
    398184                       init_resize = Resize(); ;
    399185
    400                  
     186
    401187
    402188               });
     
    408194             function Resize() {
    409195
    410                   jQuery().newResize();
    411                      
    412                
     196                 jQuery().newResize();
     197
     198
    413199             }
    414200
    415              //===================================================
    416              elem=jQuery("#pamoorama").get(0) ;
    417 if(elem)
    418 {           type="propertychange";
    419             handle=jQuery().onPropertyChange;
    420 
    421                         if (elem.addEventListener) {// Firefox, Opera, Google Chrome and Safari
    422                             elem.addEventListener('DOMAttrModified', handle, false);
    423                         } else if (elem.attachEvent) {
    424                             elem.attachEvent("on" + type, handle);
    425                         }
    426     }
    427     //======== Doubler  resize ! pour Chrome, safari ==================
    428         Wait_Affichage() ;
     201
    429202
    430203         }); // window.onload
     
    436209         */
    437210         //=========================================================
    438  
     211
    439212
    440213         jQuery.fn.extend({
    441                       //=============================================================
    442            onPropertyChange:  function (e) {
    443            return ;
     214             //==========================================================
     215             Info_description: function (e) {
     216                 return Info_description(e);
     217
     218             },
     219             //=============================================================
     220             onPropertyChange: function (e) {
     221                 return;
    444222
    445223
     
    448226             * recherche la plus grande image (hauteur ou largeur)
    449227             */
    450           Get_Img_Maxi:   function (myobj) {
    451                  var w00 = 0;
    452                  var TheImg = null;
    453                  jQuery(myobj).each(function (i) {
    454                      w0 = img_reelle.width;
    455                      h0 = img_reelle.height;
    456                      if (h0 > w0) w0 = h0;
    457                      if (w0 > w00) {
    458                          if (!this.src.match(RegExp(".png", "g")))
    459                              if (!this.src.match(RegExp(thumbnail, "g"))) {
    460                                  TheImg = this;
    461                                  w00 = w0;
    462                              }
    463 
    464                      }
    465                  });
    466                  return TheImg;
     228             Get_Img_Maxi: function (myobj) {
     229
     230                 return Get_Img_Maxi(myobj);
    467231             },
    468           //============================================================
    469            affiche_debug:  function (aff_infos) {
    470                  if (aff_infos.Dragg) {
    471                     jQuery("#Dragg").css( aff_infos.Dragg.css );
    472                      jQuery("#Dragg").text(aff_infos.Dragg.texte);
    473                  }
    474                  if (aff_infos.debug) {
    475                     jQuery("#Debug").css( aff_infos.debug.css );
    476                      jQuery("#Debug").text(aff_infos.debug.texte);
    477                  }
    478                  if (aff_infos.debug1) {
    479                      jQuery("#Debug1").css( aff_infos.debug1.css );
    480                      jQuery("#Debug1").text(aff_infos.debug1.texte);
    481                  }
    482                  //===================================================
    483                  if (aff_infos.debug2) {
    484                     jQuery("#Debug2").css( aff_infos.debug2.css );
    485                      jQuery("#Debug2").text(aff_infos.debug2.texte);
    486                  }
     232             //============================================================
     233             affiche_debug: function (aff_infos) {
     234                 affiche_debug(aff_infos);
     235
     236
    487237             },
    488 //====================================================
     238             //====================================================
    489239             newResize: function () {
     240                 // 
    490241                 var chk = eval(user_status + "_enabled");
    491                  if (!cl_visible == true)  { return true; }
    492                  if (chk == "") { return true;  }
    493                
     242                 if (!cl_visible == true) { return true; }
     243                 if (chk == "") { return true; }
     244
    494245                 //=================================================================
    495                  
     246
    496247                 var winwidth = jQuery(window).width();
    497248                 var winheight = jQuery(window).height();
     
    499250                 old_window = jQuery(window).infos();
    500251                 //===========================================================================
    501 
    502                  
    503                  var Type_Img = "";
    504                  //====== détection du type d'images ======
    505                  if (jQuery("#charlie").length > 0) {
    506                      Type_Img = "charlie";
    507                  } else if (jQuery("#pamoorama").length) {
    508                      Type_Img = "pamoorama";
    509                  } else if (jQuery("#theImage embed").length > 0) {
    510                      Type_Img = "embed";
    511                  } else if (jQuery("#map").length) {
    512                      Type_Img = "map";
    513                  } else if (jQuery("#Panorama").length) {
    514                      Type_Img = "panorama";
    515                  } else if (jQuery("#theImage").find("img").length > 0) {
    516                      Type_Img = "img";
    517                  } else if (jQuery("img").length > 0) {
    518                      Type_Img = "img_autre";
    519                      return;
    520                  } else {
    521                      return;
    522                  }
    523252
    524253
     
    561290                 else
    562291                     winwidth = Zone_Affichage.width;
    563 
    564292                 winwidth -= (marge_right + marge_left);
    565 
    566 
    567 
    568 
    569293                 if (Type_Img == "pamoorama") {
    570294
    571                      mypanorama = window.myPamoorama;                   
     295                     mypanorama = window.myPamoorama;
    572296                     //============================================================
    573297                     if (typeof (mypanorama) == "undefined") return false;
    574298                     var myPamoorama = mypanorama;
    575299                     if (typeof (myPamoorama.skipInit) == "undefined") return false;
    576 //
     300                     //
    577301
    578302                     if (myPamoorama.skipInit == false) {
    579                            
    580                             return false;
    581                      }
    582 
    583                         var info_pamoorama = jQuery("#pamoorama").infos();
     303
     304                         return false;
     305                     }
     306
     307                     var info_pamoorama = jQuery("#pamoorama").infos();
    584308                     var info_pamoorama_outter = jQuery("#pamoorama_outter").infos();
    585309                     var info_pamoorama_inner = jQuery("#pamoorama_inner").infos();
     
    587311                     var info_pamoorama_frame = jQuery("#pamoorama_frame").infos();
    588312                     TheImg = jQuery("#pamoorama");
    589                      obj = TheImg.get(0);             
    590                      //  myPamoorama = pamoorama;
    591 
    592                      /*
    593                      myPamoorama = new pamoorama('pamoorama',{ activateSlider:  {$PANO_ACTIVATESLIDER},
    594                      width:             {$PANO_WIDTH},
    595                      footercolor:               '{$PANO_FOOTERCOLOR}',
    596                      captioncolor:      '{$PANO_CAPTIONCOLOR}',
    597                      caption:           '{$ALT_IMG}',
    598                      enableAutoscroll:  {$PANO_ENABLEAUTOSCROLL},
    599                      autoscrollSpeed:   {$PANO_AUTOSCROLLSPEED},
    600                      autoscrollOnLoad:  {$PANO_AUTOSCROLLONLOAD},
    601                      startAutoscroll:   '{'pamooramics_startAutoscroll'|@translate}',
    602                      stopAutoscroll:            '{'pamooramics_stopAutoscroll'|@translate}',
    603                      loadingMessage: '{'pamooramics_loading'|@translate}',
    604                      clickMessage:              '{'pamooramics_clickMessage'|@translate}',
    605                      dragMessage:               '{'pamooramics_dragMessage'|@translate}'
    606                      });
    607                      */
    608                      /*
    609                      pamoorama_outter
    610                      pamoorama_inner
    611                      pamoorama_footer
    612                      pamoorama_caption
    613                      pamoorama_thumb
    614                      pamoorama_frame
    615                      */
     313                     obj = TheImg.get(0);
     314
    616315                 } else {
    617                      //==== récupère Img la plus grande  =====
    618                      if (jQuery("#theImg")) IMG = "#theImg";
    619                      else IMG = Cadre;
    620 
    621                      TheImg2 = jQuery().Get_Img_Maxi(IMG + " img");
    622                      //=================================================================
    623                      if (TheImg2 == null) {
    624                          if (jQuery(Cadre).find("img").length > 0) {
    625                              IMG = Cadre;
    626 
    627 
    628                              TheImg = jQuery().Get_Img_Maxi("#theImage img");
    629                          }
    630                      } else {
    631                          TheImg = TheImg2  //luciano ?
    632 
    633                      }
     316
     317
     318
     319
    634320                 }
    635321                 //=================================================================
     
    638324                 switch (Type_Img) {
    639325                     case "map":
    640                          var info_image = jQuery("#map").infos();
    641 
    642                          var info_map = jQuery("#mapPicture").infos();
    643 
     326                         img_reelle.height = info_img.height;
     327                         info_map = jQuery("#mapPicture").infos();
    644328                         marge_left = info_map.width;
    645                          jQuery("#map").css("left", marge_left);
    646 
    647                          var TheImg = jQuery("#map").get(0);
    648                          img_reelle.height = info_image.height;
    649                          img_reelle.width = winwidth - marge_right - marge_right;
     329                         jQuery("#map").css("left", marge_left + "px");
     330
    650331                         Bandeau_bas.height = 10;
    651332                         marge_right = 10;
    652 
     333                         img_reelle.width = winwidth - marge_left - marge_right;
    653334                         info_the_page = jQuery("#the_page").infos();
    654335                         ;
     
    660341                         // return;
    661342
    662                        
     343
    663344                         TheImg = jQuery().Get_Img_Maxi("#Panorama img");
    664345                         info_theImage = jQuery(TheImg).infos();
     
    687368                         //
    688369
    689                          TheImg = jQuery(Cadre).find("embed");
    690 
    691                          info_theImage = jQuery(Cadre).infos();
     370                         info_theImage = info_img;
     371                         info_the_page = jQuery("#the_page").infos();
     372
     373                         if (rapport < 0) {
     374                             img_height = info_img.height;
     375                             img_width = info_img.width;
     376
     377                             img_reelle.height = img_height;
     378                             img_reelle.width = img_width;
     379
     380                         }
     381
     382                         break
     383                     case "charlie":
     384
     385
     386                         info_theImage = info_img;
    692387                         info_the_page = jQuery("#the_page").infos();
    693388                         if (rapport < 0) {
    694                              img_height = parseInt(jQuery(TheImg).outerHeight());
    695                              img_width = parseInt(jQuery(TheImg).outerWidth());
    696 
    697                              img_reelle.height = img_height;
    698                              img_reelle.width = img_width;
    699 
    700                          }
    701 
    702                          break
    703                      case "charlie":
    704 
    705                          TheImg = jQuery('#charlie object').get(0);
    706                          info_theImage = jQuery(Cadre).infos();
    707                          info_the_page = jQuery("#the_page").infos();
    708                          if (rapport < 0) {
    709                              img_height = parseInt(TheImg.height);
    710                              img_width = parseInt(TheImg.width);
    711 
    712                              img_reelle.height = parseInt(TheImg.height);
    713                              img_reelle.width = parseInt(TheImg.width);
     389                             img_height = parseInt(info_img.height);
     390                             img_width = parseInt(info_img.width);
     391
     392                             img_reelle.height = parseInt(info_img.height);
     393                             img_reelle.width = parseInt(info_img.width);
    714394                         }
    715395
     
    717397                     case "pamoorama":
    718398
    719                         img_reelle = { height: img_height, width: img_width };
     399                         img_reelle = { height: img_height, width: img_width };
    720400
    721401                         //=========================================================
     
    783463                 if (theme.match(RegExp("sobre", "g"))) {
    784464
    785                      correction = -info_Licence.padding.top;
     465                     //   correction = -info_Licence.padding.top;
     466                     if (Type_Img == 'img')
     467                  {
     468                     if (msie == true) correction = 20;
     469                     else correction = 30;
     470                     }
    786471
    787472                 } else if (theme.match(RegExp("Pure", "g"))) {
     
    796481
    797482                 }
    798                  //================ Licence  ========================
    799 
    800                  if (Licence.length > 0) {
    801                      jQuery(".licencetag").css("padding", "0px");
    802 
    803                  }
     483
    804484                 //====================================================
    805                  info_img = jQuery(TheImg).infos();
    806                  img_top = Bandeau;
    807485
    808486                 Marge_Basse = parseInt(marge_basse || 0); // hors bandeau
    809487                 //==========================================================================
    810488                 h = 0;
    811                  if(Bandeau_bas.height <0) Bandeau_bas.height =0 ;
     489
     490                 Bandeau = Bandeau_t.bottom;
    812491
    813492                 Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction;
     
    890569                     }
    891570                     if (TheImg.src) {
    892                    
     571
    893572                         Image_width -= marges_llgbo; // réduction frame
    894573                         Image_height -= marges_llgbo; // réduction frame
     
    917596
    918597                         } else {
    919                          Image_width -= (marges_llgbo/2); // réduction frame
    920                          Image_height -= (marges_llgbo/2); // réduction frame
     598                             Image_width -= (marges_llgbo / 2); // réduction frame
     599                             Image_height -= (marges_llgbo / 2); // réduction frame
    921600                             if (Image_width > winwidth) {
    922601                                 jQuery("#gbo").width(winwidth);
     
    938617                             jQuery("#gbo").css("width", Image_width + marges_llgbo + "px");
    939618                             jQuery("#gbo").width(Image_width + marges_llgbo);
    940  
     619
    941620
    942621                         }
     
    987666                 if (theme.match(RegExp("luciano", "g"))) {
    988667                     //---- information en dehors du cadre
    989                   //   Zone_Affichage.height -= Bandeau_bas.height - 20;
     668                     //   Zone_Affichage.height -= Bandeau_bas.height - 20;
    990669                     jQuery(Cadre).height(Zone_Affichage.height -= Bandeau_bas.height);
    991                    
     670
    992671                 }
    993672
     
    1025704
    1026705                     /**/
    1027                      pdf = 2 * parseInt(jQuery(".none_2").css("paddingRight"));
     706
     707                     pdf = 0;
     708                     jQuery("#charlie div").each(function (i) {
     709
     710
     711                         p1 = jQuery(this).infos();
     712                         pdf += p1.padding.right + p1.padding.left;
     713                     });
     714
     715
    1028716                     jQuery("#charlie").css({
    1029                          width: Image_width + pdf ,
     717                         width: Image_width + pdf,
    1030718                         height: Image_height,
    1031719                         margin: "auto"
    1032720                     });
    1033721
    1034                      jQuery(".none_2").width(Image_width) ;
    1035                      jQuery(".none_2").height( Image_height) ;
    1036722
    1037723
     
    1069755                     }
    1070756                     new_width = Zone_Affichage.width - marge_right - marge_left;
    1071                      
     757
    1072758                     myPamoorama.options.width = new_width;
    1073759                     info_theImage.height = img_reelle.height + info_pamoorama_footer.height
     
    1082768
    1083769                     //====================================================
    1084                  info_pamoorama = jQuery("#pamoorama").infos();
    1085                   img_finale.height=info_pamoorama.height-info_pamoorama_footer.height;
    1086                   img_finale.width=new_width;
    1087 
    1088                  jQuery("#pamoorama_outter").width(new_width) ;
    1089                  jQuery("#pamoorama_outter").height(info_pamoorama.height-info_pamoorama_footer.height);
    1090                  
    1091 
    1092 
    1093                  jQuery("#pamoorama_outter").css({width:new_width+"px",
    1094                  height:info_pamoorama.height-info_pamoorama_footer.height+"px"
    1095                  } );
    1096           //     
     770                     info_pamoorama = jQuery("#pamoorama").infos();
     771                     img_finale.height = info_pamoorama.height - info_pamoorama_footer.height;
     772                     img_finale.width = new_width;
     773
     774                     jQuery("#pamoorama_outter").width(new_width);
     775                     jQuery("#pamoorama_outter").height(info_pamoorama.height - info_pamoorama_footer.height);
     776
     777
     778
     779                     jQuery("#pamoorama_outter").css({ width: new_width + "px",
     780                         height: info_pamoorama.height - info_pamoorama_footer.height + "px"
     781                     });
     782                     //     
    1097783                     //====================================================
    1098                      var info_pamoorama = jQuery("#pamoorama").infos();
    1099                      var info_pamoorama_outter = jQuery("#pamoorama_outter").infos();
    1100                      var info_pamoorama_inner = jQuery("#pamoorama_inner").infos();
    1101                      var info_pamoorama_footer = jQuery("#pamoorama_footer").infos();
    1102                      var info_pamoorama_frame = jQuery("#pamoorama_frame").infos();
     784                     info_pamoorama = jQuery("#pamoorama").infos();
     785                     info_pamoorama_outter = jQuery("#pamoorama_outter").infos();
     786                     info_pamoorama_inner = jQuery("#pamoorama_inner").infos();
     787                     info_pamoorama_footer = jQuery("#pamoorama_footer").infos();
     788                     info_pamoorama_frame = jQuery("#pamoorama_frame").infos();
    1103789
    1104790                     info_frame = jQuery(myPamoorama.frame).infos();
    1105                /*   myPamoorama.ratio = new_width / 200;
    1106                   jQuery("#pamoorama_frame").width(myPamoorama.ratio);
    1107                   jQuery("#pamoorama_frame").css("width", myPamoorama.ratio + "px");
    1108                  jQuery("#pamoorama_footer img").width(200)
    1109                  jQuery("#pamoorama_footer img").css({ width: "200px", height: info_pamoorama_footer.height+"px" });
    1110                  jQuery("#pamoorama_footer").width(new_width) ;
    1111                  jQuery("#pamoorama_footer").css({width:new_width+"px"})
     791                     /*   myPamoorama.ratio = new_width / 200;
     792                     jQuery("#pamoorama_frame").width(myPamoorama.ratio);
     793                     jQuery("#pamoorama_frame").css("width", myPamoorama.ratio + "px");
     794                     jQuery("#pamoorama_footer img").width(200)
     795                     jQuery("#pamoorama_footer img").css({ width: "200px", height: info_pamoorama_footer.height+"px" });
     796                     jQuery("#pamoorama_footer").width(new_width) ;
     797                     jQuery("#pamoorama_footer").css({width:new_width+"px"})
    1112798
    1113799                     jQuery(TheImg).height(img_finale.height);
     
    1115801                     jQuery(TheImg).css("height", img_finale.height + "px ");
    1116802                     jQuery(TheImg).css("width", img_finale.width + "px ");
    1117 */
     803                     */
    1118804                     zoom = Image_height / img_height;
    1119805
     
    1137823                 }
    1138824
    1139                  if (DEBUG == "true") {
    1140 
    1141                      jQuery().affiche_debug({ debug3: { texte: "Debug:Bandeau : " + Bandeau,
    1142                          css: {
    1143                              opacity: 0.5,
    1144                              filter: 'alpha(opacity:50)',
    1145                              position: "absolute",
    1146  
    1147                          }
    1148                      },
    1149                      debug1: { texte: "Debug1:img_finale.height : " + img_finale.width + " height:" + img_finale.height,
    1150                              css: {
    1151                                  opacity: 0.5,
    1152                                  filter: 'alpha(opacity:50)',
    1153                                  position: "absolute",
    1154                    
    1155                              }
    1156                          },
    1157                          debug2: { texte: "Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom,
    1158                              css: {
    1159                                  opacity: 0.5,
    1160                                  filter: 'alpha(opacity:50)',
    1161                                  position: "absolute",
    1162                              
    1163                              }
    1164                          }
    1165                      });
    1166 
    1167                  }
     825
    1168826                 jQuery("#navThumbPrev").css({ overflow: "hidden"
    1169827                 });
     
    1215873                     pos = jQuery("#copyright").infos();
    1216874                 if (pos.top > 100) jQuery("#the_page").height(pos.top);
    1217                   if (!theme.match(RegExp("luciano", "gi"))) {
    1218                  jQuery("#linkNext").css({ height:"80px",width: "200px", overflow: "hidden" });
    1219                  jQuery("#linkPrev").css({  height:"80px",width: "200px", overflow: "hidden" });
    1220                  jQuery(".navThumb img").css({ height:"80px",width:"", overflow: "hidden" });
    1221                  }
    1222                                  return true;
     875                 if (!theme.match(RegExp("luciano", "gi"))) {
     876                     jQuery("#linkNext").css({ height: "80px", width: "200px", overflow: "hidden" });
     877                     jQuery("#linkPrev").css({ height: "80px", width: "200px", overflow: "hidden" });
     878                     jQuery(".navThumb img").css({ height: "80px", width: "", overflow: "hidden" });
     879                 }
     880
     881
     882                 return true;
    1223883
    1224884
     
    1235895         });            // fin extend
    1236896
     897
     898
    1237899     } // function
    1238900);   
    1239901
     902
     903/*
     904* recherche la plus grande image (hauteur ou largeur)
     905*/
     906function     Get_Img_Maxi(myobj) {
     907                     var w00 = 0;
     908                     var myImg = null;
     909                     jQuery(myobj).each(function (i) {
     910                         w0 = img_reelle.width;
     911                         h0 = img_reelle.height;
     912                         if (h0 > w0) w0 = h0;
     913                         if (w0 > w00) {
     914                             if (!this.src.match(RegExp(".png", "g")))
     915                                 if (!this.src.match(RegExp(thumbnail, "g"))) {
     916                                     myImg = this;
     917                                     w00 = w0;
     918                                 }
     919
     920                         }
     921                     });
     922                     return myImg;
     923                 }
     924//====================================================
     925
     926                 //============================================================
     927                 /*
     928                 *
     929                 */
     930                 function Info_entete(Parent) {
     931
     932                     info_imageToolBar = jQuery("#imageToolBar").infos();
     933                     if (info_imageToolBar.position == "absolute") {
     934                         jQuery("#imageToolBar").css("position", "relative");
     935                         jQuery("#imageToolBar").css("top", 0 + "px");
     936                     }
     937
     938                     info_theImage = jQuery("#theImage").infos();
     939
     940
     941                     if (info_theImage.position == "relative") {
     942                         //--- passage relative ==> static ===/
     943                         jQuery("#theImage").css("position", "static");
     944                         info_theImage = jQuery("#theImage").infos();
     945
     946                     }
     947                     if (info_theImage.position == "absolute") {
     948                         //--- passage absolute ==> static ===/
     949                         jQuery("#theImage").css("position", "static");
     950                         info_theImage = jQuery("#theImage").infos();
     951
     952                     }
     953
     954                     marge_top = Math.ceil(Info_the_page.top +
     955                                     Info_the_page.borderwidth.top +
     956                                     info_theImage.borderwidth.top);
     957
     958                     img_top = Math.ceil(info_theImage.top + info_theImage.borderwidth.top);
     959                     result = info_imageToolBar;
     960                     result.width = "20%";
     961                     result.left = "40%";
     962                     result.marge_top = marge_top;
     963                     result.img_top = img_top;
     964
     965                     return result;
     966
     967                 }
     968
     969                 /* Récupère les informations sur la description.
     970                 *
     971                 */
     972
     973//====================================================
     974function Info_description(Parent) {
     975
     976                     //  jQuery("#" + Parent + " p:not(:contains(' ')) ").remove();
     977                     //=============================================================================
     978                     info_description = { top: 0, bottom: 0, height: 0 };
     979           
     980
     981                     //====== détection du type d'images ======
     982                     if (jQuery("#charlie").length > 0) {
     983                         Type_Img = "charlie";
     984                     } else if (jQuery("#pamoorama").length) {
     985                         Type_Img = "pamoorama";
     986                     } else if (jQuery("#theImage embed").length > 0) {
     987                         Type_Img = "embed";
     988                     } else if (jQuery("#map").length) {
     989                         Type_Img = "map";
     990
     991                     } else if (jQuery("#Panorama").length) {
     992                         Type_Img = "panorama";
     993                     } else if (jQuery("#theImage").find("img").length > 0) {
     994                         Type_Img = "img";
     995                     } else if (jQuery("img").length > 0) {
     996                         Type_Img = "img_autre";
     997                         return;
     998                     } else {
     999                         return;
     1000                     }
     1001
     1002
     1003                     Bandeau_t = Info_entete("theImage")
     1004                     Bandeau = Bandeau_t.img_top;
     1005                     llgboframe = jQuery("#gbo div:first");
     1006                     marges_llgbo = 0;
     1007                     //=========================================================
     1008
     1009                     if (llgboframe.length > 0) {
     1010                         ll0 = jQuery("#gbo").infos();
     1011                         ll1 = jQuery("#llgboframe31").infos();
     1012                         ll2 = jQuery("#llgboframe1").infos();
     1013                         marges_llgbo = (ll1.width - ll2.width) + ll2.borderwidth.left + ll2.borderwidth.right;
     1014                     }
     1015
     1016
     1017
     1018                     if (theme.match(RegExp("simple", "gi"))) {
     1019                         jQuery("#" + Parent).css({ padding: "0px",
     1020                             marginLeft: "0px",
     1021                             marginRight: "auto",
     1022                             marginTop: "0px",
     1023                             marginBottom: "0px"
     1024
     1025                         });
     1026                     } else {
     1027
     1028
     1029
     1030                     }
     1031
     1032                     //   jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px "    });
     1033                     if (theme.match(RegExp("luciano", "g"))) {
     1034                         TheImg = jQuery("#" + Parent + " #theImg img");
     1035                         info_img = jQuery(TheImg).infos();
     1036
     1037
     1038                     } else if (Type_Img == "map") {
     1039
     1040                         info_map = jQuery("#mapPicture").infos();
     1041                         marge_left = info_map.width;
     1042
     1043                         jQuery("#map").css({ left: marge_left + "px", padding: "0px",
     1044                             marginLeft: "0px",
     1045                             marginRight: "4px",
     1046                             marginTop: "0px",
     1047                             marginBottom: "0px", position: "relative"
     1048                         });
     1049
     1050                         TheImg = jQuery("#map");
     1051                         info_img = jQuery(TheImg).infos();
     1052
     1053
     1054                     } else if (jQuery("#charlie").length > 0) {
     1055
     1056                         jQuery("#charlie").css({ padding: "0px"
     1057
     1058                         });
     1059                         TheImg = jQuery("#charlie")
     1060                         info_img = jQuery(TheImg).infos();
     1061
     1062
     1063
     1064                     } else if (jQuery("#theImage embed").length > 0) {
     1065 
     1066                         TheImg = jQuery("#theImage embed");
     1067                         info_img = jQuery(TheImg).infos();
     1068                     
     1069
     1070
     1071                     } else if (Type_Img == "pamoorama") {
     1072
     1073
     1074
     1075                         if (!nopano) {
     1076                             Wait_pamoorama();
     1077                             return
     1078                         }
     1079                         TheImg = jQuery("#pamoorama");
     1080                         info_img = jQuery(TheImg).infos();
     1081                         info_footer = jQuery("#pamoorama_footer").infos();
     1082                         info_img.height = parseInt(img_reelle.height) + parseInt(info_footer.height);
     1083
     1084                     } else {
     1085                         TheImg = jQuery("#" + Parent + " img");
     1086                         TheImg = Get_Img_Maxi(TheImg);
     1087                         info_img = jQuery(TheImg).infos();
     1088                     }
     1089                     //=====================================================================================
     1090
     1091                     switch (info_img.position) {
     1092                         case "relative":
     1093                             break;
     1094                         case "static":
     1095                             break;
     1096                         case "absolute":
     1097                             break;
     1098                         case "":
     1099                             break;
     1100                         default:
     1101                             break;
     1102                     }
     1103                     info_description.marge = { bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom,
     1104                         top: info_img.padding.top + info_img.borderwidth.top + info_img.margin.top
     1105                     }
     1106                     marges_ = info_img.margin.bottom + info_img.borderwidth.bottom;
     1107                     if (marges_llgbo > 0) {
     1108                         info_img.top -= marges_llgbo / 2;
     1109                         info_img.left -= marges_llgbo / 2;
     1110
     1111                         info_img.right += marges_llgbo / 2;
     1112                         info_img.bottom += marges_llgbo / 2;
     1113                         info_img.width += marges_llgbo;
     1114                         marges_ += ll0.borderwidth.left + ll0.borderwidth.right;
     1115                     }
     1116
     1117                     info_img.bottom += marges_ * 2;
     1118                     info_img.right += marges_ * 2;
     1119                     info_img.width += marges_ * 2;
     1120                     info_img.height = info_img.bottom - info_img.top;
     1121                     //======================================================================================
     1122                     info_description.top = info_img.bottom;
     1123                     info_description.bottom = info_description.top; //init
     1124
     1125                     //===================== Recherche Description Bas ==================================
     1126
     1127                     info_para = info_description;
     1128
     1129
     1130                     jQuery("#" + Parent + " p").each(function (i) {
     1131                         para = jQuery(this).infos();
     1132                         if (para.height > 0) {
     1133                             if (para.top >= info_description.top) {
     1134                                 para.height = para.bottom - info_description.top;
     1135                                 info_para = para;
     1136                                 info_para.top = info_description.top;
     1137
     1138                             }
     1139                         }
     1140                     });
     1141                     //===================== Recherche lmt Bas =====(bleu debug3)====================
     1142                     info_licencetag = jQuery("#" + Parent + ".licencetag").infos();
     1143                     jQuery(".licencetag").css("position", "static");
     1144
     1145                     jQuery(".licencetag table").each(function (i) {
     1146                         info_licencetag = jQuery(this).infos();
     1147                         info_licencetag.bottom += info_licencetag.margin.top + info_licencetag.margin.bottom;
     1148
     1149                         if (jQuery.browser.msie == true)
     1150                             jQuery(this).css("padding", "0px");
     1151                         jQuery(this).css("border", "solid 5px transparent");
     1152
     1153                     });
     1154
     1155                     if (info_licencetag.top == 0 && info_licencetag.height > 10) {
     1156                         info_licencetag.top = info_para.bottom;
     1157                         info_licencetag.bottom = info_para.bottom + info_licencetag.height;
     1158                         info_licencetag.bottom += info_licencetag.margin.top + info_licencetag.margin.bottom;
     1159
     1160                     }
     1161
     1162                     //========================================================
     1163                     info_table = jQuery("#" + Parent + " Table").infos();
     1164                     if (info_table.height > 0) {
     1165                         info_table.bottom += info_table.margin.top + info_table.margin.bottom;
     1166                         info_licencetag.bottom = Math.max(info_table.bottom, info_licencetag.bottom)
     1167                         info_licencetag.top = info_table.top;
     1168                         info_licencetag.bottom = info_table.bottom;
     1169                         info_licencetag.height = info_table.height;
     1170                     }
     1171                     info_description.top = info_img.bottom;
     1172
     1173                     info_description.height = Math.max(info_para.bottom, info_licencetag.bottom) - info_description.top;
     1174
     1175
     1176                     info_description.bottom = info_description.bottom + info_description.height;
     1177                     //=============================================================================
     1178                     if (theme.match(RegExp("gally", "gi"))) {
     1179                         if (!theme.match(RegExp("lapis", "gi"))) {
     1180                             info_description.bottom = info_description.bottom
     1181                         }
     1182                     }
     1183
     1184
     1185
     1186                     info_description.height = info_description.bottom - info_description.top;
     1187
     1188
     1189
     1190                     if (theme.match(RegExp("gally", "g"))) {
     1191                         if (!theme.match(RegExp("lapis", "gi"))) {
     1192                             info_copyright = jQuery("#copyright").infos();
     1193                             info_description.bottom += info_copyright.height;
     1194                         }
     1195                     }
     1196
     1197                     if (theme.match(RegExp("luciano", "g"))) {
     1198                         //info_description.bottom -= 30
     1199                     }
     1200
     1201
     1202                     if (jQuery.browser.msie != true)
     1203                         info_description.bottom += 4;
     1204
     1205                   
     1206
     1207                     info_description.height = info_description.bottom - info_description.top;
     1208                     if (check_desc_v != 'checked="checked"') {
     1209                         info_description.height = 0;
     1210                     }
     1211                     Debug_pos();
     1212                     return info_description;
     1213                 }
     1214
     1215                 //====================================================
     1216     function Debug_info(index,infos,nom) {
     1217     if (DEBUG != "true") return ;
     1218     if(infos.height>0){
     1219
     1220     message = browser.browser + " -- > Info : "+ nom +" " + infos.id +"\n"+
     1221                 "Info nodeName: " + infos.nodeName +"\n"+
     1222                 "Info width: " + infos.width +"\n"+
     1223                 "Info height: " + infos.height +"\n"+
     1224                 "Info top: " + infos.top +"\n"+
     1225                 "Info left: " + infos.left +"\n"+
     1226                 "Info position: " + infos.position +"\n";
     1227               
     1228           myDebug   = { id: "Debug" + index, texte: message,
     1229                     css: {
     1230                     color:"black",
     1231                        opacity: 0.5,
     1232                        filter: 'alpha(opacity:50)',
     1233                        position: "absolute",
     1234                        height: infos.height||100 +"px",
     1235                        width: infos.width||300 +"px",
     1236                        left: infos.left||0 +"px",
     1237                        border: "solid 1px green",
     1238                        top: infos.top  + "px"
     1239
     1240                     }
     1241                 }
     1242                 return myDebug;
     1243                 }else{
     1244                  return null ;
     1245                 }
     1246
     1247
     1248     }
     1249     //====================================================
     1250     function Debug_pos() {
     1251         if (DEBUG == "true") {
     1252         
     1253             jQuery("[id ^='Debug']").show();         
     1254                /*
     1255                 Debug2  background-color:yellow
     1256                 Debug3 background-color:blue
     1257                 Debug4 background-color:green
     1258                 Debug5 background-color:red
     1259
     1260                */
     1261
     1262             affiche_debug({                               
     1263                    Debug1: Debug_info(1, Bandeau_t,"Bandeau_t"),
     1264                    Debug3: Debug_info(3, info_licencetag, "info_licencetag"),
     1265                    Debug4: Debug_info(4, info_description, "info_description"),
     1266                    Debug5: Debug_info(5, info_img, "info_img")
     1267             });
     1268         }
     1269     }
     1270
     1271   function    affiche_debug(aff_infos) {
     1272         jQuery(jQuery("[id ^='Debug']")).each(function (i) {
     1273             if (aff_infos[this.id]) {
     1274                 if (aff_infos[this.id].css) {
     1275                     jQuery("#" + this.id).css(aff_infos[this.id].css);
     1276                     jQuery("#" + this.id).text(aff_infos[this.id].texte);
     1277                 }
     1278             }
     1279         });
     1280         return;
     1281
     1282     }
     1283
     1284
     1285
     1286     $(function () {
     1287
     1288         jQuery('#pamoorama').live('ON', function (e) {
     1289             jQuery(jQuery('.debug').get(1)).trigger('ON');
     1290             Bandeau_bas = Info_description('theImage');
     1291             Bandeau = Bandeau_bas.top;
     1292         });
     1293
     1294
     1295         // Custom Event, ON to turn on a debug.
     1296         jQuery('.debug').live('ON', function (e) {
     1297             n = (e.which !== 1);
     1298             jQuery('.debug').trigger('OFF');
     1299             jQuery(this).addClass('debugOn');
     1300         });
     1301
     1302         // On Click = debugs On
     1303         jQuery('.debug').live('click', function (e) {
     1304             n = (e.which !== 1)
     1305             jQuery(this).trigger('ON');
     1306         });
     1307
     1308         // Custom Event, Turn off a debug
     1309         jQuery('.debug').live('OFF', function (e) {
     1310             n = (e.which !== 1);
     1311             jQuery(this).removeClass('debugOn');
     1312         });
     1313
     1314         // on Double Click, remove the debug from the DOM
     1315         jQuery('.debug').live('dblclick', function () {
     1316             n = (e.which !== 1);
     1317             jQuery(this).fadeOut(function () { $(this).remove() });
     1318         });
     1319
     1320         // Add another debug to the DOM
     1321         jQuery('#adddebugs').click(function () {
     1322             jQuery('<div></div>')
     1323            .addClass('debug')
     1324            .appendTo('#debugsContainer');
     1325         });
     1326
     1327         // Add 10 testing debugs to start with
     1328
     1329         if (DEBUG == "true") {
     1330             for (var i = 0; i < 10; i++) {
     1331                 jQuery('#adddebugs').click();
     1332             }
     1333             jQuery(jQuery('.light').get(8)).click();
     1334
     1335         }
     1336         //  }); //on load
     1337     });
  • extensions/Autosize/js/conflit.js

    r7821 r7867  
    1717
    1818//===================================================
    19 
     19var detect = navigator.userAgent.toLowerCase();
     20var OS, version;
     21
     22//==============================================================================
     23
     24
     25browser = detect_browser();
     26
     27
     28
     29
     30function detect_browser() {
     31    mybrowser = {
     32        browser: "",
     33        konqueror: false,
     34        chrome: false,
     35        safari: false,
     36        omniWeb: false,
     37        opera: false,
     38        firefox: false,
     39        msie: false,
     40        netscape: false
     41    }
     42    if (checkIt('konqueror')) { mybrowser.Konqueror = true; lbrowser = "konqueror"; OS = "Linux"; }
     43    else if (checkIt('chrome')) { mybrowser.chrome = true; lbrowser = "chrome"; }
     44    else if (checkIt('safari')) { mybrowser.safari = true; lbrowser = "safari"; }
     45    else if (checkIt('omniweb')) { mybrowser.omniweb = true; lbrowser = "omniWeb"; }
     46    else if (checkIt('opera')) { mybrowser.opera = true; lbrowser = "opera"; }
     47    else if (checkIt('firefox')) { mybrowser.firefox = true; lbrowser = "firefox"; }
     48
     49    else if (checkIt('msie')) { mybrowser.msie = true; lbrowser = "msie"; }
     50    else if (checkIt('compatible')) { mybrowser.NetscapeNavigator = true; lmybrowser.browser = "NetscapeNavigator"; version = detect.charAt(8); }
     51    else lbrowser = "An unknown browser";
     52    if (!version) version = detect.charAt(place + thestring.length);
     53    if (!OS) {
     54        if (checkIt('linux')) OS = "Linux";
     55        else if (checkIt('x11')) OS = "Unix";
     56        else if (checkIt('mac')) OS = "Mac";
     57        else if (checkIt('win')) OS = "Windows";
     58        else OS = "an unknown operating system";
     59    }
     60
     61    mybrowser.browser = lbrowser;
     62    return mybrowser
     63
     64
     65};
     66
     67
     68
     69function checkIt(string) {
     70    place = detect.indexOf(string) + 1;
     71    thestring = string;
     72    return place;
     73}
    2074/*
    2175 
    2276*/
    23 msie = jQuery.browser.msie || false;
    24 opera= jQuery.browser.opera || false;
     77
     78
     79konqueror = mybrowser.konqueror || false;
     80chrome = mybrowser.chrome || false;
     81safari = mybrowser.safari || false;
     82omniWeb = mybrowser.omniWeb || false;
     83opera = mybrowser.opera || false;
     84firefox = mybrowser.firefox || false;
     85msie = mybrowser.msie || false;
     86netscape = mybrowser.netscape || false;
     87
     88
    2589//========================================
    2690/*function $defined(A) {
    27     $ = _$2; //   ;
    28     return A != undefined;
     91$ = _$2; //   ;
     92return A != undefined;
    2993}
    3094*/
     
    53117    } else if (retour.match(RegExp("pamooramics", "gi"))) {
    54118
    55     ret_element =  jQuery().$Pamoorama(element);
     119        ret_element = jQuery().$Pamoorama(element);
    56120
    57121        if (retour.match(RegExp("init_", "gi"))) {
     
    62126    } else if (retour.match(RegExp("luciano", "gi"))) {
    63127        $1 = $_;
    64        
    65         ret_element = jQuery().$Luciano(element,nc);
     128
     129        ret_element = jQuery().$Luciano(element, nc);
    66130
    67131    } else if (retour.match(RegExp("jQuery", "gi"))) {
     
    274338                    }
    275339                    if (Src_Match.match("main")) {
    276                      
     340
    277341                        callstack.push("main");
    278342                        isCallstackPopulated = true;
     
    392456
    393457
    394 (function($) {
    395     $(document).ready(function(){
    396          jQuery(window).load(function () {
    397                a = jQuery(':Description');
     458(function ($) {
     459    $(document).ready(function () {
     460        jQuery(window).load(function () {
     461            a = jQuery(':Description');
    398462        });
    399463    });
    400464    //==============================================
    401465    jQuery.extend(jQuery.expr[':'], {
    402     // Nom du sélecteur personnalisé
     466        // Nom du sélecteur personnalisé
    403467        Description: function (a) {
    404         n = jQuery(a).infos();
    405         if (n.id != "") {
    406             //alert("<" + n.nodeName  +" id= " + n.id    + " >") ;
    407         }
    408         if (n.nodeName == "SCRIPT")
    409             if (a.src == "") {
    410                 Match = jQuery(a).html();
    411                 /*
    412                 if ( Match.match(new RegExp("jQuery", "gi") )) {
    413                 alert(n.id + n.nodeName + a.outerHTML ) ;
     468            n = jQuery(a).infos();
     469            if (n.id != "") {
     470                //alert("<" + n.nodeName  +" id= " + n.id    + " >") ;
     471            }
     472            if (n.nodeName == "SCRIPT")
     473                if (a.src == "") {
     474                    Match = jQuery(a).html();
     475                    /*
     476                    if ( Match.match(new RegExp("jQuery", "gi") )) {
     477                    alert(n.id + n.nodeName + a.outerHTML ) ;
     478                    }
     479                    if ( Match.match(new RegExp("ajax", "gi") )) {
     480                    alert(n.id + n.nodeName + a.outerHTML ) ;
     481                    }
     482                    */
     483                    if (Match.match(new RegExp("\\$", "gi"))) {
     484
     485                        if (Match.match(new RegExp("ajax", "gi"))) {
     486                            //     alert(n.id + n.nodeName + a.outerHTML);
     487
     488                        }
     489                    }
     490                    if (Match.match(new RegExp("pamoorama", "ig"))) {
     491
     492                        //     alert(n.id + n.nodeName + a.innerHTML);
     493
     494                    }
     495                } else {
     496
     497                    if (a.src.match(RegExp("mootools|pamooramic|luciano", "gi"))) {
     498                        jQuery.noop;
     499
     500                    }
     501
    414502                }
    415                 if ( Match.match(new RegExp("ajax", "gi") )) {
    416                 alert(n.id + n.nodeName + a.outerHTML ) ;
    417                 }
    418                 */
    419                 if (Match.match(new RegExp("\\$", "gi"))) {
    420 
    421                     if (Match.match(new RegExp("ajax", "gi"))) {
    422                         //     alert(n.id + n.nodeName + a.outerHTML);
    423 
    424                     }
    425                 }
    426                 if (Match.match(new RegExp("pamoorama", "ig"))) {
    427 
    428                     //     alert(n.id + n.nodeName + a.innerHTML);
    429 
    430                 }
    431             }else{
    432          
    433             if (a.src.match(RegExp("mootools|pamooramic|luciano", "gi"))) {   
    434               jQuery.noop;           
    435 
    436                      }
    437  
    438                 }
    439 
    440         return a;
    441 
    442     }
    443   }); //fin extend
    444   /*
    445   *
    446   */
    447 
    448 
    449 
    450 
    451 
    452 
    453 })(jQuery);
    454 
    455 
    456  function $(element, nc0) {
    457         a = conflit(element, nc0);
    458         return a;
    459     }
    460 if (typeof ($.ajax)!="function")
    461     {   
    462     $.ajax=        function  (origSettings) {
    463              jQuery.ajax(origSettings) ;
    464         }
    465      
    466 
    467      $.parseJSON=  function (msg){
    468             return jQuery.parseJSON(msg) ;
    469         }
    470 
    471 
    472     }
    473 if (typeof ($.get)!="function")
    474     {
    475         $.get = function (options) {
    476             return jQuery.get(options);
    477         }
    478 
    479 
    480     }
     503
     504            return a;
     505
     506        }
     507    }); //fin extend
     508    /*
     509    *
     510    */
     511
     512
     513
     514
     515
     516
     517})(jQuery);
     518
     519
     520function $(element, nc0) {
     521    a = conflit(element, nc0);
     522    return a;
     523}
     524if (typeof ($.ajax) != "function") {
     525    $.ajax = function (origSettings) {
     526        jQuery.ajax(origSettings);
     527    }
     528
     529
     530    $.parseJSON = function (msg) {
     531        return jQuery.parseJSON(msg);
     532    }
     533
     534
     535}
     536if (typeof ($.get) != "function") {
     537    $.get = function (options) {
     538        return jQuery.get(options);
     539    }
     540
     541
     542}
     543$_ = $;
     544function save_framework(page) {
    481545    $_ = $;
    482     function save_framework(page) {
    483         $_ = $;
    484       return 
    485  
    486 }
    487 
     546    return
     547
     548}
     549
  • extensions/Autosize/js/jquery.dimensions.js

    r7816 r7867  
    11/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
    2  * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
    3  * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
    4  *
    5  * $LastChangedDate: 2007-12-20 08:43:48 -0600 (Thu, 20 Dec 2007) $
    6  * $Rev: 4257 $
    7  *
    8  * $LastChangedDate: 2010-10-23 08:43:48 -0600 (Thu, 20 Dec 2007) $
    9  * By cljosse
    10  * Version: 1.2
    11  *
    12  * Requires: jQuery 1.2+
    13  *
    14  */
     2* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
     3* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
     4*
     5* $LastChangedDate: 2007-12-20 08:43:48 -0600 (Thu, 20 Dec 2007) $
     6* $Rev: 4257 $
     7*
     8* $LastChangedDate: 2010-10-23 08:43:48 -0600 (Thu, 20 Dec 2007) $
     9* By cljosse
     10* Version: 1.2
     11*
     12* Requires: jQuery 1.2+
     13*
     14*/
    1515(function (jQuery) {
    1616    jQuery.dimensions = { version: '1.3' };
     
    6464
    6565
    66             var left = 0, top = 0, offset, parentOffset, offsetParent, results;
     66            var Left = 0, Top = 0, offset, parentOffset, offsetParent, results;
    6767            var borderwidth = { width: "0 0 0 0",
    6868                top: 0,
     
    8484            };
    8585            //=====================================================================
     86            myposition = "";
    8687            results = {
    87                 position: jQuery(this).attr("position"),
     88                position: "",
    8889                top: 0,
    8990                left: 0,
     
    102103                if (elem.nodeName) nodeName = elem.nodeName;
    103104
     105
    104106                if (elem == window) {
    105                     Position = { top: 0, left: 0 };
    106                 } else {
    107                     Position = jQuery(elem).position();
    108                 }
    109                 left = Position.left;
    110                 top = Position.top;
    111                 if (elem == window) {
     107
     108                    myposition = jQuery(this).attr("position") || "";
    112109                    width = jQuery(elem).width();
    113110                    height = jQuery(elem).height();
    114111                } else {
     112                    myposition = jQuery(this).css("position") || "";
    115113                    width = jQuery(elem).outerWidth();
    116114                    height = jQuery(elem).outerHeight();
    117 
    118115
    119116
     
    147144                    }
    148145                }
     146                if (elem == window) {
     147                    Position = { Top: 0, Left: 0 };
     148                } else {
     149                    Position = jQuery(elem).position();
     150                }
     151                Left = Position.left;
     152                Top = Position.top;
    149153
    150154                results = {
    151                     position: jQuery(this).attr("position"),
    152                     top: top,
    153                     left: left,
     155                    position: myposition,
     156                    top: Top,
     157                    left: Left,
    154158                    width: width,
    155159                    height: height,
    156                     right: left + width,
    157                     bottom: top + height,
     160                    right: Left + width,
     161                    bottom: Top + height,
    158162                    borderwidth: borderwidth,
    159163                    margin: margin,
     
    202206
    203207                results = {
    204                     top: Math.ceil( offset.top - parentOffset.top), left: Math.ceil(offset.left - parentOffset.left)
     208                    top: Math.ceil(offset.top - parentOffset.top), left: Math.ceil(offset.left - parentOffset.left)
    205209                };
    206210            } return results;
     
    244248                if (myObj.match(reg1)) {
    245249
    246                     myObj = parseInt(myObj) ;
     250                    myObj = parseInt(myObj);
    247251
    248252                }
     
    250254                    reg1 = new RegExp("%", "g")
    251255                    if (myObj.match(reg1)) {
    252                         val =Math.ceil(myObj * Maxi_val / 100);
     256                        val = Math.ceil(myObj * Maxi_val / 100);
    253257                        return val;
    254258                    }
  • extensions/Autosize/main.inc.php

    r7826 r7867  
    22/*
    33Plugin Name: AutoSize
    4 Version: 1.3.7.2
     4Version: 1.3.7.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/autosize.tpl

    r7805 r7867  
    6060  {assign var="visible" value="block"}
    6161<!---  autosize/template/autosize.tpl  body --->
    62     <div id="Dragg"  align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:100px;left:0px;width:300px;margin:auto;"></div>
    63   <div id="Debug"  align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div>
    64    <div id="Debug1"  align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div>
    65   <div id="Debug2"  align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div>
    66  {else}
     62<style type="text/css">
     63    {literal}
     64.debug {
     65    display: inline-block;
     66    width: 45px;
     67    height: 45px;
     68    background-color: black;
     69    margin: 2px;
     70}
     71.debugOn {
     72    background-color: yellow;
     73    border: solid 1px black;
     74    width: 43px;
     75    height: 43px;
     76}
     77
     78.jssource {font-size:.8em;color:#000; }
     79pre {font-size:.9em;background-color:#ffc;overflow-x:auto; padding: 5px;}
     80pre em {color:#009;}
     81pre b {color:#900;}
     82pre strong {color:#099;}
     83pre i,
     84pre i *{color:#090;}
     85
     86</style>
     87
     88<div id="Debug0"  align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div>
     89<div id="Debug1"  align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div>
     90<div id="Debug2"  align=center style="color:black;z-index:2000;position:absolute; background-color:yellow; top:0px;left:0px;width:800px;margin:auto;"></div>
     91<div id="Debug3"  align=center style="color:black;z-index:2000;position:absolute; background-color:blue; top:0px;left:0px;width:800px;margin:auto;"></div>
     92<div id="Debug4"  align=center style="color:black;z-index:2000;position:absolute; background-color:green; top:0px;left:0px;width:800px;margin:auto;"></div>
     93<div id="Debug5"  align=center style="color:black;z-index:2000;position:absolute; background-color:red; top:100px;left:0px;width:300px;margin:auto;"></div>
     94
     95<p><button id="adddebugs">Add a debug</button></p>
     96
     97<div id="debugsContainer"><div class="debug"></div></div>
     98    {/literal}
     99    {else}
    67100  {assign var="visible" value="none"} {/if}<!--  << autosize/template/autosize.tpl body  -->
Note: See TracChangeset for help on using the changeset viewer.