Changeset 8536
- Timestamp:
- Jan 8, 2011, 6:17:44 PM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r8186 r8536 42 42 } 43 43 info_pamoorama = jQuery("#pamoorama").infos(); 44 new_width= info_pamoorama.width;44 new_width = info_pamoorama.width -( info_pamoorama.borderwidth.left + info_pamoorama.borderwidth.right); 45 45 if ( Math.abs(new_width - myPamoorama.options.width)>10 ) { 46 46 setTimeout("Wait_pamoorama()", 500); … … 93 93 if (fade_in != 0) { 94 94 if (msie) 95 jQuery("#theImage").css({ opacity: "0" 95 jQuery("#theImage").css({ opacity: "0" }); 96 96 else 97 97 jQuery("#theImage").css({ opacity: "0" }); … … 235 235 if (n == 0) { 236 236 n = winheight - old_window.height; 237 if (n == 0) return true; 237 if (n == 0) 238 return true; 238 239 } 239 240 old_window = jQuery(window).infos(); … … 264 265 if (info_ToolBar.width > 0) 265 266 marge = (Zone_Affichage.width - info_ToolBar.width) / 2; 266 else if (info_the_page.width >0)267 else if (info_the_page.width > 0) 267 268 marge = (Zone_Affichage.width - info_the_page.width) / 2; 268 269 … … 272 273 if (info_content.width > 100) { 273 274 274 marge_left = 0;275 marge_left = (info_imageInfoBar.margin.left); 275 276 marge_right = (info_imageInfoBar.margin.left + info_imageInfoBar.margin.right); 276 277 winwidth = info_content.width; … … 676 677 jQuery("#standard").css("top", 0 + "px"); 677 678 jQuery("#comments").css("top", 0 + "px"); 678 679 680 681 682 679 //========== Image Remise à l'échelle ======================= 683 680 684 681 Image_height = img_finale.height; 685 682 Image_width = img_finale.width; 686 687 688 689 683 //========================================================================= 684 jQuery(Cadre).css({ marginLeft: marge_left + "px" 685 }); 690 686 jQuery(Cadre).width(Zone_Affichage.width); 691 687 // jQuery(Cadre).height(Zone_Affichage.height); … … 749 745 750 746 } else if (Type_Img == "pamoorama") { 751 747 info_theImage.height = Zone_Affichage.height; 752 748 img_height = myPamoorama.imageHeight 753 marge_left += 2;754 755 749 if (theme.match(RegExp("simple", "g"))) { 756 marge_right = 2;750 // marge_right = 2; 757 751 } 758 752 new_width = Zone_Affichage.width - marge_right - marge_left; 759 info_theImage.height = Zone_Affichage.height; 753 new_width = Zone_Affichage.width - (info_theImage.borderwidth.right + info_theImage.borderwidth.left); 754 755 760 756 761 757 Zone_Affichage.height += info_pamoorama_footer.height; 762 763 764 758 zoom = info_theImage.height / img_height; 765 759 myPamoorama.options.width = new_width * zoom; 766 767 768 760 // if(msie || safari) jQuery("#pamoorama_inner ").css({ zoom: zoom }); 769 761 //==================================================== … … 771 763 marginLeft: "auto", 772 764 marginRight: "auto", 773 //height: Zone_Affichage.height + "px", sinon déclenchement panorama sur la hauteur;765 //height: Zone_Affichage.height + "px", sinon déclenchement panorama sur la hauteur; 774 766 width: new_width + "px" 775 767 }); … … 782 774 783 775 jQuery("#pamoorama_outter").width(new_width); 776 777 784 778 // commenter sinon outter augmente à chaque resize 785 // jQuery("#pamoorama_outter").height(info_pamoorama.height - info_pamoorama_footer.height);779 // jQuery("#pamoorama_outter").height(info_pamoorama.height - info_pamoorama_footer.height); 786 780 787 781 788 782 789 783 jQuery("#pamoorama_outter").css({ width: new_width + "px" }); 784 jQuery("#pamoorama_footer").css({ width: new_width + "px" }); 790 785 // 791 786 //==================================================== … … 851 846 } else if (theme.match(RegExp("simple", "g"))) { 852 847 853 jQuery("#imageToolBar").css("position", "static"); 848 jQuery("#imageToolBar").css({ position: "static" }); 849 854 850 info_imageInfoBar = jQuery("#imageInfoBar").infos(); 855 851 if (info_imageInfoBar.bottom < info_img.bottom) { 856 jQuery("#imageInfoBar").height(info_img.bottom);852 // jQuery("#imageInfoBar").height(info_img.bottom); 857 853 } 858 854 … … 892 888 } 893 889 // jQuery(Cadre).css("border", "solid green"); 894 margins = jQuery(Cadre).css("margin");890 margins = info_frame.margin.margin; 895 891 jQuery("#Debug5").css({ background: "transparent", 896 892 position: pos, 897 893 border: "green solid 2px", 898 894 textAlign: align_auto, 899 margin: "4px",895 margin: margins, 900 896 top: t1 + "px", 901 897 left: l1 + "px", -
extensions/Autosize/js/jquery.dimensions.js
r8093 r8536 106 106 if (elem.nodeName) nodeName = elem.nodeName; 107 107 108 108 109 109 if (elem == window) { 110 110 111 myposition = jQuery(this).attr("position") ||"";111 myposition = ""; 112 112 width = jQuery(elem).width(); 113 113 height = jQuery(elem).height(); 114 114 } else { 115 myposition = jQuery(this).css("position") || ""; 115 Css = jQuery(elem).getStyles(elem); 116 myposition = Css.position || ""; 116 117 width = jQuery(elem).outerWidth(); 117 118 height = jQuery(elem).outerHeight(); 118 119 119 120 120 borderwidth.left = jQuery(elem).Get_Val_int( jQuery(elem).css("borderLeftWidth"));121 borderwidth.right = jQuery(elem).Get_Val_int( jQuery(elem).css("borderRightWidth"));122 borderwidth.top = jQuery(elem).Get_Val_int( jQuery(elem).css("borderTopWidth"));123 borderwidth.bottom = jQuery(elem).Get_Val_int( jQuery(elem).css("borderBottomWidth"));121 borderwidth.left = jQuery(elem).Get_Val_int(Css.borderLeftWidth); 122 borderwidth.right = jQuery(elem).Get_Val_int(Css.borderRightWidth); 123 borderwidth.top = jQuery(elem).Get_Val_int(Css.borderTopWidth); 124 borderwidth.bottom = jQuery(elem).Get_Val_int(Css.borderBottomWidth); 124 125 try { 125 borderwidth.width = jQuery(elem).Get_Val_int(jQuery(elem).css("borderWidth"));126 borderwidth.width = Css.borderWidth; 126 127 } catch (e) { 127 128 borderwidth.width = '"' + borderwidth.left + ' ' + borderwidth.top + ' ' + borderwidth.right + ' ' + borderwidth.bottom + '"'; … … 129 130 130 131 131 margin.left = jQuery(elem).Get_Val_int(jQuery(elem).css("marginLeft")); 132 margin.right = jQuery(elem).Get_Val_int(jQuery(elem).css("marginRight")); 133 margin.top = jQuery(elem).Get_Val_int(jQuery(elem).css("marginTop")); 134 margin.bottom = jQuery(elem).Get_Val_int(jQuery(elem).css("marginBottom")); 132 133 margin.left = jQuery(elem).Get_Val_int(Css.marginLeft); 134 margin.right = jQuery(elem).Get_Val_int(Css.marginRight); 135 margin.top = jQuery(elem).Get_Val_int(Css.marginTop); 136 margin.bottom = jQuery(elem).Get_Val_int(Css.marginBottom); 137 135 138 try { 136 margin.margin = jQuery(elem).Get_Val_int(jQuery(elem).css("margin")); 139 margin.margin = Css.margin; 140 137 141 } catch (e) { 138 142 margin.margin = '"' + margin.left + ' ' + margin.top + ' ' + margin.right + ' ' + margin.bottom + '"'; 139 143 } 140 144 141 padding.left = jQuery(elem).Get_Val_int(jQuery(elem).css("paddingLeft")); 142 padding.right = jQuery(elem).Get_Val_int(jQuery(elem).css("paddingRight")); 143 padding.top = jQuery(elem).Get_Val_int(jQuery(elem).css("paddingTop")); 144 padding.bottom = jQuery(elem).Get_Val_int(jQuery(elem).css("paddingBottom")); 145 try { padding.padding = jQuery(elem).Get_Val_int(jQuery(elem).css("padding")); } catch (e) { 145 padding.left = jQuery(elem).Get_Val_int(Css.paddingLeft); 146 padding.right = jQuery(elem).Get_Val_int(Css.paddingRight); 147 padding.top = jQuery(elem).Get_Val_int(Css.paddingTop); 148 padding.bottom = jQuery(elem).Get_Val_int(Css.paddingBottom); 149 try { 150 padding.padding = Css.padding; 151 } catch (e) { 146 152 padding.padding = '"' + padding.left + ' ' + padding.top + ' ' + padding.right + ' ' + padding.bottom + '"'; 147 153 } … … 222 228 return jQuery(offsetParent); 223 229 }, 230 // getStyles(Obj) Récupérer la valeur CSS 231 getStyles: function (elt) { 232 var element = elt; 233 if (window.getComputedStyle) // Mozilla Firefox & cie 234 { 235 var propriete = window.getComputedStyle(element, null); 236 } 237 else if (element.currentStyle) // Microsoft Internet Explorer 238 { 239 240 var propriete = element.currentStyle; 241 } 242 return propriete; 243 }, 224 244 /* 225 245 * Get_val_int … … 230 250 Get_Val_int: function (myObj, Maxi_val, Mini_val) { 231 251 var val = 0; 232 233 252 Maxi_val = parseInt(Maxi_val || "0"); 234 253 … … 246 265 247 266 if (typeof (myObj) == "string") { 267 248 268 if (myObj == "none") return Maxi_val; 249 if (myObj == "auto") return Maxi_val; 250 var reg1 = new RegExp("px", "g") 269 var reg1 = new RegExp("auto", "g") 270 if (myObj.match(reg1)) { 271 return Maxi_val; 272 } 273 reg1 = new RegExp("px", "g") 251 274 if (myObj.match(reg1)) { 252 275 -
extensions/Autosize/main.inc.php
r8093 r8536 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.4.2. 34 Version: 1.4.2.5 5 5 Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448 -
extensions/Autosize/template/autosize.tpl
r8070 r8536 92 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 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 94 95 95 <p><button id="adddebugs">Add a debug</button></p> 96 96
Note: See TracChangeset
for help on using the changeset viewer.