Changeset 7316 for extensions
- Timestamp:
- Oct 21, 2010, 4:15:26 PM (14 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/admin/template/admin.tpl
r7229 r7316 27 27 var user_status = '{$user_status}'; 28 28 var check_auto_w = '{$check_auto_w}'; 29 30 var check_desc_v = '{$check_desc_v}'; 31 29 32 </script> 30 33 {known_script id="jquery" src="themes/default/js/jquery.packed.js"} … … 132 135 133 136 </tr> 134 <!--=================== Bloc Alignement =============================--> 137 135 138 <tr > 136 139 <td class="cluetip" title="{'cl_autosize_marge_basse'|translate}|{'cl_autosize_hlp_line5'|@translate}" > {'cl_autosize_marge_basse'|translate}</td> … … 147 150 </fieldset> 148 151 </table> 152 <!--=================== Bloc choix =============================--> 149 153 <table> 150 154 <tr><td style="visibility:visible">{'cl_autosize_icon_view'|@translate} 151 155 <input type="checkbox" name="check_icon_v" value="on" {$check_icon_v} /> 152 </td><td></td><td></td></tr> 156 </td> 157 <td>{'cl_autosize_desc_view'|@translate} 158 <input type="checkbox" name="check_desc_v" value="on" {$check_desc_v} /> 159 </td> 160 <td> 161 </td> 162 163 </tr> 153 164 </table> 154 165 -
extensions/Autosize/autosize.inc.php
r7262 r7316 114 114 * conflit ============================================= 115 115 */ 116 static public function cl_autosize_script() 117 { 118 global $template,$user,$conf ; 119 120 121 $my_path = dirname(__FILE__).'/'; 116 static public function cl_autosize_script($pictures) 117 { $my_path = dirname(__FILE__).'/'; 118 global $template,$user,$conf ; 122 119 $template->set_filenames( 123 120 array('autosize_cl_init'=> $my_path.'template/cl_conflit.tpl') … … 131 128 ); 132 129 133 return $template->parse( 'autosize_cl_init', false); 134 130 $template->parse( 'autosize_cl_init', false); 131 132 return $pictures; 135 133 136 134 }// function cl_autosize_script … … 232 230 233 231 if ( isset($_POST['submit'] ) && $_POST['submit'] == l10n('cl_autosize_save') ) { 234 235 $autosize_parametres->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : "off" ; 232 $autosize_parametres->check_desc_v = isset($_POST['check_desc_v']) ? $_POST['check_icon_v'] : "off" ; 233 $autosize_parametres->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : "off" ; 234 $autosize_parametres->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : "off" ; 236 235 }else{ 237 $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') ; ; 236 $autosize_parametres->check_desc_v = isset($_POST['check_desc_v']) ? $_POST['check_desc_v'] : ( ( isset($autosize_parametres->check_desc_v) ) ? $autosize_parametres->check_desc_v : 'off') ; 237 $autosize_parametres->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : ( ( isset($autosize_parametres->check_icon_v) ) ? $autosize_parametres->check_icon_v : 'off') ; 238 $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') ; 238 239 } 239 if ( isset($_POST['submit'] ) && $_POST['submit'] == l10n('cl_autosize_save') ) { 240 $autosize_parametres->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : "off" ; 241 }else{ 242 $autosize_parametres->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : ( ( isset($autosize_parametres->check_icon_v) ) ? $autosize_parametres->check_icon_v : 'off') ; ; 243 } 240 241 244 242 return $autosize_parametres; 245 243 } -
extensions/Autosize/include/affiche.php
r7229 r7316 2 2 3 3 $visible=(isset($visible))?$visible:false; 4 5 4 6 5 7 $img_width=isset($picture['current']['width'])?$picture['current']['width']:480; … … 26 28 'check_auto_w' => ($autosize_parametres->check_auto_w == 'on') ? 'checked="checked"' : '' , 27 29 'check_icon_v' => ($autosize_parametres->check_icon_v == 'on') ? 'checked="checked"' : '' , 30 'check_desc_v' => ($autosize_parametres->check_desc_v == 'on') ? 'checked="checked"' : '' , 28 31 'webmaster_width' => $autosize_parametres->webmaster_width, 29 32 'webmaster_height' => $autosize_parametres->webmaster_height, … … 36 39 'normal_width' => $autosize_parametres->normal_width, 37 40 'normal_height' => $autosize_parametres->normal_height, 38 'user_status' => get_user_status($user_status) 41 'user_status' => get_user_status($user_status) 42 39 43 ) 40 44 ); -
extensions/Autosize/js/Affiche_script.js
r7262 r7316 26 26 var user_status = '{$user_status}'; 27 27 var check_auto_w = '{$check_auto_w}'; 28 var check_desc_v = '{$check_desc_v}'; 28 29 */ 29 30 … … 100 101 * 101 102 */ 102 jQuery(document).ready( 103 104 105 function (jQuery) { 106 /* jQuery */ 107 var img_init = { height: img_height, width: img_width }; // taille initiale 108 var img_defaut = { height: scaled_height, width: scaled_width }; 109 var img_reelle = { height: img_height, width: img_width }; 110 var img_finale = { height: 0, width: 0 }; 111 var zone_affichage = { height: 0, width: 0 }; 103 //============================================================ 112 104 /* 113 * recherche la plus grande image (hauteur ou largeur)105 * 114 106 */ 115 116 117 118 119 function Get_Img_Maxi(myobj) { 120 var w00 = 0; 121 var TheImg = null; 122 jQuery(myobj).each(function (i) { 123 w0 = img_reelle.width; 124 h0 = img_reelle.height; 125 if (h0 > w0) w0 = h0; 126 if (w0 > w00) { 127 if (!this.src.match(RegExp(".png", "g"))) 128 if (!this.src.match(RegExp(thumbnail, "g"))) { 129 TheImg = this; 130 w00 = w0; 131 } 107 function Info_entete(Parent) { 108 109 var Info_the_page = jQuery("#the_page").info(); 110 var Zone_Affichage = jQuery("#theImage").info(); 111 var info_theHeader = jQuery("#theHeader").info(); 112 // image top gallycuise :165 113 var info_imageToolBar = jQuery("#imageToolBar").info(); 114 115 if (Zone_Affichage.position =="absolute") { 116 var Bandeau = Zone_Affichage.top - 117 (Info_the_page.top + 118 Get_Val_int(Info_the_page.borderwidth.top) + 119 Get_Val_int(Zone_Affichage.borderwidth.top)); 120 121 Bandeau = Zone_Affichage.top; 122 } else { 123 var Bandeau = Zone_Affichage.top + 124 Get_Val_int(info_imageToolBar.margin.bottom) + 125 Get_Val_int(info_imageToolBar.margin.top) + 126 Info_the_page.top + 127 Get_Val_int(Info_the_page.borderwidth.top) + 128 Get_Val_int(Zone_Affichage.borderwidth.top); 129 } 130 131 var Bandeau_t = Info_the_page.top + 132 Get_Val_int(Info_the_page.borderwidth.top) + 133 Get_Val_int(Zone_Affichage.borderwidth.top); 134 135 return { marge_top: Bandeau_t, img_top: Bandeau }; 132 136 133 137 } 134 }); 135 return TheImg; 138 139 /* Récupère les informations sur la description. 140 * 141 */ 142 function Info_description(Parent) { 143 144 //jQuery("#theImage br").remove(); 145 // jQuery("#theImage br").css("lineHeight", "2px"); 146 var inter_ligne = Get_Val_int(jQuery("#" + Parent + " p").css("lineHeight")); 147 var info_description = jQuery("#" + Parent + " ").info(); 148 jQuery("#" + Parent).css({ marginLeft: "auto", marginRight: "auto" }); 149 var Description = jQuery("#" + Parent + " >*"); 150 151 jQuery(Description).each( 152 153 function (i) { 154 t = jQuery(this).text(); 155 t = jQuery.trim(t); 156 pr = jQuery(this).parent().get(0).id; 157 n = this.nodeName; 158 infos = jQuery(this).info(); 159 160 if (t == "") { 161 if (this.nodeName == "IMG") { 162 info_description.top = infos.bottom - Get_Val_int(infos.margin.top) + inter_ligne; 163 info_description.bottom = infos.bottom + Get_Val_int(infos.margin.bottom); 164 } 165 else if (this.nodeName == "P" || this.nodeName == "BR") { 166 jQuery(this).remove(); 167 } else { 168 // jQuery(this).css("border", "solid 3px GREEN"); 169 info_description.top = infos.bottom - Get_Val_int(infos.margin.top); 170 info_description.bottom = infos.bottom + Get_Val_int(infos.margin.bottom); 171 } 172 } else { 173 174 jQuery(this).css("border", "solid 1px transparent"); 175 info_description.bottom = infos.bottom + Get_Val_int(infos.margin.bottom); 176 } 177 178 179 180 181 }); 182 info_licencetag = jQuery(".licencetag").info(); 183 if (info_licencetag.bottom > info_description.bottom) { 184 jQuery(".licencetag").css("border", "solid 2px transparent"); 185 info_description.bottom = info_licencetag.bottom ; 186 187 } 188 189 if (info_description.top < 1) 190 info_description.top = info_description.bottom; 191 192 193 var Info_the_page = jQuery("#the_page").info(); 194 var Bandeau_t = Info_entete(Parent); 195 196 if (info_description.bottom < info_description.top) 197 info_description.bottom = info_description.top = 1; 198 199 info_description.top += Bandeau_t.marge_top; 200 // info_description.bottom 739 ; 201 // info_description.height 277 ; 202 // info_description.top 465 203 info_description.height = (info_description.bottom + Info_the_page.top) - info_description.top; 204 if (check_desc_v != 'checked="checked"') { 205 info_description.height = 0; 206 } 207 208 return info_description; 209 136 210 } 137 138 139 var init_taille_thumblink = { height: 0, width: 0 };140 if (init_taille_thumblink.height == 0)141 init_taille_thumblink = {142 height: jQuery(".thumbLink").height(),143 width: jQuery(".thumbLink").width()144 };145 //===================================================================146 147 var old_h = 0;148 var rapport = -1;149 150 211 /* 151 212 * Get_val_int … … 210 271 * 211 272 */ 212 213 214 /* 215 * window .resize 216 */ 217 jQuery(window).resize(function (event, ui) { 218 if (typeof (event) == 'undefined') return; 219 if (!cl_visible) return; 220 221 //========================================================================== 222 var winwidth = jQuery(window).width(); 223 var winheight = jQuery(window).height(); 224 if (old_w == winwidth && old_h == winheight) return; 225 226 if (old_w != winwidth) 227 { old_w = winwidth; } 228 else 229 { if (old_h != winheight) old_h = winheight; } 230 //=========================================================================== 231 Cadre = jQuery("#theImage").get(0); 232 var Type_Img = ""; 233 //====== détection du type d'images ====== 234 if (jQuery("#charlie").length > 0) { 235 Type_Img = "charlie"; 236 } else if (jQuery("#pamoorama").length) { 237 Type_Img = "pamoorama"; 238 } else if (jQuery("#theImage embed").length > 0) { 239 Type_Img = "embed"; 240 } else if (jQuery("#map").length) { 241 Type_Img = "map"; 242 } else if (jQuery("#Panorama").length) { 243 Type_Img = "panorama"; 244 } else if (jQuery(Cadre).find("img").length > 0) { 245 Type_Img = "img"; 246 } else if (jQuery("img").length > 0) { 247 Type_Img = "img_autre"; 248 return; 249 } else { 250 return; 251 } 252 253 254 //=============== Information cadre ====== 255 256 var info_Cadre = jQuery(Cadre).info(); 257 258 if (info_Cadre.position != "static") { 259 /* Si LLGBO met le cadre en relative */ 260 if (theme.match(RegExp("gally", "g"))) { 261 //--- passage absolute ==> static ===/ 262 jQuery(Cadre).css("position", "static"); 263 info_Cadre = jQuery(Cadre).info(); 264 265 } 266 } 267 268 jQuery("#imageToolBar").css("position", "relative"); 269 jQuery("#imageHeaderBar").css("position", "relative"); 270 jQuery("#imageToolBar").css("top", 0 + "px"); 271 jQuery("#imageHeaderBar").css("top", "0px"); 272 //============================================================================= 273 var info_HeaderBar = jQuery("#imageHeaderBar").info(); 274 var info_imageInfoBar = jQuery("#imageInfoBar").info(); 275 var info_content = jQuery("#content").info(); 276 var info_ToolBar = jQuery("#imageToolBar").info(); 277 278 var info_titrePage = jQuery("#titrePage").info(); 279 280 var marge_right = 0; 281 var marge_left = 0; 282 if (info_content.width > 100) { 283 var marge_right = Get_Val_int(info_imageInfoBar.margin.left) + Get_Val_int(info_imageInfoBar.margin.right); 284 winwidth = info_content.width; 285 marge_right = info_imageInfoBar.width + marge_right; 286 } 287 else 288 winwidth = info_ToolBar.width - 2; 289 var marge_top = info_ToolBar.top + info_ToolBar.height; 290 291 //====================================================================== 292 293 if (Type_Img == "pamoorama") { 294 var info_pamoorama = jQuery("#pamoorama").info(); 295 var info_pamoorama = jQuery("#pamoorama_outter").info(); 296 var info_pamoorama = jQuery("#pamoorama_inner").info(); 297 298 TheImg = jQuery("#pamoorama"); 299 300 /* 301 pamoorama_outter 302 pamoorama_inner 303 pamoorama_footer 304 pamoorama_caption 305 pamoorama_thumb 306 pamoorama_frame 307 */ 308 } else { 309 //==== récupère Img la plus grande ===== 310 if (jQuery("#theImg")) IMG = "#theImg"; 311 else IMG = Cadre; 312 313 TheImg2 = Get_Img_Maxi(IMG + " img"); 314 //================================================================= 315 if (TheImg2 == null) { 316 if (jQuery(Cadre).find("img").length > 0) { 317 IMG = Cadre; 318 TheImg = Get_Img_Maxi("#theImage img"); 319 } 320 } else { 321 TheImg = TheImg2 //luciano ? 322 323 } 324 } 325 //================================================================= 326 327 328 switch (Type_Img) { 329 case "map": 330 var info_image = jQuery("#map").info(); 331 332 var info_map = jQuery("#mapPicture").info(); 333 334 marge_left = info_map.width; 335 jQuery("#map").css("left", marge_left); 336 337 var TheImg = jQuery("#map").get(0); 338 info_image = jQuery("#map").info(); 339 340 341 pos_page = jQuery("#the_page").info(); 342 ; 343 344 break 345 346 347 case "panorama": 348 349 var w00 = 0; 350 jQuery("#Panorama img").each(function (i) { 351 w0 = this.width; 352 if (w0 > w00) { 353 TheImg = this; 354 n = TheImg.nameProp; 355 w00 = w0; 356 } 357 }); 358 359 pos_image = jQuery(TheImg).info(); 360 pos_page = jQuery("#the_page").info(); 361 362 break 363 case "img": 364 365 if (!TheImg) return; 366 pos_image = jQuery(TheImg).info(); 367 pos_page = jQuery("#the_page").info(); 368 369 370 break 371 case "img_autre": 372 if (!TheImg) return; 373 pos_image = jQuery(TheImg).position(); 374 pos_page = jQuery("#the_page").position(); 375 376 377 break 378 case "embed": 379 // 380 381 var TheImg = jQuery(Cadre).find("embed"); 382 383 pos_image = jQuery(Cadre).position(); 384 pos_page = jQuery("#the_page").position(); 385 if (rapport < 0) { 386 img_height = parseInt(jQuery(TheImg).outerHeight()); 387 img_width = parseInt(jQuery(TheImg).outerWidth()); 388 389 img_reelle.height = img_height; 390 img_reelle.width = img_width; 391 392 } 393 394 break 395 case "charlie": 396 397 var TheImg = jQuery('#charlie object').get(0); 398 pos_image = jQuery(Cadre).position(); 399 pos_page = jQuery("#the_page").position(); 400 if (rapport < 0) { 401 img_height = parseInt(TheImg.height); 402 img_width = parseInt(TheImg.width); 403 404 img_reelle.height = parseInt(TheImg.height); 405 img_reelle.width = parseInt(TheImg.width); 406 } 407 408 break 409 case "pamoorama": 410 //========================================================= 411 var Images = jQuery("#pamoorama img"); 412 var Image = jQuery("#pamoorama").find("img"); 413 414 pos_image = jQuery("#pamoorama").info(); 415 pos_page = jQuery("#the_page").info(); 416 break 417 418 419 } 420 421 //=============== Vérification taille minimale autorizée ====================== 422 miniWidth = Get_Val_int(jQuery(TheImg).css("min-width"), mini_width); 423 miniHeight = Get_Val_int(jQuery(TheImg).css("min-height"), mini_height); 424 425 maxWidth = Get_Val_int(jQuery(TheImg).css("max-width"), winwidth); 426 maxHeight = Get_Val_int(jQuery(TheImg).css("max-height"), winheight); 427 428 mini_width = parseInt(miniWidth); 429 mini_height = parseInt(miniHeight); 430 431 img_reelle.width = parseInt(img_reelle.width); 432 433 434 if (img_reelle.width < mini_width) return; 435 436 img_reelle.height = parseInt(img_reelle.height); 437 if (img_reelle.height < parseInt(mini_height)) return; 438 //================================================================================== 439 if (rapport < 0) { 440 441 img_init.height = parseInt(img_height); 442 img_init.width = parseInt(img_width); 443 444 rapport = img_width / img_height; 445 446 if (Type_Img != "map") 447 rapport = (img_init.width / img_init.height); 448 else 449 rapport = 0; 450 451 } 452 453 454 //=============== Zone d'affichage ============================ 455 borderW = jQuery("#theImage").css("borderWidth"); 456 borderW = Get_Val_int(borderW, 2); 457 458 zone_affichage.width = winwidth - (borderW * 2); 459 zone_affichage.height = winheight - marge_top; 460 461 462 463 //=========================================================================== 464 var sel0 = { top: 0 }; 465 466 467 468 469 if (info_ToolBar.height > 0) { 470 Bandeau = info_ToolBar.bottom; 471 472 } 473 else { 474 475 Bandeau = info_HeaderBar.bottom; 476 } 477 478 479 //================================================================================== 480 jQuery("#theImage #theImg IMG").css("marginTop", "0px") 481 var Lmt = 0; 482 483 var h = 15; 484 if (theme.match(RegExp("sobre", "g"))) { 485 h += 0; //?? 486 } else if (theme.match(RegExp("Pure", "g"))) { 487 h += 0; //?? 488 } else if (theme.match(RegExp("luciano", "g"))) { 489 h += 0; //?? 490 } else if (theme.match(RegExp("simple", "g"))) { 491 h += 0; //?? 492 } else if (theme.match(RegExp("gally", "g"))) { 493 h += 0; //?? 494 495 } 496 497 498 if (Type_Img != "map") { 499 //=============== Description ================ 500 Parent = "theImage"; 501 if (jQuery("#" + Parent + " br").length > 0) { 502 jQuery("#" + Parent + " br").remove(); 503 } 504 //============================================= 505 var Description = jQuery("#" + Parent + " p"); 506 jQuery(Description).each(function (i) { 507 t = jQuery(this).text(); 508 p0 = jQuery(this).parent().get(0); 509 if (p0.id == Parent || p0.nodeName == "TD") { 510 if (jQuery(this).text() == "") 511 jQuery(this).remove(); 512 else { 513 h += 10; 514 h += jQuery(this).info().height; 515 } 516 517 518 } 519 520 }); 521 //================ Licence ======================== 522 523 var Licence = jQuery(".licencetag"); 524 if (Licence.length > 0) { 525 var info_licence = jQuery(".licencetag").info(); 526 h += info_licence.height; 527 jQuery(".licencetag").css("padding", "0px"); 528 jQuery(".licencetag img").css("position", "static"); 529 530 Licence = Licence.parent(); 531 532 533 //==================================================================== 534 535 536 537 } 538 539 540 541 // zone_affichage.height -= h; 542 } 543 544 info_img = jQuery(TheImg).info(); 545 info_licence = jQuery(".licencetag").info(); 546 Lmt = info_licence.top - info_img.bottom 547 var Bandeau_bas = h; 548 549 //========================================================================= 550 img_top = Bandeau; 551 //============ Padding image ? =============== 552 553 img_padding_top = Get_Val_int(info_img.padding.top); 554 img_padding_top += Get_Val_int(info_img.padding.bottom); 555 img_padding_top += Get_Val_int(info_img.borderwidth.top); 556 img_padding_top += Get_Val_int(info_img.borderwidth.bottom); 557 558 margin_top = Get_Val_int(info_Cadre.margin.top); 559 padding_top = Get_Val_int(info_Cadre.padding.top); 560 padding_top += Get_Val_int(info_Cadre.padding.bottom); 561 562 Marge_Basse = parseInt(marge_basse || 0); // hors bandeau 563 //========================================================================== 564 h = 0; 565 zone_affichage.height = winheight - Bandeau - Marge_Basse - h - margin_top - padding_top; 566 var Image_height = zone_affichage.height - Bandeau_bas - img_padding_top; 567 568 //============================================================= 569 var height_user = eval(user_status + "_height"); 570 571 572 var reg1 = new RegExp("%", "g"); 573 if (height_user.match(reg1)) 574 Image_height = Image_height * parseInt(height_user) / 100; 575 else 576 Image_height = parseInt(height_user); 577 578 //============================================================ 579 echelle_max = parseFloat(echelle_max, '3'); 580 var echelle = parseFloat(Image_height / img_reelle.height, 3); 581 582 if (echelle > echelle_max) { echelle = echelle_max; } 583 Image_height = parseInt(img_reelle.height * echelle); 584 585 if (rapport > 0) 586 var Image_width = parseInt(Image_height * rapport); 587 588 else if (Type_Img == "map") { 589 var Image_width = zone_affichage.width - marge_left - marge_right; 590 591 if (theme.match(RegExp("gally", "g"))) { 592 // Image_height -= "30"; 593 } 594 595 } else { 596 var Image_width = zone_affichage.width; 597 } 598 599 600 //=============================================================== 601 align_auto = "center"; 602 if (jQuery("#theImg").css("textAlign")) 603 align_auto = jQuery("#theImg").css("textAlign"); 604 605 if (check_auto_w == 'checked="checked"') { 606 // if (Type_Img != "pamoorama" && Type_Img != "panorama" ) { 607 //==== largeur à atteindre === 608 var width_user = eval(user_status + "_width"); 609 // Largeur maximale en fonction du statut 610 if (width_user.match(reg1)) 611 // pourcentage 612 widthmin = twidth * parseInt(width_user) / 100; 613 else 614 widthmin = parseInt(width_user); 615 616 if (Image_width > widthmin) { 617 // Image_width largeur à atteindre 618 // Calcul du rapport d'agrandissement 619 var echelle_w = parseFloat(widthmin / img_reelle.width, 3); 620 if (echelle_w > echelle_max) { echelle_w = echelle_max; } 621 Image_width = parseInt(img_reelle.width * echelle_w); 622 if (rapport > 0) 623 Image_height = parseInt(Image_width / rapport); 624 } 625 626 627 628 } 629 630 631 // } 632 633 zoom = echelle; 634 635 // zone_affichage.height *= zoom; 636 // zone_affichage.width *= zoom; 637 //=============LLGBO2 =========================== 638 marges = 0; 639 t1 = { top: 0 }; 640 if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) { 641 llgboframe = jQuery("#gbo div:first"); 642 marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").outerWidth(); 643 644 m1 = jQuery(llgboframe).outerHeight(); 645 t1 = jQuery(llgboframe).position(); 646 647 648 if (TheImg.src) { 649 marge_top = t1.top - img_top; 650 Image_height -= marge_top; 651 Image_width = Image_height * rapport; 652 if ((winwidth) < Image_width) { 653 _width = twidth; 654 } else { 655 _width = Image_width; 656 } 657 658 659 jQuery("#gbo").outerWidth(_width); 660 jQuery("#gbo").outerHeight(Image_height); 661 jQuery("#gbo").css("width", (_width) + "px"); 662 jQuery("#gbo").css("height", (Image_height) + "px"); 663 664 Image_height -= marges; 665 Image_width -= marges; 666 667 } else { 668 669 jQuery("#gbo").width(zone_affichage.width - marges); 670 jQuery("#gbo").height(Image_height + marges) 671 jQuery("#gbo").css("width", zone_affichage.width - marges + "px"); 672 jQuery("#gbo").css("height", Image_height - marges + "px") 673 674 } 675 676 677 678 if (jQuery("area").length > 0) { 679 jQuery("area").each(function (i) { 680 681 obj1 = this.rel; 682 obj2 = this.coords; 683 if (obj1 == "up") 684 this.coords = (Image_width / 3) + "," + 0 + "," + (Image_width * 2 / 3) + "," + Image_height; 685 else if (obj1 == "prev") 686 this.coords = 0 + "," + 0 + "," + (Image_width / 3) + "," + Image_height; 687 else if (obj1 == "next") 688 this.coords = (Image_width * 2) / 3 + "," + 0 + "," + (Image_width * 3 / 3) + "," + Image_height; 689 690 }); 691 692 693 694 695 696 697 } 698 699 700 } 701 702 //========================================================= 703 // jQuery(Cadre).css("position", "relative"); 704 705 jQuery(Cadre).css("top", "0px"); 706 jQuery("#standard").css("top", 0 + "px"); 707 jQuery("#comments").css("top", 0 + "px"); 708 709 710 //jQuery("#copyright").css("top", 0 + "px"); 711 712 713 jQuery("#linkNext").height(Image_height); 714 jQuery("#linkPrev").height(Image_height); 715 //================ Zone affichage ========================= 716 // Image_height, Image_width = valeur a atteindre. 717 if (theme.match(RegExp("luciano", "g"))) { 718 zone_affichage.height -= Bandeau_bas; 719 } 720 721 jQuery(Cadre).height(zone_affichage.height); 722 jQuery(Cadre).width(zone_affichage.width); 723 //============================================================== 724 725 img_finale.height = Image_height; 726 img_finale.width = Image_width; 727 //============================================================== 728 729 730 if (Type_Img == "charlie") { 731 t1 = jQuery("#charlie").position(); 732 /**/ 733 pdf = 2 * parseInt(jQuery(".none_2").css("paddingRight")); 734 jQuery("#charlie").css("width", Image_width + pdf); 735 jQuery("#charlie").css("height", Image_height); 736 jQuery("#charlie").css("margin", "auto"); 737 738 739 jQuery("#player").css("width", Image_width + 100 + "px"); 740 jQuery("#player").css("height", Image_height); 741 742 jQuery("#embedplayer").css("width", Image_width); 743 jQuery("#embedplayer").css("height", Image_height); 744 745 746 jQuery("object").width(Image_width); 747 jQuery("object").height(Image_height); 748 } else if (Type_Img == "panorama") { 749 750 // jQuery(TheImg).panorama2(img_finale.height, img_finale.width); 751 jQuery(TheImg).height(img_finale.height); 752 jQuery(TheImg).width(img_finale.width); 753 jQuery("#Panorama div").height(Image_height); 754 // class=simple_panorama 755 756 jQuery(".panorama-viewport").css("left", "2px"); 757 jQuery(".panorama-viewport").css("width", "auto"); 758 // setTimeout("cl_Timer()", 500); 759 760 } else if (Type_Img == "pamoorama") { 761 marge_left += 0; 762 new_width = zone_affichage.width - marge_right - marge_left; 763 jQuery("#pamoorama").css("margin", 0 + "px"); 764 jQuery("#pamoorama").css("left", marge_left + "px"); 765 jQuery("#pamoorama").css("height", Image_height + "px"); 766 767 jQuery("#pamoorama").css("width", new_width + "px"); 768 jQuery("#pamoorama").width(new_width); 769 770 771 jQuery("#pamoorama_outter").css("left", marge_left + "px"); 772 773 jQuery("#pamoorama_outter").css("height", Image_height + "px"); 774 775 jQuery("#pamoorama_outter").css("width", (new_width) + "px"); 776 jQuery("#pamoorama_outter").width(new_width); 777 778 779 jQuery("#pamoorama_footer").width((zone_affichage.width - marge_right - marge_left)); 780 jQuery("#pamoorama_footer").css('width', (zone_affichage.width - marge_right - marge_left) + "px"); 781 zoom = Image_height / img_height; 782 info_pamoorama_outter = jQuery("#pamoorama_outter").info(); 783 784 h_frame = jQuery("#pamoorama").width(); 785 if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) { 786 787 if (info_pamoorama_outter.width == 0) 788 setTimeout("wait_Timer()", 100); 789 // jQuery(TheImg).css("zoom", zoom); 790 } 791 792 793 } else if (TheImg.src) { 794 //--- background ?? --- 795 jQuery(TheImg).height(img_finale.height); 796 jQuery(TheImg).width(img_finale.width); 797 jQuery(TheImg).css("height", img_finale.height + "px"); 798 jQuery(TheImg).css("width", img_finale.width + "px"); 799 800 } else { 801 //===map ? === 802 jQuery(TheImg).height(img_finale.height); 803 jQuery(TheImg).width(img_finale.width); 804 jQuery(TheImg).css("height", img_finale.height + "px"); 805 jQuery(TheImg).css("width", img_finale.width + "px"); 806 } 807 808 809 try { 810 if (theme.match(RegExp("gally", "g"))) { 811 jQuery(".thumbLink").css("height", init_taille_thumblink.height + "px"); 812 jQuery(".thumbLink").css("width", init_taille_thumblink.width + "px"); 813 814 } else { 815 816 jQuery("#imageToolBar").css("position", "static"); 817 } 818 } catch (e) { 819 820 } 821 // 822 if (!pos) pos = jQuery("#copyright").position(); 823 if (pos != jQuery("#copyright").position()) 824 pos = jQuery("#copyright").position(); 825 if (pos.top > 100) jQuery("#the_page").height(pos.top); 826 827 if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) return; 828 jQuery(window).resize(); 829 return; 830 }); 831 var pos; 832 //=================================================================== 833 jQuery(window).resize(); 834 835 836 } // function 837 ); // ready 838 839 /* Extension 840 * absolutize: 841 * relativize: 842 */ 273 jQuery("#pamoorama_iner").bind('resize', function () { 274 wait_Timer(); 275 }) 276 //============================================================//== 277 jQuery("#pamoorama_outter").bind('resize', function () { 278 wait_Timer(); 279 }) 280 281 282 283 //============================================================ 284 jQuery("#iGMapsIcon").bind('resize', function () { 285 jQuery().recentrage_widget(); 286 }) 287 288 289 jQuery(document).ready( 290 function (jQuery) { 291 /* jQuery */ 292 var img_init = { height: img_height, width: img_width }; // taille initiale 293 var img_defaut = { height: scaled_height, width: scaled_width }; 294 var img_reelle = { height: img_height, width: img_width }; 295 var img_finale = { height: 0, width: 0 }; 296 var zone_affichage = { height: 0, width: 0 }; 297 298 //============================================================ 299 300 var Info_the_page = jQuery("#the_page").info(); 301 var Zone_Affichage = jQuery("#theImage").info(); 302 303 var Bandeau = Info_entete("theImage").img_top; 304 305 var Bandeau_bas = Info_description("theImage"); 306 307 var init_taille_thumblink = { height: 0, width: 0 }; 308 if (init_taille_thumblink.height == 0) 309 init_taille_thumblink = { 310 height: jQuery(".thumbLink").height(), 311 width: jQuery(".thumbLink").width() 312 }; 313 //=================================================================== 314 315 var old_h = 0; 316 var rapport = -1; 317 318 319 /* 320 * window .resize 321 */ 322 jQuery(window).resize(function (event, ui) { 323 if (typeof (event) == 'undefined') return; 324 if (!cl_visible) return; 325 326 //========================================================================== 327 var winwidth = jQuery(window).width(); 328 var winheight = jQuery(window).height(); 329 if (old_w == winwidth && old_h == winheight) return; 330 331 332 /* 333 * recherche la plus grande image (hauteur ou largeur) 334 */ 335 336 337 function Get_Img_Maxi(myobj) { 338 var w00 = 0; 339 var TheImg = null; 340 jQuery(myobj).each(function (i) { 341 w0 = img_reelle.width; 342 h0 = img_reelle.height; 343 if (h0 > w0) w0 = h0; 344 if (w0 > w00) { 345 if (!this.src.match(RegExp(".png", "g"))) 346 if (!this.src.match(RegExp(thumbnail, "g"))) { 347 TheImg = this; 348 w00 = w0; 349 } 350 351 } 352 }); 353 return TheImg; 354 } 355 356 if (old_w != winwidth) 357 { old_w = winwidth; } 358 else 359 { if (old_h != winheight) old_h = winheight; } 360 //=========================================================================== 361 362 363 Cadre = jQuery("#theImage").get(0); 364 365 //=============== Information cadre ====== 366 var info_the_page = jQuery("#the_page").info(); 367 368 //============================================================================= 369 var info_HeaderBar = jQuery("#imageHeaderBar").info(); 370 var info_imageInfoBar = jQuery("#imageInfoBar").info(); 371 var info_content = jQuery("#content").info(); 372 var info_ToolBar = jQuery("#imageToolBar").info(); 373 374 var info_titrePage = jQuery("#titrePage").info(); 375 376 var info_the_page = jQuery("#the_page").info(); 377 var zone_affichage = jQuery("#theImage").info(); 378 379 380 var Type_Img = ""; 381 //====== détection du type d'images ====== 382 if (jQuery("#charlie").length > 0) { 383 Type_Img = "charlie"; 384 } else if (jQuery("#pamoorama").length) { 385 Type_Img = "pamoorama"; 386 } else if (jQuery("#theImage embed").length > 0) { 387 Type_Img = "embed"; 388 } else if (jQuery("#map").length) { 389 Type_Img = "map"; 390 } else if (jQuery("#Panorama").length) { 391 Type_Img = "panorama"; 392 } else if (jQuery(Cadre).find("img").length > 0) { 393 Type_Img = "img"; 394 } else if (jQuery("img").length > 0) { 395 Type_Img = "img_autre"; 396 return; 397 } else { 398 return; 399 } 400 401 402 403 var info_Cadre = jQuery(Cadre).info(); 404 405 406 if (info_Cadre.position != "static") { 407 /* Si LLGBO met le cadre en relative */ 408 if (theme.match(RegExp("gally", "g"))) { 409 //--- passage absolute ==> static ===/ 410 jQuery(Cadre).css("position", "static"); 411 info_Cadre = jQuery(Cadre).info(); 412 413 } 414 } 415 416 jQuery("#imageToolBar").css("position", "relative"); 417 jQuery("#imageHeaderBar").css("position", "relative"); 418 jQuery("#imageToolBar").css("top", 0 + "px"); 419 jQuery("#imageHeaderBar").css("top", "0px"); 420 421 422 var marge_right = 0; 423 var marge_left = 0; 424 if (info_content.width > 100) { 425 marge_right = Get_Val_int(info_imageInfoBar.margin.left) + Get_Val_int(info_imageInfoBar.margin.right); 426 winwidth = info_content.width; 427 marge_right = info_imageInfoBar.width + marge_right; 428 } 429 else 430 winwidth = info_ToolBar.width - 2; 431 432 // var marge_top = info_ToolBar.top + info_ToolBar.height; 433 434 //====================================================================== 435 info_theHeader = jQuery("#theHeader").info(); 436 // var marge_top =info_theHeader.bottom + info_HeaderBar.height+ info_ToolBar.height; //145 437 var marge_top = info_HeaderBar.bottom + info_ToolBar.height; //145 438 if (Type_Img == "pamoorama") { 439 var info_pamoorama = jQuery("#pamoorama").info(); 440 var info_pamoorama_outter = jQuery("#pamoorama_outter").info(); 441 var info_pamoorama_inner = jQuery("#pamoorama_inner").info(); 442 var info_pamoorama_footer = jQuery("#pamoorama_footer").info(); 443 TheImg = jQuery("#pamoorama"); 444 445 /* 446 pamoorama_outter 447 pamoorama_inner 448 pamoorama_footer 449 pamoorama_caption 450 pamoorama_thumb 451 pamoorama_frame 452 */ 453 } else { 454 //==== récupère Img la plus grande ===== 455 if (jQuery("#theImg")) IMG = "#theImg"; 456 else IMG = Cadre; 457 458 TheImg2 = Get_Img_Maxi(IMG + " img"); 459 //================================================================= 460 if (TheImg2 == null) { 461 if (jQuery(Cadre).find("img").length > 0) { 462 IMG = Cadre; 463 TheImg = Get_Img_Maxi("#theImage img"); 464 } 465 } else { 466 TheImg = TheImg2 //luciano ? 467 468 } 469 } 470 //================================================================= 471 472 473 switch (Type_Img) { 474 case "map": 475 var info_image = jQuery("#map").info(); 476 477 var info_map = jQuery("#mapPicture").info(); 478 479 marge_left = info_map.width; 480 jQuery("#map").css("left", marge_left); 481 482 var TheImg = jQuery("#map").get(0); 483 info_image = jQuery("#map").info(); 484 485 486 pos_page = jQuery("#the_page").info(); 487 ; 488 489 break 490 491 492 case "panorama": 493 494 var w00 = 0; 495 jQuery("#Panorama img").each(function (i) { 496 w0 = this.width; 497 if (w0 > w00) { 498 TheImg = this; 499 n = TheImg.nameProp; 500 w00 = w0; 501 } 502 }); 503 504 pos_image = jQuery(TheImg).info(); 505 pos_page = jQuery("#the_page").info(); 506 507 break 508 case "img": 509 510 if (!TheImg) return; 511 pos_image = jQuery(TheImg).info(); 512 pos_page = jQuery("#the_page").info(); 513 514 515 break 516 case "img_autre": 517 if (!TheImg) return; 518 pos_image = jQuery(TheImg).position(); 519 pos_page = jQuery("#the_page").position(); 520 521 522 break 523 case "embed": 524 // 525 526 TheImg = jQuery(Cadre).find("embed"); 527 528 pos_image = jQuery(Cadre).position(); 529 pos_page = jQuery("#the_page").position(); 530 if (rapport < 0) { 531 img_height = parseInt(jQuery(TheImg).outerHeight()); 532 img_width = parseInt(jQuery(TheImg).outerWidth()); 533 534 img_reelle.height = img_height; 535 img_reelle.width = img_width; 536 537 } 538 539 break 540 case "charlie": 541 542 TheImg = jQuery('#charlie object').get(0); 543 pos_image = jQuery(Cadre).position(); 544 pos_page = jQuery("#the_page").position(); 545 if (rapport < 0) { 546 img_height = parseInt(TheImg.height); 547 img_width = parseInt(TheImg.width); 548 549 img_reelle.height = parseInt(TheImg.height); 550 img_reelle.width = parseInt(TheImg.width); 551 } 552 553 break 554 case "pamoorama": 555 //========================================================= 556 var Images = jQuery("#pamoorama img"); 557 var Image = jQuery("#pamoorama").find("img"); 558 559 pos_image = jQuery("#pamoorama").info(); 560 pos_page = jQuery("#the_page").info(); 561 break 562 563 564 } 565 566 //=============== Vérification taille minimale autorizée ====================== 567 miniWidth = Get_Val_int(jQuery(TheImg).css("min-width"), mini_width); 568 miniHeight = Get_Val_int(jQuery(TheImg).css("min-height"), mini_height); 569 570 571 maxWidth = Get_Val_int(jQuery(TheImg).css("max-width"), winwidth); 572 maxHeight = Get_Val_int(jQuery(TheImg).css("max-height"), winheight); 573 574 mini_width = parseInt(miniWidth); 575 mini_height = parseInt(miniHeight); 576 577 img_reelle.width = parseInt(img_reelle.width); 578 579 580 if (img_reelle.width < mini_width) return; 581 582 img_reelle.height = parseInt(img_reelle.height); 583 if (img_reelle.height < parseInt(mini_height)) return; 584 //================================================================================== 585 if (rapport < 0) { 586 587 img_init.height = parseInt(img_height); 588 img_init.width = parseInt(img_width); 589 590 rapport = img_width / img_height; 591 592 if (Type_Img != "map") 593 rapport = (img_init.width / img_init.height); 594 else 595 rapport = 0; 596 597 } 598 599 600 //=============== Zone d'affichage ============================ 601 602 borderW = Get_Val_int(zone_affichage.borderwidth.left, 2); 603 borderW += Get_Val_int(zone_affichage.borderwidth.right, 2); 604 605 606 zone_affichage.width = winwidth - borderW; 607 zone_affichage.height = winheight - marge_top; 608 609 610 611 //=========================================================================== 612 var sel0 = { top: 0 }; 613 614 615 616 617 618 //================================================================================== 619 jQuery("#theImage #theImg IMG").css("marginTop", "0px") 620 621 var h = 15; 622 if (theme.match(RegExp("sobre", "g"))) { 623 h += 0; //?? 624 } else if (theme.match(RegExp("Pure", "g"))) { 625 h += 0; //?? 626 } else if (theme.match(RegExp("luciano", "g"))) { 627 h += 0; //?? 628 } else if (theme.match(RegExp("simple", "g"))) { 629 h += 0; //?? 630 } else if (theme.match(RegExp("gally", "g"))) { 631 h += 0; //?? 632 633 } 634 //================ Licence ======================== 635 var Licence = jQuery(".licencetag"); 636 if (Licence.length > 0) { 637 jQuery(".licencetag").css("padding", "0px"); 638 639 } 640 //==================================================== 641 info_img = jQuery(TheImg).info(); 642 643 644 //========================================================================= 645 img_top = Bandeau; 646 //============ Padding image ? =============== 647 648 img_padding_top = Get_Val_int(info_img.padding.top); 649 img_padding_top += Get_Val_int(info_img.padding.bottom); 650 img_padding_top += Get_Val_int(info_img.borderwidth.top); 651 img_padding_top += Get_Val_int(info_img.borderwidth.bottom); 652 653 margin_top = Get_Val_int(info_Cadre.margin.top); 654 padding_top = Get_Val_int(info_Cadre.padding.top); 655 padding_top += Get_Val_int(info_Cadre.padding.bottom); 656 657 Marge_Basse = parseInt(marge_basse || 0); // hors bandeau 658 //========================================================================== 659 h = 0; 660 zone_affichage.height = winheight - Bandeau - Marge_Basse - h - margin_top - padding_top; 661 var Image_height = zone_affichage.height - Bandeau_bas.height - img_padding_top; 662 var Delta = zone_affichage.height - Image_height; 663 664 //============================================================= 665 var height_user = eval(user_status + "_height"); 666 667 668 var reg1 = new RegExp("%", "g"); 669 if (height_user.match(reg1)) 670 Image_height = Image_height * parseInt(height_user) / 100; 671 else 672 Image_height = parseInt(height_user); 673 674 //============================================================ 675 echelle_max = parseFloat(echelle_max, '3'); 676 var echelle = parseFloat(Image_height / img_reelle.height, 3); 677 678 if (echelle > echelle_max) { echelle = echelle_max; } 679 Image_height = parseInt(img_reelle.height * echelle); 680 681 var Image_width; 682 if (rapport > 0) 683 Image_width = parseInt(Image_height * rapport); 684 685 else if (Type_Img == "map") { 686 Image_width = zone_affichage.width - marge_left - marge_right; 687 688 if (theme.match(RegExp("gally", "g"))) { 689 // Image_height -= "30"; 690 } 691 692 } else { 693 Image_width = zone_affichage.width; 694 } 695 696 //=============================================================== 697 align_auto = "center"; 698 if (jQuery("#theImg").css("textAlign")) 699 align_auto = jQuery("#theImg").css("textAlign"); 700 701 if (check_auto_w == 'checked="checked"') { 702 // if (Type_Img != "pamoorama" && Type_Img != "panorama" ) { 703 //==== largeur à atteindre === 704 var width_user = eval(user_status + "_width"); 705 // Largeur maximale en fonction du statut 706 if (width_user.match(reg1)) 707 // pourcentage 708 widthmin = maxWidth * parseInt(width_user) / 100; 709 else 710 widthmin = parseInt(width_user); 711 712 if (Image_width > widthmin) { 713 // Image_width largeur à atteindre 714 // Calcul du rapport d'agrandissement 715 var echelle_w = parseFloat(widthmin / img_reelle.width, 3); 716 if (echelle_w > echelle_max) { echelle_w = echelle_max; } 717 Image_width = parseInt(img_reelle.width * echelle_w); 718 if (rapport > 0) 719 Image_height = parseInt(Image_width / rapport); 720 } 721 722 723 724 } 725 726 727 // } 728 729 // zone_affichage.height = Image_height + Delta + info_pamoorama_footer.height; 730 731 zoom = echelle; 732 733 // zone_affichage.height *= zoom; 734 // zone_affichage.width *= zoom; 735 //=============LLGBO2 =========================== 736 marges = 0; 737 t1 = { top: 0 }; 738 if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) { 739 llgboframe = jQuery("#gbo div:first"); 740 marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").outerWidth(); 741 742 m1 = jQuery(llgboframe).outerHeight(); 743 t1 = jQuery(llgboframe).position(); 744 745 746 if (TheImg.src) { 747 marge_top = t1.top - img_top; 748 Image_height -= marge_top; 749 Image_width = Image_height * rapport; 750 if ((winwidth) < Image_width) { 751 _width = maxWidth; 752 } else { 753 _width = Image_width; 754 } 755 756 757 jQuery("#gbo").outerWidth(_width); 758 jQuery("#gbo").outerHeight(Image_height); 759 jQuery("#gbo").css("width", (_width) + "px"); 760 jQuery("#gbo").css("height", (Image_height) + "px"); 761 762 Image_height -= marges; 763 Image_width -= marges; 764 765 } else { 766 767 jQuery("#gbo").width(zone_affichage.width - marges); 768 jQuery("#gbo").height(Image_height + marges) 769 jQuery("#gbo").css("width", zone_affichage.width - marges + "px"); 770 jQuery("#gbo").css("height", Image_height - marges + "px") 771 772 } 773 774 775 776 if (jQuery("area").length > 0) { 777 jQuery("area").each(function (i) { 778 779 obj1 = this.rel; 780 obj2 = this.coords; 781 if (obj1 == "up") 782 this.coords = (Image_width / 3) + "," + 0 + "," + (Image_width * 2 / 3) + "," + Image_height; 783 else if (obj1 == "prev") 784 this.coords = 0 + "," + 0 + "," + (Image_width / 3) + "," + Image_height; 785 else if (obj1 == "next") 786 this.coords = (Image_width * 2) / 3 + "," + 0 + "," + (Image_width * 3 / 3) + "," + Image_height; 787 788 }); 789 790 791 792 793 794 795 } 796 797 798 } 799 800 //========================================================= 801 // jQuery(Cadre).css("position", "relative"); 802 803 jQuery(Cadre).css("top", "0px"); 804 jQuery("#standard").css("top", 0 + "px"); 805 jQuery("#comments").css("top", 0 + "px"); 806 807 808 //jQuery("#copyright").css("top", 0 + "px"); 809 810 811 jQuery("#linkNext").height(Image_height); 812 jQuery("#linkPrev").height(Image_height); 813 //================ Zone affichage ========================= 814 // Image_height, Image_width = valeur a atteindre. 815 if (theme.match(RegExp("luciano", "g"))) { 816 zone_affichage.height -= Bandeau_bas; 817 } 818 819 // jQuery(Cadre).height(zone_affichage.height); 820 // jQuery(Cadre).height(mb-zone_affichage.top); 821 jQuery(Cadre).width(zone_affichage.width); 822 //============================================================== 823 824 img_finale.height = Image_height; 825 img_finale.width = Image_width; 826 //============================================================== 827 828 if (typeof (gmaps) != "undefined") { 829 Gmap_ = gmaps.maps[0]; 830 if (Gmap_.sizeMode == 'A'); 831 { 832 jQuery("#iGMapsIcon").css({ width: old_w * 0.8 + "px", height: old_h * 0.8 + "px" }); 833 834 } 835 } 836 //============================================================== 837 if (Type_Img == "charlie") { 838 t1 = jQuery("#charlie").position(); 839 /**/ 840 pdf = 2 * parseInt(jQuery(".none_2").css("paddingRight")); 841 jQuery("#charlie").css({ 842 width: Image_width + pdf, 843 height: Image_height, 844 margin: "auto" 845 }); 846 847 848 jQuery("#player").css("width", Image_width + 100 + "px"); 849 jQuery("#player").css("height", Image_height); 850 851 jQuery("#embedplayer").css("width", Image_width); 852 jQuery("#embedplayer").css("height", Image_height); 853 854 855 jQuery("object").width(Image_width); 856 jQuery("object").height(Image_height); 857 } else if (Type_Img == "panorama") { 858 859 // jQuery(TheImg).panorama2(img_finale.height, img_finale.width); 860 jQuery(TheImg).height(img_finale.height); 861 jQuery(TheImg).width(img_finale.width); 862 jQuery("#Panorama div").height(Image_height); 863 // class=simple_panorama 864 865 jQuery(".panorama-viewport").css("left", "2px"); 866 jQuery(".panorama-viewport").css("width", "auto"); 867 // setTimeout("cl_Timer()", 500); 868 869 } else if (Type_Img == "pamoorama") { 870 return; 871 marge_left += 0; 872 new_width = zone_affichage.width - marge_right - marge_left; 873 jQuery("#pamoorama").css({ margin: 0 + "px", 874 left: marge_left + "px", 875 height: Image_height + info_pamoorama_footer.height + "px", 876 width: new_width + "px" 877 }); 878 879 jQuery("#pamoorama").width(new_width); 880 881 882 jQuery("#pamoorama_outter").css({ 883 left: marge_left + "px", 884 height: Image_height + "px", 885 width: (new_width) + "px" 886 }); 887 jQuery("#pamoorama_outter").width(new_width); 888 889 890 jQuery("#pamoorama_footer").width((zone_affichage.width - marge_right - marge_left)); 891 jQuery("#pamoorama_footer").css('width', (zone_affichage.width - marge_right - marge_left) + "px"); 892 zoom = Image_height / img_height; 893 info_pamoorama_outter = jQuery("#pamoorama_outter").info(); 894 895 h_frame = jQuery("#pamoorama").width(); 896 if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) { 897 898 /* if (info_pamoorama_outter.width == 0) 899 setTimeout("wait_Timer()", 100); 900 */ 901 // jQuery(TheImg).css("zoom", zoom); 902 } 903 904 905 } else if (TheImg.src) { 906 //--- background ?? --- 907 jQuery(TheImg).height(img_finale.height); 908 jQuery(TheImg).width(img_finale.width); 909 jQuery(TheImg).css("height", img_finale.height + "px"); 910 jQuery(TheImg).css("width", img_finale.width + "px"); 911 912 } else { 913 //===map ? === 914 jQuery(TheImg).height(img_finale.height); 915 jQuery(TheImg).width(img_finale.width); 916 jQuery(TheImg).css("height", img_finale.height + "px"); 917 jQuery(TheImg).css("width", img_finale.width + "px"); 918 } 919 920 921 try { 922 if (theme.match(RegExp("gally", "g"))) { 923 924 jQuery("#navThumbNext").height(init_taille_thumblink.height*2); 925 jQuery("#navThumbPrev").height(init_taille_thumblink.height*2); 926 927 jQuery(".thumbLink").css("height", init_taille_thumblink.height + "px"); 928 jQuery(".thumbLink").css("width", init_taille_thumblink.width + "px"); 929 930 jQuery(Cadre).height(zone_affichage.height); 931 932 } else { 933 934 jQuery("#imageToolBar").css("position", "static"); 935 } 936 } catch (e) { 937 938 } 939 // 940 if (!pos) pos = jQuery("#copyright").position(); 941 if (pos != jQuery("#copyright").position()) 942 pos = jQuery("#copyright").position(); 943 if (pos.top > 100) jQuery("#the_page").height(pos.top); 944 945 if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) return; 946 jQuery(window).resize(); 947 return; 948 }); 949 var pos; 950 //=================================================================== 951 jQuery(window).resize(); 952 953 954 } // function 955 ); // ready 956 /* 957 * 958 */ 959 jQuery.extend(jQuery.expr[':'], { 960 // Nom du sélecteur personnalisé 961 Description: function (a) { 962 n = jQuery(a).info(); 963 return a; 964 965 } 966 }); 967 968 /* Extension 969 * absolutize: 970 * relativize: 971 */ 843 972 //========================================================= 844 973 jQuery.fn.extend({ -
extensions/Autosize/js/conflit.js
r7262 r7316 2 2 var d1 = 0; 3 3 var init_tb = 0; 4 4 5 5 function $(element, nc) { 6 6 //============== détection framework ================== … … 45 45 var jq = jQuery(element).selector; 46 46 var new_element = jQuery(element); 47 48 if (Prototype_Version == "0" && MooTools_version == "0") { 49 if (jq == "#iGMapsIconContent") { 50 47 //div.gmapsPopup div.ui-dialog-titlebar 48 if (jq.match(/GMaps/) || jq.match(/gmaps/)) { 49 if (jq == "#iGMapsIconContent") { 51 50 setTimeout('jQuery().recentrage_widget()', 0); 52 return new_element;53 54 51 } 55 return new_element; 52 if (new_element.length > 0) return new_element; 53 return new_element; 54 } 55 if (Prototype_Version == "0" && MooTools_version == "0") { 56 return new_element; 56 57 } 57 58 //======================================================================================= 58 if (arguments.caller && arguments.caller.length >0) {59 if (arguments.caller && arguments.caller.length > 0) { 59 60 if (arguments.caller.length > 1) { 60 61 if (element == "pamoorama") { 61 return jQuery().$Pamoorama(element) 62 return jQuery().$Pamoorama(element); 62 63 } 63 64 //=========== options rv_maps prototype.js ===================================65 64 arg = arguments.caller[1]; 66 if (Prototype_Version != '0') 67 switch (arg) { 68 case "dom:loaded": 69 return element; 70 return jQuery().$Protype(element); 71 break; 72 case "load": 73 return jQuery().$Protype(element); 74 break; 75 case "unload": 76 return jQuery().$Protype(element); 77 break; 78 case "prototype_event_registry": 79 80 try { 81 new_element = jQuery().$Protype(element); 82 } catch (e) { 83 new_element = null; 65 if (typeof (arg) != "undefined" && typeof (arg) != undefined) { 66 //=========== options rv_maps prototype.js =================================== 67 68 if (Prototype_Version != '0') 69 switch (arg) { 70 case "dom:loaded": 71 return element; 72 return jQuery().$Protype(element); 73 break; 74 case "load": 75 return jQuery().$Protype(element); 76 break; 77 case "unload": 78 return jQuery().$Protype(element); 79 break; 80 case "prototype_event_registry": 81 82 try { 83 new_element = jQuery().$Protype(element); 84 } catch (e) { 85 new_element = null; 86 } 87 88 89 return new_element; 90 break; 91 case "readystatechange": 92 try { 93 new_element = jQuery().$Protype(element); 94 } catch (e) { 95 new_element = null; 96 } 97 98 return new_element; 99 break; 100 } 101 102 if (MooTools_version == 'pamoorama' && typeof (arg) != undefined) 103 //=========== options pamoorama =================================== 104 { 105 var reg1 = new RegExp("pamoorama", "g"); 106 switch (arg) { 107 case "bottom": 108 return jQuery().$Pamoorama(element); 109 break; 110 case "left": 111 return jQuery().$Pamoorama(element); 112 break; 113 case "prototype_event_registry": 114 return jQuery().$Pamoorama(element); 115 break; 116 case "readystatechange": 117 return jQuery().$Pamoorama(element); 118 break; 119 120 default: 121 if (arg.area) { 122 return jQuery().$Pamoorama(element); 123 } else 124 if (arg.velocity) { 125 return jQuery().$Pamoorama(element); 126 } else if (arg.src) { 127 return jQuery().$Pamoorama(element); 128 } else if (arg.modifiers) { 129 return jQuery().$Pamoorama(element); 130 } else if (arg.limit) { 131 return jQuery().$Pamoorama(element); 132 } else if (arg.duration) { 133 return jQuery().$Pamoorama(element); 134 } else if (arg.id) { 135 switch (arg.id) { 136 case "pamoorama_footer": 137 return jQuery().$Pamoorama(element); 138 break; 139 case "pamoorama_outter": 140 return jQuery().$Pamoorama(element); 141 break; 142 case "pamoorama_inner": 143 return jQuery().$Pamoorama(element); 144 break; 145 146 default: 147 return jQuery().$Pamoorama(element); 148 break; 149 150 } 151 } else if (arg.src) { 152 return jQuery().$Pamoorama(element); 153 154 } 155 //======================================================= 156 return new_element; 157 break; 158 84 159 } 85 86 87 return new_element; 88 break; 89 case "readystatechange": 90 try { 91 new_element = jQuery().$Protype(element); 92 } catch (e) { 93 new_element = null; 94 } 95 96 return new_element; 97 break; 160 } else if (MooTools_version == 'Luciano') { //=========== options luciano =================================== 161 //=== theme Luciano ==== 162 return ret_Luciano; 163 } 164 98 165 } 99 100 if (MooTools_version == 'pamoorama')101 //=========== options pamoorama ===================================102 {103 var reg1 = new RegExp("pamoorama", "g");104 switch (arg) {105 case "bottom":106 return jQuery().$Pamoorama(element) ;107 break;108 case "left":109 return jQuery().$Pamoorama(element) ;110 break;111 case "prototype_event_registry":112 return jQuery().$Pamoorama(element) ;113 break;114 case "readystatechange":115 return jQuery().$Pamoorama(element);116 break;117 118 default:119 if (arg.area) {120 return jQuery().$Pamoorama(element);121 } else122 if (arg.velocity) {123 return jQuery().$Pamoorama(element);124 } else if (arg.src) {125 return jQuery().$Pamoorama(element);126 } else if (arg.modifiers) {127 return jQuery().$Pamoorama(element);128 } else if (arg.limit) {129 return jQuery().$Pamoorama(element);130 } else if (arg.duration) {131 return jQuery().$Pamoorama(element);132 } else if (arg.id) {133 switch (arg.id) {134 case "pamoorama_footer":135 return jQuery().$Pamoorama(element);136 break;137 case "pamoorama_outter":138 return jQuery().$Pamoorama(element);139 break;140 case "pamoorama_inner":141 return jQuery().$Pamoorama(element);142 break;143 144 default:145 return jQuery().$Pamoorama(element);146 break;147 148 }149 } else if (arg.src) {150 return jQuery().$Pamoorama(element);151 152 }153 //=======================================================154 return new_element;155 break;156 157 }158 }else if (MooTools_version=='Luciano')159 { //=========== options luciano ===================================160 //=== theme Luciano ====161 return ret_Luciano;162 }163 166 } 164 167 } … … 174 177 } 175 178 id = "window_" + new Date().getTime(); 176 varreg1 = new RegExp("^window_", "g");179 reg1 = new RegExp("^window_", "g"); 177 180 if (element.match(reg1, "g")) { 178 181 … … 262 265 return new_element; 263 266 } 264 //========= =================================================267 //========= ???? =================== 265 268 if (new_element.context) 266 269 if (new_element.context.loaded) { … … 268 271 if (MooTools_version == "Luciano") return ret_Luciano; 269 272 //=== theme gally ? ==== 270 271 return new_element; 273 if (Prototype_Version != '0') { 274 //=== rvmaps === 275 try { 276 return jQuery(element); 277 } catch (e) { 278 return jQuery().$Protype(element); 279 } 280 } 272 281 } 273 282 init_tb = 0; -
extensions/Autosize/language/en_UK/lang.php
r7229 r7316 1 1 <?php 2 2 global $lang; 3 $lang['cl_autosize_desc_view'] = "Inclure la description et la licence dans le calcul"; 3 4 $lang['cl_autosize_icon_view'] = "Show an icon in the toolbar"; 4 5 $lang['cl_autosize_info_2'] = "No resizing Display."; -
extensions/Autosize/language/fr_FR/lang.php
r7229 r7316 1 1 <?php 2 2 global $lang; 3 $lang['cl_autosize_desc_view'] = "Inclure la description et la licence dans le calcul"; 3 4 $lang['cl_autosize_icon_view'] = "Affiche une icône dans la barre d'outils"; 4 5 $lang['cl_autosize_info'] = "Permet d'ajuster automatiquement l'affichage en fonction de la fenêtre de l'explorateur."; -
extensions/Autosize/main.inc.php
r7262 r7316 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.2. 24 Version: 1.2.3 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 … … 16 16 17 17 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin') ); 18 add_event_handler('load_profile_in_template', array(&$autosize_controler,'cl_autosize_script'),50 );19 18 20 //add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 95 ); 19 //add_event_handler('loc_begin_page_header', array(&$autosize_controler,'cl_autosize_script'),20 ); 20 //add_event_handler('loc_begin_picture', array(&$autosize_controler,'cl_autosize_script'),20 ); 21 add_event_handler('loc_begin_page_tail', array(&$autosize_controler,'cl_autosize_script'),100 ); 22 23 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 95 ); 21 24 //add_event_handler('amd_jpegMD_loaded', array(&$autosize_controler, 'cl_autosize_affiche'),45); 22 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 100 );25 //add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 100 ); 23 26 24 27 ?> -
extensions/Autosize/template/autosize.tpl
r7193 r7316 34 34 var user_status = '{$user_status}'; 35 35 var check_auto_w = '{$check_auto_w}'; 36 var check_desc_v = '{$check_desc_v}'; 36 37 </script> 37 38 -
extensions/Autosize/template/cl_conflit.tpl
r7193 r7316 1 2 1 {html_head} 3 <!--- autosize/cl_confilt.tpl (head) --->4 5 <script type="text/javascript">6 7 </script>8 <!---FIN auto/cl_confilt.tpl --->9 10 11 2 <!--- autosize/cl_confilt.tpl (before) ---> 12 3 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" } 13 4 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"} 14 5 <!---FIN auto/cl_confilt.tpl (before) ---> 15 {/html_head} 16 17 18 6 {/html_head}
Note: See TracChangeset
for help on using the changeset viewer.