Changeset 7642


Ignore:
Timestamp:
Nov 5, 2010, 12:56:12 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] fix display time.

Location:
extensions/Autosize
Files:
2 added
4 edited

Legend:

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

    r7602 r7642  
    148148       
    149149        }// 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        }
    150161        /*
    151162        *
     
    154165           global  $template,$user,$conf,$picture ;
    155166                        $my_path = realpath(AUTOSIZE_PATH .'/');
    156          $userdata=$user;
    157          $fields = array( 'maxwidth', 'maxheight' );
     167                        $userdata=$user;
     168                        $fields = array( 'maxwidth', 'maxheight' );
    158169         
    159          $ThePicture = $template->get_template_vars('current');
     170                        $ThePicture = $template->get_template_vars('current');
    160171                        $data = array();
    161172                       
    162173
    163  return $content;
     174                return $content;
    164175
    165176                        $data['maxwidth'] = '1200';
    166 $data['maxheight'] ='250';
     177                        $data['maxheight'] ='250';
    167178                        $data['user_id'] = $userdata['id'];
    168            foreach ($fields as $field)
    169       {
    170         if (isset($_POST[$field]))
    171         {
    172           $data[$field] = $_POST[$field];
    173         }
    174       }
     179                        foreach ($fields as $field){
     180                                if (isset($_POST[$field])){
     181                                                $data[$field] = $_POST[$field];
     182                                                }
     183                                }
    175184       
    176         if($data['maxwidth'] != "" )
    177 {
     185        if($data['maxwidth'] != "" ){
    178186        $picture['current']['scaled_width']=$data['maxwidth'];
    179187                 $picture['current']['scaled_height']=$data['maxheight'];
    180        mass_updates(USER_INFOS_TABLE,
    181                    array('primary' => array('user_id'), 'update' => $fields),
    182                    array($data));
    183        
    184 }
    185 
    186  
     188                                        mass_updates(USER_INFOS_TABLE,
     189                                        array('primary' => array('user_id'), 'update' => $fields),
     190                                        array($data));
     191                                }
    187192   return $content;
    188193   /*
    189  $template->assign(
     194                        $template->assign(
    190195                                                array(
    191196                                                'AUTOSIZE_PATH' => $my_path,
     
    194199                                                 );
    195200 
    196                 $template->parse( 'autosize_cl_init', false);
    197         return $content;
     201                                $template->parse( 'autosize_cl_init', false);
     202                                return $content;
    198203        */
    199204
  • extensions/Autosize/js/Affiche_script.js

    r7618 r7642  
    2020}
    2121//=========================================================
    22 
    23 function wait_Timer() {
    24     old_w = 0
     22/*
     23window.onresize = resize;
     24window.onload = load;
     25
     26function resize() {
     27    alert("resize event detected!");
     28}
     29function load() {
     30    alert("load event detected!");
     31}
     32*/
     33jQuery(document).ready(
     34      function (jQuery) {
     35          jQuery("#theImage").css({ opacity: "0.0", filter: 'alpha(opacity:0)' });
     36          jQuery(window).load(function (event) {
     37              jQuery("#theImage").css({ opacity: "0.0", filter: 'alpha(opacity:0)' });
     38              setTimeout('wait_Timer()', 20);
     39
     40              function handler(event) {
     41                   
     42             
     43                  jQuery("#theImage").css({ opacity: event.data.opacity, filter: 'alpha(opacity:' + event.data.opacity * 100 + ')' });
     44              }
     45              jQuery(window).bind("resize", { opacity: "1" }, handler)
     46
    2547 
    26     if (DEBUG == "true") {
    27         info_pamoorama_outter = jQuery("#pamoorama_outter").info();
    28         jQuery("#Debug1").css({
    29             filter: 'alpha(opacity:50)',
    30             position: "absolute",
    31             border: "solid 1px green",
    32             top: 400 + "px",
    33             width: (200) + "px",
    34             height: 400 + "px"
    35         });
    36         jQuery("#Debug1").text("Debug1:info : " + info_pamoorama_outter.width +
    37     " : " + info_pamoorama_outter.height
    38     );
    39     }
    40     if (jQuery("#pamoorama").length>0)
    41         if (info_pamoorama_outter.height == 0) {
    42        
    43             setTimeout('wait_Timer()', 300);
    44             return
    45         }
    46        jQuery(window).resize();
    47        jQuery("#theImage").css({       filter: 'alpha(opacity:100)',opacity:1 });
    48 
    49 }
    50 
    51 /*
    52 *
    53 */
    54 jQuery("#pamoorama").bind('resize', function () {
    55     wait_Timer();
    56 })
    57 
    58 jQuery("#pamoorama_iner").bind('resize', function () {
    59     wait_Timer();
    60 })
    61 //============================================================//==
    62 jQuery("#pamoorama_outter").bind('resize', function () {
    63     wait_Timer();
    64 })
    65 
    66 
    67 jQuery(document).ready(
    68 
    69       function (jQuery) {
    70           jQuery("#theImage").css({ filter: 'alpha(opacity:10)', opacity: "0.1" });
    71 
    72           jQuery(window).load(function () {
    73               setTimeout('wait_Timer()', 600);
    74              
    75              // jQuery("#theImage").get(0).attachEvent('onpropertychange', onPropertyChange);
    76           }
    77          );
     48          });
     49
    7850
    7951
     
    9668              marges_llgbo = (ll1.width - ll2.width) + ll2.borderwidth.left + ll2.borderwidth.right;
    9769          }
    98 
    99 
    100 
    101 
    102 
    103           //=============================================================
    104           function cl_Timer() {
    105               //   if (!jQuery.browser.msie) { jQuery(function () { alert(jQuery.browser.version); }); }
    106               if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 8)
    107                   alert(jQuery.browser.version);
    108               panoramaContainer = jQuery(".panorama-container");
    109               n = document.scripts[6]; //12--14affiche_script ;
    110               t = n.src;
    111 
    112               currentPosition = 0 - parseInt(jQuery(panoramaContainer).css('margin-left'));
    113               if (currentPosition == NaN) return;
    114 
    115 
    116               if (currentPosition > 1000)
    117                   jQuery(panoramaContainer).css('margin-left', "0px")
    118               setTimeout("cl_Timer()", 500);
    119           }
    120           //=============================================================
    121           function onPropertyChange(e) {
    122               var el = e.srcElement;
    123               var new_class = el.className;
    124               ID = el.id;
    125               Prop = e.propertyName.split(".");
    126               Property = Prop[1];
    127               if (Property == "display") {
    128                   Valeur = parseInt(el.currentStyle[Property]);
    129                   if (Valeur == "block") {
    130 
    131 
    132                   }
    133               }
    134               return;
    135           }
    136 
    137           /* ready
    138           *
    139           *
    140           */
    141           //============================================================
    14270          /*
    14371          *
    14472          */
    145           function Info_entete(Parent) {
    146 
    147               var info_imageToolBar = jQuery("#imageToolBar").info();
    148               if (info_imageToolBar.position == "absolute") {
    149                   jQuery("#imageToolBar").css("position", "relative");
    150                   jQuery("#imageToolBar").css("top", 0 + "px");
    151               }
    152 
    153               var info_theImage = jQuery("#theImage").info();
    154 
    155               if (info_theImage.position == "relative") {
    156                   //--- passage relative ==> static ===/
    157                   jQuery("#theImage").css("position", "static");
    158                   info_theImage = jQuery("#theImage").info();
    159 
    160               }
    161               if (info_theImage.position == "absolute") {
    162                   //--- passage absolute ==> static ===/
    163                   jQuery("#theImage").css("position", "static");
    164                   info_theImage = jQuery("#theImage").info();
    165 
    166               }
    167 
    168               marge_top = Info_the_page.top +
    169                                      Info_the_page.borderwidth.top +
    170                                      info_theImage.borderwidth.top;
    171 
    172               img_top = info_theImage.top + info_theImage.borderwidth.top;
    173               return { marge_top: marge_top, img_top: img_top };
    174 
    175           }
    176 
    177           /* Récupère les informations sur la description.
    178           *
    179           */
    180           function Info_description(Parent) {
    181               //  jQuery("#" + Parent + " p:not(:contains(' ')) ").remove();
    182               //=============================================================================
    183               var info_description = { top: 0, bottom: 0, height: 0 };
    184               if (theme.match(RegExp("simple", "gi"))) {
    185                   jQuery("#" + Parent).css({ padding: "0px",
    186                       marginLeft: "0px",
    187                       marginRight: "auto",
    188                       marginTop: "0px",
    189                       marginBottom: "0px", position: "absolute", top: Bandeau + "px"
    190                   });
    191               } else {
    192 
    193                   jQuery("#" + Parent).css({ padding: "0px",
    194                       marginLeft: "auto",
    195                       marginRight: "auto",
    196                       marginTop: "0px",
    197                       marginBottom: "0px"
    198                   });
    199 
    200 
    201               }
    202 
    203 
    204               //   jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px "    });
    205 
    206 
    207               if (theme.match(RegExp("luciano", "g"))) {
    208                   info_img = jQuery("#" + Parent + " #theImg img").info();
    209 
    210               } else {
    211 
    212                   info_img = jQuery("#" + Parent + " img").info();
    213               }
    214 
    215               info_description.marge = { bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom,
    216                   top: info_img.padding.top + info_img.borderwidth.top
    217               }
    218 
    219               info_description.top = info_img.bottom + info_img.margin.bottom + info_img.borderwidth.bottom;
    220               //=============================================================================
    221               info_gbo = jQuery("#gbo").info();
    222               if (info_description.top < info_gbo.bottom)
    223                   info_description.top = info_gbo.bottom;
    224               //=============================================================================
    225               info_desc = jQuery("#" + Parent + " p:first").info();
    226               if (info_desc.bottom < info_img.bottom)
    227                   info_desc.bottom = info_img.bottom;
    228 
    229               //  if (info_desc.top > info_img.bottom)
    230               //     info_description.top = info_desc.top;
    231 
    232               if (jQuery("#Panorama").length) {
    233                   Type_Img = "panorama";
    234                   //  cl_visible = false;
    235 
    236               }
    237               info_table = jQuery(".infoTable").info();
    238 
    239               if (info_table.top > info_description.bottom)
    240                   info_description.bottom = info_table.top;
    241               //===========================================================================
    242 
    243               info_licencetag = jQuery(".licencetag").info();
    244 
    245 
    246               if (info_licencetag.bottom > 0) {
    247                   jQuery(".licencetag").css("border", "solid 5px transparent");
    248                   if (info_licencetag.bottom > info_description.bottom) {
    249                       info_description.bottom = info_licencetag.bottom;
    250                   }
    251                   else
    252                       info_description.bottom += info_table.margin.top + info_table.padding.top;
    253 
    254               }
    255               //=============================================================================
    256               if (theme.match(RegExp("gally", "gi"))) {
    257                   if (!theme.match(RegExp("lapis", "gi"))) {
    258                       info_description.bottom = info_description.bottom
    259                   }
    260               }
    261 
    262 
    263 
    264 
    265 
    266               if (info_description.top < 1)
    267                   info_description.top = info_description.bottom;
    268 
    269 
    270               if (info_description.bottom < info_description.top) {
    271                   info_description.bottom = info_description.top;
    272 
    273                   info_desc = jQuery("#" + Parent + " p:last").info();
    274 
    275                   if (info_desc.bottom > info_img.bottom)
    276                       info_description.bottom = info_desc.bottom;
    277               }
    278 
    279 
    280               if (theme.match(RegExp("gally", "g"))) {
    281                   if (!theme.match(RegExp("lapis", "gi"))) {
    282                       info_copyright = jQuery("#copyright").info();
    283                       info_description.bottom += info_copyright.height;
    284                   }
    285               }
    286 
    287               if (theme.match(RegExp("luciano", "g"))) { info_description.bottom -= 30 }
    288 
    289               info_description.height = info_description.bottom - info_description.top;
    290 
    291 
    292               if (DEBUG == "true") {
    293 
    294                   /*  jQuery("#Debug").text(jQuery("#Debug").text() + user_status);   
    295        
    296 
    297                   info_description.width = "800";
    298                   */
    299                   jQuery("#Debug").css('display', 'block');
    300                   jQuery("#Debug1").show();
    301                   jQuery("#Debug2").show();
    302                   Bandeau_bas = info_description;
    303 
    304                   jQuery("#Debug").css({ opacity: "0.50",
    305                       filter: 'alpha(opacity:50)',
    306                       position: "absolute",
    307                       width: "800px",
    308                       border: "solid 1px green",
    309                       top: Bandeau + "px"
    310                   });
    311                   jQuery("#Debug").text("Debug:Bandeau : " + Bandeau);
    312 
    313                   jQuery("#Debug1").css({ opacity: "0.50",
    314                       filter: 'alpha(opacity:50)',
    315                       position: "absolute",
    316                       border: "solid 1px green",
    317                       top: Bandeau_bas.top + "px",
    318                       width: (200) + "px",
    319                       height: Bandeau_bas.height + "px"
    320                   });
    321                   jQuery("#Debug1").text("Debug1:Bandeau_bas top : " + Bandeau_bas.top + " height:" + Bandeau_bas.height);
    322 
    323                   jQuery("#Debug2").css({ opacity: "0.50",
    324                       filter: 'alpha(opacity:50)',
    325                       position: "absolute",
    326                       left: '50px',
    327                       width: (300) + "px",
    328                       border: "solid 1px green", top: Bandeau_bas.bottom + "px"
    329                   });
    330                   jQuery("#Debug2").text("Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom);
    331 
    332               }
    333 
    334               if (check_desc_v != 'checked="checked"') {
    335                   info_description.height = 0;
    336               }
    337 
    338               return info_description;
    339 
    340           }
    341 
    342 
    343 
    344 
    345           //============================================================
    346           jQuery("#iGMapsIcon").bind('resize', function () {
    347               jQuery().recentrage_widget();
    348           })
    349           jQuery("#icon_gmaps").bind('click', function () {
    350               jQuery().recentrage_widget();
    351           })
    352 
    353 
    354 
    355 
    356 
    357 
    358           /* jQuery */
     73
     74
    35975          var img_init = { height: img_height, width: img_width };  // taille initiale
    36076          var img_defaut = { height: scaled_height, width: scaled_width };
     
    37490          Bandeau_bas = Info_description("theImage");
    37591          //===================================================================
     92
    37693          /*
    37794          * window .resize
    37895          */
    379 
    380 
    38196          jQuery(window).resize(function (event, ui) {
     97
    38298              if (typeof (event) == 'undefined') return;
    38399              if (!cl_visible == true) return;
     
    468184              if (Type_Img == "pamoorama") {
    469185                  var myPamoorama = this.myPamoorama;
    470 
     186                  //=====================================================
     187
     188
     189
     190                  //=====================================================
    471191                  if (typeof (myPamoorama) == "undefined") {
    472 
    473 
    474192                      return
    475193                  }
    476 
    477 
    478                   if (typeof (myPamoorama.imageHeight) == "undefined") {
     194                  if (myPamoorama.skipInit == false)
     195                      return
     196
     197                  var h01 = typeof (myPamoorama.imageHeight);
     198
     199                  if (h01 == "undefined") {
    479200                      old_w = 0;
    480201                      old_h = 0;
    481 
    482 
    483202                      return;
    484203                  }
     204
     205                  //=============================================
     206
     207
     208
    485209
    486210                  /*
     
    616340                      TheImg = jQuery("#pamoorama");
    617341
     342                      if (info_pamoorama_outter.height == 0) {
     343                          old_h = 0;
     344                          jQuery(window).resize();
     345                          return
     346                      }
     347                      //   event = window.event ? window.event : event;
     348                      ;
     349                      //  jQuery("#pamoorama_outter").trigger(jQuery.browser.msie ? "propertychange" : "change", [event]);
     350                      //
     351                      //   jQuery("#pamoorama_outter").trigger("onPropertychange", [event]);
     352
    618353                      img_reelle.height = myPamoorama.imageHeight;
    619354                      img_reelle.width = myPamoorama.imageWidth;
     
    1065800                  pos = jQuery("#copyright").info();
    1066801              if (pos.top > 100) jQuery("#the_page").height(pos.top);
     802
    1067803              if (old_w == jQuery(window).width() && old_h == jQuery(window).height()) return;
    1068               //jQuery(window).resize();
     804
     805
    1069806              return;
    1070           });
     807          }); // fin resize
    1071808          var pos;
    1072           //===================================================================   
    1073           //jQuery(window).resize();
     809          //================================================
     810          function Info_entete(Parent) {
     811
     812              var info_imageToolBar = jQuery("#imageToolBar").info();
     813              if (info_imageToolBar.position == "absolute") {
     814                  jQuery("#imageToolBar").css("position", "relative");
     815                  jQuery("#imageToolBar").css("top", 0 + "px");
     816              }
     817
     818              var info_theImage = jQuery("#theImage").info();
     819
     820              if (info_theImage.position == "relative") {
     821                  //--- passage relative ==> static ===/
     822                  jQuery("#theImage").css("position", "static");
     823                  info_theImage = jQuery("#theImage").info();
     824
     825              }
     826              if (info_theImage.position == "absolute") {
     827                  //--- passage absolute ==> static ===/
     828                  jQuery("#theImage").css("position", "static");
     829                  info_theImage = jQuery("#theImage").info();
     830
     831              }
     832
     833              marge_top = Info_the_page.top +
     834                                     Info_the_page.borderwidth.top +
     835                                     info_theImage.borderwidth.top;
     836
     837              img_top = info_theImage.top + info_theImage.borderwidth.top;
     838              return { marge_top: marge_top, img_top: img_top };
     839
     840          }
     841
     842          /* Récupère les informations sur la description.
     843          *
     844          */
     845          function Info_description(Parent) {
     846              //  jQuery("#" + Parent + " p:not(:contains(' ')) ").remove();
     847              //=============================================================================
     848              var info_description = { top: 0, bottom: 0, height: 0 };
     849              if (theme.match(RegExp("simple", "gi"))) {
     850                  jQuery("#" + Parent).css({ padding: "0px",
     851                      marginLeft: "0px",
     852                      marginRight: "auto",
     853                      marginTop: "0px",
     854                      marginBottom: "0px", position: "absolute", top: Bandeau + "px"
     855                  });
     856              } else {
     857
     858                  jQuery("#" + Parent).css({ padding: "0px",
     859                      marginLeft: "auto",
     860                      marginRight: "auto",
     861                      marginTop: "0px",
     862                      marginBottom: "0px"
     863                  });
     864
     865
     866              }
     867
     868
     869              //   jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px "    });
     870
     871
     872              if (theme.match(RegExp("luciano", "g"))) {
     873                  info_img = jQuery("#" + Parent + " #theImg img").info();
     874
     875              } else {
     876
     877                  info_img = jQuery("#" + Parent + " img").info();
     878              }
     879
     880              info_description.marge = { bottom: info_img.padding.bottom + info_img.margin.bottom + info_img.borderwidth.bottom,
     881                  top: info_img.padding.top + info_img.borderwidth.top
     882              }
     883
     884              info_description.top = info_img.bottom + info_img.margin.bottom + info_img.borderwidth.bottom;
     885              //=============================================================================
     886              info_gbo = jQuery("#gbo").info();
     887              if (info_description.top < info_gbo.bottom)
     888                  info_description.top = info_gbo.bottom;
     889              //=============================================================================
     890              info_desc = jQuery("#" + Parent + " p:first").info();
     891              if (info_desc.bottom < info_img.bottom)
     892                  info_desc.bottom = info_img.bottom;
     893
     894              //  if (info_desc.top > info_img.bottom)
     895              //     info_description.top = info_desc.top;
     896
     897              if (jQuery("#Panorama").length) {
     898                  Type_Img = "panorama";
     899                  //  cl_visible = false;
     900
     901              }
     902              info_table = jQuery(".infoTable").info();
     903
     904              if (info_table.top > info_description.bottom)
     905                  info_description.bottom = info_table.top;
     906              //===========================================================================
     907
     908              info_licencetag = jQuery(".licencetag").info();
     909
     910
     911              if (info_licencetag.bottom > 0) {
     912                  jQuery(".licencetag").css("border", "solid 5px transparent");
     913                  if (info_licencetag.bottom > info_description.bottom) {
     914                      info_description.bottom = info_licencetag.bottom;
     915                  }
     916                  else
     917                      info_description.bottom += info_table.margin.top + info_table.padding.top;
     918
     919              }
     920              //=============================================================================
     921              if (theme.match(RegExp("gally", "gi"))) {
     922                  if (!theme.match(RegExp("lapis", "gi"))) {
     923                      info_description.bottom = info_description.bottom
     924                  }
     925              }
     926
     927
     928
     929
     930
     931              if (info_description.top < 1)
     932                  info_description.top = info_description.bottom;
     933
     934
     935              if (info_description.bottom < info_description.top) {
     936                  info_description.bottom = info_description.top;
     937
     938                  info_desc = jQuery("#" + Parent + " p:last").info();
     939
     940                  if (info_desc.bottom > info_img.bottom)
     941                      info_description.bottom = info_desc.bottom;
     942              }
     943
     944
     945              if (theme.match(RegExp("gally", "g"))) {
     946                  if (!theme.match(RegExp("lapis", "gi"))) {
     947                      info_copyright = jQuery("#copyright").info();
     948                      info_description.bottom += info_copyright.height;
     949                  }
     950              }
     951
     952              if (theme.match(RegExp("luciano", "g"))) { info_description.bottom -= 30 }
     953
     954              info_description.height = info_description.bottom - info_description.top;
     955
     956
     957              if (DEBUG == "true") {
     958
     959                  /*  jQuery("#Debug").text(jQuery("#Debug").text() + user_status);   
     960       
     961
     962                  info_description.width = "800";
     963                  */
     964                  jQuery("#Debug").css('display', 'block');
     965                  jQuery("#Debug1").show();
     966                  jQuery("#Debug2").show();
     967                  Bandeau_bas = info_description;
     968
     969                  jQuery("#Debug").css({
     970                      opacity: "0.50",
     971                      filter: 'alpha(opacity:50)',
     972                      position: "absolute",
     973                      width: "800px",
     974                      border: "solid 1px green",
     975                      top: Bandeau + "px"
     976                  });
     977                  jQuery("#Debug").text("Debug:Bandeau : " + Bandeau);
     978
     979                  jQuery("#Debug1").css({ opacity: "0.50",
     980                      filter: 'alpha(opacity:50)',
     981                      position: "absolute",
     982                      border: "solid 1px green",
     983                      top: Bandeau_bas.top + "px",
     984                      width: (200) + "px",
     985                      height: Bandeau_bas.height + "px"
     986                  });
     987
     988                  //   jQuery("#Debug1").text(jQuery("#Debug1").text()+"Debug1:Bandeau_bas top : " + Bandeau_bas.top + " height:" + Bandeau_bas.height);
     989
     990                  jQuery("#Debug2").css({ opacity: "0.50",
     991                      filter: 'alpha(opacity:50)',
     992                      position: "absolute",
     993                      left: '50px',
     994                      width: (300) + "px",
     995                      border: "solid 1px green", top: Bandeau_bas.bottom + "px"
     996                  });
     997                  jQuery("#Debug2").text("Debug2:Bandeau_bas bottom :" + Bandeau_bas.bottom);
     998
     999              }
     1000
     1001              if (check_desc_v != 'checked="checked"') {
     1002                  info_description.height = 0;
     1003              }
     1004
     1005              return info_description;
     1006
     1007          }
     1008          //==================================================================================
     1009
     1010          //======== jQuery(window).resize();===========================================================         
     1011
    10741012          /*
    10751013          * recherche la plus grande image (hauteur ou largeur)
     
    10981036
    10991037      } // function
    1100 );                                                                                                                                                                                                                                                                                                                                                                                                                                                                     // ready
    1101     /*
    1102 *
    1103 */
     1038);
     1039
     1040
     1041
     1042      /*
     1043      *
     1044      */
     1045      jQuery("#pamoorama").bind(jQuery.browser.msie ? "propertychange" : "change", function (event) {
     1046
     1047          onPropertyChange(event);
     1048      })
     1049      jQuery("#pamoorama_frame").bind(jQuery.browser.msie ? "propertychange" : "change", function (event) {
     1050          onPropertyChange(event);
     1051      })
     1052
     1053      jQuery(window).load(function () {
     1054          //  jQuery(window).resize();
     1055          //  setTimeout("wait_Timer()", 500);
     1056
     1057          jQuery("#pamoorama").resize(function () {
     1058
     1059              jQuery("#pamoorama").bind('resize', function () {
     1060                  jQuery("#pamoorama_outter").bind(
     1061                      jQuery.browser.msie ? "propertychange" : "change", function (event) {
     1062                          event.stopPropagation();
     1063                          onPropertyChange(event);
     1064                      });
     1065              });
     1066          });
     1067
     1068      });
     1069      //=============================================================
     1070      function cl_Timer() {
     1071          //   if (!jQuery.browser.msie) { jQuery(function () { alert(jQuery.browser.version); }); }
     1072          if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 8)
     1073              alert(jQuery.browser.version);
     1074          panoramaContainer = jQuery(".panorama-container");
     1075          n = document.scripts[6]; //12--14affiche_script ;
     1076          t = n.src;
     1077
     1078          currentPosition = 0 - parseInt(jQuery(panoramaContainer).css('margin-left'));
     1079          if (currentPosition == NaN) return;
     1080
     1081
     1082          if (currentPosition > 1000)
     1083              jQuery(panoramaContainer).css('margin-left', "0px")
     1084          setTimeout("cl_Timer()", 500);
     1085      }
     1086
     1087
     1088      //============================================================
     1089      jQuery("#iGMapsIcon").bind('resize', function () {
     1090          jQuery().recentrage_widget();
     1091      })
     1092      jQuery("#icon_gmaps").bind('click', function () {
     1093          jQuery().recentrage_widget();
     1094      })
     1095
     1096
     1097
     1098
     1099
     1100      //=====================================================================
     1101      jQuery("#pamoorama").bind("resize", function (event) {
     1102          onPropertyChange(event);
     1103      })
     1104     
     1105      jQuery("#pamoorama").bind(
     1106                      jQuery.browser.msie ? "propertychange" : "change", function (event) {
     1107                          onPropertyChange(event);
     1108                      });
     1109
     1110
     1111      jQuery("#pamoorama_outter").bind(
     1112                      jQuery.browser.msie ? "propertychange" : "change", function (event) {
     1113
     1114                          onPropertyChange(event);
     1115                      });
     1116      jQuery("#pamoorama_footer").bind(
     1117                      jQuery.browser.msie ? "propertychange" : "change", function (event) {
     1118
     1119                          onPropertyChange(event);
     1120                      });
     1121      jQuery("#pamoorama_frame").bind(
     1122                      jQuery.browser.msie ? "propertychange" : "change", function (event) {
     1123
     1124                          onPropertyChange(event);
     1125                      });
     1126
     1127      //=============================================================
     1128      //frame.injectInside
     1129      function onPropertyChange(e) {
     1130
     1131          var el = e.srcElement;
     1132          if (e.srcElement == null) return
     1133          ID = el.id;
     1134          if (jQuery.browser.msie)
     1135              PropertyName = window.event.propertyName;
     1136          else
     1137              PropertyName = window.evt.propertyName;
     1138
     1139          if (!PropertyName) return;
     1140          Prop = PropertyName.split(".");
     1141
     1142          Valeur = "";
     1143          Property = Prop[1];
     1144          if (typeof (Property) != "undefined") {
     1145              Valeur = parseInt(el.currentStyle[Property]);
     1146          } else {
     1147              Property = Prop[0];
     1148          }
     1149          if (DEBUG == "true") {
     1150
     1151              if (typeof (message) == "undefined") message = jQuery("#Debug1").text();
     1152
     1153              jQuery("#Debug1").css({
     1154                  filter: 'alpha(opacity:60)',
     1155                  opacity: 0.8,
     1156                  position: "absolute",
     1157                  border: "solid 1px green",
     1158                  top: 100 + "px",
     1159                  width: "auto",
     1160                  height: 400 + "px"
     1161              });
     1162              if (ID != "pamoorama") {
     1163                  message += "onPropertyChange : " + ID + " : " + Property + " : " + Valeur + "\n";
     1164                  jQuery("#Debug1").text(message);
     1165              }
     1166
     1167
     1168              if (ID == "pamoorama_outter" & Property == "left" && Valeur == -2) {
     1169                  jQuery("#theImage").css({ filter: 'alpha(opacity:100)', opacity: 1 });
     1170                  jQuery("#theImage").css({ filter: 'alpha(opacity:100)', opacity: 1 });
     1171              }
     1172              if (Valeur == "block") {
     1173
     1174
     1175              }
     1176          }
     1177          return;
     1178      }
     1179      //====================================================================                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           // ready
     1180        /*
     1181        *
     1182        */
    11041183    jQuery.extend(jQuery.expr[':'], {
    11051184        // Nom du sélecteur personnalisé
     
    11311210        //=========================================================
    11321211    });          // fin extend
     1212
     1213
     1214    function wait_Timer() {
     1215        old_w = 0
     1216
     1217        if (DEBUG == "true") {
     1218            info_pamoorama_outter = jQuery("#pamoorama_outter").info();
     1219            jQuery("#Debug1").css({
     1220                filter: 'alpha(opacity:50)',
     1221                position: "absolute",
     1222                border: "solid 1px green",
     1223                top: 400 + "px",
     1224                width: 400 + "px",
     1225                height: "auto"
     1226            });
     1227               jQuery("#Debug1").text("Debug1:info : " + info_pamoorama_outter.width +
     1228             " : " + info_pamoorama_outter.height
     1229             );
     1230        }
     1231        if (jQuery("#pamoorama").length > 0)
     1232            if (info_pamoorama_outter.height == 0) {
     1233
     1234                //      setTimeout('wait_Timer()', 300);
     1235                return
     1236            }
     1237         jQuery(window).resize();
     1238       
     1239
     1240    }
     1241
     1242
  • extensions/Autosize/js/conflit.js

    r7618 r7642  
    1313      function (jQuery) {
    1414
    15 
    16 
    1715           tpj = jQuery("#pamoorama");
    1816          if (tpj.length > 0) {             }
     
    2725
    2826
    29               tp = typeof (Browser);
    30               if (tp != "undefined")
    31                   if (Browser.loaded == true) {
    32                       n = Browser;
    33                   }
    34                   function $(element, nc) {
    35                       return conflit(element, nc);
    36                   }
    37              
    3827          });
    3928
     
    8271     
    8372        var jq = jQuery(element).selector;
    84         var ret_el ={  prototype : ret_proto,
    85                         pamoorama : ret_pamoorama,
     73        var ret_el ={  Prototype : ret_proto,
     74                        Pamoorama : ret_pamoorama,
    8675                        jquery :     jQuery(element),
    8776                        Luciano: ret_Luciano
     
    9483                        }
    9584                         
    96                         if (Prototype_Version != "0") return ret_el.prototype; //rv_gmaps
    97                         if (MooTools_version == "pamoorama") return ret_el.pamoorama;
     85                        if (Prototype_Version != "0") return ret_el.Prototype; //rv_gmaps
     86                        //if (MooTools_version == "pamoorama") return ret_el.Pamoorama;
    9887                        return ret_el.jquery;
    9988                        j = nc;
     
    118107            if (arguments.caller.length > 1) {
    119108                if (element == "pamoorama") {
    120                     return ret_el.pamoorama
     109                    return ret_el.Pamoorama
    121110                }
    122111                arg = arguments.caller[1];
     
    128117                        case "dom:loaded":
    129118                            return element;
    130                             return ret_el.prototype
     119                            return ret_el.Prototype
    131120                            break;
    132121                        case "load":
    133                             return ret_el.prototype
     122                            return ret_el.Prototype
    134123                            break;
    135124                        case "unload":
    136                             return ret_el.prototype
     125                            return ret_el.Prototype
    137126                            break;
    138127                        case "prototype_event_registry":
    139128
    140129                            try {
    141                                 retour = ret_el.prototype;
     130                                retour = ret_el.Prototype;
    142131                            } catch (e) {
    143132                                retour = null;
     
    169158                        switch (arg) {
    170159                            case "bottom":
    171                                 return ret_el.pamoorama
     160                                return ret_el.Pamoorama
    172161                                break;
    173162                            case "left":
    174                                 return ret_el.pamoorama
     163                                return ret_el.Pamoorama
    175164                                break;
    176165                            case "prototype_event_registry":
    177                                 return ret_el.pamoorama
     166                                return ret_el.Pamoorama
    178167                                break;
    179168                            case "readystatechange":
    180                                 return ret_el.pamoorama
     169                                return ret_el.Pamoorama
    181170                                break;
    182171
    183172                            default:
    184173                                if (arg.area) {
    185                                     return ret_el.pamoorama
     174                                    return ret_el.Pamoorama
    186175                                } else
    187176                                    if (arg.velocity) {
    188                                         return ret_el.pamoorama
     177                                        return ret_el.Pamoorama
    189178                                    } else if (arg.src) {
    190                                         return ret_el.pamoorama
     179                                        return ret_el.Pamoorama
    191180                                    } else if (arg.modifiers) {
    192                                         return ret_el.pamoorama
     181                                        return ret_el.Pamoorama
    193182                                    } else if (arg.limit) {
    194                                         return ret_el.pamoorama
     183                                        return ret_el.Pamoorama
    195184                                    } else if (arg.duration) {
    196                                         return ret_el.pamoorama
     185                                        return ret_el.Pamoorama
    197186                                    } else if (arg.id) {
    198187                                        switch (arg.id) {
    199188                                            case "pamoorama_footer":
    200                                                 return ret_el.pamoorama
     189                                                return ret_el.Pamoorama
    201190                                                break;
    202191                                            case "pamoorama_outter":
    203                                                 return ret_el.pamoorama
     192                                                return ret_el.Pamoorama
    204193                                                break;
    205194                                            case "pamoorama_inner":
    206                                                 return ret_el.pamoorama
     195                                                return ret_el.Pamoorama
    207196                                                break;
    208197
    209198                                            default:
    210                                                 return ret_el.pamoorama
     199                                                return ret_el.Pamoorama
    211200                                                break;
    212201
    213202                                        }
    214203                                    } else if (arg.src) {
    215                                         return ret_el.pamoorama
     204                                        return ret_el.Pamoorama
    216205
    217206                                    }
     
    237226                if (element.match(/[a-z]_[a-z]/)) {
    238227
    239                     return ret_el.prototype
     228                    return ret_el.Prototype
    240229                }
    241230                id = "window_" + new Date().getTime();
     
    244233
    245234                    if (element.match(/_[a-z]/)) {
    246                         return ret_el.prototype
     235                        return ret_el.Prototype
    247236                    }
    248237                    return null;
     
    264253        if (MooTools_version == "Luciano" && tpe == "string") {
    265254            //=== theme Luciano ====
    266             ret_el.jquery = ret_el.Luciano;
    267             if (element == "order") return ret_el.jquery;
    268             if (element == "themeSelect") return ret_el.jquery;
    269             if (element == "languageSelect") return ret_el.jquery;
    270             if (element == 'linkPrev') return ret_el.jquery;
    271             if (element == 'linkNext') return ret_el.jquery;
    272             if (element == 'rateForm') return ret_el.jquery;
     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;
    273262        }
    274263
     
    280269                switch (jq) {
    281270                case "ie_ready":
    282                     return ret_el.pamoorama
     271                    return ret_el.Pamoorama
    283272                    break;
    284273                case "pamoorama":
    285                     return ret_el.pamoorama
     274                    return ret_el.Pamoorama
    286275                    break;
    287276                case ".tab a":
    288                     return jQuery(element);
     277                    return ret_el.jquery;
    289278                    break;
    290279
    291280            } else if (tpe == "boolean") {
    292                 return ret_el.pamoorama
     281                return ret_el.Pamoorama
    293282            }
    294283            if(element)
    295284            if (typeof (element.nodeName) != "undefined") {
    296285            el = element.nodeName;
    297             if (el == "DIV") return ret_el.pamoorama
    298             if (el == "IMG") return ret_el.pamoorama
     286            if (el == "DIV") return ret_el.Pamoorama
     287            if (el == "IMG") return ret_el.Pamoorama
    299288            if (el == "#document") {
    300                 if (Prototype_Version != "0") return ret_el.prototype; //rv_gmaps
    301                 if (MooTools_version == "pamoorama") return ret_el.pamoorama;
     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;
    302292                return ret_el.jquery;
    303293            }
    304294            if (el == "BODY") {
    305295                try {
    306                     if (Prototype_Version != "0") return ret_el.prototype; //rv_gmaps
    307                     if (MooTools_version == "pamoorama") return ret_el.pamoorama;
     296                    if (Prototype_Version != "0") return ret_el.Prototype; //rv_gmaps
     297                    if (MooTools_version == "pamoorama") return ret_el.Pamoorama;
    308298                    return ret_el.jquery;
    309299                    return jQuery().$Pamoorama(element)
     
    317307
    318308        if (element == window) {
    319             if (Prototype_Version != "0") return ret_el.prototype; //rv_gmaps
    320             if (MooTools_version == "pamoorama") return ret_el.pamoorama;
     309            if (Prototype_Version != "0") return ret_el.Prototype; //rv_gmaps
     310            if (MooTools_version == "pamoorama") return ret_el.Pamoorama;
    321311            return ret_el.jquery;
    322312
     
    372362                        //=== rvmaps ===
    373363                        try {
    374                             return ret_el.prototype
     364                            return ret_el.Prototype
    375365
    376366                        } catch (e) {
     
    404394            //=== paMOOramics ===
    405395            // ie_ready,undefined
    406             return ret_el.pamoorama
     396            return ret_el.Pamoorama
    407397        }
    408398
     
    413403            //=== rvmaps ===
    414404            try {
    415                 return ret_el.prototype
     405                return ret_el.Prototype
    416406            } catch (e) {
    417407                return jQuery(element);
     
    463453    //=============== PaMOOramics ===========================
    464454    $Pamoorama: function (B) {
    465  
    466         if (!B) {
    467             if (typeof (B) == "boolean") return null;
    468             return jQuery();
    469         }
    470         if (B.htmlElement) {
     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 () { };
    471481            return Garbage.collect(B);
    472 
    473         }
    474         if ([window, document].contains(B)) { return B; }
    475         var A = $type(B);
    476         if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
    477         if (A != "element") {
    478             return null;
    479         }
    480         if (B.htmlElement) { return Garbage.collect(B); }
    481         if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }
    482         $extend(B, Element.prototype);
    483         B.htmlElement = function () { };
    484         try { return Garbage.collect(B); } catch (e) {
    485             return;
    486         }
     482       
    487483
    488484    },
  • extensions/Autosize/main.inc.php

    r7606 r7642  
    22/*
    33Plugin Name: AutoSize
    4 Version: 1.3.2
     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);
     18add_event_handler('loc_end_picture', array(&$autosize_controler, 'cl_add_css'),30);
     19 
    1720
    1821add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 40 );
    19 
    20 
    2122add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin')  );
    2223
     
    2627//add_event_handler('loc_begin_index', array(&$autosize_controler, 'cl_autosize_script'),51 );
    2728
    28 //add_event_handler('load_profile_in_template', array(&$autosize_controler,'cl_autosize_script'),40 );
    2929
    3030?>
Note: See TracChangeset for help on using the changeset viewer.