Changeset 9007
- Timestamp:
- Jan 31, 2011, 12:57:41 PM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r8959 r9007 108 108 $autoscript .="<input id='src_img_h' type='hidden' value='' />"; 109 109 $autoscript .="<input id='src_img_w' type='hidden' value='' />"; 110 $autoscript .="<input id='window_height' type='hidden' value='' />"; 111 $autoscript .="<input id='window_width' type='hidden' value='' />"; 112 $autoscript .='<div id="Debug6" align=center style="display:none"></div>'; 110 113 $template->append('footer_elements',$autoscript); 111 114 return ; -
extensions/Autosize/css/autosize.css
r8981 r9007 42 42 } 43 43 #imageContainer{ 44 height:1 000px;44 height:1400px; 45 45 } -
extensions/Autosize/js/Affiche_script.js
r8981 r9007 55 55 return 56 56 } 57 nu_img++; 58 57 nu_img++; 58 59 59 if (fade_in == 0) { 60 60 jQuery(Parent).css({ opacity: "1" }); 61 } else { 62 jQuery(Parent).animate({ opacity: "1" },61 } else { 62 jQuery(Parent).animate({ opacity: "1" }, 63 63 fade_in, "swing", 64 64 function (i) { 65 66 67 68 69 70 71 65 jQuery(Parent).css({ opacity: "1" }); 66 if (DEBUG == "true") { 67 bp1 = jQuery('.debug').get(nu_img); 68 if (!bp1) nu_img = 0; 69 bp1 = jQuery('.debug').get(nu_img); 70 jQuery(bp1).trigger('ON'); 71 } 72 72 } 73 73 ); 74 75 } 76 // if (nu_img > 1) return;74 75 } 76 // if (nu_img > 1) return; 77 77 78 78 … … 84 84 jQuery("#src_img_w").val(img_w); 85 85 jQuery("#ret_autosize").val(src_img); 86 87 jQuery("#ret_autosize").trigger('ON', { width: img_w, height: img_h, theImage: TheImg, src_img: src_img }); 86 jQuery("#window_height").val(Window_Affichage.height); 87 jQuery("#window_width").val(Window_Affichage.width); 88 jQuery("#ret_autosize").trigger('ON', { width: img_w, 89 height: img_h, 90 theImage: TheImg, 91 src_img: src_img, 92 window_height: Window_Affichage.height, 93 window_width: Window_Affichage.width 94 }); 88 95 89 96 … … 131 138 marginLeft = "auto"; 132 139 133 jQuery(Obj).css({ width: "auto", marginTop:marge_top,140 jQuery(Obj).css({ width: "auto", marginTop: marge_top, 134 141 marginLeft: "auto", marginBottom: 0 + "px", 135 142 verticalAlign: "middle", textAlign: "center" … … 189 196 img = jQuery(this); 190 197 rap.push((img.width() / img.height())); 191 width.push( img.width());192 height.push( img.height());198 width.push(img.width()); 199 height.push(img.height()); 193 200 }); 194 201 … … 228 235 jQuery(window).unload(function () { 229 236 if (TheImg) { 230 jQuery.cookie('old_img', TheImg.src); // créer un cookie avec une valeur 231 jQuery.cookie('old_img_h', jQuery(TheImg).height()); // créer un cookie avec une valeur 232 jQuery.cookie('old_img_w', jQuery(TheImg).width()); // créer un cookie avec une valeur 237 jQuery.cookie('img', TheImg.src); // créer un cookie avec une valeur 238 jQuery.cookie('img_h', jQuery(TheImg).height()); 239 jQuery.cookie('img_w', jQuery(TheImg).width()); 240 jQuery.cookie('window_height', Window_Affichage.height); 241 jQuery.cookie('window_width', Window_Affichage.width); 233 242 } 234 243 … … 255 264 options = { imageAutosizeMargin: 0, imageAutosize: false } 256 265 } 257 258 old_img= jQuery.cookie('old_img'); 259 old_img_h= jQuery.cookie('old_img_h'); 260 old_img_w= jQuery.cookie('old_img_w'); 261 266 267 old_img = jQuery.cookie('img'); 268 old_img_h = jQuery.cookie('img_h'); 269 old_img_w = jQuery.cookie('img_w'); 270 old_window_height = jQuery.cookie('window_height'); 271 old_window_width = jQuery.cookie('window_width'); 262 272 263 273 //============================================================ … … 361 371 var chk = eval(user_status + "_enabled"); 362 372 if (chk == "") { return true; } 363 364 373 //================================================================= 365 366 367 374 var winwidth = jQuery(window).width(); 368 375 var winheight = jQuery(window).height(); … … 1044 1051 } 1045 1052 info_frame = jQuery(Cadre).infos(); 1046 1053 if (theme.match(RegExp("stripped", "gi"))) { 1054 pos = "absolute"; 1055 info_theImageBox = jQuery("#theImageAndTitle").infos(); 1056 t1 = info_theImageBox.top; 1057 l1 = info_theImageBox.left; 1058 info_theImageBox = jQuery(Parent).infos(); 1059 1060 } else { 1061 pos = "absolute"; 1062 t1 = info_frame.top; 1063 l1 = info_frame.left; 1064 info_theImageBox = jQuery(Parent).infos(); 1065 } 1066 1067 info_theImageBox.margin.margin = info_frame.margin.margin; 1068 info_theImageBox.top = t1; 1069 info_theImageBox.left = l1; 1070 info_theImageBox.pos = "absolute"; 1071 Window_Affichage = info_theImageBox; 1047 1072 if (DEBUG == "true") { 1048 if (theme.match(RegExp("stripped", "gi"))) {1049 pos = "absolute";1050 t1 = info_imageInfoBar.bottom;1051 l1 = info_imageInfoBar.left;1052 } else {1053 pos = "absolute";1054 t1 = info_frame.top;1055 l1 = info_frame.left;1056 }1057 1073 // jQuery(Cadre).css("border", "solid green"); 1058 margins = info_frame.margin.margin; 1074 1059 1075 jQuery("#Debug5").css({ background: "transparent", 1060 1076 position: pos, 1061 1077 border: "green solid 2px", 1062 1078 textAlign: align_auto, 1063 margin: margins,1064 top: t1+ "px",1065 left: l1+ "px",1066 width: info_frame.width + "px",1067 height: info_frame.height + "px"1079 margin: Window_Affichage.margin.margin, 1080 top: Window_Affichage.top + "px", 1081 left: Window_Affichage.left + "px", 1082 width: Window_Affichage.width + "px", 1083 height: Window_Affichage.height + "px" 1068 1084 }); //red 1069 1085 jQuery("#Debug4").css({ top: info_frame.bottom - info_description.height + "px" }); //green … … 1134 1150 info_theImage = jQuery(Parent).infos(); 1135 1151 info_thePicturePage = jQuery("#thePicturePage").infos(); 1152 1153 1136 1154 if (theme.match(RegExp("stripped", "gi"))) { 1137 optiontop = 0;// Info_the_page.top+ info_imageInfoBar.bottom + llgboframe.top + info_imageToolBar.top + info_imageToolBar.height; 1155 1156 info_theImageAndTitle = jQuery("#theImageAndTitle").infos(); 1157 info_theImageBox = jQuery("#theImageBox").infos(); 1158 1159 optiontop = (marges_llgbo / 2) + info_theImageAndTitle.margin.top; 1160 1138 1161 } 1139 1162 … … 1333 1356 //========================================================= 1334 1357 } else if (theme.match(RegExp("stripped", "gi"))) { 1335 1336 info_theImageAndTitle = jQuery("#theImageAndTitle").infos();1337 info_description.top = info_img.bottom;1338 info_description.bottom = info_description.borderwidth.top +1339 info_description.borderwidth.bottom;1340 1358 1341 if (options.imageAutosizeTitle) { 1342 1343 check_desc_v = true; 1344 h0 = info_theImageAndTitle.bottom - info_img.bottom; 1345 info_description.bottom += info_theImageAndTitle.bottom+ 1346 marges_llgbo/2 ; //+ 1347 // info_theImageAndTitle.margin.top; 1348 // info_theImageAndTitle.margin.bottom + 1349 } ; 1350 1359 if (options.imageAutosizeTitle == false) { 1360 info_description.top = info_theImageAndTitle.bottom + 1361 info_theImageAndTitle.margin.bottom + 1362 info_theImageAndTitle.margin.top; 1363 1364 info_description.bottom = info_theImageAndTitle.bottom + 1365 info_description.borderwidth.top + 1366 info_description.borderwidth.bottom + 1367 (marges_llgbo / 2); 1368 1369 } else { 1370 info_description.top = info_theImageBox.bottom + 1371 info_theImageAndTitle.margin.bottom + 1372 info_theImageAndTitle.margin.top; 1373 info_description.bottom = info_theImageAndTitle.bottom + 1374 info_description.borderwidth.top + 1375 info_description.borderwidth.bottom ; 1376 1377 }; 1378 check_desc_v = true; 1351 1379 1352 1380 } else { 1353 1381 info_description.bottom = info_theImage.bottom; 1354 1382 info_description.top = info_img.height + info_theImage.top; 1355 // info_description.bottom -= info_img.top;1383 // info_description.bottom -= info_img.top; 1356 1384 } 1357 1385 // if (msie == true) info_description.bottom -= 4; 1358 1386 1359 1387 info_description.height = info_description.bottom - info_description.top; 1360 1388 1361 if (check_desc_v == false) {1389 if (check_desc_v == false) { 1362 1390 info_description.height = 0; 1363 1391 } … … 1365 1393 Debug_pos(); 1366 1394 1367 // cl_visible=false ;1395 // cl_visible=false ; 1368 1396 return info_description; 1369 1397 } … … 1371 1399 //==================================================== 1372 1400 function Debug_info(index, infos, nom) { 1373 if (DEBUG != "true") return; 1401 1374 1402 if (infos.height > 0) { 1375 1403
Note: See TracChangeset
for help on using the changeset viewer.