Changeset 7867
- Timestamp:
- Nov 24, 2010, 12:42:36 PM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r7827 r7867 4 4 // jQuery est chargé 5 5 } 6 7 6 function Toggle_bp() { 8 7 cl_visible = !cl_visible; … … 23 22 24 23 } 25 26 //========================================================================== 27 function Wait_Affichage() { 28 if (jQuery("#pamoorama").length) { 29 jQuery().newResize() ; 30 mypanorama = window.myPamoorama; 31 if (!mypanorama){ 32 setTimeout("Wait_Affichage()", 500); 24 25 function Wait_pamoorama() { 26 if (jQuery("#pamoorama").length) { 27 mypanorama = window.myPamoorama; 28 if (!mypanorama){ 29 setTimeout("Wait_pamoorama()", 500); 30 return false ; 31 } 32 if ( mypanorama.skipInit==false) { 33 setTimeout("Wait_pamoorama()", 500); 33 34 return false ; 34 35 } 35 if ( mypanorama.skipInit==false) { 36 setTimeout("Wait_Affichage()", 500); 37 return false ; 38 } 36 39 37 info_pamoorama = jQuery("#pamoorama").infos(); 40 38 new_width= info_pamoorama.width ; 41 39 42 40 if ( Math.abs(new_width - myPamoorama.options.width)>10 ) { 43 setTimeout("Wait_ Affichage()", 500);41 setTimeout("Wait_pamoorama()", 500); 44 42 return false ; 45 43 } 46 47 48 }else if(!jQuery().newResize()) { 44 45 nopano = true; 46 jQuery('#pamoorama').trigger('ON'); 47 48 } 49 } 50 nu_img = 0; 51 52 //========================================================================== 53 function Wait_Affichage() { 54 jQuery("#theImage").css({ 55 opacity: 0 56 57 } 58 ) 59 if(!jQuery().newResize()) { 49 60 setTimeout("Wait_Affichage()", 500); 50 61 return 51 62 } 52 53 63 54 64 fade_in = parseInt(fade_in); … … 65 75 ); 66 76 } 67 68 69 77 nu_img += 1; 78 79 bp1 = jQuery('.debug').get(nu_img); 80 if (!bp1) nu_img = 0; 81 bp1 = jQuery('.debug').get(nu_img); 82 83 jQuery(bp1).trigger('ON'); 70 84 } 71 85 … … 79 93 //======= cl_conflit ====== 80 94 if (DEBUG == "false") { 81 jQuery("#Debug").hide(); 82 jQuery("#Debug1").hide(); 83 jQuery("#Debug2").hide(); 95 84 96 } 85 97 86 98 img_top = "0"; 87 99 rapport = -1; 88 llgboframe = jQuery("#gbo div:first"); 100 89 101 marges_llgbo = 0; 90 102 pos = 0; 91 92 //========================================================= 93 94 if (llgboframe.length > 0) { 95 ll1=jQuery("#llgboframe31").infos(); 96 ll2=jQuery("#llgboframe1" ).infos(); 97 98 marges_llgbo = (ll1.width - ll2.width) + ll2.borderwidth.left + ll2.borderwidth.right; 99 } 100 103 104 101 105 //============================================================= 102 106 function cl_Timer() { … … 114 118 } 115 119 116 117 //============================================================ 118 /* 119 * 120 */ 121 function Info_entete(Parent) { 122 123 var info_imageToolBar = jQuery("#imageToolBar").infos(); 124 if (info_imageToolBar.position == "absolute") { 125 jQuery("#imageToolBar").css("position", "relative"); 126 jQuery("#imageToolBar").css("top", 0 + "px"); 127 } 128 129 var info_theImage = jQuery("#theImage").infos(); 130 131 if (info_theImage.position == "relative") { 132 //--- passage relative ==> static ===/ 133 jQuery("#theImage").css("position", "static"); 134 info_theImage = jQuery("#theImage").infos(); 135 136 } 137 if (info_theImage.position == "absolute") { 138 //--- passage absolute ==> static ===/ 139 jQuery("#theImage").css("position", "static"); 140 info_theImage = jQuery("#theImage").infos(); 141 142 } 143 144 marge_top =Math.ceil( Info_the_page.top + 145 Info_the_page.borderwidth.top + 146 info_theImage.borderwidth.top); 147 148 img_top = Math.ceil( info_theImage.top + info_theImage.borderwidth.top); 149 return { marge_top: marge_top, img_top: img_top }; 150 151 } 152 153 /* Récupère les informations sur la description. 154 * 155 */ 156 function Info_description(Parent) { 157 // jQuery("#" + Parent + " p:not(:contains(' ')) ").remove(); 158 //============================================================================= 159 var info_description = { top: 0, bottom: 0, height: 0 }; 160 if (theme.match(RegExp("simple", "gi"))) { 161 jQuery("#" + Parent).css({ padding: "0px", 162 marginLeft: "0px", 163 marginRight: "auto", 164 marginTop: "0px", 165 marginBottom: "0px", position: "absolute", top: Bandeau + "px" 166 }); 167 } else { 168 169 jQuery("#" + Parent).css({ padding: "0px", 170 marginLeft: "auto", 171 marginRight: "auto", 172 marginTop: "0px", 173 marginBottom: "0px" 174 }); 175 176 177 } 178 // jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px " }); 179 if (theme.match(RegExp("luciano", "g"))) { 180 info_img = jQuery("#" + Parent + " #theImg img").infos(); 181 182 } else if (jQuery("#charlie").length > 0) { 183 184 jQuery("#charlie").css({ padding: "0px", 185 marginLeft: "auto", 186 marginRight: "auto", 187 marginTop: "auto", 188 marginBottom:"auto", position: "relative", top: 0+ "px" 189 }); 190 191 // info_img = jQuery("#charlie").infos(); //charlie 192 info_img = jQuery('#charlie object').infos(); //player 193 194 195 } else { 196 197 info_img = jQuery("#" + Parent + " img").infos(); 198 } 199 info_description.marge = { bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom, 200 top: info_img.padding.top + info_img.borderwidth.top 201 } 202 if (( info_img.bottom-info_img.top) < 100 ) 203 info_img.top =0 ; 204 205 info_description.top = Bandeau + info_img.top + info_img.bottom + info_img.margin.bottom + info_img.borderwidth.bottom; 206 //============================================================================= 207 info_gbo = jQuery("#gbo").infos(); 208 if (info_description.top < info_gbo.bottom) 209 info_description.top = info_gbo.bottom; 210 //============================================================================= 211 info_desc = jQuery("#" + Parent + " p:first").infos(); 212 //----> difference IE8/FF ==== 213 /* borderwidth 2 | 0 214 margin top/booom 13 | 12 215 margin 1 | 0 216 top 101 | 104 217 */ 218 if (info_desc.bottom < info_img.bottom) 219 info_desc.bottom = info_img.bottom; 220 221 // if (info_desc.top > info_img.bottom) 222 // info_description.top = info_desc.top; 223 info_table = jQuery(".infoTable").infos(); 224 225 if (info_table.top > info_description.bottom) 226 info_description.bottom = info_table.top; 227 //=========================================================================== 228 229 info_licencetag = jQuery(".licencetag").infos(); 230 231 232 if (info_licencetag.bottom > 0) { 233 if(jQuery.browser.msie == true) 234 jQuery(".licencetag").css("padding", "0px"); 235 236 jQuery(".licencetag").css("border", "solid 5px transparent"); 237 if (info_licencetag.bottom > info_description.bottom) { 238 info_description.bottom = info_licencetag.bottom; 239 } 240 else 241 info_description.bottom += info_table.margin.top + info_table.padding.top; 242 243 } 244 //============================================================================= 245 if (theme.match(RegExp("gally", "gi"))) { 246 if (!theme.match(RegExp("lapis", "gi"))) { 247 info_description.bottom = info_description.bottom 248 } 249 } 250 251 252 253 254 255 if (info_description.top < 1) 256 info_description.top = info_description.bottom; 257 258 259 if (info_description.bottom < info_description.top) { 260 top_tmp= info_description.top; 261 info_description.top=info_description.bottom; 262 info_description.bottom =top_tmp; 263 264 info_desc = jQuery("#" + Parent + " p:last").infos(); 265 266 if (info_desc.bottom > info_img.bottom) 267 info_description.bottom = info_desc.bottom; 268 if (info_description.bottom < info_description.top) { 269 top_tmp= info_description.top; 270 info_description.top=info_description.bottom; 271 info_description.bottom =top_tmp; 272 } 273 info_description.height =info_description.bottom-info_description.top; 274 275 } 276 277 278 if (theme.match(RegExp("gally", "g"))) { 279 if (!theme.match(RegExp("lapis", "gi"))) { 280 info_copyright = jQuery("#copyright").infos(); 281 info_description.bottom += info_copyright.height; 282 } 283 } 284 285 if (theme.match(RegExp("luciano", "g"))) { 286 //info_description.bottom -= 30 287 } 288 if(jQuery.browser.msie!= true) 289 info_description.bottom +=4; 290 291 info_description.height = info_description.bottom - info_description.top; 292 293 if (DEBUG == "true") { 294 jQuery("#Debug").css('display', 'block'); 295 jQuery("#Dragg").css('display', 'block'); 296 jQuery("#Debug1").show(); 297 jQuery("#Debug2").show(); 298 Bandeau_bas = info_description; 299 jQuery().affiche_debug({ debug: {texte:"Debug:Bandeau : " + Bandeau, 300 css:{ 301 opacity: 0.5, 302 filter: 'alpha(opacity:50)', 303 position: "absolute", 304 width: "800px", 305 border: "solid 1px green", 306 top: Bandeau + "px"} 307 }, 308 debug1:{ texte:"Debug1:Bandeau_bas top : " + Bandeau_bas.top + " height:" + Bandeau_bas.height, 309 css:{ 310 opacity: 0.5, 311 filter: 'alpha(opacity:50)', 312 position: "absolute", 313 border: "solid 1px green", 314 top: Bandeau_bas.top + "px", 315 width: (800) + "px", 316 height: Bandeau_bas.height + "px" 317 } 318 }, 319 debug2: { texte: "Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom , 320 css:{ 321 opacity: 0.5, 322 filter: 'alpha(opacity:50)', 323 position: "absolute", 324 left: '50px', 325 width: (800) + "px", 326 border: "solid 1px green", top: Bandeau_bas.bottom + "px" 327 } 328 } 329 }); 330 331 332 } 333 334 if (check_desc_v != 'checked="checked"') { 335 info_description.height = 0; 336 } 337 338 339 return info_description; 340 341 } 120 121 122 Type_Img = ""; 123 TheImg = null; 124 nopano = false; 125 126 342 127 343 128 /* … … 359 144 Zone_Affichage = jQuery("#theImage").infos(); 360 145 361 Bandeau = 0; 362 Bandeau_t = Info_entete("theImage") 363 Bandeau = Bandeau_t.img_top; 364 Bandeau_bas = 0; 365 Bandeau_bas = Info_description("theImage"); 146 147 // 366 148 var old_window = { width: 0, height: 0 }; 149 if (Info_description("theImage")) { 150 Bandeau_bas = Info_description("theImage"); 151 Bandeau = Bandeau_bas.top; 152 } 153 Wait_Affichage(); 367 154 368 155 … … 374 161 375 162 jQuery(window).resize( 376 function (event, ui) { 377 378 379 event = event || window.event; 380 381 if (event.type == "resize") 382 { 383 myevent = arguments[0] = jQuery.event.fix(event || window.event); 384 myevent.currentTarget = this; 385 // Namespaced event handlers 386 var namespaces = myevent.type.split("."); 387 myevent.type = namespaces.shift(); 163 function (event, ui) { 164 165 166 event = event || window.event; 167 168 if (event.type == "resize") { 169 myevent = arguments[0] = jQuery.event.fix(event || window.event); 170 myevent.currentTarget = this; 171 // Namespaced event handlers 172 var namespaces = myevent.type.split("."); 173 myevent.type = namespaces.shift(); 388 174 } 389 175 if (typeof (init_resize) == "undefined") init_resize = false; … … 398 184 init_resize = Resize(); ; 399 185 400 186 401 187 402 188 }); … … 408 194 function Resize() { 409 195 410 411 412 196 jQuery().newResize(); 197 198 413 199 } 414 200 415 //=================================================== 416 elem=jQuery("#pamoorama").get(0) ; 417 if(elem) 418 { type="propertychange"; 419 handle=jQuery().onPropertyChange; 420 421 if (elem.addEventListener) {// Firefox, Opera, Google Chrome and Safari 422 elem.addEventListener('DOMAttrModified', handle, false); 423 } else if (elem.attachEvent) { 424 elem.attachEvent("on" + type, handle); 425 } 426 } 427 //======== Doubler resize ! pour Chrome, safari ================== 428 Wait_Affichage() ; 201 429 202 430 203 }); // window.onload … … 436 209 */ 437 210 //========================================================= 438 211 439 212 440 213 jQuery.fn.extend({ 441 //============================================================= 442 onPropertyChange: function (e) { 443 return ; 214 //========================================================== 215 Info_description: function (e) { 216 return Info_description(e); 217 218 }, 219 //============================================================= 220 onPropertyChange: function (e) { 221 return; 444 222 445 223 … … 448 226 * recherche la plus grande image (hauteur ou largeur) 449 227 */ 450 Get_Img_Maxi: function (myobj) { 451 var w00 = 0; 452 var TheImg = null; 453 jQuery(myobj).each(function (i) { 454 w0 = img_reelle.width; 455 h0 = img_reelle.height; 456 if (h0 > w0) w0 = h0; 457 if (w0 > w00) { 458 if (!this.src.match(RegExp(".png", "g"))) 459 if (!this.src.match(RegExp(thumbnail, "g"))) { 460 TheImg = this; 461 w00 = w0; 462 } 463 464 } 465 }); 466 return TheImg; 228 Get_Img_Maxi: function (myobj) { 229 230 return Get_Img_Maxi(myobj); 467 231 }, 468 //============================================================ 469 affiche_debug: function (aff_infos) { 470 if (aff_infos.Dragg) { 471 jQuery("#Dragg").css( aff_infos.Dragg.css ); 472 jQuery("#Dragg").text(aff_infos.Dragg.texte); 473 } 474 if (aff_infos.debug) { 475 jQuery("#Debug").css( aff_infos.debug.css ); 476 jQuery("#Debug").text(aff_infos.debug.texte); 477 } 478 if (aff_infos.debug1) { 479 jQuery("#Debug1").css( aff_infos.debug1.css ); 480 jQuery("#Debug1").text(aff_infos.debug1.texte); 481 } 482 //=================================================== 483 if (aff_infos.debug2) { 484 jQuery("#Debug2").css( aff_infos.debug2.css ); 485 jQuery("#Debug2").text(aff_infos.debug2.texte); 486 } 232 //============================================================ 233 affiche_debug: function (aff_infos) { 234 affiche_debug(aff_infos); 235 236 487 237 }, 488 //====================================================238 //==================================================== 489 239 newResize: function () { 240 // 490 241 var chk = eval(user_status + "_enabled"); 491 if (!cl_visible == true) 492 if (chk == "") { return true; 493 242 if (!cl_visible == true) { return true; } 243 if (chk == "") { return true; } 244 494 245 //================================================================= 495 246 496 247 var winwidth = jQuery(window).width(); 497 248 var winheight = jQuery(window).height(); … … 499 250 old_window = jQuery(window).infos(); 500 251 //=========================================================================== 501 502 503 var Type_Img = "";504 //====== détection du type d'images ======505 if (jQuery("#charlie").length > 0) {506 Type_Img = "charlie";507 } else if (jQuery("#pamoorama").length) {508 Type_Img = "pamoorama";509 } else if (jQuery("#theImage embed").length > 0) {510 Type_Img = "embed";511 } else if (jQuery("#map").length) {512 Type_Img = "map";513 } else if (jQuery("#Panorama").length) {514 Type_Img = "panorama";515 } else if (jQuery("#theImage").find("img").length > 0) {516 Type_Img = "img";517 } else if (jQuery("img").length > 0) {518 Type_Img = "img_autre";519 return;520 } else {521 return;522 }523 252 524 253 … … 561 290 else 562 291 winwidth = Zone_Affichage.width; 563 564 292 winwidth -= (marge_right + marge_left); 565 566 567 568 569 293 if (Type_Img == "pamoorama") { 570 294 571 mypanorama = window.myPamoorama; 295 mypanorama = window.myPamoorama; 572 296 //============================================================ 573 297 if (typeof (mypanorama) == "undefined") return false; 574 298 var myPamoorama = mypanorama; 575 299 if (typeof (myPamoorama.skipInit) == "undefined") return false; 576 //300 // 577 301 578 302 if (myPamoorama.skipInit == false) { 579 580 581 } 582 583 303 304 return false; 305 } 306 307 var info_pamoorama = jQuery("#pamoorama").infos(); 584 308 var info_pamoorama_outter = jQuery("#pamoorama_outter").infos(); 585 309 var info_pamoorama_inner = jQuery("#pamoorama_inner").infos(); … … 587 311 var info_pamoorama_frame = jQuery("#pamoorama_frame").infos(); 588 312 TheImg = jQuery("#pamoorama"); 589 obj = TheImg.get(0); 590 // myPamoorama = pamoorama; 591 592 /* 593 myPamoorama = new pamoorama('pamoorama',{ activateSlider: {$PANO_ACTIVATESLIDER}, 594 width: {$PANO_WIDTH}, 595 footercolor: '{$PANO_FOOTERCOLOR}', 596 captioncolor: '{$PANO_CAPTIONCOLOR}', 597 caption: '{$ALT_IMG}', 598 enableAutoscroll: {$PANO_ENABLEAUTOSCROLL}, 599 autoscrollSpeed: {$PANO_AUTOSCROLLSPEED}, 600 autoscrollOnLoad: {$PANO_AUTOSCROLLONLOAD}, 601 startAutoscroll: '{'pamooramics_startAutoscroll'|@translate}', 602 stopAutoscroll: '{'pamooramics_stopAutoscroll'|@translate}', 603 loadingMessage: '{'pamooramics_loading'|@translate}', 604 clickMessage: '{'pamooramics_clickMessage'|@translate}', 605 dragMessage: '{'pamooramics_dragMessage'|@translate}' 606 }); 607 */ 608 /* 609 pamoorama_outter 610 pamoorama_inner 611 pamoorama_footer 612 pamoorama_caption 613 pamoorama_thumb 614 pamoorama_frame 615 */ 313 obj = TheImg.get(0); 314 616 315 } else { 617 //==== récupère Img la plus grande ===== 618 if (jQuery("#theImg")) IMG = "#theImg"; 619 else IMG = Cadre; 620 621 TheImg2 = jQuery().Get_Img_Maxi(IMG + " img"); 622 //================================================================= 623 if (TheImg2 == null) { 624 if (jQuery(Cadre).find("img").length > 0) { 625 IMG = Cadre; 626 627 628 TheImg = jQuery().Get_Img_Maxi("#theImage img"); 629 } 630 } else { 631 TheImg = TheImg2 //luciano ? 632 633 } 316 317 318 319 634 320 } 635 321 //================================================================= … … 638 324 switch (Type_Img) { 639 325 case "map": 640 var info_image = jQuery("#map").infos(); 641 642 var info_map = jQuery("#mapPicture").infos(); 643 326 img_reelle.height = info_img.height; 327 info_map = jQuery("#mapPicture").infos(); 644 328 marge_left = info_map.width; 645 jQuery("#map").css("left", marge_left); 646 647 var TheImg = jQuery("#map").get(0); 648 img_reelle.height = info_image.height; 649 img_reelle.width = winwidth - marge_right - marge_right; 329 jQuery("#map").css("left", marge_left + "px"); 330 650 331 Bandeau_bas.height = 10; 651 332 marge_right = 10; 652 333 img_reelle.width = winwidth - marge_left - marge_right; 653 334 info_the_page = jQuery("#the_page").infos(); 654 335 ; … … 660 341 // return; 661 342 662 343 663 344 TheImg = jQuery().Get_Img_Maxi("#Panorama img"); 664 345 info_theImage = jQuery(TheImg).infos(); … … 687 368 // 688 369 689 TheImg = jQuery(Cadre).find("embed"); 690 691 info_theImage = jQuery(Cadre).infos(); 370 info_theImage = info_img; 371 info_the_page = jQuery("#the_page").infos(); 372 373 if (rapport < 0) { 374 img_height = info_img.height; 375 img_width = info_img.width; 376 377 img_reelle.height = img_height; 378 img_reelle.width = img_width; 379 380 } 381 382 break 383 case "charlie": 384 385 386 info_theImage = info_img; 692 387 info_the_page = jQuery("#the_page").infos(); 693 388 if (rapport < 0) { 694 img_height = parseInt(jQuery(TheImg).outerHeight()); 695 img_width = parseInt(jQuery(TheImg).outerWidth()); 696 697 img_reelle.height = img_height; 698 img_reelle.width = img_width; 699 700 } 701 702 break 703 case "charlie": 704 705 TheImg = jQuery('#charlie object').get(0); 706 info_theImage = jQuery(Cadre).infos(); 707 info_the_page = jQuery("#the_page").infos(); 708 if (rapport < 0) { 709 img_height = parseInt(TheImg.height); 710 img_width = parseInt(TheImg.width); 711 712 img_reelle.height = parseInt(TheImg.height); 713 img_reelle.width = parseInt(TheImg.width); 389 img_height = parseInt(info_img.height); 390 img_width = parseInt(info_img.width); 391 392 img_reelle.height = parseInt(info_img.height); 393 img_reelle.width = parseInt(info_img.width); 714 394 } 715 395 … … 717 397 case "pamoorama": 718 398 719 img_reelle = { height: img_height, width: img_width };399 img_reelle = { height: img_height, width: img_width }; 720 400 721 401 //========================================================= … … 783 463 if (theme.match(RegExp("sobre", "g"))) { 784 464 785 correction = -info_Licence.padding.top; 465 // correction = -info_Licence.padding.top; 466 if (Type_Img == 'img') 467 { 468 if (msie == true) correction = 20; 469 else correction = 30; 470 } 786 471 787 472 } else if (theme.match(RegExp("Pure", "g"))) { … … 796 481 797 482 } 798 //================ Licence ======================== 799 800 if (Licence.length > 0) { 801 jQuery(".licencetag").css("padding", "0px"); 802 803 } 483 804 484 //==================================================== 805 info_img = jQuery(TheImg).infos();806 img_top = Bandeau;807 485 808 486 Marge_Basse = parseInt(marge_basse || 0); // hors bandeau 809 487 //========================================================================== 810 488 h = 0; 811 if(Bandeau_bas.height <0) Bandeau_bas.height =0 ; 489 490 Bandeau = Bandeau_t.bottom; 812 491 813 492 Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction; … … 890 569 } 891 570 if (TheImg.src) { 892 571 893 572 Image_width -= marges_llgbo; // réduction frame 894 573 Image_height -= marges_llgbo; // réduction frame … … 917 596 918 597 } else { 919 Image_width -= (marges_llgbo/2); // réduction frame920 Image_height -= (marges_llgbo/2); // réduction frame598 Image_width -= (marges_llgbo / 2); // réduction frame 599 Image_height -= (marges_llgbo / 2); // réduction frame 921 600 if (Image_width > winwidth) { 922 601 jQuery("#gbo").width(winwidth); … … 938 617 jQuery("#gbo").css("width", Image_width + marges_llgbo + "px"); 939 618 jQuery("#gbo").width(Image_width + marges_llgbo); 940 619 941 620 942 621 } … … 987 666 if (theme.match(RegExp("luciano", "g"))) { 988 667 //---- information en dehors du cadre 989 // Zone_Affichage.height -= Bandeau_bas.height - 20;668 // Zone_Affichage.height -= Bandeau_bas.height - 20; 990 669 jQuery(Cadre).height(Zone_Affichage.height -= Bandeau_bas.height); 991 670 992 671 } 993 672 … … 1025 704 1026 705 /**/ 1027 pdf = 2 * parseInt(jQuery(".none_2").css("paddingRight")); 706 707 pdf = 0; 708 jQuery("#charlie div").each(function (i) { 709 710 711 p1 = jQuery(this).infos(); 712 pdf += p1.padding.right + p1.padding.left; 713 }); 714 715 1028 716 jQuery("#charlie").css({ 1029 width: Image_width + pdf 717 width: Image_width + pdf, 1030 718 height: Image_height, 1031 719 margin: "auto" 1032 720 }); 1033 721 1034 jQuery(".none_2").width(Image_width) ;1035 jQuery(".none_2").height( Image_height) ;1036 722 1037 723 … … 1069 755 } 1070 756 new_width = Zone_Affichage.width - marge_right - marge_left; 1071 757 1072 758 myPamoorama.options.width = new_width; 1073 759 info_theImage.height = img_reelle.height + info_pamoorama_footer.height … … 1082 768 1083 769 //==================================================== 1084 info_pamoorama = jQuery("#pamoorama").infos();1085 img_finale.height=info_pamoorama.height-info_pamoorama_footer.height;1086 img_finale.width=new_width;1087 1088 jQuery("#pamoorama_outter").width(new_width);1089 jQuery("#pamoorama_outter").height(info_pamoorama.height-info_pamoorama_footer.height);1090 1091 1092 1093 jQuery("#pamoorama_outter").css({width:new_width+"px",1094 height:info_pamoorama.height-info_pamoorama_footer.height+"px"1095 });1096 //770 info_pamoorama = jQuery("#pamoorama").infos(); 771 img_finale.height = info_pamoorama.height - info_pamoorama_footer.height; 772 img_finale.width = new_width; 773 774 jQuery("#pamoorama_outter").width(new_width); 775 jQuery("#pamoorama_outter").height(info_pamoorama.height - info_pamoorama_footer.height); 776 777 778 779 jQuery("#pamoorama_outter").css({ width: new_width + "px", 780 height: info_pamoorama.height - info_pamoorama_footer.height + "px" 781 }); 782 // 1097 783 //==================================================== 1098 varinfo_pamoorama = jQuery("#pamoorama").infos();1099 varinfo_pamoorama_outter = jQuery("#pamoorama_outter").infos();1100 varinfo_pamoorama_inner = jQuery("#pamoorama_inner").infos();1101 varinfo_pamoorama_footer = jQuery("#pamoorama_footer").infos();1102 varinfo_pamoorama_frame = jQuery("#pamoorama_frame").infos();784 info_pamoorama = jQuery("#pamoorama").infos(); 785 info_pamoorama_outter = jQuery("#pamoorama_outter").infos(); 786 info_pamoorama_inner = jQuery("#pamoorama_inner").infos(); 787 info_pamoorama_footer = jQuery("#pamoorama_footer").infos(); 788 info_pamoorama_frame = jQuery("#pamoorama_frame").infos(); 1103 789 1104 790 info_frame = jQuery(myPamoorama.frame).infos(); 1105 /* myPamoorama.ratio = new_width / 200;1106 jQuery("#pamoorama_frame").width(myPamoorama.ratio);1107 jQuery("#pamoorama_frame").css("width", myPamoorama.ratio + "px");1108 jQuery("#pamoorama_footer img").width(200)1109 jQuery("#pamoorama_footer img").css({ width: "200px", height: info_pamoorama_footer.height+"px" });1110 jQuery("#pamoorama_footer").width(new_width) ;1111 jQuery("#pamoorama_footer").css({width:new_width+"px"})791 /* myPamoorama.ratio = new_width / 200; 792 jQuery("#pamoorama_frame").width(myPamoorama.ratio); 793 jQuery("#pamoorama_frame").css("width", myPamoorama.ratio + "px"); 794 jQuery("#pamoorama_footer img").width(200) 795 jQuery("#pamoorama_footer img").css({ width: "200px", height: info_pamoorama_footer.height+"px" }); 796 jQuery("#pamoorama_footer").width(new_width) ; 797 jQuery("#pamoorama_footer").css({width:new_width+"px"}) 1112 798 1113 799 jQuery(TheImg).height(img_finale.height); … … 1115 801 jQuery(TheImg).css("height", img_finale.height + "px "); 1116 802 jQuery(TheImg).css("width", img_finale.width + "px "); 1117 */803 */ 1118 804 zoom = Image_height / img_height; 1119 805 … … 1137 823 } 1138 824 1139 if (DEBUG == "true") { 1140 1141 jQuery().affiche_debug({ debug3: { texte: "Debug:Bandeau : " + Bandeau, 1142 css: { 1143 opacity: 0.5, 1144 filter: 'alpha(opacity:50)', 1145 position: "absolute", 1146 1147 } 1148 }, 1149 debug1: { texte: "Debug1:img_finale.height : " + img_finale.width + " height:" + img_finale.height, 1150 css: { 1151 opacity: 0.5, 1152 filter: 'alpha(opacity:50)', 1153 position: "absolute", 1154 1155 } 1156 }, 1157 debug2: { texte: "Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom, 1158 css: { 1159 opacity: 0.5, 1160 filter: 'alpha(opacity:50)', 1161 position: "absolute", 1162 1163 } 1164 } 1165 }); 1166 1167 } 825 1168 826 jQuery("#navThumbPrev").css({ overflow: "hidden" 1169 827 }); … … 1215 873 pos = jQuery("#copyright").infos(); 1216 874 if (pos.top > 100) jQuery("#the_page").height(pos.top); 1217 if (!theme.match(RegExp("luciano", "gi"))) { 1218 jQuery("#linkNext").css({ height:"80px",width: "200px", overflow: "hidden" }); 1219 jQuery("#linkPrev").css({ height:"80px",width: "200px", overflow: "hidden" }); 1220 jQuery(".navThumb img").css({ height:"80px",width:"", overflow: "hidden" }); 1221 } 1222 return true; 875 if (!theme.match(RegExp("luciano", "gi"))) { 876 jQuery("#linkNext").css({ height: "80px", width: "200px", overflow: "hidden" }); 877 jQuery("#linkPrev").css({ height: "80px", width: "200px", overflow: "hidden" }); 878 jQuery(".navThumb img").css({ height: "80px", width: "", overflow: "hidden" }); 879 } 880 881 882 return true; 1223 883 1224 884 … … 1235 895 }); // fin extend 1236 896 897 898 1237 899 } // function 1238 900 ); 1239 901 902 903 /* 904 * recherche la plus grande image (hauteur ou largeur) 905 */ 906 function Get_Img_Maxi(myobj) { 907 var w00 = 0; 908 var myImg = null; 909 jQuery(myobj).each(function (i) { 910 w0 = img_reelle.width; 911 h0 = img_reelle.height; 912 if (h0 > w0) w0 = h0; 913 if (w0 > w00) { 914 if (!this.src.match(RegExp(".png", "g"))) 915 if (!this.src.match(RegExp(thumbnail, "g"))) { 916 myImg = this; 917 w00 = w0; 918 } 919 920 } 921 }); 922 return myImg; 923 } 924 //==================================================== 925 926 //============================================================ 927 /* 928 * 929 */ 930 function Info_entete(Parent) { 931 932 info_imageToolBar = jQuery("#imageToolBar").infos(); 933 if (info_imageToolBar.position == "absolute") { 934 jQuery("#imageToolBar").css("position", "relative"); 935 jQuery("#imageToolBar").css("top", 0 + "px"); 936 } 937 938 info_theImage = jQuery("#theImage").infos(); 939 940 941 if (info_theImage.position == "relative") { 942 //--- passage relative ==> static ===/ 943 jQuery("#theImage").css("position", "static"); 944 info_theImage = jQuery("#theImage").infos(); 945 946 } 947 if (info_theImage.position == "absolute") { 948 //--- passage absolute ==> static ===/ 949 jQuery("#theImage").css("position", "static"); 950 info_theImage = jQuery("#theImage").infos(); 951 952 } 953 954 marge_top = Math.ceil(Info_the_page.top + 955 Info_the_page.borderwidth.top + 956 info_theImage.borderwidth.top); 957 958 img_top = Math.ceil(info_theImage.top + info_theImage.borderwidth.top); 959 result = info_imageToolBar; 960 result.width = "20%"; 961 result.left = "40%"; 962 result.marge_top = marge_top; 963 result.img_top = img_top; 964 965 return result; 966 967 } 968 969 /* Récupère les informations sur la description. 970 * 971 */ 972 973 //==================================================== 974 function Info_description(Parent) { 975 976 // jQuery("#" + Parent + " p:not(:contains(' ')) ").remove(); 977 //============================================================================= 978 info_description = { top: 0, bottom: 0, height: 0 }; 979 980 981 //====== détection du type d'images ====== 982 if (jQuery("#charlie").length > 0) { 983 Type_Img = "charlie"; 984 } else if (jQuery("#pamoorama").length) { 985 Type_Img = "pamoorama"; 986 } else if (jQuery("#theImage embed").length > 0) { 987 Type_Img = "embed"; 988 } else if (jQuery("#map").length) { 989 Type_Img = "map"; 990 991 } else if (jQuery("#Panorama").length) { 992 Type_Img = "panorama"; 993 } else if (jQuery("#theImage").find("img").length > 0) { 994 Type_Img = "img"; 995 } else if (jQuery("img").length > 0) { 996 Type_Img = "img_autre"; 997 return; 998 } else { 999 return; 1000 } 1001 1002 1003 Bandeau_t = Info_entete("theImage") 1004 Bandeau = Bandeau_t.img_top; 1005 llgboframe = jQuery("#gbo div:first"); 1006 marges_llgbo = 0; 1007 //========================================================= 1008 1009 if (llgboframe.length > 0) { 1010 ll0 = jQuery("#gbo").infos(); 1011 ll1 = jQuery("#llgboframe31").infos(); 1012 ll2 = jQuery("#llgboframe1").infos(); 1013 marges_llgbo = (ll1.width - ll2.width) + ll2.borderwidth.left + ll2.borderwidth.right; 1014 } 1015 1016 1017 1018 if (theme.match(RegExp("simple", "gi"))) { 1019 jQuery("#" + Parent).css({ padding: "0px", 1020 marginLeft: "0px", 1021 marginRight: "auto", 1022 marginTop: "0px", 1023 marginBottom: "0px" 1024 1025 }); 1026 } else { 1027 1028 1029 1030 } 1031 1032 // jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px " }); 1033 if (theme.match(RegExp("luciano", "g"))) { 1034 TheImg = jQuery("#" + Parent + " #theImg img"); 1035 info_img = jQuery(TheImg).infos(); 1036 1037 1038 } else if (Type_Img == "map") { 1039 1040 info_map = jQuery("#mapPicture").infos(); 1041 marge_left = info_map.width; 1042 1043 jQuery("#map").css({ left: marge_left + "px", padding: "0px", 1044 marginLeft: "0px", 1045 marginRight: "4px", 1046 marginTop: "0px", 1047 marginBottom: "0px", position: "relative" 1048 }); 1049 1050 TheImg = jQuery("#map"); 1051 info_img = jQuery(TheImg).infos(); 1052 1053 1054 } else if (jQuery("#charlie").length > 0) { 1055 1056 jQuery("#charlie").css({ padding: "0px" 1057 1058 }); 1059 TheImg = jQuery("#charlie") 1060 info_img = jQuery(TheImg).infos(); 1061 1062 1063 1064 } else if (jQuery("#theImage embed").length > 0) { 1065 1066 TheImg = jQuery("#theImage embed"); 1067 info_img = jQuery(TheImg).infos(); 1068 1069 1070 1071 } else if (Type_Img == "pamoorama") { 1072 1073 1074 1075 if (!nopano) { 1076 Wait_pamoorama(); 1077 return 1078 } 1079 TheImg = jQuery("#pamoorama"); 1080 info_img = jQuery(TheImg).infos(); 1081 info_footer = jQuery("#pamoorama_footer").infos(); 1082 info_img.height = parseInt(img_reelle.height) + parseInt(info_footer.height); 1083 1084 } else { 1085 TheImg = jQuery("#" + Parent + " img"); 1086 TheImg = Get_Img_Maxi(TheImg); 1087 info_img = jQuery(TheImg).infos(); 1088 } 1089 //===================================================================================== 1090 1091 switch (info_img.position) { 1092 case "relative": 1093 break; 1094 case "static": 1095 break; 1096 case "absolute": 1097 break; 1098 case "": 1099 break; 1100 default: 1101 break; 1102 } 1103 info_description.marge = { bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom, 1104 top: info_img.padding.top + info_img.borderwidth.top + info_img.margin.top 1105 } 1106 marges_ = info_img.margin.bottom + info_img.borderwidth.bottom; 1107 if (marges_llgbo > 0) { 1108 info_img.top -= marges_llgbo / 2; 1109 info_img.left -= marges_llgbo / 2; 1110 1111 info_img.right += marges_llgbo / 2; 1112 info_img.bottom += marges_llgbo / 2; 1113 info_img.width += marges_llgbo; 1114 marges_ += ll0.borderwidth.left + ll0.borderwidth.right; 1115 } 1116 1117 info_img.bottom += marges_ * 2; 1118 info_img.right += marges_ * 2; 1119 info_img.width += marges_ * 2; 1120 info_img.height = info_img.bottom - info_img.top; 1121 //====================================================================================== 1122 info_description.top = info_img.bottom; 1123 info_description.bottom = info_description.top; //init 1124 1125 //===================== Recherche Description Bas ================================== 1126 1127 info_para = info_description; 1128 1129 1130 jQuery("#" + Parent + " p").each(function (i) { 1131 para = jQuery(this).infos(); 1132 if (para.height > 0) { 1133 if (para.top >= info_description.top) { 1134 para.height = para.bottom - info_description.top; 1135 info_para = para; 1136 info_para.top = info_description.top; 1137 1138 } 1139 } 1140 }); 1141 //===================== Recherche lmt Bas =====(bleu debug3)==================== 1142 info_licencetag = jQuery("#" + Parent + ".licencetag").infos(); 1143 jQuery(".licencetag").css("position", "static"); 1144 1145 jQuery(".licencetag table").each(function (i) { 1146 info_licencetag = jQuery(this).infos(); 1147 info_licencetag.bottom += info_licencetag.margin.top + info_licencetag.margin.bottom; 1148 1149 if (jQuery.browser.msie == true) 1150 jQuery(this).css("padding", "0px"); 1151 jQuery(this).css("border", "solid 5px transparent"); 1152 1153 }); 1154 1155 if (info_licencetag.top == 0 && info_licencetag.height > 10) { 1156 info_licencetag.top = info_para.bottom; 1157 info_licencetag.bottom = info_para.bottom + info_licencetag.height; 1158 info_licencetag.bottom += info_licencetag.margin.top + info_licencetag.margin.bottom; 1159 1160 } 1161 1162 //======================================================== 1163 info_table = jQuery("#" + Parent + " Table").infos(); 1164 if (info_table.height > 0) { 1165 info_table.bottom += info_table.margin.top + info_table.margin.bottom; 1166 info_licencetag.bottom = Math.max(info_table.bottom, info_licencetag.bottom) 1167 info_licencetag.top = info_table.top; 1168 info_licencetag.bottom = info_table.bottom; 1169 info_licencetag.height = info_table.height; 1170 } 1171 info_description.top = info_img.bottom; 1172 1173 info_description.height = Math.max(info_para.bottom, info_licencetag.bottom) - info_description.top; 1174 1175 1176 info_description.bottom = info_description.bottom + info_description.height; 1177 //============================================================================= 1178 if (theme.match(RegExp("gally", "gi"))) { 1179 if (!theme.match(RegExp("lapis", "gi"))) { 1180 info_description.bottom = info_description.bottom 1181 } 1182 } 1183 1184 1185 1186 info_description.height = info_description.bottom - info_description.top; 1187 1188 1189 1190 if (theme.match(RegExp("gally", "g"))) { 1191 if (!theme.match(RegExp("lapis", "gi"))) { 1192 info_copyright = jQuery("#copyright").infos(); 1193 info_description.bottom += info_copyright.height; 1194 } 1195 } 1196 1197 if (theme.match(RegExp("luciano", "g"))) { 1198 //info_description.bottom -= 30 1199 } 1200 1201 1202 if (jQuery.browser.msie != true) 1203 info_description.bottom += 4; 1204 1205 1206 1207 info_description.height = info_description.bottom - info_description.top; 1208 if (check_desc_v != 'checked="checked"') { 1209 info_description.height = 0; 1210 } 1211 Debug_pos(); 1212 return info_description; 1213 } 1214 1215 //==================================================== 1216 function Debug_info(index,infos,nom) { 1217 if (DEBUG != "true") return ; 1218 if(infos.height>0){ 1219 1220 message = browser.browser + " -- > Info : "+ nom +" " + infos.id +"\n"+ 1221 "Info nodeName: " + infos.nodeName +"\n"+ 1222 "Info width: " + infos.width +"\n"+ 1223 "Info height: " + infos.height +"\n"+ 1224 "Info top: " + infos.top +"\n"+ 1225 "Info left: " + infos.left +"\n"+ 1226 "Info position: " + infos.position +"\n"; 1227 1228 myDebug = { id: "Debug" + index, texte: message, 1229 css: { 1230 color:"black", 1231 opacity: 0.5, 1232 filter: 'alpha(opacity:50)', 1233 position: "absolute", 1234 height: infos.height||100 +"px", 1235 width: infos.width||300 +"px", 1236 left: infos.left||0 +"px", 1237 border: "solid 1px green", 1238 top: infos.top + "px" 1239 1240 } 1241 } 1242 return myDebug; 1243 }else{ 1244 return null ; 1245 } 1246 1247 1248 } 1249 //==================================================== 1250 function Debug_pos() { 1251 if (DEBUG == "true") { 1252 1253 jQuery("[id ^='Debug']").show(); 1254 /* 1255 Debug2 background-color:yellow 1256 Debug3 background-color:blue 1257 Debug4 background-color:green 1258 Debug5 background-color:red 1259 1260 */ 1261 1262 affiche_debug({ 1263 Debug1: Debug_info(1, Bandeau_t,"Bandeau_t"), 1264 Debug3: Debug_info(3, info_licencetag, "info_licencetag"), 1265 Debug4: Debug_info(4, info_description, "info_description"), 1266 Debug5: Debug_info(5, info_img, "info_img") 1267 }); 1268 } 1269 } 1270 1271 function affiche_debug(aff_infos) { 1272 jQuery(jQuery("[id ^='Debug']")).each(function (i) { 1273 if (aff_infos[this.id]) { 1274 if (aff_infos[this.id].css) { 1275 jQuery("#" + this.id).css(aff_infos[this.id].css); 1276 jQuery("#" + this.id).text(aff_infos[this.id].texte); 1277 } 1278 } 1279 }); 1280 return; 1281 1282 } 1283 1284 1285 1286 $(function () { 1287 1288 jQuery('#pamoorama').live('ON', function (e) { 1289 jQuery(jQuery('.debug').get(1)).trigger('ON'); 1290 Bandeau_bas = Info_description('theImage'); 1291 Bandeau = Bandeau_bas.top; 1292 }); 1293 1294 1295 // Custom Event, ON to turn on a debug. 1296 jQuery('.debug').live('ON', function (e) { 1297 n = (e.which !== 1); 1298 jQuery('.debug').trigger('OFF'); 1299 jQuery(this).addClass('debugOn'); 1300 }); 1301 1302 // On Click = debugs On 1303 jQuery('.debug').live('click', function (e) { 1304 n = (e.which !== 1) 1305 jQuery(this).trigger('ON'); 1306 }); 1307 1308 // Custom Event, Turn off a debug 1309 jQuery('.debug').live('OFF', function (e) { 1310 n = (e.which !== 1); 1311 jQuery(this).removeClass('debugOn'); 1312 }); 1313 1314 // on Double Click, remove the debug from the DOM 1315 jQuery('.debug').live('dblclick', function () { 1316 n = (e.which !== 1); 1317 jQuery(this).fadeOut(function () { $(this).remove() }); 1318 }); 1319 1320 // Add another debug to the DOM 1321 jQuery('#adddebugs').click(function () { 1322 jQuery('<div></div>') 1323 .addClass('debug') 1324 .appendTo('#debugsContainer'); 1325 }); 1326 1327 // Add 10 testing debugs to start with 1328 1329 if (DEBUG == "true") { 1330 for (var i = 0; i < 10; i++) { 1331 jQuery('#adddebugs').click(); 1332 } 1333 jQuery(jQuery('.light').get(8)).click(); 1334 1335 } 1336 // }); //on load 1337 }); -
extensions/Autosize/js/conflit.js
r7821 r7867 17 17 18 18 //=================================================== 19 19 var detect = navigator.userAgent.toLowerCase(); 20 var OS, version; 21 22 //============================================================================== 23 24 25 browser = detect_browser(); 26 27 28 29 30 function detect_browser() { 31 mybrowser = { 32 browser: "", 33 konqueror: false, 34 chrome: false, 35 safari: false, 36 omniWeb: false, 37 opera: false, 38 firefox: false, 39 msie: false, 40 netscape: false 41 } 42 if (checkIt('konqueror')) { mybrowser.Konqueror = true; lbrowser = "konqueror"; OS = "Linux"; } 43 else if (checkIt('chrome')) { mybrowser.chrome = true; lbrowser = "chrome"; } 44 else if (checkIt('safari')) { mybrowser.safari = true; lbrowser = "safari"; } 45 else if (checkIt('omniweb')) { mybrowser.omniweb = true; lbrowser = "omniWeb"; } 46 else if (checkIt('opera')) { mybrowser.opera = true; lbrowser = "opera"; } 47 else if (checkIt('firefox')) { mybrowser.firefox = true; lbrowser = "firefox"; } 48 49 else if (checkIt('msie')) { mybrowser.msie = true; lbrowser = "msie"; } 50 else if (checkIt('compatible')) { mybrowser.NetscapeNavigator = true; lmybrowser.browser = "NetscapeNavigator"; version = detect.charAt(8); } 51 else lbrowser = "An unknown browser"; 52 if (!version) version = detect.charAt(place + thestring.length); 53 if (!OS) { 54 if (checkIt('linux')) OS = "Linux"; 55 else if (checkIt('x11')) OS = "Unix"; 56 else if (checkIt('mac')) OS = "Mac"; 57 else if (checkIt('win')) OS = "Windows"; 58 else OS = "an unknown operating system"; 59 } 60 61 mybrowser.browser = lbrowser; 62 return mybrowser 63 64 65 }; 66 67 68 69 function checkIt(string) { 70 place = detect.indexOf(string) + 1; 71 thestring = string; 72 return place; 73 } 20 74 /* 21 75 22 76 */ 23 msie = jQuery.browser.msie || false; 24 opera= jQuery.browser.opera || false; 77 78 79 konqueror = mybrowser.konqueror || false; 80 chrome = mybrowser.chrome || false; 81 safari = mybrowser.safari || false; 82 omniWeb = mybrowser.omniWeb || false; 83 opera = mybrowser.opera || false; 84 firefox = mybrowser.firefox || false; 85 msie = mybrowser.msie || false; 86 netscape = mybrowser.netscape || false; 87 88 25 89 //======================================== 26 90 /*function $defined(A) { 27 28 91 $ = _$2; // ; 92 return A != undefined; 29 93 } 30 94 */ … … 53 117 } else if (retour.match(RegExp("pamooramics", "gi"))) { 54 118 55 ret_element =jQuery().$Pamoorama(element);119 ret_element = jQuery().$Pamoorama(element); 56 120 57 121 if (retour.match(RegExp("init_", "gi"))) { … … 62 126 } else if (retour.match(RegExp("luciano", "gi"))) { 63 127 $1 = $_; 64 65 ret_element = jQuery().$Luciano(element, nc);128 129 ret_element = jQuery().$Luciano(element, nc); 66 130 67 131 } else if (retour.match(RegExp("jQuery", "gi"))) { … … 274 338 } 275 339 if (Src_Match.match("main")) { 276 340 277 341 callstack.push("main"); 278 342 isCallstackPopulated = true; … … 392 456 393 457 394 (function ($) {395 $(document).ready(function (){396 397 458 (function ($) { 459 $(document).ready(function () { 460 jQuery(window).load(function () { 461 a = jQuery(':Description'); 398 462 }); 399 463 }); 400 464 //============================================== 401 465 jQuery.extend(jQuery.expr[':'], { 402 // Nom du sélecteur personnalisé466 // Nom du sélecteur personnalisé 403 467 Description: function (a) { 404 n = jQuery(a).infos(); 405 if (n.id != "") { 406 //alert("<" + n.nodeName +" id= " + n.id + " >") ; 407 } 408 if (n.nodeName == "SCRIPT") 409 if (a.src == "") { 410 Match = jQuery(a).html(); 411 /* 412 if ( Match.match(new RegExp("jQuery", "gi") )) { 413 alert(n.id + n.nodeName + a.outerHTML ) ; 468 n = jQuery(a).infos(); 469 if (n.id != "") { 470 //alert("<" + n.nodeName +" id= " + n.id + " >") ; 471 } 472 if (n.nodeName == "SCRIPT") 473 if (a.src == "") { 474 Match = jQuery(a).html(); 475 /* 476 if ( Match.match(new RegExp("jQuery", "gi") )) { 477 alert(n.id + n.nodeName + a.outerHTML ) ; 478 } 479 if ( Match.match(new RegExp("ajax", "gi") )) { 480 alert(n.id + n.nodeName + a.outerHTML ) ; 481 } 482 */ 483 if (Match.match(new RegExp("\\$", "gi"))) { 484 485 if (Match.match(new RegExp("ajax", "gi"))) { 486 // alert(n.id + n.nodeName + a.outerHTML); 487 488 } 489 } 490 if (Match.match(new RegExp("pamoorama", "ig"))) { 491 492 // alert(n.id + n.nodeName + a.innerHTML); 493 494 } 495 } else { 496 497 if (a.src.match(RegExp("mootools|pamooramic|luciano", "gi"))) { 498 jQuery.noop; 499 500 } 501 414 502 } 415 if ( Match.match(new RegExp("ajax", "gi") )) { 416 alert(n.id + n.nodeName + a.outerHTML ) ; 417 } 418 */ 419 if (Match.match(new RegExp("\\$", "gi"))) { 420 421 if (Match.match(new RegExp("ajax", "gi"))) { 422 // alert(n.id + n.nodeName + a.outerHTML); 423 424 } 425 } 426 if (Match.match(new RegExp("pamoorama", "ig"))) { 427 428 // alert(n.id + n.nodeName + a.innerHTML); 429 430 } 431 }else{ 432 433 if (a.src.match(RegExp("mootools|pamooramic|luciano", "gi"))) { 434 jQuery.noop; 435 436 } 437 438 } 439 440 return a; 441 442 } 443 }); //fin extend 444 /* 445 * 446 */ 447 448 449 450 451 452 453 })(jQuery); 454 455 456 function $(element, nc0) { 457 a = conflit(element, nc0); 458 return a; 459 } 460 if (typeof ($.ajax)!="function") 461 { 462 $.ajax= function (origSettings) { 463 jQuery.ajax(origSettings) ; 464 } 465 466 467 $.parseJSON= function (msg){ 468 return jQuery.parseJSON(msg) ; 469 } 470 471 472 } 473 if (typeof ($.get)!="function") 474 { 475 $.get = function (options) { 476 return jQuery.get(options); 477 } 478 479 480 } 503 504 return a; 505 506 } 507 }); //fin extend 508 /* 509 * 510 */ 511 512 513 514 515 516 517 })(jQuery); 518 519 520 function $(element, nc0) { 521 a = conflit(element, nc0); 522 return a; 523 } 524 if (typeof ($.ajax) != "function") { 525 $.ajax = function (origSettings) { 526 jQuery.ajax(origSettings); 527 } 528 529 530 $.parseJSON = function (msg) { 531 return jQuery.parseJSON(msg); 532 } 533 534 535 } 536 if (typeof ($.get) != "function") { 537 $.get = function (options) { 538 return jQuery.get(options); 539 } 540 541 542 } 543 $_ = $; 544 function save_framework(page) { 481 545 $_ = $; 482 function save_framework(page) { 483 $_ = $; 484 return 485 486 } 487 546 return 547 548 } 549 -
extensions/Autosize/js/jquery.dimensions.js
r7816 r7867 1 1 /* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) 2 3 4 5 6 7 8 9 10 11 12 13 14 2 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 3 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 4 * 5 * $LastChangedDate: 2007-12-20 08:43:48 -0600 (Thu, 20 Dec 2007) $ 6 * $Rev: 4257 $ 7 * 8 * $LastChangedDate: 2010-10-23 08:43:48 -0600 (Thu, 20 Dec 2007) $ 9 * By cljosse 10 * Version: 1.2 11 * 12 * Requires: jQuery 1.2+ 13 * 14 */ 15 15 (function (jQuery) { 16 16 jQuery.dimensions = { version: '1.3' }; … … 64 64 65 65 66 var left = 0, top = 0, offset, parentOffset, offsetParent, results;66 var Left = 0, Top = 0, offset, parentOffset, offsetParent, results; 67 67 var borderwidth = { width: "0 0 0 0", 68 68 top: 0, … … 84 84 }; 85 85 //===================================================================== 86 myposition = ""; 86 87 results = { 87 position: jQuery(this).attr("position"),88 position: "", 88 89 top: 0, 89 90 left: 0, … … 102 103 if (elem.nodeName) nodeName = elem.nodeName; 103 104 105 104 106 if (elem == window) { 105 Position = { top: 0, left: 0 }; 106 } else { 107 Position = jQuery(elem).position(); 108 } 109 left = Position.left; 110 top = Position.top; 111 if (elem == window) { 107 108 myposition = jQuery(this).attr("position") || ""; 112 109 width = jQuery(elem).width(); 113 110 height = jQuery(elem).height(); 114 111 } else { 112 myposition = jQuery(this).css("position") || ""; 115 113 width = jQuery(elem).outerWidth(); 116 114 height = jQuery(elem).outerHeight(); 117 118 115 119 116 … … 147 144 } 148 145 } 146 if (elem == window) { 147 Position = { Top: 0, Left: 0 }; 148 } else { 149 Position = jQuery(elem).position(); 150 } 151 Left = Position.left; 152 Top = Position.top; 149 153 150 154 results = { 151 position: jQuery(this).attr("position"),152 top: top,153 left: left,155 position: myposition, 156 top: Top, 157 left: Left, 154 158 width: width, 155 159 height: height, 156 right: left + width,157 bottom: top + height,160 right: Left + width, 161 bottom: Top + height, 158 162 borderwidth: borderwidth, 159 163 margin: margin, … … 202 206 203 207 results = { 204 top: Math.ceil( 208 top: Math.ceil(offset.top - parentOffset.top), left: Math.ceil(offset.left - parentOffset.left) 205 209 }; 206 210 } return results; … … 244 248 if (myObj.match(reg1)) { 245 249 246 myObj = parseInt(myObj) 250 myObj = parseInt(myObj); 247 251 248 252 } … … 250 254 reg1 = new RegExp("%", "g") 251 255 if (myObj.match(reg1)) { 252 val = Math.ceil(myObj * Maxi_val / 100);256 val = Math.ceil(myObj * Maxi_val / 100); 253 257 return val; 254 258 } -
extensions/Autosize/main.inc.php
r7826 r7867 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.3.7. 24 Version: 1.3.7.4 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
r7805 r7867 60 60 {assign var="visible" value="block"} 61 61 <!--- autosize/template/autosize.tpl body ---> 62 <div id="Dragg" align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:100px;left:0px;width:300px;margin:auto;"></div> 63 <div id="Debug" align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div> 64 <div id="Debug1" align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div> 65 <div id="Debug2" align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div> 66 {else} 62 <style type="text/css"> 63 {literal} 64 .debug { 65 display: inline-block; 66 width: 45px; 67 height: 45px; 68 background-color: black; 69 margin: 2px; 70 } 71 .debugOn { 72 background-color: yellow; 73 border: solid 1px black; 74 width: 43px; 75 height: 43px; 76 } 77 78 .jssource {font-size:.8em;color:#000; } 79 pre {font-size:.9em;background-color:#ffc;overflow-x:auto; padding: 5px;} 80 pre em {color:#009;} 81 pre b {color:#900;} 82 pre strong {color:#099;} 83 pre i, 84 pre i *{color:#090;} 85 86 </style> 87 88 <div id="Debug0" align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div> 89 <div id="Debug1" align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div> 90 <div id="Debug2" align=center style="color:black;z-index:2000;position:absolute; background-color:yellow; top:0px;left:0px;width:800px;margin:auto;"></div> 91 <div id="Debug3" align=center style="color:black;z-index:2000;position:absolute; background-color:blue; top:0px;left:0px;width:800px;margin:auto;"></div> 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 <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 95 <p><button id="adddebugs">Add a debug</button></p> 96 97 <div id="debugsContainer"><div class="debug"></div></div> 98 {/literal} 99 {else} 67 100 {assign var="visible" value="none"} {/if}<!-- << autosize/template/autosize.tpl body -->
Note: See TracChangeset
for help on using the changeset viewer.