Changeset 7193
- Timestamp:
- Oct 15, 2010, 11:58:37 AM (14 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/include/affiche.php
r7124 r7193 1 1 <?php 2 2 3 $visible=(isset($visible))?$visible:true; 3 $visible=(isset($visible))?$visible:false; 4 4 5 $img_width=isset($picture['current']['width'])?$picture['current']['width']:480; 5 6 $img_height=isset($picture['current']['height'])?$picture['current']['height']:320; -
extensions/Autosize/js/Affiche_script.js
r7124 r7193 28 28 */ 29 29 30 var d1 = 0; 31 var init_tb = 0; 32 33 function set_autosize() { 34 visible = !visible; 35 30 31 var img_top = "0"; 32 var cl_visible = true; 33 34 function Toggle_bp() 35 { 36 cl_visible = !cl_visible ; 37 if (cl_visible) src=src1 ; 38 else src=src2 ; 39 if (cl_visible) src_info=src3 ; 40 else src_info=src4 ; 41 42 jQuery('#bp_cla').attr('alt',src_info); 43 jQuery('#bp_cla').attr('title', src_info); 44 45 jQuery('#bp_img_cla').get(0).src=src ; 46 jQuery('#bp_img_cla').attr('alt',src_info); 47 jQuery('#bp_img_cla').attr('title',src_info); 48 jQuery('#bp_cla').attr('Stitle', src_info); 49 jQuery('#bp_cla').attr('Stip'," "); 50 old_w = 0; 51 jQuery(window).resize(); 52 } 53 //========================================================= 54 var old_w = 0; 55 function wait_Timer() { 56 old_w = 0 57 jQuery(window).resize(); 58 info_pamoorama_outter = jQuery("#pamoorama_outter").info(); 59 if (info_pamoorama_outter.width == 0) 60 setTimeout("wait_Timer()", 100); 61 62 } 63 64 function cl_Timer() { 65 // if (!jQuery.browser.msie) { jQuery(function () { alert(jQuery.browser.version); }); } 66 if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 8) 67 alert(jQuery.browser.version); 68 panoramaContainer = jQuery(".panorama-container"); 69 n = document.scripts[6];//12--14affiche_script ; 70 t = n.src; 71 72 currentPosition = 0 - parseInt(jQuery(panoramaContainer).css('margin-left')); 73 if (currentPosition > 1000) 74 jQuery(panoramaContainer).css('margin-left',"0px") 75 setTimeout("cl_Timer()", 500); 36 76 } 37 77 function onPropertyChange(e) { 78 var el = e.srcElement; 79 ID = el.id; 80 Prop = e.propertyName.split("."); 81 Property = Prop[1]; 82 83 Valeur =parseInt( el.currentStyle[Property]); 84 if (Valeur < -1000) { 85 // jQuery( el).css(Property, 500+"px"); 86 return; 87 } 88 return; 89 } 38 90 /* ready 39 91 * … … 56 108 var TheImg = null; 57 109 jQuery(myobj).each(function (i) { 58 w0 = this.width;59 h0 = this.height;110 w0 = img_reelle.width; 111 h0 = img_reelle.height; 60 112 if (h0 > w0) w0 = h0; 61 113 if (w0 > w00) { 62 if (!this.nameProp.match(RegExp(thumbnail, "g"))) { 63 TheImg = this; 64 w00 = w0; 65 } 114 if (!this.src.match(RegExp(".png", "g"))) 115 if (!this.src.match(RegExp(thumbnail, "g"))) { 116 TheImg = this; 117 w00 = w0; 118 } 66 119 67 120 } … … 69 122 return TheImg; 70 123 } 124 125 126 var init_taille_thumblink = { height: 0, width: 0 }; 127 if (init_taille_thumblink.height == 0) 128 init_taille_thumblink = { 129 height: jQuery(".thumbLink").height(), 130 width: jQuery(".thumbLink").width() 131 }; 132 //=================================================================== 133 134 var old_h = 0; 135 var rapport = -1; 136 71 137 /* 72 138 * Get_val_int … … 74 140 * return: valeur entiere 75 141 */ 76 function Get_Val_int(myObj, Maxi_val ) {142 function Get_Val_int(myObj, Maxi_val, Obj) { 77 143 var val = 0; 78 144 var reg1 = new RegExp("%", "g") 79 Maxi_val = parseInt(Maxi_val || 400); 80 81 if (!myObj) return Maxi_val; 82 if (myObj == "none") return Maxi_val; 83 if (myObj == "auto") return Maxi_val; 84 if (myObj.match(reg1)) 85 val = myObj * Maxi_val / 100; 86 else 145 Maxi_val = parseInt(Maxi_val || "0"); 146 147 /* 148 - numérique suivie de px ou % ou pt ou em, 149 - thin, bordure mince, 150 - medium, bordure moyenne (valeur par défaut), 151 - thick, bordure épaisse, 152 - inherit, hérite de son parent (css2). 153 */ 154 155 if (!myObj) { 156 return Maxi_val; 157 } 158 if (typeof (myObj) == "string") { 159 switch (myObj) { 160 case 'thin': 161 return 1; 162 break; 163 case 'medium': 164 return 2; 165 break; 166 case 'thick': 167 return 4; 168 break; 169 case 'inherit': 170 171 172 break; 173 174 default: 175 176 177 break; 178 } 179 180 181 182 if (myObj == "none") return Maxi_val; 183 if (myObj == "auto") return Maxi_val; 184 185 if (myObj.match(reg1)) val = myObj * Maxi_val / 100; 87 186 val = parseInt(myObj); 187 188 } else 189 val = parseInt(myObj); 190 191 88 192 if (typeof (val) == "NaN") return Maxi_val; 89 193 return val; 90 194 } 91 195 92 /*93 * Marge_haute94 * params: element,boolean ajoute_h(ajoute la hauteur de l'element)95 * return: valeur margin+padding+[hauteur]96 */97 function Marge_haute(myObj, ajoute_h) {98 Mon_obj = jQuery(myObj);99 if (Mon_obj.length == 0) return 0;100 101 if (ajoute_h) h_p = parseInt(jQuery(myObj).height());102 else h_p = 0;103 104 if (jQuery(myObj).css("marginTop"))105 if (jQuery(myObj).css("marginTop") != "auto") h_p += parseInt(jQuery(myObj).css("marginTop"));106 if (jQuery(myObj).css("marginBottom"))107 if (jQuery(myObj).css("marginBottom") != "auto") h_p += parseInt(jQuery(myObj).css("marginBottom"));108 if (jQuery(myObj).css("paddingTop"))109 if (jQuery(myObj).css("paddingTop") != "auto") h_p += parseInt(jQuery(myObj).css("paddingTop"));110 if (parseInt(jQuery(myObj).css("paddingBottom")))111 if (jQuery(myObj).css("paddingBottom") != "auto") h_p += parseInt(jQuery(myObj).css("paddingBottom"));112 return h_p;113 }114 //===================================================================115 var old_w = 0;116 var old_h = 0;117 var rapport = -1;118 var init_taille_thumblink = { height: 0, width: 0 };119 196 /* 120 197 * window .resize … … 122 199 jQuery(window).resize(function (event, ui) { 123 200 if (typeof (event) == 'undefined') return; 124 125 w1 = jQuery(window).width(); 126 h1 = jQuery(window).height();127 128 129 if ( !visible) return;130 if (old_w == w1 && old_h == h1) return; 131 132 if (old_w != w1) {133 old_w = w1;134 } else {135 if (old_h != h1) old_h = h1;136 }201 if (!cl_visible) return; 202 203 //========================================================================== 204 var winwidth = jQuery(window).width(); 205 var winheight = jQuery(window).height(); 206 if (old_w == winwidth && old_h == winheight) return; 207 208 if (old_w != winwidth) 209 { old_w = winwidth; } 210 else 211 { if (old_h != winheight) old_h = winheight; } 212 //=========================================================================== 213 Cadre = jQuery("#theImage").get(0); 137 214 var Type_Img = ""; 138 215 //====== détection du type d'images ====== … … 147 224 } else if (jQuery("#Panorama").length) { 148 225 Type_Img = "panorama"; 149 } else if (jQuery( "#theImage").find("img").length > 0) {226 } else if (jQuery(Cadre).find("img").length > 0) { 150 227 Type_Img = "img"; 151 228 } else if (jQuery("img").length > 0) { … … 156 233 } 157 234 158 var winwidth = old_w; 159 var twidth = jQuery("#imageHeaderBar").width(); 160 var twidth1 = jQuery("#imageToolBar").width(); 161 162 var winheight = old_h; 163 //==== récupère Img la plus grande ===== 164 if (jQuery("#theImg")) IMG = "#theImg"; 165 else IMG = "#theImage"; 166 167 TheImg2 = Get_Img_Maxi(IMG + " img"); 235 236 //=============== Information cadre ====== 237 238 var info_Cadre = jQuery(Cadre).info(); 239 240 if (info_Cadre.position != "static") { 241 /* Si LLGBO met le cadre en relative */ 242 if (theme.match(RegExp("gally", "g"))) { 243 //--- passage absolute ==> static ===/ 244 jQuery(Cadre).css("position", "static"); 245 info_Cadre = jQuery(Cadre).info(); 246 247 } 248 } 249 250 jQuery("#imageToolBar").css("position", "relative"); 251 jQuery("#imageHeaderBar").css("position", "relative"); 252 jQuery("#imageToolBar").css("top", 0 + "px"); 253 jQuery("#imageHeaderBar").css("top", "0px"); 254 //============================================================================= 255 var info_HeaderBar = jQuery("#imageHeaderBar").info(); 256 var info_imageInfoBar = jQuery("#imageInfoBar").info(); 257 var info_content = jQuery("#content").info(); 258 var info_ToolBar = jQuery("#imageToolBar").info(); 259 260 var info_titrePage = jQuery("#titrePage").info(); 261 262 var marge_right = 0; 263 var marge_left = 0; 264 if (info_content.width > 100) { 265 var marge_right = Get_Val_int(info_imageInfoBar.margin.left) + Get_Val_int(info_imageInfoBar.margin.right); 266 winwidth = info_content.width; 267 marge_right = info_imageInfoBar.width + marge_right; 268 } 269 else 270 winwidth = info_ToolBar.width - 2; 271 var marge_top = info_ToolBar.top + info_ToolBar.height; 272 273 //====================================================================== 274 275 if (Type_Img == "pamoorama") { 276 var info_pamoorama = jQuery("#pamoorama").info(); 277 var info_pamoorama = jQuery("#pamoorama_outter").info(); 278 var info_pamoorama = jQuery("#pamoorama_inner").info(); 279 280 TheImg = jQuery("#pamoorama"); 281 282 /* 283 pamoorama_outter 284 pamoorama_inner 285 pamoorama_footer 286 pamoorama_caption 287 pamoorama_thumb 288 pamoorama_frame 289 */ 290 } else { 291 //==== récupère Img la plus grande ===== 292 if (jQuery("#theImg")) IMG = "#theImg"; 293 else IMG = Cadre; 294 295 TheImg2 = Get_Img_Maxi(IMG + " img"); 296 //================================================================= 297 if (TheImg2 == null) { 298 if (jQuery(Cadre).find("img").length > 0) { 299 IMG = Cadre; 300 TheImg = Get_Img_Maxi("#theImage img"); 301 } 302 } else { 303 TheImg = TheImg2 //luciano ? 304 305 } 306 } 168 307 //================================================================= 169 if (TheImg2 == null) { 170 if (jQuery("#theImage").find("img").length > 0) { 171 IMG = "#theImage"; 172 TheImg = Get_Img_Maxi("#theImage img"); 173 } 174 } else { 175 TheImg = TheImg2 176 177 } 178 179 //================================================================= 308 309 180 310 switch (Type_Img) { 181 311 case "map": 182 183 jQuery("#content").height(winheight); 184 312 var info_image = jQuery("#mapPicture").info(); 313 marge_left = info_image.width; 314 315 if (theme.match(RegExp("gally", "g"))) { 316 jQuery("#map").css("top", "30px"); 317 } 318 jQuery("#map").css("left", info_image.width + "px"); 185 319 var TheImg = jQuery("#map").get(0); 186 pos_image = jQuery("#map").position(); 187 pos_page = jQuery("#the_page").position(); 188 320 info_image = jQuery("#map").info(); 321 322 323 pos_page = jQuery("#the_page").info(); 324 ; 189 325 190 326 break … … 203 339 }); 204 340 205 pos_image = jQuery(TheImg). position();206 pos_page = jQuery("#the_page"). position();341 pos_image = jQuery(TheImg).info(); 342 pos_page = jQuery("#the_page").info(); 207 343 208 344 break … … 210 346 211 347 if (!TheImg) return; 212 pos_image = jQuery(TheImg). position();213 pos_page = jQuery("#the_page"). position();348 pos_image = jQuery(TheImg).info(); 349 pos_page = jQuery("#the_page").info(); 214 350 215 351 … … 225 361 // 226 362 227 var TheImg = jQuery( "#theImage").find("embed");228 229 pos_image = jQuery( "#theImage").position();363 var TheImg = jQuery(Cadre).find("embed"); 364 365 pos_image = jQuery(Cadre).position(); 230 366 pos_page = jQuery("#the_page").position(); 231 367 if (rapport < 0) { 232 img_height = parseInt(TheImg.height); 233 img_width = parseInt(TheImg.width); 234 235 img_reelle.height = parseInt(TheImg.height); 236 img_reelle.width = parseInt(TheImg.width); 368 img_height = parseInt(jQuery(TheImg).outerHeight()); 369 img_width = parseInt(jQuery(TheImg).outerWidth()); 370 371 img_reelle.height = img_height; 372 img_reelle.width = img_width; 373 237 374 } 238 375 … … 241 378 242 379 var TheImg = jQuery('#charlie object').get(0); 243 pos_image = jQuery( "#theImage").position();380 pos_image = jQuery(Cadre).position(); 244 381 pos_page = jQuery("#the_page").position(); 245 382 if (rapport < 0) { … … 257 394 var Image = jQuery("#pamoorama").find("img"); 258 395 259 pos_image = jQuery("#pamoorama"). position();260 pos_page = jQuery("#the_page"). position();396 pos_image = jQuery("#pamoorama").info(); 397 pos_page = jQuery("#the_page").info(); 261 398 break 262 return; 263 264 } 399 400 401 } 402 265 403 //=============== Vérification taille minimale autorizée ====================== 266 404 miniWidth = Get_Val_int(jQuery(TheImg).css("min-width"), mini_width); 267 405 miniHeight = Get_Val_int(jQuery(TheImg).css("min-height"), mini_height); 406 268 407 maxWidth = Get_Val_int(jQuery(TheImg).css("max-width"), winwidth); 269 408 maxHeight = Get_Val_int(jQuery(TheImg).css("max-height"), winheight); … … 273 412 274 413 img_reelle.width = parseInt(img_reelle.width); 414 415 275 416 if (img_reelle.width < mini_width) return; 276 417 … … 279 420 //================================================================================== 280 421 if (rapport < 0) { 281 img_init.height = parseInt(img_height || TheImg.height); 282 img_init.width = parseInt(img_width || TheImg.width); 422 423 img_init.height = parseInt(img_height); 424 img_init.width = parseInt(img_width); 425 283 426 rapport = img_width / img_height; 427 284 428 if (Type_Img != "map") 285 429 rapport = (img_init.width / img_init.height); 286 430 else 287 rapport = -1;431 rapport = 0; 288 432 289 433 } … … 291 435 292 436 //=============== Zone d'affichage ============================ 293 zone_affichage.width = winwidth - 0 - (pos_page.left * 2) - 5; 294 zone_affichage.height = winheight - 0 - pos_page.top; 437 borderW = jQuery("#theImage").css("borderWidth"); 438 borderW = Get_Val_int(borderW, 2); 439 440 zone_affichage.width = winwidth - (borderW * 2); 441 zone_affichage.height = winheight - marge_top; 442 295 443 296 444 297 445 //=========================================================================== 298 446 var sel0 = { top: 0 }; 299 sel0.top += Marge_haute("#theHeader", true); 300 301 sel0.top += Marge_haute("#imageHeaderBar", true); 302 if (!theme.match(RegExp("gally", "g"))) { 303 sel0.top += Marge_haute("#imageToolBar", true); 304 } else { 305 sel0.top += Marge_haute(TheImg, false); 306 } 307 if (jQuery("#theImage").css("marginTop")) 308 if (jQuery("#theImage").css("marginTop") != "auto") 309 sel0.top += parseInt(jQuery("#theImage").css("marginTop")); 310 if (jQuery("#theImage").css("paddingTop")) 311 if (jQuery("#theImage").css("paddingTop") != "auto") 312 sel0.top += parseInt(jQuery("#theImage").css("paddingTop")); 313 314 img_top = 0; 315 if (jQuery("#theImage").css("position") != "absolute") 316 zone_affichage.height -= sel0.top; 317 318 if (theme.match(RegExp("gally", "g"))) { img_top = sel0.top } 319 jQuery("#theImage").css("top", img_top + "px") 320 447 448 449 450 451 if (info_ToolBar.height > 0) { 452 Bandeau = info_ToolBar.bottom; 453 454 } 455 else { 456 457 Bandeau = info_HeaderBar.bottom; 458 } 459 460 461 //================================================================================== 321 462 jQuery("#theImage #theImg IMG").css("marginTop", "0px") 322 323 324 325 var lmt = 0; 463 var Lmt = 0; 464 465 var h = 15; 466 if (theme.match(RegExp("sobre", "g"))) { 467 h += 0; //?? 468 } else if (theme.match(RegExp("Pure", "g"))) { 469 h += 0; //?? 470 } else if (theme.match(RegExp("luciano", "g"))) { 471 h += 0; //?? 472 } else if (theme.match(RegExp("simple", "g"))) { 473 h += 0; //?? 474 } else if (theme.match(RegExp("gally", "g"))) { 475 h += 0; //?? 476 477 } 478 479 480 if (Type_Img != "map") { 481 //=============== Description ================ 482 Parent = "theImage"; 483 if (jQuery("#" + Parent + " br").length > 0) { 484 jQuery("#" + Parent + " br").remove(); 485 } 486 //============================================= 487 var Description = jQuery("#" + Parent + " p"); 488 jQuery(Description).each(function (i) { 489 t = jQuery(this).text(); 490 p0 = jQuery(this).parent().get(0); 491 if (p0.id == Parent || p0.nodeName == "TD") { 492 if (jQuery(this).text() == "") 493 jQuery(this).remove(); 494 else { 495 h += 10; 496 h += jQuery(this).info().height; 497 } 498 499 500 } 501 502 }); 503 //================ Licence ======================== 504 505 var Licence = jQuery(".licencetag"); 506 if (Licence.length > 0) { 507 var info_licence = jQuery(".licencetag").info(); 508 h += info_licence.height; 509 jQuery(".licencetag").css("padding", "0px"); 510 jQuery(".licencetag img").css("position", "static"); 511 512 Licence = Licence.parent(); 513 514 515 //==================================================================== 516 517 518 519 } 520 521 522 523 // zone_affichage.height -= h; 524 } 525 526 info_img = jQuery(TheImg).info(); 527 info_licence = jQuery(".licencetag").info(); 528 Lmt = info_licence.top - info_img.bottom 529 var Bandeau_bas = h; 530 531 //========================================================================= 532 img_top = Bandeau; 533 //============ Padding image ? =============== 534 535 img_padding_top = Get_Val_int(info_img.padding.top); 536 img_padding_top += Get_Val_int(info_img.padding.bottom); 537 img_padding_top += Get_Val_int(info_img.borderwidth.top); 538 img_padding_top += Get_Val_int(info_img.borderwidth.bottom); 539 540 margin_top = Get_Val_int(info_Cadre.margin.top); 541 padding_top = Get_Val_int(info_Cadre.padding.top); 542 padding_top += Get_Val_int(info_Cadre.padding.bottom); 543 544 Marge_Basse = parseInt(marge_basse || 0); // hors bandeau 545 //========================================================================== 326 546 h = 0; 327 //================ Licence ======================== 328 var Licence = jQuery("#theImage span"); 329 if (Licence.length > 0) { 330 jQuery("#theImage span").css("background", "blue"); 331 t1 = jQuery("#theImage span").position(); 332 h = jQuery("#theImage span").height(); 333 } 334 //==== paragraphe supplèmentaire === 335 if (jQuery("#theImage table")) { 336 jQuery("#theImage table").css("background", "yellow"); 337 t1 = jQuery("#theImage table").position(); 338 } 339 340 if (jQuery("#theImage p")) { 341 jQuery("#theImage p").css("background", "red"); 342 t1 = jQuery("#theImage p").position(); 343 h += jQuery("#theImage p").height(); 344 } 345 if (jQuery("#theImage br")) { 346 347 348 } 349 350 351 352 lmt = jQuery("#theImage span").height() - jQuery("#theImage p").height(); 353 354 //========================================================================== 355 Marge_Basse = parseInt(marge_basse || 0); 356 zone_affichage.height = zone_affichage.height - Marge_Basse; 357 358 var Image_height = zone_affichage.height - h; 359 547 zone_affichage.height = winheight - Bandeau - Marge_Basse - h - margin_top - padding_top; 548 var Image_height = zone_affichage.height - Bandeau_bas - img_padding_top; 549 550 //============================================================= 360 551 var height_user = eval(user_status + "_height"); 361 552 362 //============================================================= 553 363 554 var reg1 = new RegExp("%", "g"); 364 555 if (height_user.match(reg1)) … … 372 563 373 564 if (echelle > echelle_max) { echelle = echelle_max; } 374 375 565 Image_height = parseInt(img_reelle.height * echelle); 376 566 377 if (rapport > 0) var Image_Width = parseInt(Image_height * rapport); 378 else var Image_Width = parseInt(img_reelle.width * echelle); 567 if (rapport > 0) 568 var Image_width = parseInt(Image_height * rapport); 569 570 else if (Type_Img == "map") { 571 var Image_width = zone_affichage.width - marge_left - marge_right; 572 573 if (theme.match(RegExp("gally", "g"))) { 574 Image_height -= "30"; 575 } 576 577 } else { 578 var Image_width = zone_affichage.width; 579 } 580 581 379 582 //=============================================================== 380 381 583 align_auto = "center"; 382 584 if (jQuery("#theImg").css("textAlign")) … … 394 596 widthmin = parseInt(width_user); 395 597 396 if (Image_ Width > widthmin) {397 // Image_ Width largeur à atteindre598 if (Image_width > widthmin) { 599 // Image_width largeur à atteindre 398 600 // Calcul du rapport d'agrandissement 399 601 var echelle_w = parseFloat(widthmin / img_reelle.width, 3); 400 602 if (echelle_w > echelle_max) { echelle_w = echelle_max; } 401 Image_Width = parseInt(img_reelle.width * echelle_w); 402 } 403 404 if (rapport > 0) Image_height = parseInt(Image_Width / rapport); 603 Image_width = parseInt(img_reelle.width * echelle_w); 604 if (rapport > 0) 605 Image_height = parseInt(Image_width / rapport); 606 } 607 608 405 609 406 610 } … … 411 615 zoom = echelle; 412 616 413 if (TheImg.src) {414 w_init = TheImg.width;415 h_init = TheImg.height;416 }417 617 // zone_affichage.height *= zoom; 418 618 // zone_affichage.width *= zoom; 419 619 //=============LLGBO2 =========================== 420 620 marges = 0; 421 621 t1 = { top: 0 }; 422 622 if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) { 423 623 llgboframe = jQuery("#gbo div:first"); 424 marges = jQuery(llgboframe). width() - jQuery("#gbo div:last").width();425 cadre = {}; 426 m1 = jQuery(llgboframe). height();624 marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").outerWidth(); 625 626 m1 = jQuery(llgboframe).outerHeight(); 427 627 t1 = jQuery(llgboframe).position(); 428 628 429 629 430 630 if (TheImg.src) { 431 Image_height = Image_height - marges; 432 Image_Width = Image_Width - marges; 433 434 jQuery("#gbo").width(Image_Width + marges); 435 jQuery("#gbo").height(Image_height + marges); 436 jQuery("#gbo").css("width", Image_Width + marges + "px"); 437 jQuery("#gbo").css("height", Image_height + marges + "px"); 631 marge_top = t1.top - img_top; 632 Image_height -= marge_top; 633 Image_width = Image_height * rapport; 634 if ((winwidth) < Image_width) { 635 _width = twidth; 636 } else { 637 _width = Image_width; 638 } 639 640 641 jQuery("#gbo").outerWidth(_width); 642 jQuery("#gbo").outerHeight(Image_height); 643 jQuery("#gbo").css("width", (_width) + "px"); 644 jQuery("#gbo").css("height", (Image_height) + "px"); 645 646 Image_height -= marges; 647 Image_width -= marges; 648 438 649 } else { 439 650 … … 447 658 448 659 449 if (jQuery("#prevnext")) { 450 areas = jQuery("area"); 660 if (jQuery("area").length > 0) { 661 jQuery("area").each(function (i) { 662 663 obj1 = this.rel; 664 obj2 = this.coords; 665 if (obj1 == "up") 666 this.coords = (Image_width / 3) + "," + 0 + "," + (Image_width * 2 / 3) + "," + Image_height; 667 else if (obj1 == "prev") 668 this.coords = 0 + "," + 0 + "," + (Image_width / 3) + "," + Image_height; 669 else if (obj1 == "next") 670 this.coords = (Image_width * 2) / 3 + "," + 0 + "," + (Image_width * 3 / 3) + "," + Image_height; 671 672 }); 673 674 675 676 677 451 678 452 679 } … … 456 683 457 684 //========================================================= 458 zone_affichage.height = (Image_height + marges) 685 // jQuery(Cadre).css("position", "relative"); 686 687 jQuery(Cadre).css("top", "0px"); 688 jQuery("#standard").css("top", 0 + "px"); 689 jQuery("#comments").css("top", 0 + "px"); 690 691 692 //jQuery("#copyright").css("top", 0 + "px"); 693 694 459 695 jQuery("#linkNext").height(Image_height); 460 696 jQuery("#linkPrev").height(Image_height); 461 697 //================ Zone affichage ========================= 462 // Image_height, Image_Width = valeur a atteindre. 463 jQuery("#theImage").css("backgroundColor", "green"); 464 jQuery("#theImage").height(zone_affichage.height); 465 jQuery("#theImage").width(zone_affichage.width); 698 // Image_height, Image_width = valeur a atteindre. 699 if (theme.match(RegExp("luciano", "g"))) { 700 zone_affichage.height -= Bandeau_bas; 701 } 702 703 jQuery(Cadre).height(zone_affichage.height); 704 jQuery(Cadre).width(zone_affichage.width); 466 705 //============================================================== 706 467 707 img_finale.height = Image_height; 468 img_finale.width = Image_ Width;708 img_finale.width = Image_width; 469 709 //============================================================== 710 470 711 471 712 if (Type_Img == "charlie") { … … 473 714 /**/ 474 715 pdf = 2 * parseInt(jQuery(".none_2").css("paddingRight")); 475 jQuery("#charlie").css("width", Image_ Width + pdf);716 jQuery("#charlie").css("width", Image_width + pdf); 476 717 jQuery("#charlie").css("height", Image_height); 477 718 jQuery("#charlie").css("margin", "auto"); 478 719 479 720 480 jQuery("#player").css("width", Image_ Width + 100 + "px");721 jQuery("#player").css("width", Image_width + 100 + "px"); 481 722 jQuery("#player").css("height", Image_height); 482 723 483 jQuery("#embedplayer").css("width", Image_ Width);724 jQuery("#embedplayer").css("width", Image_width); 484 725 jQuery("#embedplayer").css("height", Image_height); 485 726 486 727 487 jQuery("object").width(Image_ Width);728 jQuery("object").width(Image_width); 488 729 jQuery("object").height(Image_height); 489 730 } else if (Type_Img == "panorama") { 731 732 733 // jQuery(TheImg).panorama2(img_finale.height, img_finale.width); 490 734 jQuery(TheImg).height(img_finale.height); 491 735 jQuery(TheImg).width(img_finale.width); 492 736 jQuery("#Panorama div").height(Image_height); 493 737 // class=simple_panorama 494 jQuery(TheImg).attr("id", "Img1"); 495 var settings = { 496 viewport_width: 600, 497 speed: 20000, 498 direction: 'left', 499 control_display: 'auto', 500 start_position: 0, 501 auto_start: true, 502 mode_360: true, 503 loop_180: true 504 }; 505 element = TheImg; //panorama_animate(element, elemWidth, settings); 506 n = $.fn; 507 pc = jQuery(TheImg) 508 options = pc.extend(); 509 510 if (options) jQuery.extend(settings, options); 511 512 513 n = 1; 514 ; 515 516 517 /* 518 jQuery("DIV .panoramaContainer").css("background", "red"); 519 jQuery("DIV .panoramaContainer").css("background", "red"); 520 jQuery("DIV .panoramaViewport").css("background", "red"); 521 jQuery("DIV .panoramaControl").css("background", "red"); 522 */ 738 739 jQuery(".panorama-viewport").css("left", "2px"); 740 jQuery(".panorama-viewport").css("width", "auto"); 741 // setTimeout("cl_Timer()", 500); 523 742 524 743 } else if (Type_Img == "pamoorama") { 525 526 744 marge_left += 0; 745 new_width = zone_affichage.width - marge_right - marge_left; 746 jQuery("#pamoorama").css("margin", 0 + "px"); 747 jQuery("#pamoorama").css("left", marge_left + "px"); 527 748 jQuery("#pamoorama").css("height", Image_height + "px"); 528 jQuery("#pamoorama").css("width", twidth + "px"); 529 530 jQuery("#pamoorama").height(Image_height); 531 jQuery("#pamoorama").width(twidth); 532 533 534 535 jQuery("#pamoorama_outter").height(Image_height); 536 jQuery("#pamoorama_outter").width(twidth); 749 750 jQuery("#pamoorama").css("width", new_width + "px"); 751 jQuery("#pamoorama").width(new_width); 752 753 754 jQuery("#pamoorama_outter").css("left", marge_left + "px"); 537 755 538 756 jQuery("#pamoorama_outter").css("height", Image_height + "px"); 539 jQuery("#pamoorama_outter").css("width", twidth + "px"); 540 jQuery("#pamoorama_footer").width(twidth); 541 jQuery("#pamoorama_footer").css('width', twidth + "px"); 757 758 jQuery("#pamoorama_outter").css("width", (new_width) + "px"); 759 jQuery("#pamoorama_outter").width(new_width); 760 761 762 jQuery("#pamoorama_footer").width((zone_affichage.width - marge_right - marge_left)); 763 jQuery("#pamoorama_footer").css('width', (zone_affichage.width - marge_right - marge_left) + "px"); 542 764 zoom = Image_height / img_height; 543 544 h_frame = jQuery("#pamoorama_frame").height(); 545 h_width = jQuery("#pamoorama_frame").width(); 546 jQuery(TheImg).css("zoom", zoom); 547 765 info_pamoorama_outter = jQuery("#pamoorama_outter").info(); 766 767 h_frame = jQuery("#pamoorama").width(); 768 if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) { 769 770 if (info_pamoorama_outter.width == 0) 771 setTimeout("wait_Timer()", 100); 772 // jQuery(TheImg).css("zoom", zoom); 773 } 548 774 549 775 … … 559 785 jQuery(TheImg).height(img_finale.height); 560 786 jQuery(TheImg).width(img_finale.width); 787 jQuery(TheImg).css("height", img_finale.height + "px"); 788 jQuery(TheImg).css("width", img_finale.width + "px"); 561 789 } 562 790 … … 564 792 try { 565 793 if (theme.match(RegExp("gally", "g"))) { 566 if (init_taille_thumblink.height == 0)567 init_taille_thumblink = { height: jQuery(".thumbLink").height(), width: jQuery(".thumbLink").height() };568 569 794 jQuery(".thumbLink").css("height", init_taille_thumblink.height + "px"); 570 795 jQuery(".thumbLink").css("width", init_taille_thumblink.width + "px"); 796 // setTimeout("cl_Timer()", 100); 797 798 } else { 799 800 jQuery("#imageToolBar").css("position", "static"); 571 801 } 572 802 } catch (e) { … … 574 804 } 575 805 // 806 if (!pos) pos = jQuery("#copyright").position(); 807 if (pos != jQuery("#copyright").position()) 808 pos = jQuery("#copyright").position(); 809 if (pos.top > 100) jQuery("#the_page").height(pos.top); 810 811 if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) return; 576 812 jQuery(window).resize(); 577 813 return; 578 814 }); 579 815 var pos; 580 816 //=================================================================== 581 582 583 817 jQuery(window).resize(); 584 jQuery(window).resize(); 818 585 819 586 820 } // function 587 ); // ready821 ); // ready 588 822 589 823 /* Extension -
extensions/Autosize/js/conflit.js
r7124 r7193 1 1 //==== remplace $(... avec jQuery( ==== 2 var d1 = 0; 3 var init_tb = 0; 2 4 3 (function () {4 5 })();6 7 8 9 5 function $(element, nc) { 10 6 //============== détection framework ================== 11 jq = jQuery(element).selector;7 12 8 13 9 var tp1 = typeof (MooTools); 10 var MooTools_version = "0"; 11 14 12 if (tp1 != "undefined") { 15 if (MooTools.version == "1.2.4") var MooTools_version = "Luciano"; // luciano 16 if (MooTools.version == "1.11") var MooTools_version = "pamoorama"; //pamoorama 17 18 } else { 19 var MooTools_version = "0"; 20 } 21 22 tp1 = typeof (Prototype); 23 if (tp1 == "undefined") { 24 var Prototype_Version = '0'; 25 26 } else { 13 if (MooTools.version == "1.2.4") { 14 MooTools_version = "Luciano"; // luciano 15 ret_Luciano = jQuery().$Luciano(element, nc); 16 } 17 18 if (MooTools.version == "1.11") { 19 MooTools_version = "pamoorama"; //pamoorama 20 try { 21 22 } catch (e) { 23 24 }; 25 } 26 27 28 } 29 30 tp1 = typeof (Prototype); 31 var Prototype_Version = '0'; 32 if (tp1 != "undefined") { 27 33 if (Prototype.Version == '1.6.0.2') { 28 var Prototype_Version = '1602'; 34 Prototype_Version = '1602'; 35 29 36 } else if (Prototype.Version == '1.6.1') { 30 var Prototype_Version = '161'; 37 Prototype_Version = '161'; 38 31 39 } else if (Prototype.Version == '1.0.0.0') { 32 var Prototype_Version = '1'; 40 Prototype_Version = '1'; 41 33 42 } 34 43 } 35 //=================================================== 44 //=================================================== 45 var jq = jQuery(element).selector; 46 var new_element = jQuery(element); 47 36 48 if ( Prototype_Version=="0" && MooTools_version == "0") { 37 return jQuery(element);49 return new_element; 38 50 } 39 51 //======================================================================================= 40 if (arguments.caller) {52 if (arguments.caller && arguments.caller.length>0 ) { 41 53 if (arguments.caller.length > 1) { 42 54 if (element == "pamoorama") { 43 return jQuery().$Pamoorama(element) ;55 return jQuery().$Pamoorama(element) ; 44 56 } 45 57 … … 50 62 case "dom:loaded": 51 63 return element; 52 return jQuery().$Protype 1602(element);64 return jQuery().$Protype(element); 53 65 break; 54 66 case "load": 55 return jQuery().$Protype 1602(element); ;67 return jQuery().$Protype(element); 56 68 break; 57 69 case "unload": 58 return jQuery().$Protype1602(element); ; 70 return jQuery().$Protype(element); 71 break; 72 case "prototype_event_registry": 73 74 try { 75 new_element = jQuery().$Protype(element); 76 } catch (e) { 77 new_element = null; 78 } 79 80 81 return new_element; 82 break; 83 case "readystatechange": 84 try { 85 new_element = jQuery().$Protype(element); 86 } catch (e) { 87 new_element = null; 88 } 89 90 return new_element; 59 91 break; 60 92 } … … 66 98 switch (arg) { 67 99 case "bottom": 68 return jQuery().$Pamoorama(element) ;100 return jQuery().$Pamoorama(element) ; 69 101 break; 70 102 case "left": 103 return jQuery().$Pamoorama(element) ; 104 break; 105 case "prototype_event_registry": 106 return jQuery().$Pamoorama(element) ; 107 break; 108 case "readystatechange": 71 109 return jQuery().$Pamoorama(element); 72 110 break; … … 108 146 } 109 147 //======================================================= 110 return jQuery(element);148 return new_element; 111 149 break; 112 150 … … 115 153 { //=========== options luciano =================================== 116 154 //=== theme Luciano ==== 117 return jQuery().$Luciano(element, nc);155 return ret_Luciano; 118 156 } 119 157 } … … 122 160 //================================================== 123 161 tpe = typeof (element); 124 new_element = jQuery(element); 125 162 126 163 //========== test jQuery ? ============== 127 164 … … 143 180 //=========== options pamoorama =================================== 144 181 { 145 tp1=typeof (element) ;146 if (tp 1=="string")182 183 if (tpe=="string") 147 184 switch (jq) { 148 185 case "ie_ready": … … 156 193 break; 157 194 158 }else if(tp 1=="boolean")195 }else if(tpe=="boolean") 159 196 { 160 197 return jQuery().$Pamoorama(element); … … 164 201 if (el == "IMG") return jQuery().$Pamoorama(element); 165 202 if (el == "#document") return jQuery(element) ; 166 jQuery().$Pamoorama(element); 167 } 168 169 if (jQuery("#Panorama").length > 0 && jq != "rateForm" && jq != "order" && jq != "themeSelect") { 203 if (el == "BODY") { 204 try { return jQuery().$Pamoorama(element) } catch (e) { 205 return jQuery(element); 206 }; 207 208 } 209 if (element == window) 210 return new_element; 211 jQuery().$Pamoorama(element); 212 } 213 obj_panorama = jQuery("#Panorama"); 214 if (obj_panorama.length > 0 && jq != "rateForm" && jq != "order" && jq != "themeSelect") { 215 if (tpe == "object") 216 if (Prototype_Version != '0') { 217 //=== rvmaps === 218 try { elem_retour=jQuery().$Protype(element); 219 return elem_retour; 220 } catch (e) { 221 222 } 223 } 224 170 225 if (new_element.length < 2) return new_element; 171 226 if (new_element.length == 2) return jQuery(element).get(1); … … 188 243 if (new_element.context.loaded) { 189 244 //=== theme Luciano ==== 190 if (MooTools_version == "Luciano") return jQuery().$Luciano(element, nc);245 if (MooTools_version == "Luciano") return ret_Luciano; 191 246 //=== theme gally ? ==== 192 247 return new_element; … … 198 253 if (MooTools_version == "Luciano") { 199 254 //=== theme Luciano ==== 200 new_element = jQuery().$Luciano(element, nc);255 new_element = ret_Luciano; 201 256 tp = new_element.nodeName + new_element.nodeType; 202 257 if (tp == "DIV1") return new_element; … … 214 269 if (Prototype_Version != '0') { 215 270 //=== rvmaps === 216 217 return jQuery().$Protype1602(element); 271 try { 272 return jQuery().$Protype(element); 273 } catch (e) { 274 return jQuery(element); 275 } 218 276 } 219 277 return jQuery(element); … … 222 280 223 281 //========================================================= 282 (function ($) { 283 $.fn.panorama2 = 284 function (height, width) { 285 286 var src =jQuery(this); 287 288 return ; 289 290 $("#theImage img").eq(0).removeAttr("style").attr({width:width,height:height}); 291 retour= jQuery('a.panorama-control-left').click(); 292 panoramaContainer=jQuery('panorama-container'); 293 294 /* 295 $(panoramaContainer).stop(); 296 op=options; 297 settings.direction = 'right'; 298 panoramaContainer.panorama_animate(panoramaContainer, elemWidth, settings); 299 */ 300 301 302 303 304 305 } 306 307 308 })(jQuery); 309 310 224 311 jQuery.fn.extend({ 225 312 //---------------- luciano ------------------------------- … … 253 340 }, 254 341 //=================================================== 255 $Protype 1602: function (element) {342 $Protype: function (element) { 256 343 //======== prototype.js ===================== 257 344 if (arguments.length > 1) { -
extensions/Autosize/main.inc.php
r7124 r7193 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1. 1.224 Version: 1.2.0 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 … … 11 11 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 12 12 if (!defined('AUTOSIZE_PATH')) 13 define( 14 'AUTOSIZE_PATH', 15 PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' 16 ); 13 define( 'AUTOSIZE_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' ); 17 14 18 add_event_handler('loc_end_picture', 'cl_autosize_affiche',EVENT_HANDLER_PRIORITY_NEUTRAL+10); 19 function cl_autosize_affiche() 20 { 21 global $user, $picture, $template,$page; 22 global $content, $element_info; 23 global $infos_message,$erreur_message; 24 global $conf,$lang ,$user; 25 load_language('lang', AUTOSIZE_PATH); 15 include_once(AUTOSIZE_PATH.'autosize.inc.php'); 26 16 27 if ( $page['body_id']=='thePicturePage' ) { 28 if ( isset($picture['current'])){ 29 $my_path = dirname(__FILE__).'/'; 30 $autosize_parametres = cl_autosize_Get_Options(); 31 include (AUTOSIZE_PATH."include/affiche.php"); 32 33 $template->assign('cl_autosize_button', array( 34 'cl_autosize_info' => 'cl_autosize_info' , 35 'cl_autosize_info_2' => 'cl_autosize_info_2' , 36 37 'URL' => $_SERVER['REQUEST_URI'] , 38 'ICON2' => AUTOSIZE_PATH . 'icons/button-maximize.png', 39 'ICON' => AUTOSIZE_PATH . 'icons/button-minimize.png' 40 )); 41 42 $template->set_filenames(array('cl_bp' => $my_path. '/template/picture.tpl')); 43 $template->concat('PLUGIN_PICTURE_ACTIONS', $template->parse('cl_bp', true)); 44 45 $template->set_filenames( 46 array('autosize_content'=> $my_path.'template/autosize.tpl') 47 ); 48 49 return $template->parse( 'autosize_content', false); 50 } 51 } 52 } 17 $autosize_controler = new autosize_controler(); 18 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 95 ); 19 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin') ); 53 20 54 21 55 //===================================================================== 56 add_event_handler('get_admin_plugin_menu_links', 'cl_autosize_admin_menu_test'); 57 function cl_autosize_admin_menu_test($menu) 58 { 59 global $lang ; 60 array_push($menu, array('NAME' => 'Autosize', 61 'URL' => get_admin_plugin_menu_link(AUTOSIZE_PATH . 'admin/admin_autosize.php'))); 62 return $menu; 63 } 64 //=================================================================== 65 function cl_autosize_aff_infos_plus() 66 { 67 global $template,$infos_message,$erreur_message, $user ; 68 global $conf,$lang ; 69 70 //============================================================== 71 if (isset($erreur_message)) 72 { 73 if ($erreur_message <> "") 74 { 75 $erreur_message=str_replace("\n",'<br />',$erreur_message) ; 76 $template->assign('errors',$erreur_message); 77 $erreur_message=""; 78 } 79 } 80 if (isset($infos_message)) 81 { 82 83 if ($infos_message <> "") 84 { 85 $infos_message=str_replace("\n",'<br />',$infos_message) ; 86 $template->assign('infos',$infos_message); 87 $infos_message=""; 88 } 89 } 90 //============================================================= 91 return; 92 93 } 94 95 //=================================================================================== 96 function cl_autosize_Get_Options() 97 { 98 global $conf,$autosize_parametres; 99 100 $autosize_parametres = unserialize($conf['cl_autosize']); 101 $autosize_parametres = cl_autosize_Set_Options(); 102 return $autosize_parametres; 103 } 104 //=============================================================================== 105 function cl_autosize_Set_Options() 106 { 107 global $autosize_parametres; 108 //============================================================================= 109 $autosize_parametres->webmaster_height =(isset($_POST['webmaster_height'])) ? $_POST['webmaster_height'] : ((isset($autosize_parametres->webmaster_height )) ? $autosize_parametres->webmaster_height : '100%' ) ; 110 $autosize_parametres->webmaster_width=(isset($_POST['webmaster_width']))? $_POST['webmaster_width']: ((isset($autosize_parametres->webmaster_width)) ? $autosize_parametres->webmaster_width: '90%') ; 111 112 $autosize_parametres->admin_height =(isset($_POST['admin_height'])) ? $_POST['admin_height'] : ((isset($autosize_parametres->admin_height )) ? $autosize_parametres->admin_height : '90%' ) ; 113 $autosize_parametres->admin_width=(isset($_POST['admin_width']))? $_POST['admin_width']: ((isset($autosize_parametres->admin_width)) ? $autosize_parametres->admin_width: '90%') ; 114 115 $autosize_parametres->generic_height =(isset($_POST['generic_height'])) ? $_POST['generic_height'] : ((isset($autosize_parametres->generic_height )) ? $autosize_parametres->generic_height : '100%' ) ; 116 $autosize_parametres->generic_width=(isset($_POST['generic_width']))? $_POST['generic_width']: ((isset($autosize_parametres->generic_width)) ? $autosize_parametres->generic_width: '90%') ; 117 118 $autosize_parametres->guest_height =(isset($_POST['guest_height'])) ? $_POST['guest_height'] : ((isset($autosize_parametres->guest_height )) ? $autosize_parametres->guest_height : '100%' ) ; 119 $autosize_parametres->guest_width=(isset($_POST['guest_width']))? $_POST['guest_width']: ((isset($autosize_parametres->guest_width)) ? $autosize_parametres->guest_width: '90%') ; 120 121 $autosize_parametres->normal_height =(isset($_POST['normal_height'])) ? $_POST['normal_height'] : ((isset($autosize_parametres->normal_height )) ? $autosize_parametres->normal_height : '100%' ) ; 122 $autosize_parametres->normal_width=(isset($_POST['normal_width']))? $_POST['normal_width']: ((isset($autosize_parametres->normal_width)) ? $autosize_parametres->normal_width: '90%') ; 22 add_event_handler('load_profile_in_template', array(&$autosize_controler,'cl_autosize_script'),50 ); 123 23 124 24 125 $autosize_parametres->mini_height =(isset($_POST['mini_height'])) ? $_POST['mini_height'] : ((isset($autosize_parametres->mini_height )) ? $autosize_parametres->mini_height : '150' ) ;126 $autosize_parametres->mini_width=(isset($_POST['mini_width']))? $_POST['mini_width']: ((isset($autosize_parametres->mini_width)) ? $autosize_parametres->mini_width: '300') ;127 128 $autosize_parametres->echelle_max=(isset($_POST['echelle_max']))? $_POST['echelle_max'] : ((isset($autosize_parametres->echelle_max)) ? $autosize_parametres->echelle_max : '1.2');129 $autosize_parametres->marge_basse=(isset($_POST['marge_basse']))? $_POST['marge_basse']: ((isset($autosize_parametres->marge_basse)) ? $autosize_parametres->marge_basse : '50');130 //===============================================================================131 132 if ( isset($_POST['submit'] ) && $_POST['submit'] == l10n('cl_autosize_save') ) {133 134 $autosize_parametres->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : "off" ;135 }else{136 $autosize_parametres->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : ( ( isset($autosize_parametres->check_auto_w) ) ? $autosize_parametres->check_auto_w : 'off') ; ;137 }138 139 return $autosize_parametres;140 }141 //========================================================================142 function cl_autosize_sauve_options_inf()143 {144 global $options,$infos_message,$conf,$autosize_parametres ;145 $infos_message .=l10n("cl_autosize_save_config")."<br>";146 $autosize_parametres=cl_autosize_Set_Options();147 148 if ( isset($autosize_parametres) )149 {150 151 $query = '152 UPDATE '.CONFIG_TABLE.'153 SET value="'.addslashes(serialize($autosize_parametres)).'"154 WHERE param = "cl_autosize"155 LIMIT 1';156 pwg_query($query);157 }158 159 }160 //=======================================================================161 add_event_handler('loc_end_section_init', 'cl_autosize_script', 60 );162 163 164 function cl_autosize_script()165 {166 $my_path = dirname(__FILE__).'/';167 168 global $template;169 170 $template->set_filenames(171 array('autosize_cl_init'=> $my_path.'template/cl_conflit.tpl')172 );173 $template->assign(174 array(175 'AUTOSIZE_PATH' => AUTOSIZE_PATH176 )177 );178 return $template->parse( 'autosize_cl_init', false);179 180 }181 25 182 26 ?> -
extensions/Autosize/maintain.inc.php
r6912 r7193 24 24 if (!defined('AUTOSIZE_PATH')) 25 25 define( 26 'AUTOSIZE_PATH', 27 PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' 26 'AUTOSIZE_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' 28 27 ); 29 28 -
extensions/Autosize/template/autosize.tpl
r7124 r7193 1 1 {* $Id: autosize/template/picture.tpl *} 2 2 <!-- autosize/template/picture.tpl --> 3 3 4 4 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1} 5 5 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"} 6 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.min.js"} 6 7 {*jQuery is always available by default*} 7 8 <script type="text/javascript"> … … 34 35 var check_auto_w = '{$check_auto_w}'; 35 36 </script> 36 <style type="text/css"> 37 #theImage p{ldelim} 38 height:auto; 39 } 40 </style> 37 38 41 39 42 40 <!-- << autosize/template/picture.tpl --> -
extensions/Autosize/template/cl_conflit.tpl
r7124 r7193 14 14 <!---FIN auto/cl_confilt.tpl (before) ---> 15 15 {/html_head} 16 17 18 -
extensions/Autosize/template/picture.tpl
r7124 r7193 1 <a><input id="bp_cla" 2 type="image" 3 style=" float:right;border:0px;" 4 src="{$cl_autosize_button.ICON}" 5 onclick = " Toggle_bp() " 1 <style type="text/css"> 2 #bp_cla {ldelim} 3 cursor:pointer; 4 } 5 navThumb{ldelim} 6 height:auto 7 } 8 body{ldelim} overflow:visible; overflow-x:visible; overflow-y:visible 9 } 10 </style> 11 <a onclick = "Toggle_bp()" id="bp_cla" 6 12 title="{'cl_autosize_info_2'|@translate}" 7 13 alt="{'cl_autosize_info_2'|@translate}" /> 8 </a> 14 <img class="button" id="bp_img_cla" alt="{'cl_autosize_info_2'|@translate}" src="{$cl_autosize_button.ICON}" complete="complete"/> 15 </a> 16 9 17 <script language=javascript type="text/javascript"> 10 src1="{$cl_autosize_button.ICON}";11 src2="{$cl_autosize_button.ICON2}";12 src3="{'cl_autosize_info_2'|@translate}";13 src4="{'cl_autosize_info'|@translate}";18 var src1="{$cl_autosize_button.ICON}"; 19 var src2="{$cl_autosize_button.ICON2}"; 20 var src3="{'cl_autosize_info_2'|@translate}"; 21 var src4="{'cl_autosize_info'|@translate}"; 14 22 15 function Toggle_bp()16 {ldelim}17 visible = !visible ;18 if (visible) src=src1 ;19 else src=src2 ;20 if (visible) src_info=src3 ;21 else src_info=src4 ;22 23 23 jQuery('#bp_cla').get(0).src=src ;24 jQuery('#bp_cla').attr('alt',src_info);25 jQuery('#bp_cla').attr('title',src_info);26 old_w = 0;27 jQuery(window).resize();28 }29 24 </script> 30 25
Note: See TracChangeset
for help on using the changeset viewer.