Changeset 8729


Ignore:
Timestamp:
Jan 18, 2011, 1:17:27 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] compatibility whith simple


Location:
extensions/Autosize
Files:
8 edited

Legend:

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

    r8627 r8729  
    316316 }
    317317
    318 
     318 function auto_memo_var($variables)
     319{
     320  ob_start();
     321  echo '<pre>';
     322  print_r($variables);
     323  echo '</pre>';
     324  $m= ob_get_contents();
     325  ob_end_clean();
     326  return $m;           
     327}
     328   
    319329
    320330?>
  • extensions/Autosize/css/autosize.css

    r8060 r8729  
    1 #theImage{
    2  
    3     opacity: 1.0 ;
    4      
    5        }
    6    
     1 
    72/* jQuery ui resizable */
    83.ui-resizable { position: relative; }
     
    2318.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: 0px; top: 0px; background: transparent url(images/resizable-nw.gif); }
    2419.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: 0px; top: 0px; background: transparent url(images/resizable-ne.gif); }
     20#theImage {
     21    opacity: 0;
     22    filter: alpha(opacity:0);
     23    padding-bottom: 0px;
     24    padding-left: 0px;
     25}
     26#the_page{
     27position:static ;
     28 
     29}
     30#mapPicture{
     31top:40% ;
     32
     33}
     34#mapPicture{
     35top:40% ;
     36
     37}
     38#imageContainer{
     39height:2000px;
     40}
  • extensions/Autosize/js/Affiche_script.js

    r8627 r8729  
    5252
    5353//==========================================================================
    54 function Wait_Affichage() {
     54function Wait_Affichage() {
     55   
     56            fade_in = parseInt(fade_in);
    5557    if(!jQuery().newResize()) {
    5658                 setTimeout("Wait_Affichage()", 500);
    5759                 return
    5860             }
    59 
    60              fade_in = parseInt(fade_in);
    61              if (fade_in == 0) {
    62                  if (msie)
    63                      jQuery(Parent).css({opacity:"1",filter: "alpha(opacity=100)"});
    64              else
    65                  jQuery(Parent).css("opacity","1");
    66              } else {
    67                  jQuery(Parent).animate(
    68                          { opacity: 1 }, fade_in, "swing"
     61 
     62             if (fade_in == 0) {               
     63                     jQuery(Parent).css({opacity:"1" });
     64         } else {
     65
     66                jQuery(Parent).animate(
     67                         { opacity: "1" }, fade_in, "swing"
    6968                       , function (i) {
     69                           jQuery(Parent).css({ opacity: "1" });
    7070                           if (DEBUG == "true") {
    7171                               bp1 = jQuery('.debug').get(nu_img);
     
    8585jQuery(document).ready(
    8686     function (jQuery) {
     87         jQuery(window).unload(function () {
     88             
     89
     90
     91         });
    8792         jQuery(window).load(function () {
    88              if (fade_in != 0) {
    89                  if (msie)
    90                      jQuery("#theImage").css({ opacity: "0" });
    91                  else
    92                      jQuery("#theImage").css({ opacity: "0" });
    93              }
     93
     94             //  jQuery("#theImage").css({ opacity: "0" });
     95
     96             jQuery("#the_page").css({ top: "0px" });
     97
    9498             //======= cl_conflit ======
    9599             img_top = "0";
    96100             rapport = -1;
    97 
    98101             marges_llgbo = 0;
    99102             pos = 0;
    100 
    101 
    102103             //=============================================================
    103104             function cl_Timer() {
     
    133134             img_finale = { height: 0, width: 0 };
    134135             Zone_Affichage = { height: 0, width: 0 };
    135 
    136              //============================================================
     136             //============================================================       
    137137
    138138             Info_the_page = jQuery("#the_page").infos();
     
    150150             }
    151151             old_window = { width: 0, height: 0 };
    152              Wait_Affichage();
     152             jQuery("#theImage").trigger('ON');
     153
    153154             old_window = { width: 0, height: 0 };
    154155             jQuery().newResize();
     
    255256                 var info_ToolBar = jQuery("#imageToolBar").infos();
    256257                 var marge = 0;
    257                  marge_right = 0;
    258                  marge_left = 0;
     258                 var marge_right = 0;
     259                 var marge_left = 0;
    259260                 if (theme.match(RegExp("simple", "g"))) {
    260261                     if (info_ToolBar.width > 0)
     
    263264                         marge = (Zone_Affichage.width - info_the_page.width) / 2;
    264265
    265                      var marge_right = marge;
    266                      var marge_left = marge;
     266                     marge_right = marge;
     267                     marge_left = marge;
    267268
    268269                     if (info_content.width > 100) {
     
    274275
    275276                     }
    276                  }
    277                  else
     277                 } else {
     278                     if (info_ToolBar.width > 0)
     279                         marge = (info_the_page.width - info_ToolBar.width) / 2;
     280
     281                     marge_right = marge;
     282                     marge_left = marge;
    278283                     winwidth = info_the_page.width;
     284                 }
    279285
    280286
     
    328334                         jQuery("#map").css("left", info_map.width + "px");
    329335                         Bandeau_bas.height = 10;
    330                        
     336
    331337                         if (theme.match(RegExp("simple", "g"))) {
    332338                             img_reelle.width = winwidth; //- info_map.width -marge_right;
    333                          } else { 
    334                           img_reelle.width = winwidth - info_map.width -marge_right;
     339                         } else {
     340                             img_reelle.width = winwidth - info_map.width - marge_right;
    335341                         }
    336342
     
    610616                         heightgbo = img_finale.height;
    611617                         img_finale.width -= marges_llgbo;
    612                          img_finale.height -= marges_llgbo;
     618                         if (jQuery("#slideshow").infos().width > 0) {
     619                             img_finale.height -= (marges_llgbo * 1.5);
     620                         } else {
     621                             img_finale.height -= marges_llgbo
     622                         }
     623
    613624
    614625                         if (wingbo > winwidth) {
     
    668679                 //================ Zone affichage =========================
    669680
    670                  if (theme.match(RegExp("luciano", "g"))) {
    671                      //---- information en dehors du cadre
    672                      jQuery(Cadre).height(Zone_Affichage.height -= Bandeau_bas.height);
    673                  }
    674 
    675                  //=========================================================
    676681
    677682                 //  jQuery(Cadre).css("top", "0px");
     
    683688                 Image_width = img_finale.width;
    684689                 //=========================================================================
    685                  jQuery(Cadre).css({ marginLeft: marge_left + "px"
    686                  });
     690                 if (jQuery("#slideshow").infos().width > 0) {
     691
     692                     jQuery(Cadre).css({ marginLeft: "auto"
     693                     });
     694                 }
     695                 else
     696                     jQuery(Cadre).css({ marginLeft: marge_left + "px"
     697                     });
    687698                 jQuery(Cadre).width(Zone_Affichage.width);
    688699                 //   jQuery(Cadre).height(Zone_Affichage.height);
     
    816827                 }
    817828
    818 
    819 
     829                 jQuery("#imageContainer").css({ height: "auto" });
    820830
    821831                 jQuery("#navThumbPrev").css({ overflow: "hidden" });
    822832                 jQuery("#navThumbNext").css({ overflow: "hidden" });
    823833                 n = typeof inittoolbar;
    824 
     834                 if (Type_Img == "map") {
     835                     jQuery("#navThumbNext").css({ display: 'none' });
     836                     jQuery("#navThumbPrev").css({ display: 'none' });
     837                 }
    825838                 try {
    826839                     if (theme.match(RegExp("gally", "gi"))) {
     
    835848                                 top: info_img.top + 20 + "px", overflow: "hidden"
    836849                             });
    837                              if (Type_Img == "map")
    838                                  jQuery("#navThumbPrevContainer").css({ background: 'none' });
     850
    839851                         }
    840852                         if (jQuery("#navThumbNext").length > 0) {
     
    844856
    845857                         }
    846                          if (Type_Img == "map")
    847                              jQuery("#navThumbNextContainer").css({ background: 'none' });
     858
     859
    848860                         if (!theme.match(RegExp("lapis", "gi"))) {
    849                              initializeImageMode("resize");
     861                             if (typeof initializeImageMode == "function") {
     862                                 initializeImageMode("resize");
     863                             }
     864
    850865                         }
    851866
     
    955970                 *
    956971                 */
    957                  
     972
    958973                 function Info_entete(Parent) {
    959974                     if (typeof (marge_top) != "undefined") return result;
     
    10221037                     //=============================================================================
    10231038                     info_description = { top: 0, bottom: 0, height: 0 };
    1024            
    1025 
     1039
     1040                     jQuery(Parent).css({ display: "block" });
    10261041                     //====== détection du type d'images ======
    10271042                     if (jQuery("#charlie").length > 0) {
     
    10851100                     if (theme.match(RegExp("luciano", "g"))) {
    10861101                         TheImg = jQuery(Parent + " #theImg img");
     1102
    10871103                         info_img = jQuery(TheImg).infos();
    10881104
     
    12421258
    12431259                     if (theme.match(RegExp("luciano", "g"))) {
    1244                          //info_description.bottom -= 30
     1260                         info_description.bottom -= 0;
     1261
     1262                       
     1263                             correction = -30;
     1264                             Info_slidshowToolBar = jQuery("#slidshowToolBar").infos();
     1265
     1266                             if (Info_slidshowToolBar.height > 0) {
     1267                                 correction -= (Info_slidshowToolBar.height);
     1268                                 info_description.top -= 90;
     1269
     1270                             }
     1271                             
     1272                       
     1273
     1274                         //=========================================================
    12451275                     }
    12461276
     
    13361366             Wait_Affichage();
    13371367         });
    1338 
     1368         jQuery(Parent).live('ON', function (e) {
     1369             jQuery(jQuery('.debug').get(1)).trigger('ON');
     1370             Wait_Affichage();
     1371         });
    13391372
    13401373         // Custom Event, ON to turn on a debug.
  • extensions/Autosize/js/conflit.js

    r8627 r8729  
    33//===================================================
    44var detect = navigator.userAgent.toLowerCase();
     5//   $_SERVER['HTTP_USER_AGENT'] ;
    56var OS, version;
    67//==============================================================================
     
    89
    910function detect_browser() {
     11   
    1012    mybrowser = {
    1113        browser: "",
     
    3739        else OS = "an unknown operating system";
    3840    }
    39 
     41    mybrowser.version =version;
     42    mybrowser.OS = OS;
    4043    mybrowser.browser = lbrowser;
    4144    return mybrowser
     
    6467msie = mybrowser.msie || false;
    6568netscape = mybrowser.netscape || false;
     69
     70
    6671
    6772var time_out = 0;
     
    478483test_conflit = false;
    479484librairies = new Array;
    480 
    481 
    482 
    483485$_ = $;
    484486function save_framework(page) {
     
    490492    } catch (e) {
    491493
     494    }
     495    if (jQuery('#browser').length > 0) {
     496        jQuery('#browser').val(browser.browser);
    492497    }
    493498    if (typeof (Parent) == "undefined")
     
    508513                    //==== compatibilité Gally/LLGBO ===                 
    509514                    jQuery(Parent).css({ position: "static" });
    510 
    511515                }
    512516            } catch (e) {
  • extensions/Autosize/js/jquery.dimensions.js

    r8627 r8729  
    113113                    height = jQuery(elem).height();
    114114                } else {
     115
    115116                    Css = jQuery(elem).getStyles(elem);
    116117                    myposition = Css.position || "";
     
    119120
    120121
    121                     borderwidth.left = jQuery(elem).Get_Val_int(Css.borderLeftWidth);
    122                     borderwidth.right = jQuery(elem).Get_Val_int(Css.borderRightWidth);
    123                     borderwidth.top = jQuery(elem).Get_Val_int(Css.borderTopWidth);
    124                     borderwidth.bottom = jQuery(elem).Get_Val_int(Css.borderBottomWidth);
     122                    borderwidth.left = jQuery(elem).Get_Val_int(Css.borderLeftWidth, "", "", 'borderLeftWidth');
     123                    borderwidth.right = jQuery(elem).Get_Val_int(Css.borderRightWidth, "", "", 'borderRightWidth');
     124                    borderwidth.top = jQuery(elem).Get_Val_int(Css.borderTopWidth, "", "", 'borderTopWidth');
     125                    borderwidth.bottom = jQuery(elem).Get_Val_int(Css.borderBottomWidth, "", "", 'borderBottomWidth');
    125126                    try {
    126127                        borderwidth.width = Css.borderWidth;
     
    131132
    132133
    133                     margin.left = jQuery(elem).Get_Val_int(Css.marginLeft);
    134                     margin.right = jQuery(elem).Get_Val_int(Css.marginRight);
    135                     margin.top = jQuery(elem).Get_Val_int(Css.marginTop);
    136                     margin.bottom = jQuery(elem).Get_Val_int(Css.marginBottom);
     134                    margin.left = jQuery(elem).Get_Val_int(Css.marginLeft, "", "", 'marginLeft');
     135                    margin.right = jQuery(elem).Get_Val_int(Css.marginRight, "", "", 'marginRight');
     136                    margin.top = jQuery(elem).Get_Val_int(Css.marginTop, "", "", 'marginTop');
     137                    margin.bottom = jQuery(elem).Get_Val_int(Css.marginBottom, "", "", 'marginBottom');
     138
     139
    137140                    try {
    138141                        margin.margin = Css.margin;
     
    141144                    }
    142145
    143                     padding.left = jQuery(elem).Get_Val_int(Css.paddingLeft);
    144                     padding.right = jQuery(elem).Get_Val_int(Css.paddingRight);
    145                     padding.top = jQuery(elem).Get_Val_int(Css.paddingTop);
    146                     padding.bottom = jQuery(elem).Get_Val_int(Css.paddingBottom);
     146
     147                    padding.left = jQuery(elem).Get_Val_int(Css.paddingLeft, "", "", 'paddingLeft');
     148                    padding.right = jQuery(elem).Get_Val_int(Css.paddingRight, "", "", 'paddingRight');
     149                    padding.top = jQuery(elem).Get_Val_int(Css.paddingTop, "", "", 'paddingTop');
     150                    padding.bottom = jQuery(elem).Get_Val_int(Css.paddingBottom, "", "", 'paddingBottom');
     151
    147152                    try {
    148153                        padding.padding = Css.padding;
     
    246251        */
    247252
    248         Get_Val_int: function (myObj, Maxi_val, Mini_val) {
     253        Get_Val_int: function (myObj, Maxi_val, Mini_val, prop) {
    249254            var val = 0;
    250255            Maxi_val = parseInt(Maxi_val || "0");
     
    263268
    264269            if (typeof (myObj) == "string") {
    265 
    266                 if (myObj == "none") return Maxi_val;
     270                switch (myObj) {
     271                    case 'thin':
     272                        return 1;
     273                        break;
     274                    case 'medium':
     275                        return 2;
     276                        break;
     277                    case 'thick':
     278                        return 4;
     279                        break;
     280                    case 'inherit':
     281                        break;
     282                    case 'none':
     283                        return Maxi_val;
     284                        break;
     285                    default:
     286                        break;
     287                }
     288                el = this.get(0);
    267289                var reg1 = new RegExp("auto", "g")
    268290                if (myObj.match(reg1)) {
    269291                    return Maxi_val;
    270292                }
    271                 reg1 = new RegExp("px", "g")
    272                 if (myObj.match(reg1)) {
    273 
    274                     myObj = parseInt(myObj);
    275 
    276                 }
     293                if (prop)
     294                    myObj = num(el, prop);
    277295                else {
    278                     reg1 = new RegExp("%", "g")
     296                    reg1 = new RegExp("px", "g")
    279297                    if (myObj.match(reg1)) {
    280                         val = Math.ceil(myObj * Maxi_val / 100);
    281                         return val;
    282                     }
     298
     299                        myObj = parseInt(myObj);
     300
     301                    } else {
     302                        reg1 = new RegExp("%", "g")
     303                        if (myObj.match(reg1)) {
     304                            val = Math.ceil(myObj * Maxi_val / 100);
     305                            return val;
     306                        }
     307
     308                    }
     309
    283310                }
    284311
    285312                if (Mini_val)
    286313                    if (myObj < Mini_val) return Maxi_val;
    287 
    288                 switch (myObj) {
    289                     case 'thin':
    290                         return 1;
    291                         break;
    292                     case 'medium':
    293                         return 2;
    294                         break;
    295                     case 'thick':
    296                         return 4;
    297                         break;
    298                     case 'inherit':
    299                         break;
    300                     default:
    301                         break;
    302                 }
    303 
    304314
    305315
  • extensions/Autosize/language/fr_FR/lang.php

    r7962 r8729  
    11<?php
    22global $lang;
     3
    34$lang['cl_autosize_hlp_line3'] = "Si la taille originale de la photo à afficher est inférieure à cette valeur, le redimensionnement automatique sera inhibé. "  ;
    45
  • extensions/Autosize/main.inc.php

    r8627 r8729  
    22/*
    33Plugin Name: AutoSize
    4 Version: 1.4.2.6
     4Version: 1.4.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
  • extensions/Autosize/template/autosize.tpl

    r8627 r8729  
    55    {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"}
    66 <script type="text/javascript">
     7
    78    var fade_in = '{$fade_in}';
    89    var cl_visible = "{$cl_visible}" =="true";
     
    4546    var check_desc_v = '{$check_desc_v}';
    4647     </script>
    47 
    4848{known_script id="Affiche_script" src=$AUTOSIZE_PATH|@cat:"js/Affiche_script.js"}
    4949<link href="{$AUTOSIZE_PATH}css/autosize.css" rel="stylesheet" type="text/css" />
Note: See TracChangeset for help on using the changeset viewer.