Changeset 8807 for extensions/Autosize
- Timestamp:
- Jan 20, 2011, 4:44:46 PM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r8792 r8807 84 84 var winwidth = jQuery(window).width(); 85 85 var winheight = jQuery(window).height(); 86 h1 = jQuery(Obj).infos(); 87 h1 = (winheight - h1.top - 5); 88 rap = jQuery(Obj).find("img").height() / jQuery(Obj).find("img").width(); 89 Obj.height(h1); w1=(h1 / rap); 90 Obj.css({ height: h1 + "px",width:w1+"px", margin: "auto" }); 91 img = jQuery(Obj).find("img") ; 86 info_Obj = jQuery(Obj).infos(); 87 h1_left = jQuery(Obj).absoluteLeft(); 88 h1_top = jQuery(Obj).absoluteTop(); 89 h1 = (winheight - h1_top); 90 img = jQuery(Obj).find("img") ; 91 rap = jQuery(img).height() / jQuery(img).width(); 92 w2 = (h1 / rap); 93 94 if (w2 < info_Obj.width) 95 marginLeft = info_Obj.left + parseInt((info_Obj.width - w2) / 2)+"px"; 96 else 97 marginLeft = "auto"; 98 Obj.css({ width: "auto", 99 marginLeft: "auto", 100 verticalAlign: "middle", textAlign: "center" 101 }); 102 Obj.height(h1); 103 104 92 105 img.height(h1); 93 img.width(w 1);106 img.width(w2); 94 107 95 108 … … 1223 1236 info_description.bottom -= info_img.top; 1224 1237 } 1225 if (msie == true) info_description.bottom -= 4;1238 // if (msie == true) info_description.bottom -= 4; 1226 1239 1227 1240 info_description.height = info_description.bottom - info_description.top; -
extensions/Autosize/js/jquery.dimensions.js
r8729 r8807 58 58 }) : this[0] == window || this[0] == document ? self[(name == 'Left' ? 'pageXOffset' : 'pageYOffset')] || jQuery.boxModel && document.documentElement['scroll' + name] || document.body['scroll' + name] : this[0]['scroll' + name]; 59 59 }; 60 //================================================ 61 jQuery.fn['absolute' + name] = function (val) { 62 if (!this[0]) return; 63 a = jQuery(this[0]); 64 m = 0; 65 while (a.length > 0) { 66 val = jQuery(a).infos(); 67 if (val.position != "absolute") { 68 m += name == 'Left' ? val.left : val.top; 69 m += name == 'Left' ? val.margin.left : val.margin.top; 70 m += name == 'Left' ? val.margin.right : val.margin.bottom; 71 m += name == 'Left' ? val.borderwidth.left : val.borderwidth.top; 72 // m += name == 'Left' ? val.borderwidth.right : val.borderwidth.bottom; 73 // m += name == 'Left' ? val.padding.left : val.padding.top; 74 // m += name == 'Left' ? val.padding.right : val.padding.bottom; 75 a = jQuery(a).offsetParent(); 76 } else 77 break; 78 79 } 80 //306 81 82 83 return m; 84 85 86 }; 87 60 88 61 89 }); 90 //===================================================== 62 91 jQuery.fn.extend({ 63 92 … … 159 188 Cl_Position = { Top: 0, Left: 0 }; 160 189 } else { 161 Cl_Position = jQuery(elem). position();190 Cl_Position = jQuery(elem).d_position(); 162 191 } 163 192 Left = Cl_Position.left; … … 185 214 * Cl_Position de l'object elem 186 215 */ 187 position: function () {216 d_position: function () { 188 217 var left = 0, top = 0, elem = this[0], offset, parentOffset, offsetParent, results; 189 218 -
extensions/Autosize/main.inc.php
r8792 r8807 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.4.3 34 Version: 1.4.34 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
Note: See TracChangeset
for help on using the changeset viewer.