Changeset 7962 for extensions/Autosize
- Timestamp:
- Dec 1, 2010, 10:19:47 AM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/admin/template/admin.tpl
r7931 r7962 14 14 var echelle_max = '{ $ECHELLE_MAX }'; 15 15 var mini_width = '{ $MINI_WIDTH }'; 16 var mini_height = '{ $MINI_HEIGHT }'; 17 16 var mini_height = '{ $MINI_HEIGHT }'; 17 var mini_width2 = '{ $MINI_WIDTH2 }'; 18 var mini_height2 = '{ $MINI_HEIGHT2 }'; 18 19 var webmaster_width = '{$webmaster_width }'; 19 20 var webmaster_height = '{ $webmaster_height }'; … … 129 130 <fieldset> 130 131 <legend class="cluetip" title="{'cl_autosize_config_title_2'|@translate}|{'cl_autosize_hlp_line2'|@translate}">{'cl_autosize_config_title_2'|@translate}</legend> 131 132 132 133 <!--======== Dimensions HL ===================--> 133 134 <tr> … … 139 140 <td > 140 141 <input name="mini_width" id="mini_width" type="text" value = "{$MINI_WIDTH}" /> px 142 </tr> 143 <!--======== Dimensions HL2 ===================--> 144 <tr> 145 <td class="cluetip" title="{'cl_autosize_miniheight2'|@translate}|{'cl_autosize_hlp_line32'|@translate}" >{'cl_autosize_miniheight2'|translate}</td> 146 <td ><input name="mini_height2" id="Text2" type="text" value ="{$MINI_HEIGHT2}" /> px 147 </td> 148 149 <td class="cluetip" title="{'cl_autosize_miniwidth2'|translate}|{'cl_autosize_hlp_line32'|@translate}" > {'cl_autosize_miniwidth2'|translate}</td> 150 <td > 151 <input name="mini_width2" id="Text4" type="text" value = "{$MINI_WIDTH2}" /> px 141 152 </tr> 142 153 <!--======== Positions ===================--> -
extensions/Autosize/autosize.inc.php
r7943 r7962 143 143 if ( !empty($content) ) { return $content; } 144 144 if ($ThePicture['is_picture'] <> 1 ) { return $content; ; } 145 146 $autosizejs = '<script type="text/javascript" id="jquery" charset="utf-8" src="';145 $autosizejs ='<!--- cl_autosize_script_3 -->'; 146 $autosizejs = $autosizejs.'<script type="text/javascript" id="jquery" charset="utf-8" src="'; 147 147 $autocss = $autosizejs.'themes/default/js/jquery.packed.js"></script>'."\n"; 148 148 $template->append('head_elements',$autocss); … … 188 188 //============================================================ 189 189 /* 190 * 190 * cl_autosize_script 191 191 */ 192 192 static public function cl_autosize_script() 193 193 { 194 194 global $template,$user,$conf,$picture ,$page, $cl_plugin ; 195 195 196 $my_path = basename(dirname(__FILE__)).'/' ; 196 197 $my_path = dirname(__FILE__).'/'; 197 198 $template->set_filenames(array('autosize_init'=>$my_path. "template/conflit.tpl" ) ); 198 199 $debug = isset($conf['debug']) ? $conf['debug'] : false ; 199 200 $autosize_parametres = cl_autosize_Get_Options() ; 200 201 $theme=$user['theme']; 201 202 202 203 $template->assign( 203 204 array( 205 'cl_conflit_parametres' => $cl_conflit_parametres , 206 'cl_plugins' => $cl_plugin , 204 207 'cl_version' => $cl_plugin['version'] , 205 208 'name' => $cl_plugin['name'] , … … 271 274 global $autosize_parametres; 272 275 //============================================================================= 273 $autosize_parametres->webmaster_height =(isset($_POST['webmaster_height'])) ? $_POST['webmaster_height'] : ((isset($autosize_parametres->webmaster_height )) ? $autosize_parametres->webmaster_height : '100%' ) ; 274 $autosize_parametres->webmaster_width=(isset($_POST['webmaster_width']))? $_POST['webmaster_width']: ((isset($autosize_parametres->webmaster_width)) ? $autosize_parametres->webmaster_width: '90%') ; 275 276 $autosize_parametres->admin_height =(isset($_POST['admin_height'])) ? $_POST['admin_height'] : ((isset($autosize_parametres->admin_height )) ? $autosize_parametres->admin_height : '90%' ) ; 277 $autosize_parametres->admin_width=(isset($_POST['admin_width']))? $_POST['admin_width']: ((isset($autosize_parametres->admin_width)) ? $autosize_parametres->admin_width: '90%') ; 278 279 $autosize_parametres->generic_height =(isset($_POST['generic_height'])) ? $_POST['generic_height'] : ((isset($autosize_parametres->generic_height )) ? $autosize_parametres->generic_height : '100%' ) ; 280 $autosize_parametres->generic_width=(isset($_POST['generic_width']))? $_POST['generic_width']: ((isset($autosize_parametres->generic_width)) ? $autosize_parametres->generic_width: '90%') ; 281 282 $autosize_parametres->guest_height =(isset($_POST['guest_height'])) ? $_POST['guest_height'] : ((isset($autosize_parametres->guest_height )) ? $autosize_parametres->guest_height : '100%' ) ; 283 $autosize_parametres->guest_width=(isset($_POST['guest_width']))? $_POST['guest_width']: ((isset($autosize_parametres->guest_width)) ? $autosize_parametres->guest_width: '90%') ; 284 285 $autosize_parametres->normal_height =(isset($_POST['normal_height'])) ? $_POST['normal_height'] : ((isset($autosize_parametres->normal_height )) ? $autosize_parametres->normal_height : '100%' ) ; 286 $autosize_parametres->normal_width=(isset($_POST['normal_width']))? $_POST['normal_width']: ((isset($autosize_parametres->normal_width)) ? $autosize_parametres->normal_width: '90%') ; 287 288 289 $autosize_parametres->mini_height =(isset($_POST['mini_height'])) ? $_POST['mini_height'] : ((isset($autosize_parametres->mini_height )) ? $autosize_parametres->mini_height : '150' ) ; 290 $autosize_parametres->mini_width=(isset($_POST['mini_width']))? $_POST['mini_width']: ((isset($autosize_parametres->mini_width)) ? $autosize_parametres->mini_width: '300') ; 291 292 $autosize_parametres->echelle_max=(isset($_POST['echelle_max']))? $_POST['echelle_max'] : ((isset($autosize_parametres->echelle_max)) ? $autosize_parametres->echelle_max : '1.2'); 293 $autosize_parametres->marge_basse=(isset($_POST['marge_basse']))? $_POST['marge_basse']: ((isset($autosize_parametres->marge_basse)) ? $autosize_parametres->marge_basse : '50'); 294 $autosize_parametres->fade_in=(isset($_POST['fade_in']))? $_POST['fade_in']: ((isset($autosize_parametres->fade_in)) ? $autosize_parametres->fade_in : '200'); 276 $my_para=$autosize_parametres; 277 278 $my_para->query =(isset($_POST['query'])) ? $_POST['query'] : ((isset($my_para->query )) ? $my_para->query : 'Qt' ) ; 279 $my_para->type=(isset($_POST['type']))? $_POST['type']: ((isset($my_para->type)) ? $my_para->type: 'Ty') ; 280 281 $my_para->webmaster_height =(isset($_POST['webmaster_height'])) ? $_POST['webmaster_height'] : ((isset($my_para->webmaster_height )) ? $my_para->webmaster_height : '100%' ) ; 282 $my_para->webmaster_width=(isset($_POST['webmaster_width']))? $_POST['webmaster_width']: ((isset($my_para->webmaster_width)) ? $my_para->webmaster_width: '90%') ; 283 284 $my_para->admin_height =(isset($_POST['admin_height'])) ? $_POST['admin_height'] : ((isset($my_para->admin_height )) ? $my_para->admin_height : '90%' ) ; 285 $my_para->admin_width=(isset($_POST['admin_width']))? $_POST['admin_width']: ((isset($my_para->admin_width)) ? $my_para->admin_width: '90%') ; 286 287 $my_para->generic_height =(isset($_POST['generic_height'])) ? $_POST['generic_height'] : ((isset($my_para->generic_height )) ? $my_para->generic_height : '100%' ) ; 288 $my_para->generic_width=(isset($_POST['generic_width']))? $_POST['generic_width']: ((isset($my_para->generic_width)) ? $my_para->generic_width: '90%') ; 289 290 $my_para->guest_height =(isset($_POST['guest_height'])) ? $_POST['guest_height'] : ((isset($my_para->guest_height )) ? $my_para->guest_height : '100%' ) ; 291 $my_para->guest_width=(isset($_POST['guest_width']))? $_POST['guest_width']: ((isset($my_para->guest_width)) ? $my_para->guest_width: '90%') ; 292 293 $my_para->normal_height =(isset($_POST['normal_height'])) ? $_POST['normal_height'] : ((isset($my_para->normal_height )) ? $my_para->normal_height : '100%' ) ; 294 $my_para->normal_width=(isset($_POST['normal_width']))? $_POST['normal_width']: ((isset($my_para->normal_width)) ? $my_para->normal_width: '90%') ; 295 296 297 $my_para->mini_height =(isset($_POST['mini_height'])) ? $_POST['mini_height'] : ((isset($my_para->mini_height )) ? $my_para->mini_height : '150' ) ; 298 $my_para->mini_width=(isset($_POST['mini_width']))? $_POST['mini_width']: ((isset($my_para->mini_width)) ? $my_para->mini_width: '300') ; 299 300 $my_para->mini_height2 =(isset($_POST['mini_height2'])) ? $_POST['mini_height2'] : ((isset($my_para->mini_height2 )) ? $my_para->mini_height2 : '150' ) ; 301 $my_para->mini_width2=(isset($_POST['mini_width2']))? $_POST['mini_width2']: ((isset($my_para->mini_width2)) ? $my_para->mini_width2: '300') ; 302 303 $my_para->echelle_max=(isset($_POST['echelle_max']))? $_POST['echelle_max'] : ((isset($my_para->echelle_max)) ? $my_para->echelle_max : '1.2'); 304 $my_para->marge_basse=(isset($_POST['marge_basse']))? $_POST['marge_basse']: ((isset($my_para->marge_basse)) ? $my_para->marge_basse : '50'); 305 $my_para->fade_in=(isset($_POST['fade_in']))? $_POST['fade_in']: ((isset($my_para->fade_in)) ? $my_para->fade_in : '200'); 295 306 296 307 //=============================================================================== 297 308 298 309 if ( isset($_POST['submit'] ) && $_POST['submit'] == l10n('cl_autosize_save') ) { 299 $ autosize_parametres->check_desc_v = isset($_POST['check_desc_v']) ? $_POST['check_desc_v'] : "off" ;300 $ autosize_parametres->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : "off" ;301 $ autosize_parametres->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : "off" ;302 303 $ autosize_parametres->webmaster_enabled = isset($_POST['webmaster_enabled']) ? $_POST['webmaster_enabled'] : "off" ;304 $ autosize_parametres->admin_enabled = isset($_POST['admin_enabled']) ? $_POST['admin_enabled'] : "off" ;305 $ autosize_parametres->generic_enabled = isset($_POST['generic_enabled']) ? $_POST['generic_enabled'] : "off" ;306 $ autosize_parametres->guest_enabled = isset($_POST['guest_enabled']) ? $_POST['guest_enabled'] : "off" ;307 $ autosize_parametres->normal_enabled = isset($_POST['normal_enabled']) ? $_POST['normal_enabled'] : "off" ;310 $my_para->check_desc_v = isset($_POST['check_desc_v']) ? $_POST['check_desc_v'] : "off" ; 311 $my_para->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : "off" ; 312 $my_para->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : "off" ; 313 314 $my_para->webmaster_enabled = isset($_POST['webmaster_enabled']) ? $_POST['webmaster_enabled'] : "off" ; 315 $my_para->admin_enabled = isset($_POST['admin_enabled']) ? $_POST['admin_enabled'] : "off" ; 316 $my_para->generic_enabled = isset($_POST['generic_enabled']) ? $_POST['generic_enabled'] : "off" ; 317 $my_para->guest_enabled = isset($_POST['guest_enabled']) ? $_POST['guest_enabled'] : "off" ; 318 $my_para->normal_enabled = isset($_POST['normal_enabled']) ? $_POST['normal_enabled'] : "off" ; 308 319 309 320 }else{ 310 $ 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') ;311 $ 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') ;312 $ 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') ;313 314 315 $ autosize_parametres->webmaster_enabled = isset($_POST['webmaster_enabled']) ? $_POST['webmaster_enabled'] : ( ( isset($autosize_parametres->webmaster_enabled) ) ? $autosize_parametres->webmaster_enabled : 'on') ;316 $ autosize_parametres->admin_enabled = isset($_POST['admin_enabled ']) ? $_POST['admin_enabled '] : ( ( isset($autosize_parametres->admin_enabled ) ) ? $autosize_parametres->admin_enabled : 'on') ;317 $ autosize_parametres->generic_enabled = isset($_POST['generic_enabled']) ? $_POST['generic_enabled'] : ( ( isset($autosize_parametres->generic_enabled) ) ? $autosize_parametres->generic_enabled : 'on') ;318 $ autosize_parametres->guest_enabled = isset($_POST['guest_enabled']) ? $_POST['guest_enabled'] : ( ( isset($autosize_parametres->guest_enabled) ) ? $autosize_parametres->guest_enabled : 'on') ;319 $ autosize_parametres->normal_enabled = isset($_POST['normal_enabled']) ? $_POST['normal_enabled'] : ( ( isset($autosize_parametres->normal_enabled) ) ? $autosize_parametres->normal_enabled : 'on') ;321 $my_para->check_desc_v = isset($_POST['check_desc_v']) ? $_POST['check_desc_v'] : ( ( isset($my_para->check_desc_v) ) ? $my_para->check_desc_v : 'off') ; 322 $my_para->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : ( ( isset($my_para->check_icon_v) ) ? $my_para->check_icon_v : 'off') ; 323 $my_para->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : ( ( isset($my_para->check_auto_w) ) ? $my_para->check_auto_w : 'off') ; 324 325 326 $my_para->webmaster_enabled = isset($_POST['webmaster_enabled']) ? $_POST['webmaster_enabled'] : ( ( isset($my_para->webmaster_enabled) ) ? $my_para->webmaster_enabled : 'on') ; 327 $my_para->admin_enabled = isset($_POST['admin_enabled ']) ? $_POST['admin_enabled '] : ( ( isset($my_para->admin_enabled ) ) ? $my_para->admin_enabled : 'on') ; 328 $my_para->generic_enabled = isset($_POST['generic_enabled']) ? $_POST['generic_enabled'] : ( ( isset($my_para->generic_enabled) ) ? $my_para->generic_enabled : 'on') ; 329 $my_para->guest_enabled = isset($_POST['guest_enabled']) ? $_POST['guest_enabled'] : ( ( isset($my_para->guest_enabled) ) ? $my_para->guest_enabled : 'on') ; 330 $my_para->normal_enabled = isset($_POST['normal_enabled']) ? $_POST['normal_enabled'] : ( ( isset($my_para->normal_enabled) ) ? $my_para->normal_enabled : 'on') ; 320 331 321 332 322 333 } 323 334 324 return $ autosize_parametres;335 return $my_para; 325 336 } 326 337 /* -
extensions/Autosize/include/affiche.php
r7917 r7962 28 28 'IMG_WIDTH' => $img_width, 29 29 'IMG_HEIGHT' => $img_height, 30 31 30 32 'MINI_HEIGHT' => $autosize_parametres->mini_height, 31 33 'MINI_WIDTH' => $autosize_parametres->mini_width, 34 'MINI_HEIGHT2' => $autosize_parametres->mini_height2, 35 'MINI_WIDTH2' => $autosize_parametres->mini_width2, 36 32 37 'MARGE_BASSE' => $autosize_parametres->marge_basse, 33 38 'ECHELLE_MAX' => $autosize_parametres->echelle_max, -
extensions/Autosize/js/Affiche_script.js
r7943 r7962 214 214 //================================================================= 215 215 216 216 217 var winwidth = jQuery(window).width(); 217 218 var winheight = jQuery(window).height(); … … 410 411 miniHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-height"), mini_height); 411 412 413 var miniWidth2 = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-width"), mini_width2); 414 var miniHeight2 = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-height"), mini_height2); 412 415 413 416 var maxWidth = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-width"), winwidth, "0"); 414 417 maxHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-height"), winheight, "0"); 418 415 419 416 420 mini_width = parseInt(miniWidth); … … 481 485 h = 0; 482 486 483 Zone_Affichage.height -= (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom); 484 Bandeau = Bandeau_t.bottom; 485 Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction; 487 h = (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom); 488 Bandeau = Bandeau_t.img_top; 489 Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction - h; 490 //========================================================================= 491 if (Zone_Affichage.height < mini_height) 492 Zone_Affichage.height = mini_height2; 493 if (Zone_Affichage.width < mini_width) 494 Zone_Affichage.width = mini_width2; 495 //========================================================================= 486 496 if (typeof (Bandeau_bas) != "undefined") { 487 var Image_height = Zone_Affichage.height - Bandeau_bas.height - Bandeau_bas.marge.top - Bandeau_bas.marge.bottom;497 Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom); 488 498 489 499 490 500 } else { 491 var Image_height = Zone_Affichage.height; 492 } 493 494 501 502 } 503 504 var Image_height = Zone_Affichage.height; 495 505 496 506 //============================================================= … … 534 544 else 535 545 widthmin = parseInt(width_user); 546 536 547 var marges = marges_llgbo; 548 537 549 if (typeof (info_img) != "undefined") { 538 550 widthmin -= info_img.borderwidth.left || 0; … … 540 552 } 541 553 widthmin -= marges; 554 widthmin -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left); 555 Image_width -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left); 542 556 if (Image_width > widthmin) { 543 557 // Image_width largeur à atteindre … … 558 572 //=================================================== 559 573 560 574 img_finale.height = Image_height; 575 img_finale.width = Image_width; 561 576 562 577 zoom = echelle; … … 572 587 if (TheImg.src) { 573 588 574 Image_width -= marges_llgbo; // réduction frame 575 Image_height -= marges_llgbo; // réduction frame 589 img_finale.width -= (marges_llgbo); // réduction frame 590 img_finale.height -= (marges_llgbo); // réduction frame 591 576 592 if (rapport > 1) { 593 if (img_finale.width > winwidth) { 594 jQuery("#gbo").width(winwidth); 595 jQuery("#gbo").height(winheight); 596 jQuery("#gbo").css("width", winwidth + "px"); 597 jQuery("#gbo").css("height", winheight + "px"); 598 } 599 else { 600 jQuery("#gbo").width(img_finale.width); 601 jQuery("#gbo").height(img_finale.height); 602 jQuery("#gbo").css("width", img_finale.width + "px"); 603 jQuery("#gbo").css("height", img_finale.height + "px"); 604 } 605 606 t1 = jQuery("#gbo div:last").infos(); 607 608 img_finale.width = t1.width - (t1.borderwidth.left + t1.borderwidth.right); 609 img_finale.height = parseInt(img_finale.width / rapport); 610 611 jQuery("#gbo").height(Image_height); 612 jQuery("#gbo").css("height", (Image_height) + "px"); 613 614 615 } else { 616 img_finale.width -= (marges_llgbo / 2); // réduction frame 617 img_finale.height -= (marges_llgbo / 2); // réduction frame 577 618 if (Image_width > winwidth) { 578 619 jQuery("#gbo").width(winwidth); … … 582 623 } 583 624 else { 584 jQuery("#gbo").width( Image_width);585 jQuery("#gbo").height( Image_height);586 jQuery("#gbo").css("width", Image_width + "px");587 jQuery("#gbo").css("height", Image_height + "px");625 jQuery("#gbo").width(img_finale.width); 626 jQuery("#gbo").height(img_finale.height); 627 jQuery("#gbo").css("width", img_finale.width + "px"); 628 jQuery("#gbo").css("height", img_finale.height + "px"); 588 629 } 589 630 590 t1 = jQuery("#gbo div:last").infos(); 591 592 Image_width = t1.width - (t1.borderwidth.left + t1.borderwidth.right); 593 Image_height = parseInt(Image_width / rapport); 594 595 jQuery("#gbo").height(Image_height + marges_llgbo); 596 jQuery("#gbo").css("height", (Image_height + marges_llgbo) + "px"); 597 598 599 } else { 600 Image_width -= (marges_llgbo / 2); // réduction frame 601 Image_height -= (marges_llgbo / 2); // réduction frame 602 if (Image_width > winwidth) { 603 jQuery("#gbo").width(winwidth); 604 jQuery("#gbo").height(winheight); 605 jQuery("#gbo").css("width", winwidth + "px"); 606 jQuery("#gbo").css("height", winheight + "px"); 607 } 608 else { 609 jQuery("#gbo").width(Image_width); 610 jQuery("#gbo").height(Image_height); 611 jQuery("#gbo").css("width", Image_width + "px"); 612 jQuery("#gbo").css("height", Image_height + "px"); 613 } 614 615 616 jQuery("#gbo").css("height", (Image_height + marges_llgbo) + "px"); 617 jQuery("#gbo").height(Image_height + marges_llgbo); 618 619 jQuery("#gbo").css("width", Image_width + marges_llgbo + "px"); 620 jQuery("#gbo").width(Image_width + marges_llgbo); 621 622 623 } 631 632 jQuery("#gbo").css("height", (img_finale.height + marges_llgbo) + "px"); 633 jQuery("#gbo").height(img_finale.height + marges_llgbo); 634 635 jQuery("#gbo").css("width", img_finale.width + marges_llgbo + "px"); 636 jQuery("#gbo").width(img_finale.width + marges_llgbo); 637 638 639 } 640 Zone_Affichage.height = jQuery("#gbo").outerHeight(true) 641 642 //============================================================= 624 643 // jQuery(Parent + " p:not(:contains(' ')) ").remove(); 625 644 a0 = jQuery("area[rel!=up][rel!=prev][rel!=next]"); … … 636 655 637 656 638 var Largeur_zone = ( Image_width / nb_zone);639 var Hauteur_zone = ( Image_height);657 var Largeur_zone = (img_finale.width / nb_zone); 658 var Hauteur_zone = (img_finale.height); 640 659 var init_zone = 0; 641 660 … … 647 666 } 648 667 649 coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: Image_height };668 coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: img_finale.height }; 650 669 651 670 if (a0.length > 0) { … … 658 677 659 678 if (a2.length > 0) { 660 coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: Image_height };679 coord = { x0: init_zone, y0: 0, x1: init_zone + Largeur_zone, y1: img_finale.height }; 661 680 jQuery("area[rel=next]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" }); 662 681 } … … 665 684 666 685 //================ Zone affichage ========================= 667 686 668 687 if (theme.match(RegExp("luciano", "g"))) { 669 688 //---- information en dehors du cadre … … 678 697 679 698 680 jQuery(Cadre).width(Zone_Affichage.width - 4); 681 682 //============= Remise à l'échelle ======================= 683 684 img_finale.height = Image_height; 685 img_finale.width = Image_width; 699 700 701 //========== Image Remise à l'échelle ======================= 702 703 Image_height = img_finale.height; 704 Image_width = img_finale.width; 705 706 686 707 687 708 //========================================================================= 688 709 jQuery(Cadre).width(Zone_Affichage.width); 710 // jQuery(Cadre).height(Zone_Affichage.height); 689 711 690 712 if (typeof (gmaps) != "undefined") { … … 712 734 pdf += p1.padding.right + p1.padding.left; 713 735 }); 714 736 img_finale.width -= pdf; 715 737 716 738 jQuery("#charlie").css({ 717 width: Image_width + pdf,718 height: Image_height,739 width: img_finale.width + pdf, 740 height: img_finale.height, 719 741 margin: "auto" 720 742 }); … … 722 744 723 745 724 jQuery("#player").css("width", Image_width + 100+ "px");725 jQuery("#player").css("height", Image_height);726 727 jQuery("#embedplayer").css("width", Image_width);728 jQuery("#embedplayer").css("height", Image_height);729 730 731 jQuery("object").width( Image_width);732 jQuery("object").height( Image_height);746 jQuery("#player").css("width", img_finale.width + "px"); 747 jQuery("#player").css("height", img_finale.height); 748 749 jQuery("#embedplayer").css("width", img_finale.width); 750 jQuery("#embedplayer").css("height", img_finale.height); 751 752 753 jQuery("object").width(img_finale.width); 754 jQuery("object").height(img_finale.height); 733 755 734 756 … … 738 760 // jQuery(TheImg).height(img_finale.height); 739 761 // jQuery(TheImg).width(img_finale.width); 740 jQuery("#Panorama div").height( Image_height);762 jQuery("#Panorama div").height(img_finale.height); 741 763 // class=simple_panorama 742 764 … … 790 812 info_frame = jQuery(myPamoorama.frame).infos(); 791 813 792 zoom = Image_height / img_height;814 zoom = img_finale.height / img_height; 793 815 794 816 … … 797 819 jQuery(TheImg).height(img_finale.height); 798 820 jQuery(TheImg).width(img_finale.width); 799 jQuery(TheImg).css({ height: img_finale.height + "px ", width: img_finale.width + "px " }); 821 jQuery(TheImg).css({ height: img_finale.height + "px ", 822 width: img_finale.width + "px " 823 }); 800 824 801 825 … … 804 828 jQuery(TheImg).height(img_finale.height); 805 829 jQuery(TheImg).width(img_finale.width); 806 jQuery(TheImg).css({ height: img_finale.height + "px ", width: img_finale.width + "px " }); 807 808 } 809 810 info_frame = Zone_Affichage; 811 h0 = jQuery(Cadre).outerHeight(true); 830 jQuery(TheImg).css({ height: img_finale.height + "px ", 831 width: img_finale.width + "px " 832 }); 833 834 } 835 836 812 837 813 838 … … 868 893 jQuery(".navThumb img").css({ height: "80px", width: "", overflow: "hidden" }); 869 894 } 895 info_frame = jQuery("#the_page").infos(); 896 870 897 if (DEBUG == "true") { 871 // jQuery(Parent).height(info_frame.height +info_description.height +"px"); 872 // info_Cadre = jQuery(Parent).infos(); 873 874 // jQuery("#Debug3").css({ top: info_Cadre.top + "px", height: info_Cadre.height + "px" }); //blue 898 if (theme.match(RegExp("stripped", "gi"))) { 899 pos = "absolute"; 900 t1 = info_imageInfoBar.bottom; 901 l1 = info_imageInfoBar.left; 902 } else { 903 pos = "absolute"; 904 t1 = info_frame.top; 905 l1 = info_frame.left; 906 } 907 // jQuery(Cadre).css("border", "solid green"); 908 margins = jQuery(Cadre).css("margin"); 875 909 jQuery("#Debug5").css({ background: "transparent", 910 position: pos, 876 911 border: "red solid 2px", 877 top: info_frame.top + "px", 878 left: info_frame.left + "px", 912 textAlign: align_auto, 913 margin: "4px", 914 top: t1 + "px", 915 left: l1 + "px", 879 916 width: info_frame.width + "px", 880 917 height: info_frame.height + "px" … … 930 967 * 931 968 */ 969 932 970 function Info_entete(Parent) { 933 971 if (typeof (marge_top) != "undefined") return result; 934 972 info_imageToolBar = jQuery("#imageToolBar").infos(); 935 973 if (info_imageToolBar.position == "absolute") { … … 937 975 jQuery("#imageToolBar").css("top", 0 + "px"); 938 976 } 939 977 optiontop = 0; 978 979 info_imageInfoBar = jQuery("#imageInfoBar").infos(); 980 981 982 info_theImgContainer = jQuery("#"+ "theImgContainer").infos(); 940 983 info_theImage = jQuery(Parent).infos(); 941 942 943 if (info_theImage.position == "relative") { 944 //--- passage relative ==> static ===/ 945 jQuery(Parent).css("position", "static"); 946 info_theImage = jQuery(Parent).infos(); 947 948 } 984 info_thePicturePage = jQuery("#thePicturePage").infos(); 985 986 987 if (info_theImage.position == "relative") { 988 //--- passage relative ==> static ===/ 989 jQuery(Parent).css("position", "static"); 990 info_theImage = jQuery(Parent).infos(); 991 992 } else { 993 if ( theme.match(RegExp("stripped", "gi"))) 994 { 995 optiontop = info_imageInfoBar.bottom; 996 } 997 } 949 998 if (info_theImage.position == "absolute") { 950 999 //--- passage absolute ==> static ===/ … … 956 1005 marge_top = Math.ceil(Info_the_page.top + 957 1006 Info_the_page.borderwidth.top + 958 info_theImage.borderwidth.top); 959 960 img_top = Math.ceil(info_theImage.top + info_theImage.borderwidth.top); 1007 info_theImage.borderwidth.top + 1008 info_thePicturePage.margin.top 1009 ); 1010 1011 img_top = Math.ceil(info_theImage.top + 1012 info_theImage.borderwidth.top + 1013 info_thePicturePage.margin.top + optiontop); 961 1014 result = info_imageToolBar; 962 1015 result.width = "20%"; … … 1006 1059 1007 1060 1008 Bandeau_t = Info_entete(Parent) 1009 Bandeau = Bandeau_t.img_top; 1061 1010 1062 llgboframe = jQuery("#gbo div:first"); 1011 1063 marges_llgbo = 0; … … 1014 1066 if (llgboframe.length > 0) { 1015 1067 ll0 = jQuery("#gbo").infos(); 1016 ll1 = jQuery("#llgboframe31").infos(); 1017 ll2 = jQuery("#llgboframe1").infos(); 1018 marges_llgbo = (ll1.width - ll2.width) + ll2.borderwidth.left + ll2.borderwidth.right; 1019 } 1020 1021 1068 ll1 = jQuery("#gbo div:first").infos(); 1069 ll12 = jQuery("#gbo div:last").infos(); ; 1070 ll1 = jQuery("#"+ll1.id).outerWidth(true); 1071 ll2 = jQuery("#" + ll12.id).outerWidth(true); 1072 marges_llgbo = ((ll1 - ll2)*2) + ll0.borderwidth.left + ll0.borderwidth.right; 1073 } 1074 1075 Bandeau_t = Info_entete(Parent) 1076 Bandeau = Bandeau_t.img_top; 1022 1077 1023 1078 if (theme.match(RegExp("simple", "gi"))) { -
extensions/Autosize/js/conflit.js
r7943 r7962 8 8 var init_tb = 0; 9 9 var dom = {}; 10 10 11 if (typeof jQuery == 'undefined') { 11 12 alert(" jQuery n'est pas chargé"); … … 14 15 } 15 16 17 try{ 18 if (DEBUG == "true") { 19 20 } 21 }catch(e) 22 { 23 DEBUG = "false"; 24 } 16 25 //=================================================== 17 26 var detect = navigator.userAgent.toLowerCase(); -
extensions/Autosize/language/en_UK/lang.php
r7394 r7962 1 1 <?php 2 2 global $lang; 3 4 $lang['cl_autosize_miniheight2'] = 'Minimum height picture size'; 5 $lang['cl_autosize_miniwidth2'] = 'Minimum width picture size'; 6 $lang['cl_autosize_hlp_line32'] = "Minimum picture size. " ; 7 3 8 $lang['cl_autosize_enabled'] = "Enabled"; 4 9 $lang['cl_autosize_desc_view'] = "Inclure la description et la licence dans le calcul"; -
extensions/Autosize/language/fr_FR/lang.php
r7725 r7962 1 1 <?php 2 2 global $lang; 3 $lang['cl_autosize_hlp_line3'] = "Si la taille originale de la photo à afficher est inférieure à cette valeur, le redimensionnement automatique sera inhibé. " ; 4 5 $lang['cl_autosize_miniheight2'] = 'Hauteur d\'affichage minimum'; 6 $lang['cl_autosize_miniwidth2'] = 'Largeur d\'affichage minimum'; 7 $lang['cl_autosize_hlp_line32'] = "Taille minimun de la photo affichée. " ; 8 3 9 $lang['cl_autosize_fade_in'] = "Fondu à l'ouverture"; 4 10 $lang['cl_autosize_hlp_fade_in'] = "Temp en millisecondes avant d'afficher l'image(Fondu à l'ouverture)"; … … 23 29 $lang['cl_autosize_miniwidth'] = 'Largeur minimum'; 24 30 25 $lang['cl_autosize_hlp_line3'] = "Si la taille de la photo à afficher est inférieure à cette valeur, le redimensionnement automatique sera inhibé. " ; 31 26 32 27 33 $lang['cl_autosize_echelle_max'] = "Echelle maximum."; -
extensions/Autosize/main.inc.php
r7943 r7962 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.3.9. 54 Version: 1.3.9.6 5 5 Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448 -
extensions/Autosize/template/autosize.tpl
r7912 r7962 20 20 var mini_width='{ $MINI_WIDTH }'; 21 21 var mini_height = '{ $MINI_HEIGHT }'; 22 var mini_width2 = '{ $MINI_WIDTH2 }'; 23 var mini_height2 = '{ $MINI_HEIGHT2 }'; 22 24 23 25 var webmaster_width='{$webmaster_width }'; -
extensions/Autosize/template/conflit.tpl
r7943 r7962 1 1 {html_head} 2 <!--- Autosize/template/confilt.tpl (head) ---> 3 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1} 4 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"} 5 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"} 6 7 8 2 <!--- Autosize/template/confilt.tpl (head) ---> 3 <!--- Ajout scripts {$AUTOSIZE_PATH}---> 4 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1} <!--- jquery.packed.js ---> 5 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"}<!--- conflit.js ---> 6 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"}<!---jquery.dimensions.js ---> 7 <!--- fin Ajout scripts ---> 9 8 <script type="text/javascript"> 10 9 var DEBUG = '{$DEBUG}'; 11 10 var theme = '{$theme}'; 12 var cl_version = '{$cl_version}';11 var cl_version = '{$cl_version}'; 13 12 var cl_plugin = '{$name}'; 13 var cl_query = '{$autosize_parametres->query}'; 14 var cl_type = '{$autosize_parametres->type}'; 15 var cl_plugins=new Array(); 16 {if $DEBUG} 17 {if not empty($cl_plugins )} 18 {foreach from=$cl_plugins item=cl_plug } 19 value="{$cl_plug}";cl_plugins.push(value); 20 {/foreach} 21 {/if} 22 {/if} 14 23 </script> 15 24 <!---FIN Autosize/template/confilt.tpl (/head) ---> 16 25 {/html_head} 26 17 27 <!--- Autosize/template/confilt.tpl (body) ---> 18 28
Note: See TracChangeset
for help on using the changeset viewer.