Changeset 16124


Ignore:
Timestamp:
Jun 28, 2012, 3:44:47 PM (12 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix compatibility with 2.4

Location:
extensions/Autosize
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/autosize.inc.php

    r12652 r16124  
    129129                                        'AUTOSIZE_PATH' => AUTOSIZE_PATH,
    130130          'Size' => $size
    131 
     131           
    132132                                        )
    133133                                                );
    134 
     134  include_once (PHPWG_ROOT_PATH.'include/functions_cookie.inc.php') ;
    135135                        $autoscript="<script type='text/javascript'>
    136136                        /* cl_autosize_script_2 */
    137137                        if (typeof (save_framework) == 'function')
    138                            save_framework('".$ma_page."');     
     138                           save_framework('".$ma_page."'); 
     139         var cookie_path   ='". cookie_path() ."'
    139140                        </script>";
    140141         
     
    301302function Get_Options(&$parametres,$str_index){
    302303    global $conf ;
     304     if (!isset( $conf[$str_index]))  {   
     305      $conf[$str_index]="";
     306     }
    303307    $m_options=  $conf[$str_index];
    304308     if(isset($m_options))
     
    401405
    402406
     407  if (empty($my_para))
     408$my_para = (object) '';
     409
    403410$my_para->query =(isset($_POST['query'])) ? $_POST['query'] : ((isset($my_para->query )) ? $my_para->query : 'Qt' ) ;
    404411$my_para->type=(isset($_POST['type']))? $_POST['type']: ((isset($my_para->type)) ? $my_para->type:  'Ty') ;
  • extensions/Autosize/css/autosize.css

    r12527 r16124  
    1919.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: 0px; top: 0px; background: transparent url(images/resizable-ne.gif); }
    2020#theImage {
    21     opacity: 0;
    22     filter: alpha(opacity:0);
     21    opacity: 100;
     22    filter: alpha(opacity:100);
    2323    padding-top: 0px;
    2424    padding-bottom: 0px;
     
    2929}
    3030#the_page {
    31   margin-top: -4px;position:static ;
    32  
     31  /* 
     32  margin-top: -4px;
     33position:static ;*/
     34   
    3335}
    3436#mapPicture{
     
    4143}
    4244
    43  
    44 #theImage {
     45
     46#navThumbNext, #navThumbPrev{ /*height:200px;*/
    4547
    4648 
    4749}
    48 #content {   
    49  
    50  
    51 }
    52  #imageContainer {
    53  
    54  
    55 }
    56 #navThumbNext, #navThumbPrev{ height:200px;
    57 
    58  
    59 }
    60 .navThumbNextBg{
    61  
     50/**/
     51#theImageAndInfos, #theImageAndTitle {
     52 /* background-color: #FFFF00;*/
    6253}
    6354
    64 #_Comment{
     55#theImage {
     56 /* margin: 10px;
     57 border: 10px solid #f0FFf0;
     58  padding: 10px;
    6559 
     60  background-color: #00FF00; */
    6661}
    67 #_Comment2{
     62#theMainImage {
     63/*
     64  margin: 15px;
     65  border: 15px solid #f0f0ff;
     66  padding:15px;
     67 
     68 background-color: #0000FF; */
     69}
     70
     71#imageInfos {
     72/* margin : 20px;
     73  border: 20px solid #FFf0f0;
     74  padding: 20px;
    6875 
     76  background-color: #FF0000; */
    6977}
    70 #charlie div div{
    71  
    72 }
    73 #charlie div {
    74  
    75 }
    76 #charlie a h1 {
    77 }
    78 #charlie {
    79 
    80 }
    81 #form_autosize_picture {
    82 
    83 }
    84 .Image {
    85 }
  • extensions/Autosize/include/affiche.php

    r11961 r16124  
    4242                                                                        );     
    4343                 
    44  
    45                                
     44if (!isset($conf['prefix_thumbnail'])) $conf['prefix_thumbnail']="TN_";                         
    4645        $template->assign(
    4746                                        array(
  • extensions/Autosize/js/Affiche_script.js

    r13512 r16124  
    22// problème avec GMaps+diaporama:
    33// corriger   gmaps_pip.class.inc.php ajouter ligne 90 if ( !isset($_GET['slideshow']))
    4 function Toggle_bp() {
    5   cl_visible = !cl_visible;
    6  
    7   jQuery().newResize();
    8   Wait_Affichage();
    9   set_cl();
    10 }
     4  function Toggle_bp() {
     5    cl_visible = !cl_visible; 
     6    jQuery().newResize();
     7    Wait_Affichage();
     8    set_cl();
     9  }
    1110  function set_cl(){
    1211  if (typeof cl_visible == "undefined") return;
     
    1817    if (cl_visible) {
    1918      src_info = src3;
    20       src_info_1 = src3;
     19      src_infos_1 = src3;
    2120    }
    2221    else {
    2322      src_info = src4;
    24       src_info_1 = src5;
     23      src_infos_1 = src5;
    2524    }
    2625    zoom = jQuery('#zoom ').val() ;
     
    3130    jQuery('#bp_cla').attr('Stip', zoom + "%");
    3231
    33   //jQuery('#bp_cla span').text(src_info_1 +"    "+ zoom + "%");
     32  //jQuery('#bp_cla span').text(src_infos_1 +"    "+ zoom + "%");
    3433    jQuery('#bp_cla span').text(zoom+"%" );
    3534    bp_scr = jQuery('#bp_img_cla');
     
    4443
    4544}
    46 nu_img = 0;
    47 tempo=0;
    4845
    4946function Wait_pamoorama() {
     
    6259            return false;
    6360        }
    64         info_pamoorama = jQuery("#pamoorama").infos();
    65         new_width = info_pamoorama.width - (info_pamoorama.borderwidth.left + info_pamoorama.borderwidth.right);
     61        infos_pamoorama = jQuery("#pamoorama").infos();
     62        new_width = infos_pamoorama.width - (infos_pamoorama.borderwidth.left + infos_pamoorama.borderwidth.right);
    6663        if (Math.abs(new_width - myPamoorama.options.width) > 10) {
    6764            setTimeout("Wait_pamoorama()", 500);
     
    161158}
    162159
     160//=======================================================================
     161function Calcul_Image(all_width) {
     162  // theImageAndInfos(jaune) -> theImage(vert) -> [llgbo] -> theMainImage
     163  // + infos_imageInfos(red)
     164  infos_theImage = jQuery("#theImage").infos();
     165
     166  infos_the_page = jQuery("#the_page").infos();
     167          infos_imageToolBar = jQuery("#imageToolBar").infos();
     168          infos_imageInfos = jQuery("#imageInfos").infos();
     169          //  infos_llgbo = jQuery("#llgbo").infos();
     170 
     171          infos_theImageAndInfos = jQuery("#theImageAndInfos").infos();
     172
     173          pos_left = infos_theImage.left;
     174          x = infos_body.left;
     175          imageInfos_width = jQuery("#imageInfos").css("width");
     176          infos_body = jQuery("body").infos();
     177
     178           retrait_w = infos_theImage.margin.left
     179                        + infos_theImage.margin.right
     180                        + infos_theImage.borderwidth.left
     181                        + infos_theImage.borderwidth.right
     182                        + infos_theImage.padding.left
     183                        + infos_theImage.padding.right;
     184
     185           retrait_w += infos_the_page.margin.left
     186                        + infos_the_page.margin.right
     187                        + infos_the_page.borderwidth.left
     188                        + infos_the_page.borderwidth.right
     189                        + infos_the_page.padding.left
     190                        + infos_the_page.padding.right;
     191
     192           retrait_w += infos_body.margin.left +
     193                        infos_body.margin.right;
     194
     195           retrait_h = infos_theImage.margin.top
     196                        + infos_theImage.margin.bottom
     197                        + infos_theImage.borderwidth.top
     198                        + infos_theImage.borderwidth.bottom
     199                        + infos_theImage.padding.top
     200                        + infos_theImage.padding.bottom;
     201
     202           t0 = infos_imageToolBar.bottom + infos_imageToolBar.margin.top + infos_imageToolBar.margin.bottom;
     203           if ((t0 > 0) && (infos_theImageAndInfos.top == 0))
     204             retrait_h += t0;
     205
     206           else
     207             retrait_h += infos_theImageAndInfos.top;  // top+height
     208
     209            jQuery("#theMainImage").css({margin:"auto"       
     210            });
     211
     212           retrait_img = infos_theMainImage.borderwidth.left
     213            + infos_theMainImage.borderwidth.right
     214            + infos_theMainImage.padding.left
     215            + infos_theMainImage.padding.right;
     216           retrait_img += infos_llgbo.borderwidth.right + infos_llgbo.borderwidth.right;
     217
     218        if (theme.match(RegExp("elegant", "gi")) ) {
     219          if (all_width != true) {
     220            new_width = 8  +
     221                        infos_imageInfos.width +
     222                        infos_imageInfos.borderwidth.left +
     223                        infos_imageInfos.borderwidth.right +
     224                        infos_imageInfos.margin.left +
     225                        infos_imageInfos.borderwidth.right +
     226                        infos_imageInfos.padding.left +
     227                        infos_imageInfos.padding.right;                   
     228              }else{
     229                  new_width=0 ;
     230              }
     231                width_theImage= (jQuery(window).width() - new_width)
     232             
     233        }else if (theme.match(RegExp("stripped", "gi")) ) {
     234                width_theImage = (jQuery(window).width() );
     235        }else{
     236                width_theImage = (jQuery(window).width() );
     237          }
     238
     239
     240              b = 2;
     241
     242              n = Bandeau_t;
     243              if (infos_llgbo.top > 0) {
     244                if ((infos_llgbo.top - retrait_h)>0 ) {
     245                  b = infos_llgbo.top - retrait_h;
     246                } else {
     247                b = infos_llgbo.top;
     248                }
     249              }
     250              retrait_h += (b * 2)
     251          height_theImage = jQuery(window).height() - retrait_h  ; 
     252          width_theImage -= retrait_w ;
     253          //===============================================================
     254          width_theMainImage = width_theImage - retrait_img;
     255          height_theMainImage = parseInt(width_theMainImage / rapport) - (retrait_img );
     256          //===============================================================
     257          // test débordement
     258          if ((height_theMainImage  ) > height_theImage -(retrait_img + (b*2))) {           
     259            height_theMainImage = height_theImage - (retrait_img );
     260            width_theMainImage = parseInt(height_theMainImage * rapport);
     261          } else {
     262            width_theMainImage = width_theImage - (retrait_img);
     263            height_theMainImage = parseInt(width_theMainImage / rapport);
     264          }
     265          height_theImage += (b * 2);
     266
     267        Zone_image = {
     268          image: {  width: width_theMainImage    ,
     269                    height: height_theMainImage
     270                    },
     271                  container: {
     272                    width: width_theImage  ,
     273                    height: height_theImage 
     274                              }
     275                };
     276 
     277           Zone_image.marge = { width: retrait_w, height: retrait_h };
     278           //============ a corriger en fonction window ====
     279       
     280             return Zone_image;
     281  }
     282
    163283//=====================================================================
    164     old_window = { width: 0, height: 0 };
    165 List_autosize = new Array();
    166284function Autosize_resize(Obj) {
    167 
    168285    conf = jQuery(Obj).get(0).conf;
    169286    Obj = jQuery(Obj).get(0).obj;
    170287    myWindow = jQuery("#" + conf.parent).infos();
    171 
    172288    if (myWindow.width == 0) myWindow = jQuery(window).infos();
    173289    marge_basse = 0;
    174290    if (conf.MargeBasse)
    175         marge_basse = jQuery().Get_Val_int(
    176             conf.MargeBasse
    177     );
     291        marge_basse = jQuery().Get_Val_int (conf.MargeBasse );
    178292    marge_top = 0;
    179293    if (conf.MargeHaute)
    180         marge_top = jQuery().Get_Val_int(
    181             conf.MargeHaute
    182     );
    183     info_Obj = jQuery(Obj).infos();
     294        marge_top = jQuery().Get_Val_int(conf.MargeHaute);
     295    infos_Obj = jQuery(Obj).infos();
    184296    h1_left = jQuery(Obj).absoluteLeft();
    185297    h1_top = jQuery(Obj).absoluteTop();
    186298
    187     if (h1_top < info_Obj.height)
     299    if (h1_top < infos_Obj.height)
    188300        h1 = (myWindow.height - h1_top - marge_basse - marge_top);
    189301    else
    190302        h1 = (myWindow.height - marge_basse);
    191     rap = info_Obj.height / info_Obj.width;
     303    rap = infos_Obj.height / infos_Obj.width;
    192304    w2 = parseInt(h1 / rap);
    193     if (w2 < info_Obj.width)
    194         marginLeft = info_Obj.left + parseInt((info_Obj.width - w2) / 2) + "px";
     305    if (w2 < infos_Obj.width)
     306        marginLeft = infos_Obj.left + parseInt((infos_Obj.width - w2) / 2) + "px";
    195307    else
    196308        marginLeft = "auto";
     
    214326      h1_top = jQuery(img).absoluteTop() - h1_top;
    215327      h1_bottom =  Obj_h  - h1_top;
    216       info_img = { width: conf.width[i], height: conf.height[i] }; //origine
     328      infos_img = { width: conf.width[i], height: conf.height[i] }; //origine
    217329        img_rap = conf.rap[i];
    218         if (info_img.width > Obj_w) h1 = parseInt(Obj_w / img_rap);
     330        if (infos_img.width > Obj_w) h1 = parseInt(Obj_w / img_rap);
    219331      h1 -= h1_top;
    220332      if (h1 > Obj_h - h1_top) {
     
    233345      h1_top = jQuery(this).absoluteTop() - h1_top;
    234346      h1_bottom = Obj_h - h1_top;
    235       info_img = { width: conf.width[i], height: conf.height[i] }; //origine
     347      infos_img = { width: conf.width[i], height: conf.height[i] }; //origine
    236348      img_rap = conf.rap[i];
    237       if (info_img.width > Obj_w) h1 = parseInt(Obj_w / img_rap);
     349      if (infos_img.width > Obj_w) h1 = parseInt(Obj_w / img_rap);
    238350      h1 -= h1_top;
    239351      if (h1 > Obj_h - h1_top) {
     
    416528}
    417529//==============================================================
     530var infos_theImageAndInfos = jQuery("#theImageAndInfos").infos(); // Cadre general
     531var infos_theMainImage = jQuery("#theMainImage").infos();         // Cadre general
     532var infos_imageInfos = jQuery("#imageInfos").infos();             // Cadre general
     533var infos_the_page = jQuery("#the_page").infos();
     534var infos_content = jQuery("#content").infos();
     535var infos_titrePage = jQuery("#titrePage").infos();
     536var infos_imageInfoBar = jQuery("#imageInfoBar").infos();
     537var infos_theHeader = jQuery("#theHeader").infos();
     538var infos_imageToolBar = jQuery("#imageToolBar").infos();
     539var infos_body = jQuery("body").infos();
     540var infos_llgbo = jQuery("#llgbo").infos();
     541var infos_llgboh2 = jQuery("#llgboh2").infos();
     542//===============================================================
     543
    418544jQuery(document).ready(
    419545     function (jQuery) {
    420546       // jQuery(':Autosize');
     547
     548
    421549       jQuery(window).unload(function () {
    422550         try {
     
    445573         href = location.href;
    446574         var aff_ok = false;
    447        /*
     575         /*
    448576         jQuery.post(href, function (data) {
    449            nu_img--;
    450            if (nu_img < 0) nu_img = 9;
    451            jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
    452            //alert("Data Loaded: " + data);
    453            Wait_Affichage();
     577         nu_img--;
     578         if (nu_img < 0) nu_img = 9;
     579         jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
     580         //alert("Data Loaded: " + data);
     581         Wait_Affichage();
    454582         });
    455 */
     583         */
    456584         // jQuery(':Set_Class');
    457585         if (typeof img_width == "undefined") {
     
    491619         jQuery("#the_page").css({ top: "0px" });
    492620
    493          Info_the_page = jQuery("#the_page").infos();
    494          info_HeaderBar = jQuery("#imageHeaderBar").infos();
     621         infos_theImageAndInfos = jQuery("#theImageAndInfos").infos(); // Cadre general
     622         infos_theMainImage = jQuery("#theMainImage").infos();         // Cadre general
     623         infos_imageInfos = jQuery("#imageInfos").infos();             // Cadre general
     624        infos_the_page = jQuery("#the_page").infos();
     625         infos_content = jQuery("#content").infos();
     626         infos_titrePage = jQuery("#titrePage").infos();
     627         infos_imageInfoBar = jQuery("#imageInfoBar").infos();
     628         infos_theHeader = jQuery("#theHeader").infos();
     629         infos_imageToolBar = jQuery("#imageToolBar").infos();
     630         infos_imageHeaderBar = jQuery("#imageHeaderBar").infos();
    495631
    496632         Parent = "#theImage";
    497          var info_theImage = jQuery(Parent).infos();
     633         infos_theImage = jQuery(Parent).infos();
    498634         Zone_Affichage = jQuery(Parent).infos();
    499635         //
    500636         var old_window = { width: 0, height: 0 };
    501637
    502          Bandeau_bas = Info_Description_f(Parent);
     638         Bandeau_bas = infos_Description_f(Parent);
    503639         if (typeof Bandeau_bas != "undefined") Bandeau = Bandeau_bas.top;
    504640         else Bandeau = 0;
    505641
     642
     643         rapport = parseInt(img_init.width) / parseInt(img_init.height);
     644
     645
     646
     647
    506648         old_window = { width: 0, height: 0 };
    507          jQuery().newResize();
     649         jQuery().newResize(true);
    508650         Wait_Affichage();
    509651
     
    535677       jQuery.fn.extend({
    536678         //==========================================================
    537          Info_description: function (e) {
    538            return Info_Description_f(e);
     679         infos_description: function (e) {
     680           return infos_Description_f(e);
    539681
    540682         },
     
    556698         },
    557699         //====================================================
    558          newResize: function () {
    559            //
    560            //set_cl();
     700         newResize: function (force) {
     701           if (force && force == true) old_window.width = 0;
     702           id2 = jQuery("#theImage img").attr("usemap");
     703           if (typeof id2 == "undefined") id2 = jQuery("#theImage").attr("usemap");
     704           if (id2) {
     705             if (id2.match(RegExp("#map", "gi"))) {
     706               return true;
     707             }
     708           }
    561709           if (typeof options != "undefined")
    562710             if (options.imageAutosize) {
    563711               // Wait_Affichage();
    564712               return true; //stripped
    565              }
    566 
    567              if (typeof Bandeau_bas == "undefined")
     713             }         
     714           if (typeof Bandeau_bas == "undefined")
    568715             return true;
    569 
    570716           if (typeof cl_visible == "undefined") return true;
    571717           if (!cl_visible == true) { return true; }
    572718           var chk = eval(user_status + "_enabled");
    573719           if (chk == "") { return true; }
    574            //=================================================================
     720           //=================================================================
     721           
     722           nds = jQuery("#imageInfos").css("display");
     723           Zone_image = Calcul_Image(nds == "none");
     724
    575725           var winwidth = jQuery(window).width();
    576726           var winheight = jQuery(window).height();
     727
     728
    577729           n = winwidth - old_window.width;
    578730           if (Math.abs(n) < 1) {
    579731             n = winheight - old_window.height;
    580732             if (Math.abs(n) < 1) {
    581                n = winheight - old_window.height;
    582                //return false;
    583 
     733               return false;
    584734             }
    585735           }
     736
    586737           if (Math.abs(n) > 30) nu_img = 0;
    587738           nu_img++;
    588            //if (nu_img > 10) return true;
     739           if (nu_img > 10) return true;
     740
    589741           old_window = jQuery(window).infos();
    590            //===========================================================================
    591 
    592            jQuery(Parent).width(winwidth);
    593 
    594            var Cadre = jQuery(Parent).get(0);
    595 
    596            //===============  Information cadre ======
    597            var info_the_page = jQuery("#the_page").infos();
    598            //=============================================================================
    599 
    600            var info_content = jQuery("#content").infos();
    601            var info_titrePage = jQuery("#titrePage").infos();
    602            var info_imageInfoBar = jQuery("#imageInfoBar").infos();
    603            var info_theHeader = jQuery("#theHeader").infos();
    604 
    605            var Zone_Affichage = jQuery(Parent).infos();
    606            var info_ToolBar = jQuery("#imageToolBar").infos();
     742           //========= Récupération des informations =============       
     743
     744
    607745           var marge = 0;
    608746           var marge_right = 0;
     
    610748
    611749           var Licence = jQuery(".licencetag");
    612            info_Licence = jQuery(".licencetag").infos();
    613 
    614            // jQuery(".licencetag").addClass('imageComment');
    615  /*
    616            hd_click = jQuery("#theImage a[href]");
    617            if (hd_click.length > 0) {
    618              hd_click = hd_click[0];
    619              if (hd_click.href.match(RegExp("phpWGOpenWindow", "gi"))) {
    620 
    621                hd_click = jQuery("#theImage p");
    622                jQuery(hd_click).addClass('imageComment');
    623                jQuery(hd_click).wrapAll('<div id="_Comment2"  />');
    624              }
    625            }
    626 
    627            if (jQuery('#_Comment, ').length == 0)
    628              jQuery('.imageComment, ').wrapAll('<div id="_Comment"  />');
    629             */
    630 
    631            if (theme.match(RegExp("simple", "g"))) {
    632              if (info_ToolBar.width > 0)
    633                marge = (Zone_Affichage.width - info_ToolBar.width) / 2;
    634              else if (info_the_page.width > 0)
    635                marge = (Zone_Affichage.width - info_the_page.width) / 2;
     750           infos_Licence = jQuery(".licencetag").infos();
     751
     752           if (theme.match(RegExp("simple", "gi"))) {
     753             if (infos_imageToolBar.width > 0)
     754               marge = (Zone_Affichage.width - infos_imageToolBar.width) / 2;
     755             else if (infos_the_page.width > 0)
     756               marge = (Zone_Affichage.width - infos_the_page.width) / 2;
    636757
    637758             marge_right = marge;
    638759             marge_left = marge;
    639760
    640              if (info_content.width > 100) {
    641 
    642                marge_left = (info_imageInfoBar.margin.left) + 1;
    643                marge_right = (marge_left + info_imageInfoBar.margin.right) + 1;
    644                winwidth = info_content.width;
    645                marge_right = info_imageInfoBar.width + marge_right;
     761             if (infos_content.width > 100) {
     762
     763               marge_left = (infos_imageInfoBar.margin.left) + 1;
     764               marge_right = (marge_left + infos_imageInfoBar.margin.right) + 1;
     765               winwidth = infos_content.width;
     766               marge_right = infos_imageInfoBar.width + marge_right;
    646767
    647768             }
     769           } else if (theme.match(RegExp("elegant", "gi"))) {
     770
     771             infos_theMainImage = jQuery("#theMainImage").infos(); // Image
     772             infos_imageHeaderBar = jQuery("#imageHeaderBar").infos();
     773             infos_window = jQuery(window).infos();
     774
     775             infos_theImage = jQuery("#theImage").infos(); // conteneur image
     776             infos_imageInfos = jQuery("#imageInfos").infos(); // conteneur infos
     777
     778             if (jQuery("#imageInfos").is(":hidden")) {
     779
     780               marge_right = infos_imageInfos.margin.left + infos_imageInfos.margin.right;
     781               marge_right += infos_imageInfos.borderwidth.left + infos_imageInfos.borderwidth.right;
     782
     783               marge_left = infos_imageInfos.left + 2;
     784             } else {
     785
     786               marge_right = infos_imageInfos.margin.left + infos_imageInfos.margin.right;
     787               marge_right += infos_imageInfos.width + infos_imageInfos.borderwidth.left + infos_imageInfos.borderwidth.right;
     788
     789               marge_left = infos_imageInfos.left + 2;
     790             }
     791
    648792           } else {
    649              if (theme.match(RegExp("stripped", "gi"))) {
    650 
    651                info_imageHeaderBar = jQuery("#imageHeaderBar").infos();
    652                marge = (info_the_page.width - info_content.width) / 2;
     793             infos_imageHeaderBar = jQuery("#imageHeaderBar").infos();
     794             if (theme.match(RegExp("stripped", "gi")) || theme.match(RegExp("elegant", "gi"))) {
     795               marge = (infos_the_page.width - infos_content.width) / 2;
    653796               marge_right = marge + 2;
    654797               marge_left = marge + 2;
    655              } else if (info_ToolBar.width > 0) {
    656                marge = (info_the_page.width - info_ToolBar.width) / 2;
    657 
    658                marge_right = marge + info_the_page.left;
     798             } else if (infos_imageToolBar.width > 0) {
     799               marge = (infos_the_page.width - infos_imageToolBar.width) / 2;
     800
     801               marge_right = marge + infos_the_page.left;
    659802               marge_left = marge;
    660803
    661804             }
    662              winwidth = info_the_page.width;
     805             winwidth = infos_the_page.width;
    663806           }
    664807
     
    667810           marge_right += Zone_Affichage.borderwidth.right;
    668811           marge_left += Zone_Affichage.borderwidth.left;
    669            if ((marge_right + marge_left) < winwidth ) {
    670            winwidth -= (marge_right + marge_left);
    671            }
     812           if ((marge_right + marge_left) < winwidth) {
     813             winwidth -= (marge_right + marge_left);
     814           }
     815   
     816
    672817
    673818           if (Type_Img == "pamoorama") {
     
    685830             }
    686831
    687              var info_pamoorama = jQuery("#pamoorama").infos();
    688              var info_pamoorama_outter = jQuery("#pamoorama_outter").infos();
    689              var info_pamoorama_inner = jQuery("#pamoorama_inner").infos();
    690              var info_pamoorama_footer = jQuery("#pamoorama_footer").infos();
    691              var info_pamoorama_frame = jQuery("#pamoorama_frame").infos();
     832             var infos_pamoorama = jQuery("#pamoorama").infos();
     833             var infos_pamoorama_outter = jQuery("#pamoorama_outter").infos();
     834             var infos_pamoorama_inner = jQuery("#pamoorama_inner").infos();
     835             var infos_pamoorama_footer = jQuery("#pamoorama_footer").infos();
     836             var infos_pamoorama_frame = jQuery("#pamoorama_frame").infos();
    692837             The_MainImage = jQuery("#pamoorama");
    693838             obj = The_MainImage.get(0);
     
    704849           switch (Type_Img) {
    705850             case "map":
    706                img_reelle.height = winheight; // info_img.height;
    707                info_map = jQuery("#mapPicture").infos();
    708                jQuery("#map").css("left", info_map.width + "px");
    709                Bandeau_bas.height = 10;
    710 
    711                if (theme.match(RegExp("simple", "g"))) {
    712                  img_reelle.width = winwidth; //- info_map.width -marge_right;
    713                } else {
    714                  img_reelle.width = winwidth - info_map.width - marge_right;
    715                }
    716 
    717 
    718                info_the_page = jQuery("#the_page").infos();
    719                winwidth = img_reelle.width;
     851
    720852
    721853               ;
     
    724856
    725857
    726              case "panorama":
    727                //  return true;
    728 
    729                //the theMainImage ??
     858             case "panorama":     
    730859               if (!The_MainImage) {
    731860                 The_MainImage = jQuery("#theMainImage");
     
    733862                   return;
    734863                 The_MainImage = jQuery().Get_Img_Maxi("#Panorama img[alt]");
    735                  // return;
     864               
    736865                 if (The_MainImage.length > 0)
    737866                   The_MainImage = The_MainImage[0];
     
    739868                   The_MainImage = jQuery().Get_Img_Maxi("#Panorama img[alt]");
    740869               }
    741                info_theImage = jQuery(The_MainImage).infos();
    742                info_the_page = jQuery("#the_page").infos();
    743                jQuery("#theImage").height(info_theImage.height);
    744                img_finale.height = info_theImage.height;
     870               infos_theImage = jQuery(The_MainImage).infos();
     871               infos_the_page = jQuery("#the_page").infos();
     872               jQuery("#theImage").height(infos_theImage.height);
     873               img_finale.height = infos_theImage.height;
    745874
    746875               break
     
    752881               }
    753882
    754                info_the_page = jQuery("#the_page").infos();
     883               infos_the_page = jQuery("#the_page").infos();
    755884
    756885
     
    762891
    763892               }
    764                info_theImage = jQuery(The_MainImage).infos();
    765                info_the_page = jQuery("#the_page").infos();
     893               infos_theImage = jQuery(The_MainImage).infos();
     894               infos_the_page = jQuery("#the_page").infos();
    766895
    767896
     
    769898             case "embed":
    770899               //
    771                if (info_img.width == 0)
    772                  info_img = jQuery("#thePicturePage").infos();
    773                if (info_img.width == 0)
    774                  info_img = jQuery("#the_page").infos();
    775                info_theImage = info_img;
    776                info_the_page = jQuery("#the_page").infos();
     900               if (infos_img.width == 0)
     901                 infos_img = jQuery("#thePicturePage").infos();
     902               if (infos_img.width == 0)
     903                 infos_img = jQuery("#the_page").infos();
     904               infos_theImage = infos_img;
     905               infos_the_page = jQuery("#the_page").infos();
    777906               Bandeau_bas.height = Bandeau_bas.top;
    778907
    779908               iph1 = jQuery("#theImage div").infos();
    780                if ((winheight - iph1.bottom)>0)
    781                Bandeau_bas.height =(winheight - iph1.bottom) + 50;
     909               if ((winheight - iph1.bottom) > 0)
     910                 Bandeau_bas.height = (winheight - iph1.bottom) + 50;
    782911               else
    783                Bandeau_bas.height = 50;
     912                 Bandeau_bas.height = 50;
    784913
    785914
    786915               if (rapport < 0) {
    787                  img_height = info_img.height;
    788                  img_width = info_img.width;
     916                 img_height = infos_img.height;
     917                 img_width = infos_img.width;
    789918                 img_reelle.height = img_height;
    790919                 img_reelle.width = img_width;
     
    793922               break
    794923             case "charlie":
    795                info_theImage = info_img;
    796                info_the_page = jQuery("#the_page").infos();
     924               infos_theImage = infos_img;
     925               infos_the_page = jQuery("#the_page").infos();
    797926               if (rapport < 0) {
    798                  img_height = parseInt(info_img.height);
    799                  img_width = parseInt(info_img.width);
    800 
    801                  img_reelle.height = parseInt(info_img.height);
    802                  img_reelle.width = parseInt(info_img.width);
     927                 img_height = parseInt(infos_img.height);
     928                 img_width = parseInt(infos_img.width);
     929                 img_reelle.height = parseInt(infos_img.height);
     930                 img_reelle.width = parseInt(infos_img.width);
    803931               }
    804932               break
     
    806934
    807935             case "pamoorama":
    808 
    809936               img_reelle = { height: img_height, width: img_width };
    810 
    811937               //=========================================================
    812938               img_reelle.height = img_height;
    813939               img_reelle.width = Zone_Affichage.width;
    814 
    815 
    816940               The_MainImage = myPamoorama.image;
    817                info_theImage = jQuery("#pamoorama").infos();
    818                //img_finale.height = info_theImage.height;
    819                //info_theImage.height = img_reelle.height;
    820 
    821                info_theImage.height = info_theImage.height;
    822 
    823                info_the_page = jQuery("#the_page").infos();
    824 
     941               infos_theImage = jQuery("#pamoorama").infos();
     942               infos_theImage.height = infos_theImage.height;
     943               infos_the_page = jQuery("#the_page").infos();
    825944               break
    826 
    827 
    828            }
    829            //================= Vérification taille image ==================
     945           }
     946 //================= Vérification taille image ==================
    830947           MinWidth = jQuery(The_MainImage).css("minWidth");
    831948           if (MinWidth == "0px")
     
    854971           maxHeight = jQuery(The_MainImage).Get_Val_int(MaxHeight, winheight, "0");
    855972
    856 
    857 
    858973           mini_width = parseInt(miniWidth);
    859974           mini_height = parseInt(miniHeight);
     
    861976           img_reelle.width = parseInt(img_reelle.width);
    862977
    863            if (img_reelle.width < mini_width) {
    864              //jQuery(Cadre).width(mini_width); 1.6.2
     978           if (img_reelle.width < mini_width)
    865979             return true;
    866 
    867            }
     980         
    868981
    869982           img_reelle.height = parseInt(img_reelle.height);
    870983           if (img_reelle.height < parseInt(mini_height))
    871984             return true;
    872            //==================================================================================
    873            //---------------------------------------------
    874            //  jQuery(Parent).width(winwidth);
    875            //  jQuery(Parent).css({ height: "auto" });
    876            //  jQuery(Parent).height(Zone_Affichage.height);
    877            //---------------------------------------------
    878 
    879            if (rapport < 0) {
    880              img_init.height = parseInt(img_height);
    881              img_init.width = parseInt(img_width);
    882 
    883              rapport = img_width / img_height;
    884 
    885              if (Type_Img != "map")
    886                rapport = (img_init.width / img_init.height);
    887              else
    888                rapport = 0;
    889 
    890            }
    891 
    892 
    893            //=============== Zone d'affichage ============================
    894 
    895            borderW = Zone_Affichage.borderwidth.left;
    896            borderW += Zone_Affichage.borderwidth.right;
    897 
    898 
    899            Zone_Affichage.width = winwidth - borderW;
    900 
    901 
     985//======================================================================
     986           jQuery("#theMainImage").width(Zone_image.image.width);
     987           jQuery("#theMainImage").height(Zone_image.image.height);
     988           jQuery("#theImage").width(Zone_image.container.width);
     989           jQuery("#theImage").height(Zone_image.container.height);
     990         
     991return true;
     992 //=============== Zone d'affichage ============================ 
     993           Zone_Affichage.width = winwidth;
     994           borderH = Zone_Affichage.borderwidth.top;
     995           borderH += Zone_Affichage.borderwidth.bottom;
     996
     997           Zone_Affichage.height = winheight - borderH;
    902998
    903999           var Licence = jQuery(".licencetag");
    904            info_Licence = jQuery(".licencetag").infos();
     1000           infos_Licence = jQuery(".licencetag").infos();
    9051001
    9061002           var MainImage = jQuery("#theMainImage");
     
    9121008           if (theme.match(RegExp("sobre", "g"))) {
    9131009
    914              //   correction = -info_Licence.padding.top;
     1010             //   correction = -infos_Licence.padding.top;
    9151011             if (Type_Img == 'img') {
    9161012               if (msie == true) correction = 0;
     
    9301026           } else if (theme.match(RegExp("os", "g"))) {
    9311027             correction += 0; //??
    932            }
    933 
     1028           } else if (theme.match(RegExp("elegant", "gi"))) {
     1029             correction += 0; //??
     1030           }
    9341031           //====================================================
    9351032           if (options.imageAutosizeMargin > 0) Marge_Basse = options.imageAutosizeMargin;
     
    9381035           h = 0;
    9391036           Bandeau = 0;
    940 
     1037           infos_body = jQuery("body").infos();
    9411038           h = (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom);
    942            if (typeof Bandeau_t != "undefined") Bandeau = Bandeau_t.img_top | 0;
    943            Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction - h;
     1039           h -= infos_body.margin.bottom;
     1040           h -= infos_body.margin.top;
     1041           if (typeof Bandeau_t != "undefined") {
     1042             Bandeau = Bandeau_t.top | 0;
     1043
     1044           }
     1045           Zone_Affichage.height -= Bandeau + Marge_Basse - correction - h; // 784 -127
     1046
     1047
    9441048           //=========================================================================
    9451049           if (Zone_Affichage.height < mini_height2)
     
    9481052             Zone_Affichage.width = mini_width2;
    9491053           //=========================================================================
     1054           /*
    9501055           if (typeof (Bandeau_bas) != "undefined") {
    951              if (Bandeau_bas.height < Zone_Affichage.height)
    952                  Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom);
     1056           if (Bandeau_bas.height < Zone_Affichage.height)
     1057           Zone_Affichage.height += (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom);
    9531058           } else {
    954            }
    955 
    956            var Image_height = Zone_Affichage.height;
     1059
     1060           }
     1061           */
     1062
     1063
     1064
     1065           img_finale.width = Zone_Affichage.width - (Zone_Affichage.borderwidth.left + Zone_Affichage.borderwidth.right);
     1066           img_finale.height = Zone_Affichage.height - (Zone_Affichage.borderwidth.left + Zone_Affichage.borderwidth.bottom);
     1067
     1068
     1069           var Image_height = img_finale.height;
    9571070
    9581071           //=============================================================
     
    9701083           Image_height = parseInt(img_reelle.height * echelle);
    9711084           //============================================================
    972 
    9731085           var Image_width;
    9741086           if (rapport > 0)
     
    9811093
    9821094           //===============================================================
     1095           jQuery(Cadre).width(Zone_Affichage.width);
     1096           jQuery(Cadre).height(Zone_Affichage.height);
     1097           jQuery(The_MainImage).removeAttr("width");
     1098           jQuery(The_MainImage).css({ height: Image_height }); //image
     1099
     1100
     1101
    9831102           align_auto = "center";
    9841103           if (jQuery("#theImg").css("textAlign"))
     
    9991118             var marges = 0;
    10001119
    1001              if (typeof (info_img) != "undefined") {
    1002                widthmin -= info_img.borderwidth.left || 0;
    1003                widthmin -= info_img.borderwidth.right || 0;
     1120             if (typeof (infos_img) != "undefined") {
     1121               widthmin -= infos_img.borderwidth.left || 0;
     1122               widthmin -= infos_img.borderwidth.right || 0;
    10041123             }
    10051124             widthmin -= marges;
     
    10421161             t1 = llgboframe;
    10431162             if (!The_MainImage.src) {
    1044                The_MainImage = jQuery("#gbo").find("img").get(0)
     1163               The_MainImage = jQuery("#llgbo").find("img").get(0)
    10451164               if (!The_MainImage.src) {
    10461165                 The_MainImage = jQuery(Parent).find("div").get(0)
     
    10511170               heightgbo = img_finale.height;
    10521171               if (Type_Img == "panorama") {
    1053                  heightgbo = info_theImage.height;
    1054                  img_finale.height = info_theImage.height;
     1172                 heightgbo = infos_theImage.height;
     1173                 img_finale.height = infos_theImage.height;
    10551174               }
    10561175
     
    10641183
    10651184               if (wingbo > winwidth) {
    1066                  jQuery("#gbo").width(winwidth);
    1067                  jQuery("#gbo").height(winheight);
    1068                  jQuery("#gbo").css("width", winwidth + "px");
    1069                  jQuery("#gbo").css("height", winheight + "px");
     1185                 jQuery("#llgbo").width(winwidth);
     1186                 jQuery("#llgbo").height(winheight);
     1187                 jQuery("#llgbo").css("width", winwidth + "px");
     1188                 jQuery("#llgbo").css("height", winheight + "px");
    10701189               }
    10711190               else {
    1072                  jQuery("#gbo").width(wingbo);
    1073                  jQuery("#gbo").height(heightgbo);
    1074                  jQuery("#gbo").css("width", wingbo + "px");
    1075                  jQuery("#gbo").css("height", heightgbo + "px");
     1191                 jQuery("#llgbo").width(wingbo);
     1192                 jQuery("#llgbo").height(heightgbo);
     1193                 jQuery("#llgbo").css("width", wingbo + "px");
     1194                 jQuery("#llgbo").css("height", heightgbo + "px");
    10761195               }
    10771196
     
    11201239           //================ Zone affichage =========================
    11211240
    1122 
    11231241           //  jQuery(Cadre).css("top", "0px");
    11241242           jQuery("#standard").css("top", 0 + "px");
     
    11411259
    11421260             jQuery(Cadre).css({ width: Zone_Affichage.width + "px" });
     1261           } else if (theme.match(RegExp("elegant", "gi"))) {
     1262
     1263             // jQuery(Cadre).css("width", "auto");
     1264             jQuery(Cadre).css({ height: Zone_Affichage.height + "px", width: "auto" }); //conteneur
    11431265
    11441266           } else {
     
    11491271
    11501272           if (Type_Img == "panorama" || Type_Img == "pamoorama") {
    1151              img_finale.height = info_theImage.height;
     1273             img_finale.height = infos_theImage.height;
    11521274             Zone_Affichage.height = img_finale.height;
    11531275
     
    12081330               });
    12091331               jQuery("object").css({ width: img_finale.width + "px",
    1210                                     height: img_finale.height + "px"
    1211                                   });
    1212               jQuery("video").css({ width: img_finale.width + "px",
    1213                                     height: img_finale.height + "px"
    1214                                   });
     1332                 height: img_finale.height + "px"
     1333               });
     1334               jQuery("video").css({ width: img_finale.width + "px",
     1335                 height: img_finale.height + "px"
     1336               });
    12151337
    12161338
     
    12541376             n1 = jQuery("#Panorama div").width();
    12551377             jQuery(".panorama-viewport").css("margin", "auto");
    1256              n = info_imageToolBar;
     1378             n = infos_imageToolBar;
    12571379
    12581380
     
    12611383
    12621384
    1263              info_theImage.height = Zone_Affichage.height;
     1385             infos_theImage.height = Zone_Affichage.height;
    12641386             img_height = myPamoorama.imageHeight
    12651387             if (theme.match(RegExp("simple", "g"))) {
     
    12671389             }
    12681390             new_width = Zone_Affichage.width - marge_right - marge_left;
    1269              new_width = Zone_Affichage.width - (info_theImage.borderwidth.right + info_theImage.borderwidth.left);
     1391             new_width = Zone_Affichage.width - (infos_theImage.borderwidth.right + infos_theImage.borderwidth.left);
    12701392             if (new_width > myPamoorama.imageWidth)
    12711393               new_width = myPamoorama.imageWidth;
     
    12731395
    12741396
    1275              Zone_Affichage.height += info_pamoorama_footer.height;
    1276              zoom = info_theImage.height / img_height;
     1397             Zone_Affichage.height += infos_pamoorama_footer.height;
     1398             zoom = infos_theImage.height / img_height;
    12771399             myPamoorama.options.width = new_width * zoom;
    12781400             //  if(msie || safari) jQuery("#pamoorama_inner ").css({ zoom: zoom });
     
    12871409
    12881410             //====================================================
    1289              info_pamoorama = jQuery("#pamoorama").infos();
    1290              img_finale.height = info_pamoorama.height - info_pamoorama_footer.height;
     1411             infos_pamoorama = jQuery("#pamoorama").infos();
     1412             img_finale.height = infos_pamoorama.height - infos_pamoorama_footer.height;
    12911413             img_finale.width = new_width;
    12921414
     
    12951417             jQuery("#pamoorama_thumb").width(200 / zoom);
    12961418             // commenter sinon outter augmente à chaque resize
    1297              //  jQuery("#pamoorama_outter").height(info_pamoorama.height - info_pamoorama_footer.height);
     1419             //  jQuery("#pamoorama_outter").height(infos_pamoorama.height - infos_pamoorama_footer.height);
    12981420             // pamoorama_frame
    12991421
     
    13031425             //
    13041426             //====================================================
    1305              info_pamoorama = jQuery("#pamoorama").infos();
    1306              info_pamoorama_outter = jQuery("#pamoorama_outter").infos();
    1307              info_pamoorama_inner = jQuery("#pamoorama_inner").infos();
    1308              info_pamoorama_footer = jQuery("#pamoorama_footer").infos();
    1309              info_pamoorama_frame = jQuery("#pamoorama_frame").infos();
    1310 
    1311              info_frame = jQuery(myPamoorama.frame).infos();
     1427             infos_pamoorama = jQuery("#pamoorama").infos();
     1428             infos_pamoorama_outter = jQuery("#pamoorama_outter").infos();
     1429             infos_pamoorama_inner = jQuery("#pamoorama_inner").infos();
     1430             infos_pamoorama_footer = jQuery("#pamoorama_footer").infos();
     1431             infos_pamoorama_frame = jQuery("#pamoorama_frame").infos();
     1432
     1433             infos_frame = jQuery(myPamoorama.frame).infos();
    13121434
    13131435
     
    13241446           } else {
    13251447             //===map ? luciano ===
    1326              jQuery(The_MainImage).height(img_finale.height);
    1327              jQuery(The_MainImage).width(img_finale.width);
    1328              jQuery(The_MainImage).css({ height: img_finale.height + "px ",
    1329                width: img_finale.width + "px "
    1330              });
     1448             //   jQuery(The_MainImage).css({ height: img_finale.height + "px ",  width: img_finale.width + "px });
     1449             //   jQuery(The_MainImage).height(img_finale.height );
     1450             //   jQuery(The_MainImage).width(img_finale.width );
     1451             //   jQuery(The_MainImage).attr({ width: img_finale.width  });
     1452             h = img_finale.height;
     1453             h = Zone_Affichage.height - Zone_Affichage.borderwidth.top - Zone_Affichage.borderwidth.bottom;
     1454             h -= (infos_theImage.borderwidth.bottom + infos_theImage.borderwidth.top);
     1455
     1456             jQuery(The_MainImage).attr({ height: h - 3 }); //image
     1457             if (theme.match(RegExp("elegant", "gi"))) {
     1458               return true;
     1459
     1460             }
    13311461             if (theme.match(RegExp("luciano", "g"))) {
    13321462               imgl = 180;
     
    13411471             }
    13421472
     1473           }
     1474
     1475           var theImg = document.getElementById("theMainImage");
     1476           if (theImg) {
     1477             theImg.removeAttribute("width");
     1478             theImg.removeAttribute("height");
     1479             jQuery(The_MainImage).css("width", img_finale.width + "px");
    13431480           }
    13441481
     
    13491486             jQuery("#navThumbNext").css({ display: 'none' });
    13501487             jQuery("#navThumbPrev").css({ display: 'none' });
    1351              jQuery("#theImage").css({ marginTop: info_ToolBar.height + "px", marginLeft: "0px",
     1488             jQuery("#theImage").css({ marginTop: infos_imageToolBar.height + "px", marginLeft: "0px",
    13521489               width: winwidth + "px",
    13531490               height: winheight + "px"
     
    13901527               jQuery("#imageToolBar").css({ position: "static" });
    13911528
    1392                info_imageInfoBar = jQuery("#imageInfoBar").infos();
    1393                if (info_imageInfoBar.bottom < info_img.bottom) {
    1394                  //   jQuery("#imageInfoBar").height(info_img.bottom);
     1529               infos_imageInfoBar = jQuery("#imageInfoBar").infos();
     1530               if (infos_imageInfoBar.bottom < infos_img.bottom) {
     1531                 //   jQuery("#imageInfoBar").height(infos_img.bottom);
    13951532               }
    13961533
     
    14141551           set_cl();
    14151552
    1416          
     1553
    14171554           //  --- réglage de la hauteur de page en fonction du copyright-----------
    14181555           if (typeof (pos_copyright) == "undefined") pos_copyright = jQuery("#copyright").infos();
     
    14331570           }
    14341571           */
    1435            info_frame = jQuery(Cadre).infos();
     1572           infos_frame = jQuery(Cadre).infos();
    14361573           if (theme.match(RegExp("stripped", "gi"))) {
    14371574             /*
    1438              info_theImageBox = jQuery("#theImageAndTitle").infos();
     1575             infos_theImageBox = jQuery("#theImageAndTitle").infos();
    14391576             p1 = jQuery(".randomButtons").infos();
    14401577             p2 = jQuery("#imageHeaderBar").infos();
    1441              p3 = info_content.top;
     1578             p3 = infos_content.top;
    14421579             p1 = options.imageAutosizeTitle;
    14431580
    1444              jQuery("#theImage").width("width", info_theImageBox.width + "px");
     1581             jQuery("#theImage").width("width", infos_theImageBox.width + "px");
    14451582             //jQuery("#theImageAndTitle").css("position", "relative");
    14461583             jQuery("#content").css({ position: "relative", top: "10px", marginTop: "0px",
     
    14511588             paddingTop: "0px", marginLeft: "auto"
    14521589             }); */
    1453              t1 = info_theImageBox.top;
    1454              l1 = info_theImageBox.left;
    1455              // info_theImageBox = jQuery(Parent).infos();
     1590             t1 = infos_theImageBox.top;
     1591             l1 = infos_theImageBox.left;
     1592             // infos_theImageBox = jQuery(Parent).infos();
    14561593
    14571594           } else {
    14581595
    1459              t1 = info_frame.top;
    1460              l1 = info_frame.left;
    1461              info_theImageBox = jQuery(Parent).infos(); //theImage
    1462            }
    1463            info_theImageBox.margin.margin = info_frame.margin.margin;
    1464            info_theImageBox.top = t1;
    1465            info_theImageBox.left = l1;
    1466            //  info_theImageBox.position = "absolute";
    1467 
    1468            Window_Affichage = info_theImageBox;
     1596             t1 = infos_frame.top;
     1597             l1 = infos_frame.left;
     1598             infos_theImageBox = jQuery(Parent).infos(); //theImage
     1599           }
     1600           infos_theImageBox.margin.margin = infos_frame.margin.margin;
     1601           infos_theImageBox.top = t1;
     1602           infos_theImageBox.left = l1;
     1603           //  infos_theImageBox.position = "absolute";
     1604
     1605           Window_Affichage = infos_theImageBox;
    14691606           if (DEBUG_autosize == "_true") {
    14701607             //   jQuery(Cadre).css("border", "solid green");
     
    14801617               height: Window_Affichage.height + "px"
    14811618             }); //red
    1482              jQuery("#Debug4").css({ top: info_frame.bottom - info_description.height + "px" }); //green
     1619             jQuery("#Debug4").css({ top: infos_frame.bottom - infos_description.height + "px" }); //green
    14831620           }
    14841621
     
    15101647    img = jQuery("#theMainImage");
    15111648    if (img != null) {
    1512 return;
     1649      return;
    15131650
    15141651    } 
     
    15251662                if (!this.src.match(RegExp(thumbnail, "g"))) {
    15261663                    myImg = this;
    1527            jQuery( myImg).addClass("Image");
     1664                    jQuery( myImg).addClass("Image");
    15281665                    w00 = w0;
    15291666                }
     
    15391676*/
    15401677
    1541 function Info_entete(Parent) {
    1542 
    1543     info_imageToolBar = jQuery("#imageToolBar").infos();
     1678function infos_entete(Parent) {
     1679
     1680    infos_imageToolBar = jQuery("#imageToolBar").infos();
    15441681    if (typeof (marge_top) != "undefined") return result;
    15451682
    1546     if (info_imageToolBar.position == "absolute") {
     1683    if (infos_imageToolBar.position == "absolute") {
    15471684        jQuery("#imageToolBar").css("position", "relative");
    15481685        jQuery("#imageToolBar").css("top", 0 + "px");
     
    15511688
    15521689
    1553     info_imageInfoBar = jQuery("#imageInfoBar").infos();
     1690    infos_imageInfoBar = jQuery("#imageInfoBar").infos();
    15541691
    15551692    jQuery("#" + "theImgContainer").css("marginTop", "0px");
    1556     info_thePicturePage = jQuery("#thePicturePage").infos();
    1557     info_theImage = jQuery(Parent).infos();
     1693    infos_thePicturePage = jQuery("#thePicturePage").infos();
     1694    infos_theImage = jQuery(Parent).infos();
    15581695    if (theme.match(RegExp("stripped", "gi"))) {
    1559         info_theImageAndTitle = jQuery("#theImageAndTitle").infos();
    1560         info_theImageBox = jQuery("#theImageBox").infos();
    1561         optiontop = (marges_llgbo / 2) + info_theImageAndTitle.margin.top;
    1562     }
    1563 
    1564     if (info_theImage.position == "relative") {
     1696        infos_theImageAndTitle = jQuery("#theImageAndTitle").infos();
     1697        infos_theImageBox = jQuery("#theImageBox").infos();
     1698        optiontop = (marges_llgbo / 2) + infos_theImageAndTitle.margin.top;
     1699    }
     1700
     1701    if (infos_theImage.position == "relative") {
    15651702        //--- passage relative ==> static ===/
    15661703        jQuery(Parent).css("position", "static");
    1567         info_theImage = jQuery(Parent).infos();
     1704        infos_theImage = jQuery(Parent).infos();
    15681705
    15691706    } else {
    15701707
    15711708    }
    1572     if (info_theImage.position == "absolute") {
     1709    if (infos_theImage.position == "absolute") {
    15731710        //--- passage absolute ==> static ===/
    15741711        jQuery(Parent).css("position", "static");
    1575         info_theImage = jQuery(Parent).infos();
    1576 
    1577     }
    1578 
    1579     marge_top = Math.ceil(Info_the_page.top +
    1580                                      Info_the_page.borderwidth.top +
    1581                                      info_theImage.borderwidth.top +
    1582                                      info_thePicturePage.margin.top
     1712        infos_theImage = jQuery(Parent).infos();
     1713
     1714    }
     1715
     1716    marge_top = Math.ceil(infos_the_page.top +
     1717                                     infos_the_page.borderwidth.top +
     1718                                     infos_theImage.borderwidth.top +
     1719                                     infos_thePicturePage.margin.top
    15831720                                     );
    15841721
    1585     img_top = Math.ceil(info_theImage.top +
    1586                         info_theImage.padding.top +
    1587                         info_theImage.borderwidth.top +
    1588                         info_thePicturePage.margin.top + optiontop);
    1589     result = info_imageToolBar;
     1722    img_top = Math.ceil(infos_theImage.top +
     1723                        infos_theImage.padding.top +
     1724                        infos_theImage.borderwidth.top +
     1725                        infos_thePicturePage.margin.top + optiontop);
     1726    result = infos_imageToolBar;
    15901727   // result.width = "20%";
    15911728   // result.left = "40%";
     
    15931730    result.img_top = img_top;
    15941731    //=== Afficher le titre de l'image sur le cadre ===
    1595     llgboh2 = jQuery("#gboh2").infos();
    1596     llgbo = jQuery("#gbo").infos();
    1597 
    1598     if (llgboh2.top > 0)
    1599       result.img_top = llgboh2.top - (llgboh2.height * 2);
    1600     else if (marges_llgbo > 0)
     1732
     1733
     1734    if (infos_llgboh2.top > 0) {
     1735      result.img_top = infos_llgboh2.top;
     1736
     1737    }
     1738    else if (marges_llgbo > 0) {
    16011739      result.img_top -= (8);
    1602 
     1740    }
    16031741 
    16041742    return result;
     
    16101748*/
    16111749type_src = "div";
     1750old_window = { width: 0, height: 0 };
     1751List_autosize = new Array();
     1752nu_img = 0;
     1753tempo = 0;
    16121754//====================================================
    1613 function Info_Description_f(Parent) {
    1614     jQuery(Parent).css({ display: "block" });
     1755function infos_Description_f(Parent) {
     1756   // jQuery(Parent).css({ display: "block" });
    16151757    //====== détection du type d'images ======
    16161758    if (jQuery("#charlie").length > 0) {
     
    16841826    // jQuery(Parent + " p:not(:contains(' ')) ").remove();
    16851827    // jQuery(Parent + " p:(:contains('')) ").remove();
    1686     llgboframe = jQuery("#gbo").infos();
     1828     
     1829      jQuery("#llgbo").trigger("ON");
     1830      llgboframe = infos_llgbo;
     1831
    16871832    marges_llgbo = 0;
    16881833
    16891834    if (llgboframe.height > 0) {
    1690         ll2 = jQuery("#gbo div:last").infos();
    1691         ll1 = jQuery("#gbo div:first").infos();
    1692         ll2 ="" ;
    1693         jQuery("#gbo div").each(function (i) {
    1694 
    1695          if (  this.id=="") return ;
    1696 ll2=this ;
    1697         });
    1698        ll2 = jQuery(ll2).infos();
    1699         ll1 = ll1.width;
    1700         ll2 = ll2.width - ll2.borderwidth.left - ll2.borderwidth.right;
    1701         marges_llgbo = (ll1 - ll2);
    1702 
    1703     }
    1704 
    1705       Bandeau_t = Info_entete(Parent);
     1835      marges_llgbo = llgboframe.borderwidth.left * 2;
     1836
     1837    }
     1838
     1839      Bandeau_t = infos_entete(Parent);
    17061840
    17071841    Bandeau = Bandeau_t.img_top;
    1708     info_theImgContainer = jQuery("#" + "theImgContainer").infos();
    1709     info_description = jQuery("#" + "description").infos();
     1842    infos_theImgContainer = jQuery("#" + "theImgContainer").infos();
     1843    infos_description = jQuery("#" + "description").infos();
    17101844    //=============================================================================
    17111845    //   jQuery(Parent + " p").css({ padding: "0px", margin: "0px "    });
     
    17241858        jQuery("#imageContainer").css({ height: "auto" });
    17251859        The_MainImage = jQuery(Parent + " #theImg img");
    1726         info_img = jQuery(The_MainImage).infos();
     1860        infos_img = jQuery(The_MainImage).infos();
    17271861
    17281862
    17291863    } else if (Type_Img == "map") {
    17301864
    1731         info_map = jQuery("#mapPicture").infos();
    1732         marge_left = info_map.width;
     1865        infos_map = jQuery("#mapPicture").infos();
     1866        marge_left = infos_map.width;
    17331867
    17341868        jQuery("#map").css({ left: marge_left + "px", padding: "0px",
     
    17411875
    17421876        The_MainImage = jQuery("#map");
    1743         info_img = jQuery(The_MainImage).infos();
     1877        infos_img = jQuery(The_MainImage).infos();
    17441878
    17451879
    17461880      } else if (jQuery("#charlie").length > 0) {
    1747         info_charlie = jQuery("#charlie").infos();
     1881        infos_charlie = jQuery("#charlie").infos();
    17481882        obj_charlie = jQuery("object");
    17491883        try {
     
    17751909        if (MainImage.length == 0) {
    17761910          The_MainImage = jQuery("#charlie");
    1777           info_img = jQuery(The_MainImage).infos();
     1911          infos_img = jQuery(The_MainImage).infos();
    17781912        } else {
    17791913          The_MainImage = jQuery("#theMainImage");
    1780           info_img = jQuery(The_MainImage).infos();
     1914          infos_img = jQuery(The_MainImage).infos();
    17811915         
    17821916        }
     
    17861920    if (jQuery("#theMainImage").lenght == 0) {
    17871921      The_MainImage = jQuery(Parent + " embed");
    1788       info_img = jQuery(The_MainImage).infos();
    1789       jQuery(Parent + " embed").width({ width: info_img.width + "px", height: info_img.height + "px" });
     1922      infos_img = jQuery(The_MainImage).infos();
     1923      jQuery(Parent + " embed").width({ width: infos_img.width + "px", height: infos_img.height + "px" });
    17901924    } else {
    17911925      The_MainImage = jQuery("#theMainImage");
    1792       info_img = jQuery(The_MainImage).infos();
     1926      infos_img = jQuery(The_MainImage).infos();
    17931927      Type_Img == "charlie"
    1794       if (info_img.width == 0) {
     1928      if (infos_img.width == 0) {
    17951929        The_MainImage = jQuery("#theMainImage");
    1796         info_img = jQuery(The_MainImage).infos();
     1930        infos_img = jQuery(The_MainImage).infos();
    17971931
    17981932      }
     
    18021936        if (!nopano) {
    18031937            Wait_pamoorama();
    1804             return info_description;
     1938            return infos_description;
    18051939        }
    18061940        The_MainImage = jQuery("#pamoorama");
    1807         info_img = jQuery(The_MainImage).infos();
    1808         info_footer = jQuery("#pamoorama_footer").infos();
    1809         info_img.height = parseInt(img_reelle.height) + parseInt(info_footer.height);
     1941        infos_img = jQuery(The_MainImage).infos();
     1942        infos_footer = jQuery("#pamoorama_footer").infos();
     1943        infos_img.height = parseInt(img_reelle.height) + parseInt(infos_footer.height);
    18101944
    18111945      } else {
     
    18251959          }
    18261960
    1827         info_img = jQuery(The_MainImage).infos();
     1961        infos_img = jQuery(The_MainImage).infos();
    18281962    }
    18291963    //=====================================================================================
    18301964
    1831     switch (info_img.position) {
     1965    switch (infos_img.position) {
    18321966        case "relative":
    18331967            break;
     
    18421976    }
    18431977
    1844     info_description.marge = {
    1845         bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom,
    1846         top: info_img.padding.top + info_img.borderwidth.top + info_img.margin.top
    1847     }
    1848 
    1849     if (llgboframe.height > 0) info_img = llgboframe; // format de l'image+largeur du cadre
     1978    infos_description.marge = {
     1979        bottom: infos_img.padding.bottom + infos_img.margin.bottom + infos_img.borderwidth.bottom,
     1980        top: infos_img.padding.top + infos_img.borderwidth.top + infos_img.margin.top
     1981    }
     1982
     1983    if (llgboframe.height > 0) infos_img = llgboframe; // format de l'image+largeur du cadre
    18501984
    18511985    if (theme.match(RegExp("luciano", "g"))) {
    18521986
    1853         info_theImgContainer = jQuery("#imageContainer").infos();
    1854         info_description.bottom = jQuery("#imageInfo").infos().top;
    1855         info_description.top = info_theImgContainer.bottom;
    1856         Info_slidshowToolBar = jQuery("#slidshowToolBar").infos();
    1857 
    1858         if (Info_slidshowToolBar.height > 0) {
    1859             correction = (Info_slidshowToolBar.height);
    1860             info_description.top = info_img.bottom;
    1861             info_description.bottom = jQuery("#copyright").infos().top;
     1987        infos_theImgContainer = jQuery("#imageContainer").infos();
     1988        infos_description.bottom = jQuery("#imageInfo").infos().top;
     1989        infos_description.top = infos_theImgContainer.bottom;
     1990        infos_slidshowToolBar = jQuery("#slidshowToolBar").infos();
     1991
     1992        if (infos_slidshowToolBar.height > 0) {
     1993            correction = (infos_slidshowToolBar.height);
     1994            infos_description.top = infos_img.bottom;
     1995            infos_description.bottom = jQuery("#copyright").infos().top;
    18621996        }
    18631997
     
    18672001          //options.imageMargin
    18682002          jQuery("#content").css({paddingTop:"5px"});
    1869     info_content = jQuery("#content").infos();
     2003    infos_content = jQuery("#content").infos();
    18702004        if (options.imageAutosizeTitle == false) {
    1871             info_description.top =   info_theImageBox.bottom ;
    1872 
    1873             info_description.bottom =info_HeaderBar.margin.top+ info_description.top +
    1874                                     info_description.borderwidth.top +
    1875                                     info_description.borderwidth.bottom +
     2005            infos_description.top =   infos_theImageBox.bottom ;
     2006
     2007            infos_description.bottom =infos_HeaderBar.margin.top+ infos_description.top +
     2008                                    infos_description.borderwidth.top +
     2009                                    infos_description.borderwidth.bottom +
    18762010                                      options.imageAutosizeMargin*2 +
    18772011                                    (marges_llgbo / 2)+4;
     
    18802014
    18812015
    1882             info_description.top = info_theImageBox.bottom -
    1883                         info_content.top +
     2016            infos_description.top = infos_theImageBox.bottom -
     2017                        infos_content.top +
    18842018                        options.imageAutosizeMargin * 2  +
    18852019                        (marges_llgbo / 2)
    18862020                                ;
    1887             info_description.bottom = jQuery("#tabZone").infos().top +
    1888                         info_theImageAndTitle.margin.top;
    1889            if (msie == true) info_description.bottom -= 4;
     2021            infos_description.bottom = jQuery("#tabZone").infos().top +
     2022                        infos_theImageAndTitle.margin.top;
     2023           if (msie == true) infos_description.bottom -= 4;
    18902024        };
    18912025        check_desc_v = true;
     
    18932027      } else {
    18942028        if (theme.match(RegExp("sobre", "gi"))) {
    1895           info_description.marge.top = -2;
     2029          infos_description.marge.top = -2;
    18962030        }
    1897         info_description.bottom = info_theImage.bottom; //482
    1898         info_description.top = info_img.height + info_theImage.top ; //410+62
    1899         // info_description.bottom -= info_img.top;
     2031        infos_description.bottom = infos_theImage.bottom; //482
     2032        infos_description.top = infos_img.height + infos_theImage.top ; //410+62
     2033        // infos_description.bottom -= infos_img.top;
    19002034    }
    19012035    //
    19022036
    1903     info_description.height =   info_description.bottom - info_description.top;
     2037    infos_description.height =   infos_description.bottom - infos_description.top;
    19042038
    19052039    if (check_desc_v == false) {
    1906         info_description.height = 0;
     2040        infos_description.height = 0;
    19072041    }
    19082042
     
    19102044
    19112045    //cl_visible=false ;
    1912     return info_description;
     2046    return infos_description;
    19132047}
    19142048
     
    19622096        affiche_debug({
    19632097            Debug1: Debug_info(1, Bandeau_t, "Bandeau_t"),
    1964             Debug4: Debug_info(4, info_description, "info_description"),
    1965             Debug5: Debug_info(5, info_img, "info_img")
     2098            Debug4: Debug_info(4, infos_description, "infos_description"),
     2099            Debug5: Debug_info(5, infos_img, "infos_img")
    19662100        });
    19672101    }
     
    19852119
    19862120jQuery(function () {
    1987   //'gallyInterfaceReady'
    1988 
    19892121  jQuery('#pamoorama').live('ON', function (e) {
    19902122    jQuery(jQuery('.debug').get(1)).trigger('ON');
    19912123    if (typeof Bandeau_bas == "undefined" || Bandeau_bas.width == 0) {
    1992       Bandeau_bas = Info_Description_f(Parent);
     2124      Bandeau_bas = infos_Description_f(Parent);
    19932125      Bandeau = Bandeau_bas.top;
    19942126      old_window = { width: 0, height: 0 };
     
    19982130
    19992131  });
    2000 
    2001 
     2132  //=============================================================
     2133
     2134
     2135  jQuery("#infoSwitcher").click(function () {
     2136    jQuery("#llgbo").trigger("ON");
     2137    jQuery("#theImage").css({ textAlign: "center" });
     2138    nds = jQuery("#imageInfos").css("display");
     2139
     2140    Zone_image = Calcul_Image(nds != "none");
     2141    jQuery("#theMainImage").width(Zone_image.image.width);
     2142    jQuery("#theMainImage").height(Zone_image.image.height);
     2143
     2144    jQuery("#theImage").width(Zone_image.container.width);
     2145    jQuery("#theImage").height(Zone_image.container.height);
     2146    Set_Map(nds);
     2147
     2148  });
    20022149
    20032150  jQuery('#ret_autosize').live('ON', function (e) {
    2004     if (nu_img == "") nu_img = 8 ;
     2151    if (nu_img == "") nu_img = 8;
    20052152    jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
    20062153
    20072154  });
    20082155
    2009   jQuery(Parent).live('ON', function (e) {
     2156
     2157  jQuery("#reset").click(function () {
     2158    location.reload();
     2159  });
     2160
     2161  //=====================================================================
     2162  // jQuery("#llgbo").trigger("ON");
     2163  jQuery("#llgbo").live('ON', function (e) {
     2164    infos_llgbo = jQuery("#llgbo").infos();
     2165    //llgboframe
     2166    marges_llgbo = 0;
     2167
     2168    if (infos_llgbo.height > 0) {
     2169      ll2 = jQuery("#llgbo div:last").infos();
     2170      ll1 = jQuery("#llgbo div:first").infos();
     2171      ll2 = "";
     2172      jQuery("#llgbo div").each(function (i) {
     2173        if (this.id == "") return;
     2174        var llgbo_frame = document.getElementById(this.id);
     2175        this.removeAttribute("width");
     2176        this.removeAttribute("height");
     2177        ll2 = this;
     2178      });
     2179
     2180      ll2 = jQuery(ll2).infos();
     2181      ll1 = ll1.width;
     2182      ll2 = ll2.width - ll2.borderwidth.left - ll2.borderwidth.right;
     2183      marges_llgbo = (ll1 - ll2);
     2184      infos_llgbo.borderwidth.left = parseInt(marges_llgbo / 2);
     2185      infos_llgbo.borderwidth.right = parseInt(marges_llgbo / 2);
     2186      infos_llgbo.borderwidth.top = parseInt(marges_llgbo / 2);
     2187      infos_llgbo.borderwidth.bottom = parseInt(marges_llgbo / 2);
     2188
     2189      infos_llgboh2 = jQuery("#llgboh2").infos();
     2190
     2191
     2192    }
     2193
     2194
     2195  });
     2196  //=====================================================================
     2197  // jQuery("#theImageAndInfos").trigger("ON");
     2198  jQuery("#theImageAndInfos").live('ON', function (e) {
     2199    infos_theImageAndInfos = jQuery("#theImageAndInfos").infos();
     2200
     2201
     2202  });
     2203  //=====================================================================
     2204  // jQuery("#map").trigger("ON");
     2205  jQuery("#mapPicture").live('ON', function (e) {
     2206    p2 = jQuery("#infoSwitcher").infos();
     2207  });
     2208  function Set_Map(nds) {
     2209    p0 = jQuery("#map").position();
     2210    if (!p0) return;
     2211
     2212    infos_map = jQuery("#map").infos();
     2213    // if (infos_map.width == (Zone_image.container.width - p0.left))   return ;
     2214    nds = jQuery("#imageInfos").css("display");
     2215    if (nds !="none") {
     2216      p2 = jQuery("#infoSwitcher").infos();
     2217      p0.left += 35;
     2218    }
     2219    jQuery("#map").width(Zone_image.container.width - p0.left);
     2220    jQuery("#map").css({ height: '100%' });
     2221  }
     2222
     2223  jQuery("#map").live('ON', function (e) {
     2224
     2225  });
     2226  //=====================================================================
     2227  // jQuery("#theImage").trigger("ON");
     2228  jQuery("#theImage").live('ON', function (e) {
     2229
     2230    infos_theImage = jQuery("#theImage").infos();
     2231
     2232    idi = jQuery("#theImage img").attr("src"); ;
     2233    id2 = jQuery("#theImage img").attr("usemap");
     2234    if (id2) {
     2235      id3 = jQuery("#derivativeCheckedAutosize");
     2236      id4 = id2.replace('#map', ''); // en cours
     2237      id0 = idi.split('-');
     2238      id5 = id0[id0.length - 1].split(".")[1];
     2239      id6 = id0[id0.length - 1];
     2240
     2241      id4 = idi.replace("-" + id0[id0.length - 1], "-xx") + "." + id5;
     2242      idi = id4;
     2243      id4 = 'xxlarge';
     2244      path = document.URL;
     2245      if (id3.length == 0) {
     2246
     2247        //derivativeCheckedxxlarge
     2248        jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden');
     2249        // jQuery('#derivativeChecked' + typeSave).css('visibility', 'visible');
     2250
     2251        new_html = '<br /><span class="switchCheck" id="derivativeCheckedAutosize" style="visibility:visible" >&#x2714; </span>';
     2252        new_html += '<a href="javascript:changeImgSrc1(\'' + idi + '\', \'' + id4 + '\', \'Autosize\') ">';
     2253        new_html += 'Autosize<span class="derivativeSizeDetails"> - Autosize</span>  </a>';
     2254
     2255
     2256        htm = jQuery("#derivativeSwitchBox")[0].innerHTML;
     2257        jQuery("#derivativeSwitchBox br:last").before(new_html);
     2258        // cl_visible = false;
     2259        htm1 = jQuery("#derivativeSwitchBox")[0].innerHTML;
     2260
     2261        var theImg = document.getElementById("theMainImage");
     2262        if (theImg) {
     2263
     2264          theImg.removeAttribute("width");
     2265          theImg.removeAttribute("height");
     2266          theImg.src = idi;
     2267          //  theImg.useMap =  ;
     2268          theImg.useMap = "Autosize";
     2269        }
     2270      }
     2271    }
     2272    if (nu_img == "") nu_img = 7;
     2273
     2274
     2275    jQuery().newResize(false);
     2276    p2 = jQuery("#infoSwitcher").css("display");
     2277    Set_Map(p2);
     2278    jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
     2279
     2280  });
     2281  //=================================================================
     2282  jQuery(document).live('gallyInterfaceReady', function (e) {
     2283    i = jQuery(this).text();
     2284    jQuery(this).trigger('ON');
     2285  }
     2286
     2287  );
     2288  jQuery(Parent).live('OK', function (e) {
    20102289    if (nu_img == "") nu_img = 7;
    20112290    jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
    2012     jQuery().newResize();
     2291    jQuery().newResize(false);
     2292    jQuery().newResize(false);
     2293
     2294    jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
    20132295  });
    20142296  // Custom Event, ON to turn on a debug.
    20152297  jQuery('.debug').live('ON', function (e) {
    2016  
     2298
    20172299    nu_img = jQuery(this).text();
    20182300    jQuery('.debug').trigger('OFF');
    20192301    jQuery(this).addClass('debugOn');
    2020    
     2302
    20212303  });
    20222304
     
    20552337    }
    20562338
     2339
     2340
     2341    //piwigo 2.4
     2342    // Add another debug to the DOM
     2343    jQuery('#derivativeCheckedAutosize').click(function () {
     2344
     2345
     2346    });
     2347
     2348    jQuery("#derivativeSwitchBox a").click(function () {
     2349      var theImg = document.getElementById("theMainImage");
     2350      if (theImg) {
     2351        try {
     2352          n = eval(this.pathname);
     2353        } catch (e) {
     2354          n = false;
     2355        }
     2356        infos_theMainImage = jQuery("#theMainImage").infos();
     2357        infos_theImage = jQuery("#theImage").infos();
     2358        theImg.removeAttribute("width");
     2359        theImg.removeAttribute("height");
     2360        rapport = parseInt(img_init.width) / parseInt(img_init.height);
     2361        if (n == true) {
     2362          old_window.width = 0; // force autosize
     2363          jQuery(window).resize();
     2364        } else {
     2365          nw = "100% x 100%".split("x");
     2366          if (jQuery(this).text().match(RegExp("x", "gi"))) {
     2367            nw = jQuery(this).text().split("(")[1].split(")")[0];
     2368            nw = nw.split("x");
     2369            jQuery("#theImage").css({ marginRight: "auto", marginLeft: "auto", textAlign: "center" });
     2370
     2371            wx = parseInt(nw[0]);
     2372            jQuery(theImg).width(wx);
     2373            jQuery(theImg).height(wx / rapport);
     2374            /*  n = jQuery("#imageInfos").css("display");
     2375            Zone_image = Calcul_Image(n == "none");
     2376            jQuery("#theImage").width(wx+(Zone_image.marge.width * 1.5));
     2377            jQuery("#theImage").height((wx / rapport) + Zone_image.marge.height);
     2378            */
     2379
     2380
     2381
     2382
     2383
     2384          }
     2385        }
     2386
     2387
     2388
     2389      }
     2390
     2391    });
     2392
     2393    function changeImgSrc1(url, typeSave, typeMap) {
     2394      var theImg = document.getElementById("theMainImage");
     2395      if (theImg) {
     2396        theImg.removeAttribute("width");
     2397        theImg.removeAttribute("height");
     2398        theImg.src = url;
     2399        //  theImg.useMap = "#map" + typeMap;
     2400        if (typeMap == "Autosize") {
     2401          theImg.useMap = "#" + typeMap;
     2402        } else {
     2403          theImg.useMap = "#map" + typeSave;
     2404        }
     2405        jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden');
     2406        jQuery('#derivativeChecked' + typeMap).css('visibility', 'visible');
     2407        document.cookie = 'picture_deriv=' + typeSave + ';path="' + cookie_path + '" ';
     2408      }
     2409    }
     2410
     2411
    20572412  }); //on load
    20582413});
     2414
     2415function changeImgSrc1(url, typeSave, typeMap) {
     2416  old_window.width = 0; // force autosize
     2417  jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden');
     2418  jQuery('#derivativeChecked' + typeMap).css('visibility', 'visible');
     2419  jQuery(window).resize();
     2420};
  • extensions/Autosize/template/picture_2_2.tpl

    r10913 r16124  
    1 {combine_script id="Affiche_script" path= $AUTOSIZE_PATH|@cat:"js/Affiche_script.js" require='jquery,autosize.cookie,conflit_script' }
     1{combine_script id="Affiche_script" path= $AUTOSIZE_PATH|@cat:"js/Affiche_script.js" require='jquery,autosize.cookie,conflit_script'  }
Note: See TracChangeset for help on using the changeset viewer.