Ignore:
Timestamp:
Jan 18, 2011, 1:17:27 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] compatibility whith simple


File:
1 edited

Legend:

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

    r8627 r8729  
    5252
    5353//==========================================================================
    54 function Wait_Affichage() {
     54function Wait_Affichage() {
     55   
     56            fade_in = parseInt(fade_in);
    5557    if(!jQuery().newResize()) {
    5658                 setTimeout("Wait_Affichage()", 500);
    5759                 return
    5860             }
    59 
    60              fade_in = parseInt(fade_in);
    61              if (fade_in == 0) {
    62                  if (msie)
    63                      jQuery(Parent).css({opacity:"1",filter: "alpha(opacity=100)"});
    64              else
    65                  jQuery(Parent).css("opacity","1");
    66              } else {
    67                  jQuery(Parent).animate(
    68                          { opacity: 1 }, fade_in, "swing"
     61 
     62             if (fade_in == 0) {               
     63                     jQuery(Parent).css({opacity:"1" });
     64         } else {
     65
     66                jQuery(Parent).animate(
     67                         { opacity: "1" }, fade_in, "swing"
    6968                       , function (i) {
     69                           jQuery(Parent).css({ opacity: "1" });
    7070                           if (DEBUG == "true") {
    7171                               bp1 = jQuery('.debug').get(nu_img);
     
    8585jQuery(document).ready(
    8686     function (jQuery) {
     87         jQuery(window).unload(function () {
     88             
     89
     90
     91         });
    8792         jQuery(window).load(function () {
    88              if (fade_in != 0) {
    89                  if (msie)
    90                      jQuery("#theImage").css({ opacity: "0" });
    91                  else
    92                      jQuery("#theImage").css({ opacity: "0" });
    93              }
     93
     94             //  jQuery("#theImage").css({ opacity: "0" });
     95
     96             jQuery("#the_page").css({ top: "0px" });
     97
    9498             //======= cl_conflit ======
    9599             img_top = "0";
    96100             rapport = -1;
    97 
    98101             marges_llgbo = 0;
    99102             pos = 0;
    100 
    101 
    102103             //=============================================================
    103104             function cl_Timer() {
     
    133134             img_finale = { height: 0, width: 0 };
    134135             Zone_Affichage = { height: 0, width: 0 };
    135 
    136              //============================================================
     136             //============================================================       
    137137
    138138             Info_the_page = jQuery("#the_page").infos();
     
    150150             }
    151151             old_window = { width: 0, height: 0 };
    152              Wait_Affichage();
     152             jQuery("#theImage").trigger('ON');
     153
    153154             old_window = { width: 0, height: 0 };
    154155             jQuery().newResize();
     
    255256                 var info_ToolBar = jQuery("#imageToolBar").infos();
    256257                 var marge = 0;
    257                  marge_right = 0;
    258                  marge_left = 0;
     258                 var marge_right = 0;
     259                 var marge_left = 0;
    259260                 if (theme.match(RegExp("simple", "g"))) {
    260261                     if (info_ToolBar.width > 0)
     
    263264                         marge = (Zone_Affichage.width - info_the_page.width) / 2;
    264265
    265                      var marge_right = marge;
    266                      var marge_left = marge;
     266                     marge_right = marge;
     267                     marge_left = marge;
    267268
    268269                     if (info_content.width > 100) {
     
    274275
    275276                     }
    276                  }
    277                  else
     277                 } else {
     278                     if (info_ToolBar.width > 0)
     279                         marge = (info_the_page.width - info_ToolBar.width) / 2;
     280
     281                     marge_right = marge;
     282                     marge_left = marge;
    278283                     winwidth = info_the_page.width;
     284                 }
    279285
    280286
     
    328334                         jQuery("#map").css("left", info_map.width + "px");
    329335                         Bandeau_bas.height = 10;
    330                        
     336
    331337                         if (theme.match(RegExp("simple", "g"))) {
    332338                             img_reelle.width = winwidth; //- info_map.width -marge_right;
    333                          } else { 
    334                           img_reelle.width = winwidth - info_map.width -marge_right;
     339                         } else {
     340                             img_reelle.width = winwidth - info_map.width - marge_right;
    335341                         }
    336342
     
    610616                         heightgbo = img_finale.height;
    611617                         img_finale.width -= marges_llgbo;
    612                          img_finale.height -= marges_llgbo;
     618                         if (jQuery("#slideshow").infos().width > 0) {
     619                             img_finale.height -= (marges_llgbo * 1.5);
     620                         } else {
     621                             img_finale.height -= marges_llgbo
     622                         }
     623
    613624
    614625                         if (wingbo > winwidth) {
     
    668679                 //================ Zone affichage =========================
    669680
    670                  if (theme.match(RegExp("luciano", "g"))) {
    671                      //---- information en dehors du cadre
    672                      jQuery(Cadre).height(Zone_Affichage.height -= Bandeau_bas.height);
    673                  }
    674 
    675                  //=========================================================
    676681
    677682                 //  jQuery(Cadre).css("top", "0px");
     
    683688                 Image_width = img_finale.width;
    684689                 //=========================================================================
    685                  jQuery(Cadre).css({ marginLeft: marge_left + "px"
    686                  });
     690                 if (jQuery("#slideshow").infos().width > 0) {
     691
     692                     jQuery(Cadre).css({ marginLeft: "auto"
     693                     });
     694                 }
     695                 else
     696                     jQuery(Cadre).css({ marginLeft: marge_left + "px"
     697                     });
    687698                 jQuery(Cadre).width(Zone_Affichage.width);
    688699                 //   jQuery(Cadre).height(Zone_Affichage.height);
     
    816827                 }
    817828
    818 
    819 
     829                 jQuery("#imageContainer").css({ height: "auto" });
    820830
    821831                 jQuery("#navThumbPrev").css({ overflow: "hidden" });
    822832                 jQuery("#navThumbNext").css({ overflow: "hidden" });
    823833                 n = typeof inittoolbar;
    824 
     834                 if (Type_Img == "map") {
     835                     jQuery("#navThumbNext").css({ display: 'none' });
     836                     jQuery("#navThumbPrev").css({ display: 'none' });
     837                 }
    825838                 try {
    826839                     if (theme.match(RegExp("gally", "gi"))) {
     
    835848                                 top: info_img.top + 20 + "px", overflow: "hidden"
    836849                             });
    837                              if (Type_Img == "map")
    838                                  jQuery("#navThumbPrevContainer").css({ background: 'none' });
     850
    839851                         }
    840852                         if (jQuery("#navThumbNext").length > 0) {
     
    844856
    845857                         }
    846                          if (Type_Img == "map")
    847                              jQuery("#navThumbNextContainer").css({ background: 'none' });
     858
     859
    848860                         if (!theme.match(RegExp("lapis", "gi"))) {
    849                              initializeImageMode("resize");
     861                             if (typeof initializeImageMode == "function") {
     862                                 initializeImageMode("resize");
     863                             }
     864
    850865                         }
    851866
     
    955970                 *
    956971                 */
    957                  
     972
    958973                 function Info_entete(Parent) {
    959974                     if (typeof (marge_top) != "undefined") return result;
     
    10221037                     //=============================================================================
    10231038                     info_description = { top: 0, bottom: 0, height: 0 };
    1024            
    1025 
     1039
     1040                     jQuery(Parent).css({ display: "block" });
    10261041                     //====== détection du type d'images ======
    10271042                     if (jQuery("#charlie").length > 0) {
     
    10851100                     if (theme.match(RegExp("luciano", "g"))) {
    10861101                         TheImg = jQuery(Parent + " #theImg img");
     1102
    10871103                         info_img = jQuery(TheImg).infos();
    10881104
     
    12421258
    12431259                     if (theme.match(RegExp("luciano", "g"))) {
    1244                          //info_description.bottom -= 30
     1260                         info_description.bottom -= 0;
     1261
     1262                       
     1263                             correction = -30;
     1264                             Info_slidshowToolBar = jQuery("#slidshowToolBar").infos();
     1265
     1266                             if (Info_slidshowToolBar.height > 0) {
     1267                                 correction -= (Info_slidshowToolBar.height);
     1268                                 info_description.top -= 90;
     1269
     1270                             }
     1271                             
     1272                       
     1273
     1274                         //=========================================================
    12451275                     }
    12461276
     
    13361366             Wait_Affichage();
    13371367         });
    1338 
     1368         jQuery(Parent).live('ON', function (e) {
     1369             jQuery(jQuery('.debug').get(1)).trigger('ON');
     1370             Wait_Affichage();
     1371         });
    13391372
    13401373         // Custom Event, ON to turn on a debug.
Note: See TracChangeset for help on using the changeset viewer.