Changeset 7962 for extensions/Autosize


Ignore:
Timestamp:
Dec 1, 2010, 10:19:47 AM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] compatibility with simple


Location:
extensions/Autosize
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/admin/template/admin.tpl

    r7931 r7962  
    1414     var echelle_max = '{ $ECHELLE_MAX }';
    1515     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 }';
    1819     var webmaster_width = '{$webmaster_width   }';
    1920     var webmaster_height = '{ $webmaster_height   }';
     
    129130   <fieldset>
    130131        <legend class="cluetip" title="{'cl_autosize_config_title_2'|@translate}|{'cl_autosize_hlp_line2'|@translate}">{'cl_autosize_config_title_2'|@translate}</legend>
    131  
     132
    132133    <!--======== Dimensions HL ===================-->   
    133134    <tr>
     
    139140   <td  >
    140141    <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
    141152       </tr>
    142153   <!--======== Positions  ===================-->       
  • extensions/Autosize/autosize.inc.php

    r7943 r7962  
    143143                if ( !empty($content) )   {  return $content;  }       
    144144                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="';
    147147                $autocss =   $autosizejs.'themes/default/js/jquery.packed.js"></script>'."\n";
    148148                $template->append('head_elements',$autocss);
     
    188188 //============================================================
    189189 /*
    190   *
     190  *  cl_autosize_script
    191191 */
    192192 static public function cl_autosize_script()
    193193        {
    194194           global  $template,$user,$conf,$picture ,$page, $cl_plugin ;
     195
    195196                $my_path =  basename(dirname(__FILE__)).'/' ;
    196197            $my_path = dirname(__FILE__).'/';
    197198                $template->set_filenames(array('autosize_init'=>$my_path. "template/conflit.tpl" ) );   
    198199                $debug = isset($conf['debug']) ? $conf['debug'] : false ;
    199                
     200                $autosize_parametres =   cl_autosize_Get_Options() ;                   
    200201                $theme=$user['theme'];
    201202                         
    202203                $template->assign(
    203204                                                array(
     205                                                'cl_conflit_parametres' => $cl_conflit_parametres ,
     206                                                'cl_plugins' => $cl_plugin ,
    204207                                                'cl_version' => $cl_plugin['version'] ,
    205208                                                'name' => $cl_plugin['name'] ,
     
    271274  global $autosize_parametres;
    272275//=============================================================================
    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');
    295306
    296307//===============================================================================       
    297308
    298309if ( 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" ;
    308319
    309320         }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') ; 
    320331
    321332
    322333   }
    323334
    324 return $autosize_parametres;
     335return $my_para;
    325336}
    326337        /*
  • extensions/Autosize/include/affiche.php

    r7917 r7962  
    2828                    'IMG_WIDTH'         => $img_width,
    2929                    'IMG_HEIGHT'        => $img_height,
     30
     31
    3032                    'MINI_HEIGHT' => $autosize_parametres->mini_height,
    3133                    'MINI_WIDTH'        => $autosize_parametres->mini_width,
     34                                         'MINI_HEIGHT2' => $autosize_parametres->mini_height2,
     35                    'MINI_WIDTH2'       => $autosize_parametres->mini_width2,
     36
    3237                    'MARGE_BASSE' => $autosize_parametres->marge_basse,
    3338                    'ECHELLE_MAX' => $autosize_parametres->echelle_max,
  • extensions/Autosize/js/Affiche_script.js

    r7943 r7962  
    214214                 //=================================================================
    215215
     216
    216217                 var winwidth = jQuery(window).width();
    217218                 var winheight = jQuery(window).height();
     
    410411                 miniHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-height"), mini_height);
    411412
     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);
    412415
    413416                 var maxWidth = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-width"), winwidth, "0");
    414417                 maxHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-height"), winheight, "0");
     418
    415419
    416420                 mini_width = parseInt(miniWidth);
     
    481485                 h = 0;
    482486
    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                 //=========================================================================
    486496                 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);
    488498
    489499
    490500                 } else {
    491                      var Image_height = Zone_Affichage.height;
    492                  }
    493 
    494 
     501
     502                 }
     503
     504                 var Image_height = Zone_Affichage.height;
    495505
    496506                 //=============================================================
     
    534544                     else
    535545                         widthmin = parseInt(width_user);
     546
    536547                     var marges = marges_llgbo;
     548
    537549                     if (typeof (info_img) != "undefined") {
    538550                         widthmin -= info_img.borderwidth.left || 0;
     
    540552                     }
    541553                     widthmin -= marges;
     554                     widthmin -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left);
     555                     Image_width -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left);
    542556                     if (Image_width > widthmin) {
    543557                         //   Image_width largeur à atteindre
     
    558572                 //===================================================
    559573
    560 
     574                 img_finale.height = Image_height;
     575                 img_finale.width = Image_width;
    561576
    562577                 zoom = echelle;
     
    572587                     if (TheImg.src) {
    573588
    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
    576592                         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
    577618                             if (Image_width > winwidth) {
    578619                                 jQuery("#gbo").width(winwidth);
     
    582623                             }
    583624                             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");
    588629                             }
    589630
    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                         //=============================================================
    624643                         //  jQuery(Parent + " p:not(:contains(' ')) ").remove();
    625644                         a0 = jQuery("area[rel!=up][rel!=prev][rel!=next]");
     
    636655
    637656
    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);
    640659                         var init_zone = 0;
    641660
     
    647666                         }
    648667
    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 };
    650669
    651670                         if (a0.length > 0) {
     
    658677
    659678                         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 };
    661680                             jQuery("area[rel=next]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" });
    662681                         }
     
    665684
    666685                 //================ Zone affichage =========================
    667  
     686
    668687                 if (theme.match(RegExp("luciano", "g"))) {
    669688                     //---- information en dehors du cadre
     
    678697
    679698
    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
    686707
    687708                 //=========================================================================
    688 
     709                 jQuery(Cadre).width(Zone_Affichage.width);
     710                 //   jQuery(Cadre).height(Zone_Affichage.height);
    689711
    690712                 if (typeof (gmaps) != "undefined") {
     
    712734                         pdf += p1.padding.right + p1.padding.left;
    713735                     });
    714 
     736                     img_finale.width -= pdf;
    715737
    716738                     jQuery("#charlie").css({
    717                          width: Image_width + pdf,
    718                          height: Image_height,
     739                         width: img_finale.width + pdf,
     740                         height: img_finale.height,
    719741                         margin: "auto"
    720742                     });
     
    722744
    723745
    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);
    733755
    734756
     
    738760                     // jQuery(TheImg).height(img_finale.height);
    739761                     // jQuery(TheImg).width(img_finale.width);
    740                      jQuery("#Panorama div").height(Image_height);
     762                     jQuery("#Panorama div").height(img_finale.height);
    741763                     //  class=simple_panorama
    742764
     
    790812                     info_frame = jQuery(myPamoorama.frame).infos();
    791813
    792                      zoom = Image_height / img_height;
     814                     zoom = img_finale.height / img_height;
    793815
    794816
     
    797819                     jQuery(TheImg).height(img_finale.height);
    798820                     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                     });
    800824
    801825
     
    804828                     jQuery(TheImg).height(img_finale.height);
    805829                     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
    812837
    813838
     
    868893                     jQuery(".navThumb img").css({ height: "80px", width: "", overflow: "hidden" });
    869894                 }
     895                 info_frame = jQuery("#the_page").infos();
     896
    870897                 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");
    875909                     jQuery("#Debug5").css({ background: "transparent",
     910                         position: pos,
    876911                         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",
    879916                         width: info_frame.width + "px",
    880917                         height: info_frame.height + "px"
     
    930967                 *
    931968                 */
     969                 
    932970                 function Info_entete(Parent) {
    933 
     971                     if (typeof (marge_top) != "undefined") return result;
    934972                     info_imageToolBar = jQuery("#imageToolBar").infos();
    935973                     if (info_imageToolBar.position == "absolute") {
     
    937975                         jQuery("#imageToolBar").css("top", 0 + "px");
    938976                     }
    939 
     977                     optiontop = 0;
     978                     
     979                     info_imageInfoBar = jQuery("#imageInfoBar").infos();
     980
     981
     982                    info_theImgContainer = jQuery("#"+ "theImgContainer").infos();
    940983                     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                 }
    949998                     if (info_theImage.position == "absolute") {
    950999                         //--- passage absolute ==> static ===/
     
    9561005                     marge_top = Math.ceil(Info_the_page.top +
    9571006                                     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);
    9611014                     result = info_imageToolBar;
    9621015                     result.width = "20%";
     
    10061059
    10071060
    1008                      Bandeau_t = Info_entete(Parent)
    1009                      Bandeau = Bandeau_t.img_top;
     1061
    10101062                     llgboframe = jQuery("#gbo div:first");
    10111063                     marges_llgbo = 0;
     
    10141066                     if (llgboframe.length > 0) {
    10151067                         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;
    10221077
    10231078                     if (theme.match(RegExp("simple", "gi"))) {
  • extensions/Autosize/js/conflit.js

    r7943 r7962  
    88var init_tb = 0;
    99var dom = {};
     10
    1011if (typeof jQuery == 'undefined') {
    1112    alert(" jQuery n'est pas chargé");
     
    1415}
    1516
     17try{
     18    if (DEBUG == "true") {
     19
     20    }
     21}catch(e)
     22{
     23    DEBUG = "false";
     24}
    1625//===================================================
    1726var detect = navigator.userAgent.toLowerCase();
  • extensions/Autosize/language/en_UK/lang.php

    r7394 r7962  
    11<?php
    22global $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
    38$lang['cl_autosize_enabled'] = "Enabled";
    49$lang['cl_autosize_desc_view'] = "Inclure la description et la licence dans le calcul";
  • extensions/Autosize/language/fr_FR/lang.php

    r7725 r7962  
    11<?php
    22global $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
    39$lang['cl_autosize_fade_in'] = "Fondu à l'ouverture";
    410$lang['cl_autosize_hlp_fade_in'] = "Temp en millisecondes avant d'afficher l'image(Fondu à l'ouverture)";
     
    2329$lang['cl_autosize_miniwidth'] = 'Largeur minimum';
    2430
    25 $lang['cl_autosize_hlp_line3'] = "Si la taille de la photo à afficher est inférieure à cette valeur, le redimensionnement automatique sera inhibé. "  ;
     31
    2632
    2733$lang['cl_autosize_echelle_max'] = "Echelle maximum."; 
  • extensions/Autosize/main.inc.php

    r7943 r7962  
    22/*
    33Plugin Name: AutoSize
    4 Version: 1.3.9.5
     4Version: 1.3.9.6
    55Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448
  • extensions/Autosize/template/autosize.tpl

    r7912 r7962  
    2020    var mini_width='{ $MINI_WIDTH   }';
    2121    var mini_height = '{ $MINI_HEIGHT   }';
     22    var mini_width2 = '{ $MINI_WIDTH2 }';
     23    var mini_height2 = '{ $MINI_HEIGHT2 }';
    2224
    2325    var webmaster_width='{$webmaster_width   }';
  • extensions/Autosize/template/conflit.tpl

    r7943 r7962  
    11{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  --->
    98<script type="text/javascript">
    109    var DEBUG = '{$DEBUG}';
    1110    var theme = '{$theme}';
    12 var cl_version = '{$cl_version}';
     11    var cl_version = '{$cl_version}';
    1312    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}
    1423</script>
    1524<!---FIN Autosize/template/confilt.tpl (/head) --->     
    1625{/html_head}
     26
    1727<!--- Autosize/template/confilt.tpl (body) ---> 
    1828
Note: See TracChangeset for help on using the changeset viewer.