Changeset 17538 for extensions/Autosize/js/Affiche_script.js
- Timestamp:
- Aug 10, 2012, 5:37:39 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r17503 r17538 16 16 var theImg; 17 17 var Zone_image; 18 18 /****************************************** 19 * test_theme("mont,pur") ... 20 ******************************************/ 21 test_theme = function (param) { 22 if (!param) return 23 regx = new RegExp(param, "gi"); 24 return (options.theme.match(regx)) 25 26 } 19 27 /****************************************** 20 28 * Save_cookies … … 296 304 infos_imageInfos = jQuery(imageInfos_id).infos(true); // information 297 305 infos_theMainImage = jQuery(theMainImage_id).infos(true); // Image 306 infos_copyright = jQuery("#copyright").infos(true); 298 307 299 308 jQuery("#loading").show(0); 300 309 zheight = infos_window.height - (infos_theImage.top); 310 h01 = 0; 311 h02 = 0; 301 312 if (options.check_desc_v) { 302 info_comments = jQuery("#comments").infos(true); 313 314 infos_comments = jQuery("#comments").infos(true); 303 315 infos_Licence = jQuery(".licencetag").infos(true); 304 316 infos_imageComment = jQuery(imageComment_id).infos(true); 305 h01 = info_comments.top - infos_theMainImage.bottom; 317 318 if (infos_imageComment.visible = true && infos_imageComment.general.bottom > infos_theMainImage.bottom) { 306 319 h02 = infos_imageComment.general.bottom - infos_theMainImage.bottom; 320 } 321 if (infos_Licence.visible = true && infos_Licence.general.bottom > infos_theMainImage.bottom) { 322 h01 = infos_Licence.general.bottom - infos_theMainImage.bottom; 323 } 307 324 delta_h = infos_imageInfos.bottom - infos_imageInfos.top; 308 if (options.theme.match(RegExp("blanc", "gi")) || options.theme.match(RegExp("pure", "gi")) 309 || options.theme.match(RegExp("hr_", "gi"))) { 325 info_comments1 = jQuery(theImage_id + " p").infos(true); 326 if (test_theme("simple")) { 327 options.marge_basse += info_comments1.general.height; 310 328 311 h01 = infos_Licence.general.bottom-infos_theMainImage.bottom; 312 options.marge_basse += h01; 329 } else { 330 options.marge_basse += Math.max(h01, h02); 331 if (test_theme("blanc , pure, hr_ ")) { 313 332 options.marge_gauche += 10; 314 333 options.marge_droite += 10; 315 316 } else {317 318 if (options.theme != "simple")319 if (delta_h > 5 && (infos_imageInfos.top > infos_theMainImage.bottom)) {320 if (infos_imageComment.visible) {321 322 334 } 323 335 } 324 325 326 h01 = infos_Licence.general.bottom - infos_theMainImage.bottom; 327 h02 = infos_imageComment.general.bottom - infos_theMainImage.bottom; 328 329 if (Type_Img == "pamoorama") { 330 h01 = infos_Licence.general.bottom - infos_theMainImage.bottom; 331 332 ; 333 options.marge_basse += (h01); 334 } else 335 options.marge_basse += Math.max(h01, h01); 336 337 } 338 } 339 340 infos_theMainImage = jQuery(theMainImage_id).infos(true); 341 infos_theImage = jQuery(theImage_id).infos(true); 342 336 } 343 337 Zone_image = { image_init: { 344 338 width: infos_theMainImage.width, … … 353 347 container: { 354 348 width: infos_theImage.general.width, 355 height: infos_window.height - (infos_theImage.top),349 height: zheight, 356 350 margesWidth: infos_window.width - infos_theImage.width + (options.marge_droite + options.marge_gauche) 357 351 } 358 352 } 353 359 354 360 355 … … 391 386 } 392 387 } 388 389 if (test_theme("simple")) { 390 jQuery(theMainImage_id).css({ maxWidth: "none" }); 391 infos_menubar = jQuery("#menubar").infos(true); 392 if (infos_menubar.visible == true) { 393 jQuery(theImage_id).width(infos_window.width - infos_imageInfos.general.width - infos_menubar.general.width-20); 394 infos_theImage = jQuery(theImage_id).infos(true); 395 396 } 397 } 398 393 399 if ((old_w - infos_theImage.width) != 0) { 394 400 Zone_image.container.width = infos_theImage.width; … … 398 404 infos_body = jQuery("body").infos(); 399 405 infos_content = jQuery(content_id).infos(); 400 401 402 406 // imageInfos 403 404 405 406 407 infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general 407 408 //============================================================= 408 409 409 Zone_image.container = { 410 410 height: infos_window.height - (infos_theImage.top), … … 413 413 }; 414 414 415 if (options.theme.match(RegExp("simple", "gi"))) {416 jQuery(theMainImage_id).css({ maxWidth: "none" });417 infos_menubar = jQuery("#menubar").infos(true);418 if (infos_menubar.visible == true) {419 Zone_image.container.width -= infos_menubar.right;420 }421 }422 423 415 jQuery(theImage_id).height(Zone_image.container.height + 2); 416 417 418 424 419 425 420 if (DEBUG_autosize == "no") return; … … 515 510 fade_in = options.fade_in || 0; 516 511 imageComment_id = ".imageComment"; 517 if ( options.theme.match(RegExp("simple", "gi"))) {512 if (test_theme("simple")) { 518 513 jQuery("#theImage p").addClass("imageComment"); 519 514 } 520 if ( options.theme.match(RegExp("mont", "gi"))) {515 if (test_theme("mont")) { 521 516 jQuery("#content").css({ marginLeft: 'auto' }); //monblanc 522 517 } … … 885 880 jQuery(theMainImage_id).height(Zone_image.image.height); 886 881 jQuery(theMainImage_id).width(Zone_image.image.width); 882 883 if (test_theme("xxxxxxx")) { 884 jQuery(theImage_id).css({ height: "auto" }); 885 jQuery(theImage_id).height(Zone_image.image.height + Zone_image.marges.height); 886 jQuery(theImage_id).width(Zone_image.image.width + Zone_image.marges.width); 887 888 } 887 889 } 888 890 … … 890 892 set_cl(true); 891 893 } else { 892 jQuery(theImage_id).height(Zone_image.image.height + Zone_image.marges.height);894 // jQuery(theImage_id).height(Zone_image.image.height + Zone_image.marges.height); 893 895 Set_Pamoorama({ width: Zone_image.container.width, height: Zone_image.image.height }); 894 896 set_cl(false); … … 1129 1131 if (typeof Zone_image == "undefined") Zone_image = { image: {} }; 1130 1132 if (typeof Zone_image.image == "undefined") Zone_image.image = { height: Zone_image.image_init.height, width: Zone_image.image_init.width }; 1131 theImg. width= img_init.height;1133 theImg.height = img_init.height; 1132 1134 theImg.width = img_init.width; 1133 1135 … … 1530 1532 1531 1533 //========================================================== 1532 if ( options.theme.match(RegExp("stripped", "gi"))) {1534 if (test_theme("stripped")) { 1533 1535 infos_the_page.margin.left = 20; //taille fleche 1534 1536 infos_the_page.margin.right = 20; … … 1536 1538 1537 1539 1538 if ( options.theme.match(RegExp("elegant", "gi"))) {1540 if (test_theme("elegant")) { 1539 1541 1540 1542 jQuery("#imageInfos").css({ position: "absolute", right: 0, top: 0 … … 1552 1554 marge_left += 1; 1553 1555 1554 } else if ( options.theme.match(RegExp("stripped", "gi"))) {1555 1556 } else if ( options.theme.match(RegExp("simple", "gi"))) {1557 1558 1559 1560 } else if ( options.theme.match(RegExp("OS", "gi"))) {1561 1562 } else if ( options.theme.match(RegExp("pur", "gi"))) {1556 } else if (test_theme("stripped")) { 1557 1558 } else if (test_theme("simple")) { 1559 1560 1561 1562 } else if (test_theme("OS")) { 1563 1564 } else if (test_theme("pur")) { 1563 1565 marge_right += 0; 1564 1566 // marge_right += 25; 1565 } else if ( options.theme.match(RegExp("mont", "gi"))) {1567 } else if (test_theme("mont")) { 1566 1568 marge_right += 0; 1567 1569 … … 1948 1950 //_______________________ init_gen _______________________ 1949 1951 1950 if (typeof changeImgSrc != "function") {1951 1952 }1953 1952 }); // ready 1954 1953
Note: See TracChangeset
for help on using the changeset viewer.