Changeset 7369

Show
Ignore:
Timestamp:
10/24/10 10:59:11 (3 years ago)
Author:
cljosse
Message:

[Autosize][beta] Improvement compatibility whis LLBO.

Files:
1 modified

Legend:

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

    r7355 r7369  
     1var cl_visible = true; 
     2function Toggle_bp() { 
     3    cl_visible = !cl_visible; 
     4    if (cl_visible) src = src1; 
     5    else src = src2; 
     6    if (cl_visible) src_info = src3; 
     7    else src_info = src4; 
     8 
     9    jQuery('#bp_cla').attr('alt', src_info); 
     10    jQuery('#bp_cla').attr('title', src_info); 
     11 
     12    jQuery('#bp_img_cla').get(0).src = src; 
     13    jQuery('#bp_img_cla').attr('alt', src_info); 
     14    jQuery('#bp_img_cla').attr('title', src_info); 
     15    jQuery('#bp_cla').attr('Stitle', src_info); 
     16    jQuery('#bp_cla').attr('Stip', " "); 
     17    old_w = 0; 
     18    jQuery(window).resize(); 
     19} 
     20 
    121jQuery(document).ready( 
    222      function (jQuery) { 
    323          var img_top = "0"; 
    4           var cl_visible = true; 
     24 
    525          var old_h = 0; 
    626          var rapport = -1; 
    727          var old_w = 0; 
    828 
    9           function Toggle_bp() { 
    10               cl_visible = !cl_visible; 
    11               if (cl_visible) src = src1; 
    12               else src = src2; 
    13               if (cl_visible) src_info = src3; 
    14               else src_info = src4; 
    15  
    16               jQuery('#bp_cla').attr('alt', src_info); 
    17               jQuery('#bp_cla').attr('title', src_info); 
    18  
    19               jQuery('#bp_img_cla').get(0).src = src; 
    20               jQuery('#bp_img_cla').attr('alt', src_info); 
    21               jQuery('#bp_img_cla').attr('title', src_info); 
    22               jQuery('#bp_cla').attr('Stitle', src_info); 
    23               jQuery('#bp_cla').attr('Stip', " "); 
    24               old_w = 0; 
    25               jQuery(window).resize(); 
    26           } 
     29 
    2730          //========================================================= 
    2831 
     
    209212              if (llgboframe.length > 0) { 
    210213 
    211                   marges_llgbo = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").outerWidth(); 
     214                  marges_llgbo = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth(); 
    212215              } 
    213216              if (theme.match(RegExp("gally", "g"))) { 
     
    220223              //      info_description.top 465  
    221224              info_description.height = marges_llgbo + (info_description.bottom + Info_the_page.top) - info_description.top; 
    222               
     225 
    223226              if (check_desc_v != 'checked="checked"') { 
    224227                  info_description.height = 0; 
     
    436439              jQuery("#imageToolBar").css("top", 0 + "px"); 
    437440              jQuery("#imageHeaderBar").css("top", "0px"); 
    438  
    439  
    440               var marge_right = 0; 
    441               var marge_left = 0; 
     441              w0 = Zone_Affichage.width; 
     442              marge = (Zone_Affichage.width - info_ToolBar.width) / 2; 
     443 
     444              var marge_right = marge; 
     445              var marge_left = marge; 
    442446              if (info_content.width > 100) { 
    443447                  marge_right = Get_Val_int(info_imageInfoBar.margin.left) + Get_Val_int(info_imageInfoBar.margin.right); 
     
    446450              } 
    447451              else 
    448                   winwidth = info_ToolBar.width - 2; 
    449  
     452                  winwidth = Zone_Affichage.width; 
     453 
     454              winwidth -= (marge_right + marge_left); 
    450455              //  var marge_top = info_ToolBar.top + info_ToolBar.height; 
    451456 
     
    678683              else 
    679684                  Image_height = parseInt(height_user); 
    680               
     685 
    681686              echelle_max = parseFloat(echelle_max, '3'); 
    682687              var echelle = parseFloat(Image_height / img_reelle.height, 3); 
     
    691696              else if (Type_Img == "map") { 
    692697                  Image_width = zone_affichage.width - marge_left - marge_right; 
    693                  } else { 
     698              } else { 
    694699                  Image_width = zone_affichage.width; 
    695700              } 
     
    699704              if (jQuery("#theImg").css("textAlign")) 
    700705                  align_auto = jQuery("#theImg").css("textAlign"); 
    701               var widthmin = Image_width; 
     706              var widthmin = winwidth; 
    702707 
    703708              if (check_auto_w == 'checked="checked"') { 
     
    714719                  widthmin -= Get_Val_int(info_img.borderwidth.left); 
    715720                  widthmin -= Get_Val_int(info_img.borderwidth.right); 
     721                  if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) { 
     722                      llgboframe = jQuery("#gbo div:first"); 
     723                      marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").outerWidth(); 
     724                  } 
     725                  widthmin -=2*marges; 
    716726                  if (Image_width > widthmin) { 
    717727                      //   Image_width largeur � atteindre  
     
    731741              // } 
    732742 
    733               //   zone_affichage.height = Image_height + Delta + info_pamoorama_footer.height; 
    734743 
    735744              zoom = echelle; 
    736  
    737               //  zone_affichage.height *= zoom; 
    738               //  zone_affichage.width *= zoom; 
    739745              //=============LLGBO2 =========================== 
    740746              marges = 0; 
     
    742748              if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) { 
    743749                  llgboframe = jQuery("#gbo div:first"); 
    744                   marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").outerWidth(); 
     750                  marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth(); 
    745751 
    746752                  m1 = jQuery(llgboframe).outerHeight(); 
     
    755761                          _width = maxWidth; 
    756762                      } else { 
    757                           _width = Image_width; 
     763                          _width = Image_width - (marges/2); 
    758764                      } 
    759765 
    760  
    761                       jQuery("#gbo").outerWidth(_width); 
    762                       jQuery("#gbo").outerHeight(Image_height); 
    763                       jQuery("#gbo").css("width", (_width) + "px"); 
    764                       jQuery("#gbo").css("height", (Image_height) + "px"); 
    765  
    766                       Image_height -= marges; 
    767                       Image_width -= marges; 
     766                        jQuery("#gbo").outerWidth(_width); 
     767                        jQuery("#gbo").css("width", (_width) + "px"); 
     768                        jQuery("#gbo").css("height", (Image_height) + "px"); 
     769                        jQuery("#gbo").outerHeight(Image_height); 
     770                        Image_width = jQuery("#gbo div:last").innerWidth(); 
     771                        Image_height = parseInt(Image_width / rapport); 
    768772 
    769773                  } else { 
     
    814818              } 
    815819 
    816               // jQuery(Cadre).height(zone_affichage.height); 
    817               //  jQuery(Cadre).height(mb-zone_affichage.top); 
     820   
    818821              jQuery(Cadre).width(zone_affichage.width); 
    819822              //============================================================== 
     
    866869              } else if (Type_Img == "pamoorama") { 
    867870                  return; 
     871 
    868872                  marge_left += 0; 
    869873                  new_width = zone_affichage.width - marge_right - marge_left; 
     
    943947 
    944948      } // function 
    945 );                                                                                                                                                                                                                                                                                                            // ready 
     949);                                                                                                                                                                                                                                                                                                                 // ready 
    946950    /* 
    947951*