Changeset 7369 for extensions/Autosize
- Timestamp:
- Oct 24, 2010, 10:59:11 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r7355 r7369 1 var cl_visible = true; 2 function 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 1 21 jQuery(document).ready( 2 22 function (jQuery) { 3 23 var img_top = "0"; 4 var cl_visible = true; 24 5 25 var old_h = 0; 6 26 var rapport = -1; 7 27 var old_w = 0; 8 28 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 27 30 //========================================================= 28 31 … … 209 212 if (llgboframe.length > 0) { 210 213 211 marges_llgbo = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last"). outerWidth();214 marges_llgbo = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth(); 212 215 } 213 216 if (theme.match(RegExp("gally", "g"))) { … … 220 223 // info_description.top 465 221 224 info_description.height = marges_llgbo + (info_description.bottom + Info_the_page.top) - info_description.top; 222 225 223 226 if (check_desc_v != 'checked="checked"') { 224 227 info_description.height = 0; … … 436 439 jQuery("#imageToolBar").css("top", 0 + "px"); 437 440 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; 442 446 if (info_content.width > 100) { 443 447 marge_right = Get_Val_int(info_imageInfoBar.margin.left) + Get_Val_int(info_imageInfoBar.margin.right); … … 446 450 } 447 451 else 448 winwidth = info_ToolBar.width - 2; 449 452 winwidth = Zone_Affichage.width; 453 454 winwidth -= (marge_right + marge_left); 450 455 // var marge_top = info_ToolBar.top + info_ToolBar.height; 451 456 … … 678 683 else 679 684 Image_height = parseInt(height_user); 680 685 681 686 echelle_max = parseFloat(echelle_max, '3'); 682 687 var echelle = parseFloat(Image_height / img_reelle.height, 3); … … 691 696 else if (Type_Img == "map") { 692 697 Image_width = zone_affichage.width - marge_left - marge_right; 693 698 } else { 694 699 Image_width = zone_affichage.width; 695 700 } … … 699 704 if (jQuery("#theImg").css("textAlign")) 700 705 align_auto = jQuery("#theImg").css("textAlign"); 701 var widthmin = Image_width;706 var widthmin = winwidth; 702 707 703 708 if (check_auto_w == 'checked="checked"') { … … 714 719 widthmin -= Get_Val_int(info_img.borderwidth.left); 715 720 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; 716 726 if (Image_width > widthmin) { 717 727 // Image_width largeur à atteindre … … 731 741 // } 732 742 733 // zone_affichage.height = Image_height + Delta + info_pamoorama_footer.height;734 743 735 744 zoom = echelle; 736 737 // zone_affichage.height *= zoom;738 // zone_affichage.width *= zoom;739 745 //=============LLGBO2 =========================== 740 746 marges = 0; … … 742 748 if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) { 743 749 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(); 745 751 746 752 m1 = jQuery(llgboframe).outerHeight(); … … 755 761 _width = maxWidth; 756 762 } else { 757 _width = Image_width ;763 _width = Image_width - (marges/2); 758 764 } 759 765 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); 768 772 769 773 } else { … … 814 818 } 815 819 816 // jQuery(Cadre).height(zone_affichage.height); 817 // jQuery(Cadre).height(mb-zone_affichage.top); 820 818 821 jQuery(Cadre).width(zone_affichage.width); 819 822 //============================================================== … … 866 869 } else if (Type_Img == "pamoorama") { 867 870 return; 871 868 872 marge_left += 0; 869 873 new_width = zone_affichage.width - marge_right - marge_left; … … 943 947 944 948 } // function 945 ); // ready949 ); // ready 946 950 /* 947 951 *
Note: See TracChangeset
for help on using the changeset viewer.