Changeset 7669


Ignore:
Timestamp:
Nov 6, 2010, 4:43:08 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] Improvement compatibility Gmaps, rvmaps,pamooramic.

Location:
extensions/Autosize
Files:
6 edited

Legend:

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

    r7642 r7669  
    4646                                $autosize_parametres = cl_autosize_Get_Options();
    4747                                include (AUTOSIZE_PATH."include/affiche.php"); 
    48                                 $debug = isset($conf['debug']) ? $conf['debug'] : 'false' ;
     48                                $debug = isset($conf['debug']) ? $conf['debug'] : false ;
    4949                                $cl_visible=isset($conf['cl_auto']) ? $conf['cl_auto'] : 'true' ;
    5050                               
     
    9999                 global $template,$infos_message,$erreur_message, $user ;
    100100                global  $conf,$lang ;
    101 
     101       
    102102                 //==============================================================
    103103                  if (isset($erreur_message))
     
    130130 * conflit =============================================
    131131 */
     132 static public function cl_autosize_script_2($pictures)
     133 {
     134           global  $template,$user,$conf,$picture ;
     135
     136                $my_path =  basename(dirname(__FILE__)).'/' ;
     137            $my_path = dirname(__FILE__).'/';
     138                $template->set_filenames(
     139                     array('autosize_init'=>$my_path. "template/cl_conflit.tpl" 
     140                         )
     141                      );                 
     142                $template->assign(
     143                                                array('AUTOSIZE_ROOT' => AUTOSIZE_PATH)
     144                                                 );
     145
     146                 
     147                return $pictures;
     148 }
    132149        static public function cl_autosize_script()
    133150        {
     
    135152
    136153                $my_path =  basename(dirname(__FILE__)).'/' ;
    137         $my_path = dirname(__FILE__).'/';
     154            $my_path = dirname(__FILE__).'/';
    138155                $template->set_filenames(
    139156                     array('autosize_init'=>$my_path. "template/conflit.tpl" 
     
    148165       
    149166        }// function cl_autosize_script
    150         static public function cl_add_css(){
    151             global  $template,$user,$conf,$picture ;
    152                 $path = get_root_url().'plugins/'. basename(dirname(__FILE__)).'/';
    153                 $template->append('head_elements', '
    154                         <link rel="stylesheet" type="text/css" href="'.$path.'css/autosize.css">
    155                         <script type="text/javascript" src="'.$path.'js/css.js"></script>
    156                         <script type="text/javascript">
    157                                  
    158                         </script>'
    159                 );
    160         }
    161167        /*
    162168        *
     
    165171           global  $template,$user,$conf,$picture ;
    166172                        $my_path = realpath(AUTOSIZE_PATH .'/');
    167                         $userdata=$user;
    168                         $fields = array( 'maxwidth', 'maxheight' );
     173         $userdata=$user;
     174         $fields = array( 'maxwidth', 'maxheight' );
    169175         
    170                         $ThePicture = $template->get_template_vars('current');
     176         $ThePicture = $template->get_template_vars('current');
    171177                        $data = array();
    172178                       
    173179
    174                 return $content;
     180 return $content;
    175181
    176182                        $data['maxwidth'] = '1200';
    177                         $data['maxheight'] ='250';
     183$data['maxheight'] ='250';
    178184                        $data['user_id'] = $userdata['id'];
    179                         foreach ($fields as $field){
    180                                 if (isset($_POST[$field])){
    181                                                 $data[$field] = $_POST[$field];
    182                                                 }
    183                                 }
     185           foreach ($fields as $field)
     186      {
     187        if (isset($_POST[$field]))
     188        {
     189          $data[$field] = $_POST[$field];
     190        }
     191      }
    184192       
    185         if($data['maxwidth'] != "" ){
     193        if($data['maxwidth'] != "" )
     194{
    186195        $picture['current']['scaled_width']=$data['maxwidth'];
    187196                 $picture['current']['scaled_height']=$data['maxheight'];
    188                                         mass_updates(USER_INFOS_TABLE,
    189                                         array('primary' => array('user_id'), 'update' => $fields),
    190                                         array($data));
    191                                 }
     197       mass_updates(USER_INFOS_TABLE,
     198                   array('primary' => array('user_id'), 'update' => $fields),
     199                   array($data));
     200       
     201}
     202
     203 
    192204   return $content;
    193205   /*
    194                         $template->assign(
     206 $template->assign(
    195207                                                array(
    196208                                                'AUTOSIZE_PATH' => $my_path,
     
    199211                                                 );
    200212 
    201                                 $template->parse( 'autosize_cl_init', false);
    202                                 return $content;
     213                $template->parse( 'autosize_cl_init', false);
     214        return $content;
    203215        */
    204216
  • extensions/Autosize/js/Affiche_script.js

    r7644 r7669  
    1 
    21function Toggle_bp() {
    32    cl_visible = !cl_visible;
     
    1918    jQuery(window).resize();
    2019}
    21 //=========================================================
    22 /*
    23 window.onresize = resize;
    24 window.onload = load;
    25 
    26 function resize() {
    27     alert("resize event detected!");
    28 }
    29 function load() {
    30     alert("load event detected!");
    31 }
    32 */
     20
    3321jQuery(document).ready(
     22
    3423      function (jQuery) {
    35 
    36 
    3724
    3825
     
    5542              marges_llgbo = (ll1.width - ll2.width) + ll2.borderwidth.left + ll2.borderwidth.right;
    5643          }
     44
     45
     46          //=========================================================
     47
     48          function wait_Timer() {
     49              old_w = 0
     50              jQuery(window).resize();
     51              info_pamoorama_outter = jQuery("#pamoorama_outter").info();
     52              if (info_pamoorama_outter.width == 0)
     53                  setTimeout("wait_Timer()", 100);
     54
     55          }
     56
     57
     58          //=============================================================
     59          function cl_Timer() {
     60              //   if (!jQuery.browser.msie) { jQuery(function () { alert(jQuery.browser.version); }); }
     61              if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 8)
     62                  alert(jQuery.browser.version);
     63              panoramaContainer = jQuery(".panorama-container");
     64              n = document.scripts[6]; //12--14affiche_script ;
     65              t = n.src;
     66
     67              currentPosition = 0 - parseInt(jQuery(panoramaContainer).css('margin-left'));
     68              if (currentPosition == NaN) return;
     69
     70
     71              if (currentPosition > 1000)
     72                  jQuery(panoramaContainer).css('margin-left', "0px")
     73              setTimeout("cl_Timer()", 500);
     74          }
     75          //=============================================================
     76          function onPropertyChange(e) {
     77              var el = e.srcElement;
     78              var new_class = el.className;
     79              ID = el.id;
     80              Prop = e.propertyName.split(".");
     81              Property = Prop[1];
     82              if (Property == "display") {
     83                  Valeur = parseInt(el.currentStyle[Property]);
     84                  if (Valeur == "block") {
     85
     86
     87                  }
     88              }
     89              return;
     90          }
     91
     92          /* ready
     93          *
     94          *
     95          */
     96          //============================================================
    5797          /*
    5898          *
    5999          */
    60 
    61 
     100          function Info_entete(Parent) {
     101
     102              var info_imageToolBar = jQuery("#imageToolBar").info();
     103              if (info_imageToolBar.position == "absolute") {
     104                  jQuery("#imageToolBar").css("position", "relative");
     105                  jQuery("#imageToolBar").css("top", 0 + "px");
     106              }
     107
     108              var info_theImage = jQuery("#theImage").info();
     109
     110              if (info_theImage.position == "relative") {
     111                  //--- passage relative ==> static ===/
     112                  jQuery("#theImage").css("position", "static");
     113                  info_theImage = jQuery("#theImage").info();
     114
     115              }
     116              if (info_theImage.position == "absolute") {
     117                  //--- passage absolute ==> static ===/
     118                  jQuery("#theImage").css("position", "static");
     119                  info_theImage = jQuery("#theImage").info();
     120
     121              }
     122
     123              marge_top = Info_the_page.top +
     124                                     Info_the_page.borderwidth.top +
     125                                     info_theImage.borderwidth.top;
     126
     127              img_top = info_theImage.top + info_theImage.borderwidth.top;
     128              return { marge_top: marge_top, img_top: img_top };
     129
     130          }
     131
     132          /* Récupère les informations sur la description.
     133          *
     134          */
     135          function Info_description(Parent) {
     136              //  jQuery("#" + Parent + " p:not(:contains(' ')) ").remove();
     137              //=============================================================================
     138              var info_description = { top: 0, bottom: 0, height: 0 };
     139              if (theme.match(RegExp("simple", "gi"))) {
     140                  jQuery("#" + Parent).css({ padding: "0px",
     141                      marginLeft: "0px",
     142                      marginRight: "auto",
     143                      marginTop: "0px",
     144                      marginBottom: "0px", position: "absolute", top: Bandeau + "px"
     145                  });
     146              } else {
     147
     148                  jQuery("#" + Parent).css({ padding: "0px",
     149                      marginLeft: "auto",
     150                      marginRight: "auto",
     151                      marginTop: "0px",
     152                      marginBottom: "0px"
     153                  });
     154
     155
     156              }
     157
     158
     159              //   jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px "    });
     160
     161
     162              if (theme.match(RegExp("luciano", "g"))) {
     163                  info_img = jQuery("#" + Parent + " #theImg img").info();
     164
     165              } else {
     166
     167                  info_img = jQuery("#" + Parent + " img").info();
     168              }
     169
     170              info_description.marge = { bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom,
     171                  top: info_img.padding.top + info_img.borderwidth.top
     172              }
     173
     174              info_description.top = info_img.bottom + info_img.margin.bottom + info_img.borderwidth.bottom;
     175              //=============================================================================
     176              info_gbo = jQuery("#gbo").info();
     177              if (info_description.top < info_gbo.bottom)
     178                  info_description.top = info_gbo.bottom;
     179              //=============================================================================
     180              info_desc = jQuery("#" + Parent + " p:first").info();
     181              if (info_desc.bottom < info_img.bottom)
     182                  info_desc.bottom = info_img.bottom;
     183
     184              //  if (info_desc.top > info_img.bottom)
     185              //     info_description.top = info_desc.top;
     186
     187              if (jQuery("#Panorama").length) {
     188                  Type_Img = "panorama";
     189                  //  cl_visible = false;
     190
     191              }
     192              info_table = jQuery(".infoTable").info();
     193
     194              if (info_table.top > info_description.bottom)
     195                  info_description.bottom = info_table.top;
     196              //===========================================================================
     197
     198              info_licencetag = jQuery(".licencetag").info();
     199
     200
     201              if (info_licencetag.bottom > 0) {
     202                  jQuery(".licencetag").css("border", "solid 5px transparent");
     203                  if (info_licencetag.bottom > info_description.bottom) {
     204                      info_description.bottom = info_licencetag.bottom;
     205                  }
     206                  else
     207                      info_description.bottom += info_table.margin.top + info_table.padding.top;
     208
     209              }
     210              //=============================================================================
     211              if (theme.match(RegExp("gally", "gi"))) {
     212                  if (!theme.match(RegExp("lapis", "gi"))) {
     213                      info_description.bottom = info_description.bottom
     214                  }
     215              }
     216
     217
     218
     219
     220
     221              if (info_description.top < 1)
     222                  info_description.top = info_description.bottom;
     223
     224
     225              if (info_description.bottom < info_description.top) {
     226                  info_description.bottom = info_description.top;
     227
     228                  info_desc = jQuery("#" + Parent + " p:last").info();
     229
     230                  if (info_desc.bottom > info_img.bottom)
     231                      info_description.bottom = info_desc.bottom;
     232              }
     233
     234
     235              if (theme.match(RegExp("gally", "g"))) {
     236                  if (!theme.match(RegExp("lapis", "gi"))) {
     237                      info_copyright = jQuery("#copyright").info();
     238                      info_description.bottom += info_copyright.height;
     239                  }
     240              }
     241
     242              if (theme.match(RegExp("luciano", "g"))) { info_description.bottom -= 30 }
     243
     244              info_description.height = info_description.bottom - info_description.top;
     245
     246
     247              if (DEBUG == "true") {
     248
     249                  /*  jQuery("#Debug").text(jQuery("#Debug").text() + user_status);   
     250       
     251
     252                  info_description.width = "800";
     253                  */
     254                  jQuery("#Debug").css('display', 'block');
     255                  jQuery("#Debug1").show();
     256                  jQuery("#Debug2").show();
     257                  Bandeau_bas = info_description;
     258
     259                  jQuery("#Debug").css({
     260                      filter: 'alpha(opacity:50)',
     261                      position: "absolute",
     262                      width: "800px",
     263                      border: "solid 1px green",
     264                      top: Bandeau + "px"
     265                  });
     266                  jQuery("#Debug").text("Debug:Bandeau : " + Bandeau);
     267
     268                  jQuery("#Debug1").css({
     269                      filter: 'alpha(opacity:50)',
     270                      position: "absolute",
     271                      border: "solid 1px green",
     272                      top: Bandeau_bas.top + "px",
     273                      width: (200) + "px",
     274                      height: Bandeau_bas.height + "px"
     275                  });
     276                  jQuery("#Debug1").text("Debug1:Bandeau_bas top : " + Bandeau_bas.top + " height:" + Bandeau_bas.height);
     277
     278                  jQuery("#Debug2").css({
     279                      filter: 'alpha(opacity:50)',
     280                      position: "absolute",
     281                      left: '50px',
     282                      width: (300) + "px",
     283                      border: "solid 1px green", top: Bandeau_bas.bottom + "px"
     284                  });
     285                  jQuery("#Debug2").text("Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom);
     286
     287              }
     288
     289              if (check_desc_v != 'checked="checked"') {
     290                  info_description.height = 0;
     291              }
     292
     293              return info_description;
     294
     295          }
     296
     297          /*
     298          *
     299          */
     300          jQuery("#pamoorama_iner").bind('resize', function () {
     301              wait_Timer();
     302          })
     303          //============================================================//==
     304          jQuery("#pamoorama_outter").bind('resize', function () {
     305              wait_Timer();
     306          })
     307
     308
     309
     310          //============================================================
     311          jQuery("#iGMapsIcon").bind('resize', function () {
     312              jQuery().recentrage_widget();
     313          })
     314          jQuery("#icon_gmaps").bind('click', function () {
     315              jQuery().recentrage_widget();
     316          })
     317
     318
     319
     320
     321
     322
     323          /* jQuery */
    62324          var img_init = { height: img_height, width: img_width };  // taille initiale
    63325          var img_defaut = { height: scaled_height, width: scaled_width };
     
    66328          var Zone_Affichage = { height: 0, width: 0 };
    67329
    68 
     330          //============================================================
     331
     332          var Info_the_page = jQuery("#the_page").info();
     333          var Zone_Affichage = jQuery("#theImage").info();
     334
     335          var Bandeau = 0;
     336          var Bandeau_t = Info_entete("theImage")
     337          Bandeau = Bandeau_t.img_top;
     338          var Bandeau_bas = 0;
     339          Bandeau_bas = Info_description("theImage");
    69340          //===================================================================
    70 
    71341          /*
    72342          * window .resize
    73343          */
    74344          jQuery(window).resize(function (event, ui) {
    75 
    76345              if (typeof (event) == 'undefined') return;
    77346              if (!cl_visible == true) return;
     
    80349
    81350
     351
    82352              //==========================================================================
    83               var Window_width = jQuery(window).width();
    84               var Window_height = jQuery(window).height();
    85               var winwidth = Window_width;
    86               var winheight = Window_height;
     353              var winwidth = jQuery(window).width();
     354              var winheight = jQuery(window).height();
    87355              if (old_w == winwidth && old_h == winheight) return;
    88356
     
    160428              winwidth -= (marge_right + marge_left);
    161429
     430
     431
     432
    162433              if (Type_Img == "pamoorama") {
    163                   var myPamoorama = this.myPamoorama;
    164                   //=====================================================
     434                  var info_pamoorama = jQuery("#pamoorama").info();
     435                  var info_pamoorama_outter = jQuery("#pamoorama_outter").info();
     436                  var info_pamoorama_inner = jQuery("#pamoorama_inner").info();
     437                  var info_pamoorama_footer = jQuery("#pamoorama_footer").info();
     438                  TheImg = jQuery("#pamoorama");
    165439                  if (typeof (myPamoorama) == "undefined") {
     440
    166441                      return
     442
    167443                  }
    168 
    169                   var h01 = typeof (myPamoorama.imageHeight);
    170 
    171                   if (h01 == "undefined") {
    172                       old_w = 0;
    173                       old_h = 0;
    174                       return;
    175                   }
    176 
    177                   //=============================================
    178                   if (myPamoorama.skipInit == false)
    179                       return
    180 
    181 
     444                 
     445
     446         
     447                  po = myPamoorama;
    182448
    183449                  /*
     
    307573                      //=========================================================
    308574
    309                       var info_pamoorama = jQuery("#pamoorama").info();
    310                       var info_pamoorama_outter = jQuery("#pamoorama_outter").info();
    311                       var info_pamoorama_inner = jQuery("#pamoorama_inner").info();
    312                       var info_pamoorama_footer = jQuery("#pamoorama_footer").info();
    313                       TheImg = jQuery("#pamoorama");
    314 
    315                       if (info_pamoorama_outter.height == 0) {
    316                           old_h = 0;
    317                           jQuery(window).resize();
    318                           return
    319                       }
    320                       //   event = window.event ? window.event : event;
    321                       ;
    322                       //  jQuery("#pamoorama_outter").trigger(jQuery.browser.msie ? "propertychange" : "change", [event]);
    323                       //
    324                       //   jQuery("#pamoorama_outter").trigger("onPropertychange", [event]);
     575
     576                      if (typeof (myPamoorama.imageHeight) == "undefined") {
     577                           old_w = 0;
     578                          return;
     579                      }
    325580
    326581                      img_reelle.height = myPamoorama.imageHeight;
     
    449704              var widthmin = winwidth;
    450705
    451               if (check_auto_w == 'checked="checked"' || Type_Img == "pamoorama") {
     706              if (check_auto_w == 'checked="checked"') {
    452707                  // if (Type_Img != "pamoorama" && Type_Img != "panorama" ) {
    453708                  //==== largeur à atteindre ===
     
    470725                      if (echelle_w > echelle_max) { echelle_w = echelle_max; }
    471726                      Image_width = parseInt(img_reelle.width * echelle_w);
    472                       if (Type_Img != "pamoorama") {
    473                           if (rapport > 0)
    474                               Image_height = parseInt(Image_width / rapport);
    475                       }
     727                      if (rapport > 0)
     728                          Image_height = parseInt(Image_width / rapport);
    476729                  }
    477730
     
    617870                  Gmap_ = gmaps.maps[0];
    618871                  if (Gmap_.sizeMode == 'A') {
    619                       jQuery("#iGMapsIcon").css({ width: Window_width * gmaps.popupAutomaticSize + "px", height: Window_height * gmaps.popupAutomaticSize + "px" });
     872                      jQuery("#iGMapsIcon").css({ width: old_w * 0.8 + "px", height: old_h * 0.8 + "px" });
     873
    620874                  }
    621875              }
     
    657911                  img_height = myPamoorama.imageHeight
    658912
    659 
    660                   new_width = Zone_Affichage.width;
     913                  marge_left += 0;
     914                  new_width = Zone_Affichage.width - marge_right - marge_left;
    661915                  new_width -= 4;
    662916                  jQuery("#pamoorama").css({ marginLeft: "auto",
     
    688942                  jQuery("#linkPrev").css({ width: "200px", overflow: "hidden" });
    689943                  zoom = Image_height / img_height;
    690 
     944                 
    691945
    692946
     
    741995                      if (jQuery("#navThumbPrev").length > 0) {
    742996                          jQuery("#navThumbPrev").css({ height: info_img.height + "px",
    743                               top: info_img.top
     997                              top: info_img.top + 20 + "px"
    744998                          });
    745999                      }
    7461000                      if (jQuery("#navThumbNext").length > 0) {
    7471001                          jQuery("#navThumbNext").css({ height: info_img.height + "px",
    748                               top: info_img.top
     1002                              top: info_img.top + 20 +"px"
    7491003                          });
    7501004                      }
     
    7541008                      jQuery("#imageToolBar").css("position", "static");
    7551009                      info_imageInfoBar = jQuery("#imageInfoBar").info();
    756                       info_theImage = jQuery("#theImage").info();
    757                       Maxi_b = info_theImage.bottom - info_imageInfoBar.top
    758                       if (info_imageInfoBar.bottom < info_theImage.bottom) {
    759                           jQuery("#imageInfoBar").height(info_theImage.height);
    760                           jQuery("#imageInfoBar").css("height", info_theImage.height + "px");
     1010                      if (info_imageInfoBar.bottom < info_img.bottom) {
     1011                          jQuery("#imageInfoBar").height(info_img.bottom);
    7611012                      }
    7621013
     
    7731024                  pos = jQuery("#copyright").info();
    7741025              if (pos.top > 100) jQuery("#the_page").height(pos.top);
    775 
    7761026              if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) return;
    777 
    778 
     1027              jQuery(window).resize();
    7791028              return;
    780           }); // fin resize
     1029          });
    7811030          var pos;
    782           //================================================
    783           function Info_entete(Parent) {
    784 
    785               var info_imageToolBar = jQuery("#imageToolBar").info();
    786               if (info_imageToolBar.position == "absolute") {
    787                   jQuery("#imageToolBar").css("position", "relative");
    788                   jQuery("#imageToolBar").css("top", 0 + "px");
    789               }
    790 
    791               var info_theImage = jQuery("#theImage").info();
    792 
    793               if (info_theImage.position == "relative") {
    794                   //--- passage relative ==> static ===/
    795                   jQuery("#theImage").css("position", "static");
    796                   info_theImage = jQuery("#theImage").info();
    797 
    798               }
    799               if (info_theImage.position == "absolute") {
    800                   //--- passage absolute ==> static ===/
    801                   jQuery("#theImage").css("position", "static");
    802                   info_theImage = jQuery("#theImage").info();
    803 
    804               }
    805 
    806               marge_top = Info_the_page.top +
    807                                      Info_the_page.borderwidth.top +
    808                                      info_theImage.borderwidth.top;
    809 
    810               img_top = info_theImage.top + info_theImage.borderwidth.top;
    811               return { marge_top: marge_top, img_top: img_top };
    812 
    813           }
    814 
    815           /* Récupère les informations sur la description.
    816           *
    817           */
    818           function Info_description(Parent) {
    819               //  jQuery("#" + Parent + " p:not(:contains(' ')) ").remove();
    820               //=============================================================================
    821               var info_description = { top: 0, bottom: 0, height: 0 };
    822               if (theme.match(RegExp("simple", "gi"))) {
    823                   jQuery("#" + Parent).css({ padding: "0px",
    824                       marginLeft: "0px",
    825                       marginRight: "auto",
    826                       marginTop: "0px",
    827                       marginBottom: "0px", position: "absolute", top: Bandeau + "px"
    828                   });
    829               } else {
    830 
    831                   jQuery("#" + Parent).css({ padding: "0px",
    832                       marginLeft: "auto",
    833                       marginRight: "auto",
    834                       marginTop: "0px",
    835                       marginBottom: "0px"
    836                   });
    837 
    838 
    839               }
    840 
    841 
    842               //   jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px "    });
    843 
    844 
    845               if (theme.match(RegExp("luciano", "g"))) {
    846                   info_img = jQuery("#" + Parent + " #theImg img").info();
    847 
    848               } else {
    849 
    850                   info_img = jQuery("#" + Parent + " img").info();
    851               }
    852 
    853               info_description.marge = { bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom,
    854                   top: info_img.padding.top + info_img.borderwidth.top
    855               }
    856 
    857               info_description.top = info_img.bottom + info_img.margin.bottom + info_img.borderwidth.bottom;
    858               //=============================================================================
    859               info_gbo = jQuery("#gbo").info();
    860               if (info_description.top < info_gbo.bottom)
    861                   info_description.top = info_gbo.bottom;
    862               //=============================================================================
    863               info_desc = jQuery("#" + Parent + " p:first").info();
    864               if (info_desc.bottom < info_img.bottom)
    865                   info_desc.bottom = info_img.bottom;
    866 
    867               //  if (info_desc.top > info_img.bottom)
    868               //     info_description.top = info_desc.top;
    869 
    870               if (jQuery("#Panorama").length) {
    871                   Type_Img = "panorama";
    872                   //  cl_visible = false;
    873 
    874               }
    875               info_table = jQuery(".infoTable").info();
    876 
    877               if (info_table.top > info_description.bottom)
    878                   info_description.bottom = info_table.top;
    879               //===========================================================================
    880 
    881               info_licencetag = jQuery(".licencetag").info();
    882 
    883 
    884               if (info_licencetag.bottom > 0) {
    885                   jQuery(".licencetag").css("border", "solid 5px transparent");
    886                   if (info_licencetag.bottom > info_description.bottom) {
    887                       info_description.bottom = info_licencetag.bottom;
    888                   }
    889                   else
    890                       info_description.bottom += info_table.margin.top + info_table.padding.top;
    891 
    892               }
    893               //=============================================================================
    894               if (theme.match(RegExp("gally", "gi"))) {
    895                   if (!theme.match(RegExp("lapis", "gi"))) {
    896                       info_description.bottom = info_description.bottom
    897                   }
    898               }
    899 
    900 
    901 
    902 
    903 
    904               if (info_description.top < 1)
    905                   info_description.top = info_description.bottom;
    906 
    907 
    908               if (info_description.bottom < info_description.top) {
    909                   info_description.bottom = info_description.top;
    910 
    911                   info_desc = jQuery("#" + Parent + " p:last").info();
    912 
    913                   if (info_desc.bottom > info_img.bottom)
    914                       info_description.bottom = info_desc.bottom;
    915               }
    916 
    917 
    918               if (theme.match(RegExp("gally", "g"))) {
    919                   if (!theme.match(RegExp("lapis", "gi"))) {
    920                       info_copyright = jQuery("#copyright").info();
    921                       info_description.bottom += info_copyright.height;
    922                   }
    923               }
    924 
    925               if (theme.match(RegExp("luciano", "g"))) { info_description.bottom -= 30 }
    926 
    927               info_description.height = info_description.bottom - info_description.top;
    928 
    929 
    930               if (DEBUG == "true") {
    931 
    932                   /*  jQuery("#Debug").text(jQuery("#Debug").text() + user_status);   
    933        
    934 
    935                   info_description.width = "800";
    936                   */
    937                   jQuery("#Debug").css('display', 'block');
    938                   jQuery("#Debug1").show();
    939                   jQuery("#Debug2").show();
    940                   Bandeau_bas = info_description;
    941 
    942                   jQuery("#Debug").css({
    943                       opacity: "0.50",
    944                       filter: 'alpha(opacity:50)',
    945                       position: "absolute",
    946                       width: "800px",
    947                       border: "solid 1px green",
    948                       top: Bandeau + "px"
    949                   });
    950                   jQuery("#Debug").text("Debug:Bandeau : " + Bandeau);
    951 
    952                   jQuery("#Debug1").css({ opacity: "0.50",
    953                       filter: 'alpha(opacity:50)',
    954                       position: "absolute",
    955                       border: "solid 1px green",
    956                       top: Bandeau_bas.top + "px",
    957                       width: (200) + "px",
    958                       height: Bandeau_bas.height + "px"
    959                   });
    960 
    961                   //   jQuery("#Debug1").text(jQuery("#Debug1").text()+"Debug1:Bandeau_bas top : " + Bandeau_bas.top + " height:" + Bandeau_bas.height);
    962 
    963                   jQuery("#Debug2").css({ opacity: "0.50",
    964                       filter: 'alpha(opacity:50)',
    965                       position: "absolute",
    966                       left: '50px',
    967                       width: (300) + "px",
    968                       border: "solid 1px green", top: Bandeau_bas.bottom + "px"
    969                   });
    970                   jQuery("#Debug2").text("Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom);
    971 
    972               }
    973 
    974               if (check_desc_v != 'checked="checked"') {
    975                   info_description.height = 0;
    976               }
    977 
    978               return info_description;
    979 
    980           }
    981           //==================================================================================
    982 
    983           //======== jQuery(window).resize();===========================================================         
    984 
     1031          //===================================================================   
     1032          jQuery(window).resize();
    9851033          /*
    9861034          * recherche la plus grande image (hauteur ou largeur)
     
    10071055          }
    10081056
    1009           jQuery("#theImage").css({ opacity: "0.0", filter: 'alpha(opacity:0)' });
    1010 
    1011           var Bandeau = 0;
    1012           var Info_the_page = jQuery("#the_page").info();
    1013           var Zone_Affichage = jQuery("#theImage").info();
    1014           var Bandeau_t = Info_entete("theImage");
    1015           var Bandeau_bas = 0;
    1016 
    1017           //====================================================================================
    1018           jQuery(window).load(function () {
    1019 
    1020 
    1021  
    1022               Info_the_page = jQuery("#the_page").info();
    1023               Zone_Affichage = jQuery("#theImage").info();
    1024               Bandeau_t = Info_entete("theImage")
    1025               Bandeau = Bandeau_t.img_top;
    1026               Bandeau_bas = Info_description("theImage");
    1027               setTimeout('wait_Timer()', 10);
    1028           });
    1029           //====================================================================================
    10301057
    10311058      } // function
    1032 );
    1033 
    1034       //=============================================================
    1035       function cl_Timer() {
    1036           //   if (!jQuery.browser.msie) { jQuery(function () { alert(jQuery.browser.version); }); }
    1037           if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 8)
    1038               alert(jQuery.browser.version);
    1039           panoramaContainer = jQuery(".panorama-container");
    1040           n = document.scripts[6]; //12--14affiche_script ;
    1041           t = n.src;
    1042 
    1043           currentPosition = 0 - parseInt(jQuery(panoramaContainer).css('margin-left'));
    1044           if (currentPosition == NaN) return;
    1045 
    1046 
    1047           if (currentPosition > 1000)
    1048               jQuery(panoramaContainer).css('margin-left', "0px")
    1049           setTimeout("cl_Timer()", 500);
    1050       }
    1051 
    1052 
    1053       //============================================================
    1054       jQuery("#iGMapsIcon").bind('resize', function () {
    1055           jQuery().recentrage_widget();
    1056       })
    1057       jQuery("#icon_gmaps").bind('click', function () {
    1058           jQuery().recentrage_widget();
    1059       })
    1060 
    1061 
    1062       //=============================================================
    1063       //frame.injectInside
    1064       function onPropertyChange(e) {
    1065 
    1066           var el = e.srcElement;
    1067           if (e.srcElement == null) return
    1068           ID = el.id;
    1069           if (jQuery.browser.msie)
    1070               PropertyName = window.event.propertyName;
    1071           else
    1072               PropertyName = window.evt.propertyName;
    1073 
    1074           if (!PropertyName) return;
    1075           Prop = PropertyName.split(".");
    1076 
    1077           Valeur = "";
    1078           Property = Prop[1];
    1079           if (typeof (Property) != "undefined") {
    1080               Valeur = parseInt(el.currentStyle[Property]);
    1081           } else {
    1082               Property = Prop[0];
    1083           }
    1084           if (DEBUG == "true") {
    1085 
    1086               if (typeof (message) == "undefined") message = jQuery("#Debug1").text();
    1087 
    1088               jQuery("#Debug1").css({
    1089                   filter: 'alpha(opacity:60)',
    1090                   opacity: 0.8,
    1091                   position: "absolute",
    1092                   border: "solid 1px green",
    1093                   top: 100 + "px",
    1094                   width: "auto",
    1095                   height: 400 + "px"
    1096               });
    1097               if (ID != "pamoorama") {
    1098                   message += "onPropertyChange : " + ID + " : " + Property + " : " + Valeur + "\n";
    1099                   jQuery("#Debug1").text(message);
    1100               }
    1101 
    1102               if (Valeur == "block") {
    1103 
    1104 
    1105               }
    1106           }
    1107           return;
    1108       }
    1109       //====================================================================                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           // ready
    1110         /*
    1111         *
    1112         */
     1059);                                                                                                                                                                                                                                                                                                                                                                                                                                                          // ready
     1060    /*
     1061*
     1062*/
    11131063    jQuery.extend(jQuery.expr[':'], {
    11141064        // Nom du sélecteur personnalisé
     
    11291079            jQuery('html,body').stop().scrollTop(0);
    11301080            jQuery('html,body').stop().scrollLeft(0);
    1131             jQuery(".ui-widget-overlay").css({opacity:"0.75",filter: 'alpha(opacity:65)'});
     1081            jQuery(".ui-widget-overlay").css("opacity", "0.75");
    11321082
    11331083            l1 = (jQuery(window).width() - (jQuery(".gmapsPopup").width()))/2;
     
    11371087            jQuery(".gmapsPopup").css("top", h1 + "px");
    11381088
     1089        },
     1090        //-------------------------------------------------------
     1091        absolutize: function (element) {
     1092            element = jQuery(element).get(0);
     1093            if (element.getStyle('position') == 'absolute') return;
     1094            // Position.prepare(); // To be done manually by Scripty when it needs it.
     1095
     1096            var offsets = element.positionedOffset();
     1097            var top = offsets[1];
     1098            var left = offsets[0];
     1099            var width = element.clientWidth;
     1100            var height = element.clientHeight;
     1101
     1102            element._originalLeft = left - parseFloat(element.style.left || 0);
     1103            element._originalTop = top - parseFloat(element.style.top || 0);
     1104            element._originalWidth = element.style.width;
     1105            element._originalHeight = element.style.height;
     1106
     1107            element.style.position = 'absolute';
     1108            element.style.top = top + 'px';
     1109            element.style.left = left + 'px';
     1110            element.style.width = width + 'px';
     1111            element.style.height = height + 'px';
     1112            return element;
     1113        },
     1114
     1115        relativize: function (element) {
     1116            element = jQuery(element).get(0); ;
     1117            if (jQuery(element).css('position') == 'relative') return;
     1118            // Position.prepare(); // To be done manually by Scripty when it needs it.
     1119            element._originalLeft = parseFloat(element.style.left || 0);
     1120            element._originalTop = parseFloat(element.style.top || 0);
     1121            element._originalWidth = element.style.width;
     1122            element._originalHeight = element.style.height;
     1123
     1124            element.style.position = 'relative';
     1125            var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);
     1126            var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
     1127
     1128            element.style.top = top + 'px';
     1129            element.style.left = left + 'px';
     1130            //  element.style.height = element._originalHeight;
     1131            // element.style.width  = element._originalWidth;
     1132            return element;
    11391133        }
    11401134        //=========================================================
    11411135    });          // fin extend
    1142 
    1143 
    1144     function wait_Timer() {
    1145         old_w = 0;
    1146         old_h = 0;
    1147 
    1148 
    1149         if (jQuery("#pamoorama").length > 0) {
    1150             var info_pamoorama_outter = jQuery("#pamoorama_outter").info();
    1151             if (info_pamoorama_outter.height == 0) {
    1152                
    1153                 jQuery("#theImage").css({ opacity: '0', filter: 'alpha(opacity:' + '0' + ')' });
    1154                 setTimeout('wait_Timer()', 200);
    1155                 return
    1156             }
    1157         }
    1158          jQuery(window).resize();
    1159          jQuery("#theImage").css({ opacity: '1', filter: 'alpha(opacity:' +  '100' + ')' });
    1160 
    1161     }
    1162 
    1163 
  • extensions/Autosize/js/conflit.js

    r7642 r7669  
    22var d1 = 0;
    33var init_tb = 0;
    4 
     4//===================================================
    55function $(element, nc) {
    6     nc = this;
    7  //   element, key, defaultValue
    8                   return conflit(element, nc);
     6   return conflit(element, nc)
     7}
     8//===================================================
     9function conflit(element, nc) {
     10    try {
     11       var  retour = alert(nonExistentVariable);
     12       
     13    } catch (e) {
     14
     15   var retour=(getStackTrace());
     16
     17    }
     18
     19    if (retour == "")
     20        return jQuery(element);
     21
     22
     23    if (retour.match(RegExp("pamoorama", "gi"))) {
     24        return jQuery().$Pamoorama(element);
     25    }
     26
     27    if (retour.match(RegExp("luciano", "gi"))) {
     28        return jQuery().$Luciano(element);
     29    }
     30
     31    if (retour.match(RegExp("prototype.js", "gi"))) {
     32    return jQuery().$Prototype(element);
     33}   
     34
     35//alert(retour);
     36 if (retour.match(RegExp("jquery|switchmenu|gmaps", "gi"))) {
     37    return jQuery(element);
     38}
     39 
     40
     41if (retour.match(RegExp("ie_ready", "gi"))) {
     42    return jQuery().$Pamoorama(element);
     43}
     44    if (retour.match(RegExp("skipInit", "gi"))) {
     45        return jQuery().$Pamoorama(element);
     46    }
     47    //==============================================================
     48   
     49    if (retour.match(RegExp("(splat|buildFrameWork|photoNext)", "gi"))) {
     50           ret = jQuery().$Luciano(element);
     51           return ret;
     52       }
     53
     54       //  var form = $('rateForm');
     55       Expression = new RegExp("\$", "gi")
     56       if (retour.match(Expression)) {
     57           if (retour.match(RegExp("rateForm", "gi"))) {
     58               ret = jQuery().$Luciano(element);
     59               return ret;
     60           }
     61       }
     62       if (typeof(Browser)!="undefined")
     63           if (Browser.loaded)
     64               b="mootools1.2.4"
     65
     66
     67
     68    if (retour.match(RegExp("gmaps", "gi"))) {
     69        return jQuery(element);
     70    }
     71    if (retour.match(RegExp("responder", "gi"))) {
     72        return jQuery().$Prototype(element);
     73    }
     74    if (retour.match(RegExp("fire", "gi"))) {
     75        return jQuery().$Prototype(element);
     76    }
     77    if (retour.match(RegExp("createResponder", "gi"))) {
     78        return jQuery().$Prototype(element);
     79    }
     80    if (retour.match(RegExp("element =", "gi"))) {
     81      //  return jQuery().$Prototype(element);
     82    }
     83    if (retour.match(RegExp("stopO", "g"))) {
     84        return jQuery().$Prototype(element);
     85    }
     86
     87    alert(retour);
     88
     89    retour= jQuery(element);
     90 return retour;
     91         return jQuery().$Pamoorama(element);
     92           
    993              }
    10 
     94//============================================================
     95 
    1196jQuery(document).ready(
    12 
    1397      function (jQuery) {
    14 
    1598           tpj = jQuery("#pamoorama");
    1699          if (tpj.length > 0) {             }
    17100          jQuery(window).load(function () {
    18 
    19 
    20101              if (jQuery("#theImage").css("position") == "relative") {
    21102                  //==== compatibilité Gally/LLGBO ===
     
    23104                  jQuery("#theImage").css("position", "static");
    24105              }
    25 
    26 
     106                  function $(element, nc) {
     107                      return conflit(element, nc);
     108                    }
     109             
    27110          });
    28111
    29112      })
    30113;
    31     function conflit(element, nc) {
    32         //============== détection framework ==================
    33         var tp1 = typeof (MooTools);
    34         var MooTools_version = "0";
    35         ret_mootool=jQuery(element) ;
    36         ret_Luciano =ret_mootool ;
    37         ret_pamoorama = ret_mootool;
    38 
    39         if (tp1 != "undefined") {
    40             MooTools_version = "1";
    41             if (MooTools.version == "1.2.4") {
    42                 MooTools_version = "Luciano"; // luciano
    43               ret_Luciano = jQuery().$Luciano(element, nc) ;
    44             }
    45 
    46             if (MooTools.version == "1.11") {
    47                 MooTools_version = "pamoorama"; //pamoorama
    48                 ret_pamoorama =  jQuery().$Pamoorama(element)
    49             }
    50 
    51 
    52         }
    53 
    54         tp1 = typeof (Prototype);
    55         var Prototype_Version = '0';
    56         ret_proto=jQuery();
    57         if (tp1 != "undefined") {
    58             if (Prototype.Version == '1.6.0.2') {
    59                 Prototype_Version = '1602';
    60                  ret_proto=jQuery().$Prototype(element) ;
    61             } else if (Prototype.Version == '1.6.1') {
    62                 Prototype_Version = '161';
    63                  ret_proto=jQuery().$Prototype(element) ;
    64             } else if (Prototype.Version == '1.0.0.0') {
    65                 Prototype_Version = '1';
    66                 ret_proto=jQuery().$Prototype(element) ;
    67             }
    68         }
    69         //===================================================
    70        
    71      
    72         var jq = jQuery(element).selector;
    73         var ret_el ={  Prototype : ret_proto,
    74                         Pamoorama : ret_pamoorama,
    75                         jquery :     jQuery(element),
    76                         Luciano: ret_Luciano
    77                     };
    78 
    79                     if (element == window) {
    80                         if (typeof (Gmaps_status) != "undefined") {
    81                         if (Gmaps_status )
    82                             return ret_el.jquery;
    83                         }
    84                          
    85                         if (Prototype_Version != "0") return ret_el.Prototype; //rv_gmaps
    86                         //if (MooTools_version == "pamoorama") return ret_el.Pamoorama;
    87                         return ret_el.jquery;
    88                         j = nc;
    89 
    90                     }
    91 
    92         //===================================================
    93         //div.gmapsPopup div.ui-dialog-titlebar
    94                     if (jq.match(/GMaps/) || jq.match(/gmaps/)) {
    95                         Gmaps_status = true;
    96             if (jq == "#iGMapsIconContent") {
    97                 setTimeout('jQuery().recentrage_widget()', 0);
    98             }
    99             if (ret_el.jquery.length > 0) return ret_el.jquery;
    100             return ret_el.jquery;
    101         }
    102         if (Prototype_Version == "0" && MooTools_version == "0") {
    103             return ret_el.jquery;
    104         }
    105         //=======================================================================================
    106         if (arguments.caller && arguments.caller.length > 0) {
    107             if (arguments.caller.length > 1) {
    108                 if (element == "pamoorama") {
    109                     return ret_el.Pamoorama
    110                 }
    111                 arg = arguments.caller[1];
    112                 if (typeof (arg) != "undefined" && typeof (arg) != undefined) {
    113                     //=========== options rv_maps prototype.js ===================================   
    114 
    115                     if (Prototype_Version != '0')
    116                         switch (arg) {
    117                         case "dom:loaded":
    118                             return element;
    119                             return ret_el.Prototype
    120                             break;
    121                         case "load":
    122                             return ret_el.Prototype
    123                             break;
    124                         case "unload":
    125                             return ret_el.Prototype
    126                             break;
    127                         case "prototype_event_registry":
    128 
    129                             try {
    130                                 retour = ret_el.Prototype;
    131                             } catch (e) {
    132                                 retour = null;
    133                             }
    134                             return retour;
    135                             break;
    136                         case "readystatechange":
    137                             try {
    138                                 retour = ret_el.Luciano;
    139                             } catch (e) {
    140                                 retour = null;
    141                                 try {
    142                                     retour = ret_el.Luciano;
    143                                     retour = jQuery(element).get(0);
    144                                 } catch (e) {
    145                                     retour = null;
    146                                 }
    147 
    148                             }
    149 
    150                             return ret_el.jquery;
    151                             break;
    152                     }
    153 
    154                     if (MooTools_version == 'pamoorama' && typeof (arg) != undefined)
    155                     //=========== options pamoorama =================================== 
    156                     {
    157                         var reg1 = new RegExp("pamoorama", "g");
    158                         switch (arg) {
    159                             case "bottom":
    160                                 return ret_el.Pamoorama
    161                                 break;
    162                             case "left":
    163                                 return ret_el.Pamoorama
    164                                 break;
    165                             case "prototype_event_registry":
    166                                 return ret_el.Pamoorama
    167                                 break;
    168                             case "readystatechange":
    169                                 return ret_el.Pamoorama
    170                                 break;
    171 
    172                             default:
    173                                 if (arg.area) {
    174                                     return ret_el.Pamoorama
    175                                 } else
    176                                     if (arg.velocity) {
    177                                         return ret_el.Pamoorama
    178                                     } else if (arg.src) {
    179                                         return ret_el.Pamoorama
    180                                     } else if (arg.modifiers) {
    181                                         return ret_el.Pamoorama
    182                                     } else if (arg.limit) {
    183                                         return ret_el.Pamoorama
    184                                     } else if (arg.duration) {
    185                                         return ret_el.Pamoorama
    186                                     } else if (arg.id) {
    187                                         switch (arg.id) {
    188                                             case "pamoorama_footer":
    189                                                 return ret_el.Pamoorama
    190                                                 break;
    191                                             case "pamoorama_outter":
    192                                                 return ret_el.Pamoorama
    193                                                 break;
    194                                             case "pamoorama_inner":
    195                                                 return ret_el.Pamoorama
    196                                                 break;
    197 
    198                                             default:
    199                                                 return ret_el.Pamoorama
    200                                                 break;
    201 
    202                                         }
    203                                     } else if (arg.src) {
    204                                         return ret_el.Pamoorama
    205 
    206                                     }
    207                                 //=======================================================
    208                                 return ret_el.jquery;
    209                                 break;
    210 
    211                         }
    212                     } else if (MooTools_version == 'Luciano') { //=========== options luciano ===================================
    213                         //=== theme Luciano ====
    214                         return ret_Luciano;
    215                     }
    216 
    217                 }
    218             }
    219         }
    220 
    221         //==================================================
    222         tpe = typeof (element);
    223         if (Prototype_Version != '0') {
    224             if (tpe == "string") {
    225                 //=== rvmaps === //
    226                 if (element.match(/[a-z]_[a-z]/)) {
    227 
    228                     return ret_el.Prototype
    229                 }
    230                 id = "window_" + new Date().getTime();
    231                 reg1 = new RegExp("^window_", "g");
    232                 if (element.match(reg1, "g")) {
    233 
    234                     if (element.match(/_[a-z]/)) {
    235                         return ret_el.Prototype
    236                     }
    237                     return null;
    238                 }
    239             }
    240         }
    241         //========== test jQuery ? ==============
    242         if (tpe == "string")
    243             if (element.match(RegExp("^#", "g")) ) {
    244                 return ret_el.jquery;
    245             }
    246         if (jq.match(RegExp("^#", "g")) || jq == "html") {
    247             return ret_el.jquery;
    248         }
    249         if (tpe == "undefined") {
    250             return jQuery();
    251         }
    252         //==== mootools ====
    253         if (MooTools_version == "Luciano" && tpe == "string") {
    254             //=== theme Luciano ====
    255            
    256             if (element == "order") return ret_el.Luciano;
    257             if (element == "themeSelect") return ret_el.Luciano;
    258             if (element == "languageSelect") return ret_el.Luciano;
    259             if (element == 'linkPrev') return ret_el.Luciano;
    260             if (element == 'linkNext') return ret_el.Luciano;
    261             if (element == 'rateForm') return ret_el.Luciano;
    262         }
    263 
    264         if (MooTools_version == 'pamoorama')
    265         //=========== options pamoorama =================================== 
    266         {
    267 
    268             if (tpe == "string")
    269                 switch (jq) {
    270                 case "ie_ready":
    271                     return ret_el.Pamoorama
    272                     break;
    273                 case "pamoorama":
    274                     return ret_el.Pamoorama
    275                     break;
    276                 case ".tab a":
    277                     return ret_el.jquery;
    278                     break;
    279 
    280             } else if (tpe == "boolean") {
    281                 return ret_el.Pamoorama
    282             }
    283             if(element)
    284             if (typeof (element.nodeName) != "undefined") {
    285             el = element.nodeName;
    286             if (el == "DIV") return ret_el.Pamoorama
    287             if (el == "IMG") return ret_el.Pamoorama
    288             if (el == "#document") {
    289                 if (Prototype_Version != "0") return ret_el.Prototype; //rv_gmaps
    290                 if (MooTools_version == "pamoorama") return ret_el.jquery;
    291                 if (MooTools_version == "pamoorama") return ret_el.Pamoorama;
    292                 return ret_el.jquery;
    293             }
    294             if (el == "BODY") {
    295                 try {
    296                     if (Prototype_Version != "0") return ret_el.Prototype; //rv_gmaps
    297                     if (MooTools_version == "pamoorama") return ret_el.Pamoorama;
    298                     return ret_el.jquery;
    299                     return jQuery().$Pamoorama(element)
    300                 } catch (e) {
    301                     return jQuery(element);
    302                 };
    303             }
    304         }
    305 
    306 
    307 
    308         if (element == window) {
    309             if (Prototype_Version != "0") return ret_el.Prototype; //rv_gmaps
    310             if (MooTools_version == "pamoorama") return ret_el.Pamoorama;
    311             return ret_el.jquery;
    312 
    313         }
    314            
    315         }
    316         obj_panorama = jQuery("#Panorama");
    317         if (obj_panorama.length > 0 && jq != "rateForm" && jq != "order" && jq != "themeSelect") {
    318             if (tpe == "object")
    319                 if (Prototype_Version != '0') {
    320                     //=== rvmaps ===
    321                     try {
    322                         elem_retour = jQuery().$Prototype(element);
    323                         return elem_retour;
    324                     } catch (e) {
    325 
    326                     }
    327                 }
    328 
    329             if (ret_el.jquery.length < 2) return ret_el.jquery;
    330             if (ret_el.jquery.length == 2) return jQuery(element).get(1);
    331             if (ret_el.jquery.length == 3) return jQuery(element).get(2);
    332 
    333         }
    334         afq = jQuery(document).data("initialized"); //2
    335         if (element == window && afq != 1)
    336             if (init_tb == 1) {
    337                 init_tb = 2;
    338                 return ret_el.jquery;
    339             }
    340 
    341 
    342         //========= ????  ===================
    343         if (ret_el.jquery != null) {
    344             if (typeof (ret_el.jquery.context) != "undefined") {
    345                 if (afq != 1 && afq != undefined) {
    346                     if (init_tb != 2) init_tb = 1;
    347                     return ret_el.jquery;
    348                 }
    349                 if (ret_el.jquery.context.loaded) {
    350                     //=== theme Luciano ====
    351                     if (MooTools_version == "Luciano") {
    352                         try {
    353                             ret_el = jQuery().$Prototype(element);
    354                             return ret_el;
    355                         } catch (e) {
    356                             jQuery("#Debug").text(e.message);
    357                             return ret_Luciano;
    358                         }
    359                     }
    360                     //=== theme gally ? ====
    361                     if (Prototype_Version != '0') {
    362                         //=== rvmaps ===
    363                         try {
    364                             return ret_el.Prototype
    365 
    366                         } catch (e) {
    367                         return jQuery(element);
    368                            
    369                         }
    370                     }
    371                 }
    372             }
    373         }
    374         init_tb = 0;
    375         //================================================================
    376 
    377         //==== mootools ====
    378         if (MooTools_version == "Luciano") {
    379             //=== theme Luciano ====
    380             tp = this;
    381             ret_el.jquery = ret_Luciano;
    382             //$(this.options.container)
    383             if (ret_el.jquery != null) {
    384                 if (ret_el.jquery.nodeName) {
    385                     tp = ret_el.jquery.nodeName + ret_el.jquery.nodeType;
    386                     if (tp == "DIV1") return ret_el.jquery;
    387                     if (tp == "SELECT1") return ret_el.jquery;
    388                     tp = element.nodeName + element.nodeType;
    389                     return ret_el.jquery;
    390                 }
    391 
    392             }
    393         } else if (MooTools_version == "pamoorama") {
    394             //=== paMOOramics ===
    395             // ie_ready,undefined
    396             return ret_el.Pamoorama
    397         }
    398 
    399         //=================================================================
    400        
    401 
    402         if (Prototype_Version != '0') {
    403             //=== rvmaps ===
    404             try {
    405                 return ret_el.Prototype
    406             } catch (e) {
    407                 return jQuery(element);
    408             }
    409         }
    410         return jQuery(element);
    411 
    412     }
     114
    413115
    414116//=========================================================
    415117(function ($2) {
    416118              $2.fn.panorama2 =
    417               function (height, width) {
    418                
    419            var src =jQuery(this);
    420 
    421           return ;
    422 
    423 $("#theImage img").eq(0).removeAttr("style").attr({width:width,height:height});
    424 retour= jQuery('a.panorama-control-left').click();
    425 panoramaContainer=jQuery('panorama-container');
    426 
    427             /*
    428                 $(panoramaContainer).stop();
    429                 op=options;
    430                 settings.direction = 'right';
    431                 panoramaContainer.panorama_animate(panoramaContainer, elemWidth, settings);
    432              */ 
    433                
    434 
    435                            
    436 
    437 
    438               }
     119                    function (height, width) {               
     120                        var src =jQuery(this);
     121                         return ;
     122                        }
    439123
    440124
     
    445129    //---------------- luciano -------------------------------
    446130    $Luciano: function (el, nc) {
    447         try {
    448             return document.id(el, nc, this.document)
    449         } catch (e) {
    450             return;
    451         };
     131        return document.id(el, nc, this.document);
    452132    },
    453133    //=============== PaMOOramics ===========================
     134
    454135    $Pamoorama: function (B) {
    455      
    456             if (!B) {
    457                 return null;
    458             }
    459             if (B.htmlElement) {
    460                 return Garbage.collect(B);
    461             }
    462             if ([window, document].contains(B)) {
    463                 return B;
    464             }
    465             var A = $type(B);
    466             if (A == "string") {
    467                 B = document.getElementById(B);
    468                 A = (B) ? "element" : false;
    469             }
    470             if (A != "element") {
    471                 return null;
    472             }
    473             if (B.htmlElement) {
    474                 return Garbage.collect(B);
    475             }
    476             if (["object", "embed"].contains(B.tagName.toLowerCase())) {
    477                 return B;
    478             }
    479             $extend(B, Element.prototype);
    480             B.htmlElement = function () { };
     136        if (!B) {
     137            if (typeof (B) == "boolean") return null;
     138            return jQuery();
     139        }
     140        if (B.htmlElement) {
    481141            return Garbage.collect(B);
    482        
     142
     143        }
     144        if ([window, document].contains(B)) { return B; }
     145        var A = $type(B);
     146        if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
     147        if (A != "element") {
     148            return null;
     149        }
     150        if (B.htmlElement) { return Garbage.collect(B); }
     151        if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }
     152        $extend(B, Element.prototype);
     153        B.htmlElement = function () { };
     154       try{ return Garbage.collect(B);}catch(e){
     155       return ;
     156       }
    483157
    484158    },
     
    494168            element = document.getElementById(element);
    495169
    496         return Element.extend(element);
     170          return Element.extend(element);
    497171
    498172        try {
    499             ret_el.jquery = Element.extend(element);
     173            new_element = Element.extend(element);
    500174        } catch (e) {
    501             return ret_el.jquery;
    502         }
    503         return ret_el.jquery;
     175            return new_element;
     176        }
     177        return new_element;
    504178    }
    505179    //=========================================================
    506 });      // fin extend
     180});   // fin extend
     181
     182
     183
     184
     185function getStackTrace() {
     186    var callstack = [];
     187    var isCallstackPopulated = false;
     188   try {
     189        i.dont.exist += 0; //doesn't exist- that's the point
     190    } catch (e) {
     191     
     192   var retcallstack = [];
     193        if (e.stack) { //Firefox
     194            var lines = e.stack.split("\n");
     195            for (var i = 2, len = lines.length; i < len; i++) {
     196                if (lines[i].match(/conflit.js/)) {
     197                    //
     198                } else if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
     199                    callstack.push(lines[i]); //php?
     200                } else {
     201                    callstack.push(lines[i]);
     202
     203                }
     204                if (lines[i].match("prototype")) {
     205                    break;
     206                }
     207            }
     208            //Remove call to printStackTrace()
     209            //callstack.shift();
     210            isCallstackPopulated = true;
     211            isCallstackPopulated = false;
     212
     213        }
     214        else if (window.opera && e.message) {
     215            //Opera =================================
     216            var lines = e.message.split("\n");
     217            for (var i = 0, len = lines.length; i < len; i++) {
     218                if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
     219                    var entry = lines[i];
     220                    //Append next line also since it has the file info
     221                    if (lines[i + 1]) {
     222                        entry += " at " + lines[i + 1];
     223                        i++;
     224                    }
     225                    callstack.push(entry);
     226                }
     227            }
     228            //Remove call to printStackTrace()
     229           // callstack.shift();
     230            isCallstackPopulated = true;
     231        }
     232        //===== fin Opera======================================
     233    }
     234    if (!isCallstackPopulated) { //IE and Safari
     235        var currentFunction = arguments.callee.caller;
     236        //next
     237        if (currentFunction == null) {
     238            return ("The function was called from the top!");
     239        }
     240
     241        currentFunction = currentFunction.caller;
     242        //$family
     243        while (currentFunction) {
     244            var fn = currentFunction.toString();
     245            var fname = fn.substring(fn.indexOf("function") + 8, fn.indexOf("(")) || " ";
     246            callstack.push(fn);
     247            // if (fname != " $") callstack.push(fn);
     248            if (fn.match(RegExp("buildFrameWork", "gi"))) {  //luciano
     249                break;
     250            }
     251            if (fn.match(RegExp("_footer", "gi"))) {
     252                break;
     253            }
     254            if (fn.match(RegExp("observe|responder|stopobserving", "gi"))) {
     255                callstack.push('prototype.js');
     256                 break;
     257            }
     258            if (fn.match(RegExp("stopobserving", "gi"))) {
     259              break;
     260            }
     261            if (fn .match(RegExp("jquery", "gi"))) {
     262    break ;
     263}
     264            currentFunction = currentFunction.caller;
     265        }
     266 
     267    }
     268   
     269    return callstack.join('\n');
     270}
     271/*
     272//1.2.4
     273 Element1.Events.domready = {
     274    onAdd: function (fn) {
     275        if (Browser.loaded) fn.call(this);
     276    }
     277} ;
     278
     279Element2.Events.domready = {
     280    add: function (B) {
     281        if (window.loaded) { B.call(this); return; }
     282        var A = function () {
     283            if (window.loaded) { return; }
     284            window.loaded = true;
     285            window.timer = $clear(window.timer);
     286            this.fireEvent("domready");
     287        } .bind(this);
     288    }
     289}
     290*/
  • extensions/Autosize/main.inc.php

    r7644 r7669  
    22/*
    33Plugin Name: AutoSize
    4 Version: 1.3.4
     4Version: 1.3.3
    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
     
    1515$autosize_controler = new autosize_controler();
    1616
    17 //add_event_handler('loc_begin_picture', array(&$autosize_controler, 'cl_add_css'),30);
    18 add_event_handler('loc_end_picture', array(&$autosize_controler, 'cl_add_css'),30);
    19  
     17        add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin')  );
     18        add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 40 );
    2019
    21 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 40 );
    22 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin')  );
     20//======================================================================================================
     21//add_event_handler('render_element_content', array(&$obj, 'paMOOramics_load'),41,2);
     22// add_event_handler('render_element_content', array(&$autosize_controler, 'cl_autosize_script'),42,2 );
     23// add_event_handler('picture_pictures_data', array(&$autosize_controler, 'cl_autosize_script_2'),50 );
    2324
     25//=================================================================================================
    2426//add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script'),40 );
    2527
    26 //---- Categorie ----
    27 //add_event_handler('loc_begin_index', array(&$autosize_controler, 'cl_autosize_script'),51 );
     28//---- Categorie - attention Gmaps ne marche plus($.ajax)---
     29 add_event_handler('loc_begin_index', array(&$autosize_controler, 'cl_autosize_script'),51 );
    2830
     31// add_event_handler('load_profile_in_template', array(&$autosize_controler,'cl_autosize_script'),40 );
    2932
    3033?>
  • extensions/Autosize/template/cl_conflit.tpl

    r7316 r7669  
    33{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" }
    44{known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"}
    5 <!---FIN auto/cl_confilt.tpl (before) --->     
    6 {/html_head}   
     5<!---FIN auto/cl_confilt.tpl (before) --->      {/html_head}
     6<script language=javascript type="text/javascript">
     7    function $(element, nc) {delim}
     8        return conflit(element, nc)
     9    }
     10
     11</script>
     12   
  • extensions/Autosize/template/conflit.tpl

    r7537 r7669  
    33{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" }
    44{known_script id="conflit_script" src=$AUTOSIZE_ROOT|@cat:"js/conflit.js"}
    5 <!---FIN Autosize/template/confilt.tpl (before) --->    {/html_head}   
     5<!---FIN Autosize/template/confilt.tpl (before) --->   
     6{/html_head}   
Note: See TracChangeset for help on using the changeset viewer.