Changeset 11429


Ignore:
Timestamp:
Jun 19, 2011, 2:03:07 PM (13 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix bugs on height

Location:
extensions/Autosize
Files:
2 added
9 edited

Legend:

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

    r10848 r11429  
    1 {known_script id="jquery" src = $ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=0}
     1{known_script id="jquery" src = $ROOT_URL|@cat:"themes/default/js/jquery.packed.js" }
    22{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"}
    33{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/minified/ui.core.min.js"}
  • extensions/Autosize/autosize.inc.php

    r10913 r11429  
    4343        {
    4444                global  $template,$user,$conf,$picture ,$page, $cl_plugin ;
    45     if(isset($page['body_id']) &&       $page['body_id'] == 'theAdminPage' ) return ;
     45 
     46  header ('X-UA-Compatible: n=7')  ;
     47   header ('X-UA-Compatible: IE=Edge')  ;
     48  if(isset($page['body_id']) && $page['body_id'] == 'theAdminPage' ) return ;
     49
    4650    if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ;
    4751     
     
    5458    else
    5559      $file =AUTOSIZE_PATH_ABS.'template/header_2_2.tpl' ;
     60   
     61;
     62
    5663    $template->set_filenames(array('autosize_init_header'=> $file ));
    5764    $template->set_filenames(array('autosize_init'=>AUTOSIZE_PATH_ABS. "template/conflit.tpl" ) );
     
    8895 {
    8996           global  $template,$user,$conf,$picture ,$page, $cl_plugin,$known_script ;
    90      if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ;
    91 
    92                         $my_path = dirname(__FILE__).'/';
     97   if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ;
     98
     99                        $AUTOSIZE_PATH = dirname(__FILE__).'/';
    93100//=================================================================================================
    94101$DEBUG_autosize = isset($_POST['cl_debug_conflit']) ? $_POST['cl_debug_conflit'] : "false" ;
     
    152159                global $infos_message,$erreur_message;
    153160                global  $conf,$lang ,$user,$userdata;
    154     if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ;
     161 if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ;
    155162                load_language('plugin.lang', AUTOSIZE_PATH);
    156                 $my_path = dirname(__FILE__).'/';
     163                $AUTOSIZE_PATH = dirname(__FILE__).'/';
    157164                 if (isset( $page['body_id']) && $page['body_id']=='thePicturePage'  ) {
    158165                        if ( isset($picture['current'])){       
     
    182189
    183190                                                        );
    184                                         $template->set_filenames(array('cl_bp' => $my_path. 'template/picture.tpl'));
     191                                        $template->set_filenames(array('cl_bp' => $AUTOSIZE_PATH. 'template/picture.tpl'));
    185192                                        $template->concat('PLUGIN_PICTURE_ACTIONS', $template->parse('cl_bp', true));
    186193                                }
    187194                                 $template->set_filenames(
    188                                                 array('autosize_content'=> $my_path.'template/autosize.tpl')
     195                                                array('autosize_content'=> $AUTOSIZE_PATH.'template/autosize.tpl')
    189196                                        );
    190197                        $template->concat('autosize_content', $template->parse('autosize_content_header', true));                                                                               
     
    233240        static public function cl_ajuste_data($content){
    234241                global  $template,$user,$conf,$picture ;
    235                 $my_path = realpath(AUTOSIZE_PATH .'/');
     242                $AUTOSIZE_PATH = realpath(AUTOSIZE_PATH .'/');
    236243                $userdata=$user;
    237244                $fields = array( 'maxwidth', 'maxheight' );
  • extensions/Autosize/include/affiche.php

    r10845 r11429  
    1515$DEBUG_autosize = isset($conf['cl_debug_conflit']) ? $conf['cl_debug_conflit'] : $DEBUG_autosize ;
    1616//=================================================================================================
    17   $my_path = AUTOSIZE_PATH_ABS;
     17  $AUTOSIZE_PATH = AUTOSIZE_PATH_ABS;
    1818  $theme=$user['theme'];
    1919  $user_status = $user['status'] ;
  • extensions/Autosize/js/Affiche_script.js

    r11277 r11429  
    258258       });
    259259
    260        jQuery(window).resize(
    261                function (event, ui) {
    262                  List_autosize_resize(event, ui);
    263                  jQuery().newResize();
    264                });
     260
    265261
    266262       jQuery(window).load(function () {
    267263         if (typeof img_width == "undefined") {
    268 
    269264           if (List_autosize.length == 0) return;
    270265           for (i = 0; i < List_autosize.length; i++) {
    271266             Autosize_resize(jQuery(List_autosize[i]));
    272267           }
    273 
    274268           return;
    275269         }
     
    351345       //=========================================================
    352346       old_window = { width: 0, height: 0 };
     347       jQuery(window).resize(
     348               function (event, ui) {
     349                 List_autosize_resize(event, ui);
     350                 jQuery().newResize();
     351               });
    353352
    354353       jQuery.fn.extend({
     
    531530               info_theImage = jQuery(theImg).infos();
    532531               info_the_page = jQuery("#the_page").infos();
     532               jQuery("#theImage").height(info_theImage.height);
     533               img_finale.height = info_theImage.height;
    533534
    534535               break
     
    596597               theImg = myPamoorama.image;
    597598               info_theImage = jQuery("#pamoorama").infos();
    598                info_theImage.height = img_reelle.height;
    599 
     599               //img_finale.height = info_theImage.height;
     600               //info_theImage.height = img_reelle.height;
     601
     602               info_theImage.height =info_theImage.height;
    600603
    601604               info_the_page = jQuery("#the_page").infos();
     
    714717           //==========================================================================
    715718           h = 0;
     719           Bandeau = 0;
    716720
    717721           h = (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom);
    718            Bandeau = Bandeau_t.img_top;
     722           if (typeof Bandeau_t != "undefined") Bandeau = Bandeau_t.img_top;
    719723           Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction - h;
    720724           //=========================================================================
     
    782786             }
    783787             widthmin -= marges;
    784              widthmin -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left);
    785              Image_width -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left);
     788             if (typeof Bandeau_t != "undefined") {
     789               widthmin -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left);
     790               Image_width -= (Bandeau_t.borderwidth.left + Bandeau_t.borderwidth.left);
     791             } else {
     792
     793               jQuery().newResize();
     794             }
    786795             if (Image_width > widthmin) {
    787796               //   Image_width largeur à atteindre
     
    811820           }
    812821           zoom = echelle;
    813            if (llgboframe.height > 0) {
     822           if (typeof (llgboframe) != "undefined" && llgboframe.height > 0) {
    814823             //=============LLGBO2 ===========================
    815824             t1 = llgboframe;
    816825             if (!theImg.src) {
    817                theImg = jQuery(theImg).find("img").get(0)
     826               theImg = jQuery("#gbo").find("img").get(0)
    818827               if (!theImg.src) {
    819828                 theImg = jQuery(Parent).find("div").get(0)
     
    889898                 jQuery("area[rel=next]").attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" });
    890899               }
     900               jQuery("#theImage").height(heightgbo + marges_llgbo / 2);
    891901             }
    892902           }
     
    913923           // jQuery(Cadre).width(Zone_Affichage.width);
    914924           jQuery(Cadre).css("width", "auto");
    915            //   jQuery(Cadre).height(Zone_Affichage.height);
     925           if (Type_Img == "panorama" || Type_Img == "pamoorama")
     926           img_finale.height = info_theImage.height;
     927           Zone_Affichage.height = img_finale.height;
     928           jQuery(Cadre).height(Zone_Affichage.height);
    916929
    917930           if (typeof (gmaps) != "undefined") {
     
    10401053
    10411054
    1042            } else if (theImg.src) {
     1055           } else if (theImg != null && theImg.src) {
    10431056             //--- background ?? ---
    10441057             jQuery(theImg).height(img_finale.height);
     
    12421255
    12431256function Info_entete(Parent) {
    1244     if (typeof (marge_top) != "undefined") return result;
     1257
    12451258    info_imageToolBar = jQuery("#imageToolBar").infos();
    1246 
     1259    if (typeof (marge_top) != "undefined") return info_imageToolBar;
    12471260
    12481261    if (info_imageToolBar.position == "absolute") {
     
    13011314    llgboh2 = jQuery("#gboh2").infos();
    13021315    result.img_top += llgboh2.height;
     1316
    13031317    return result;
    13041318
  • extensions/Autosize/js/conflit.js

    r11277 r11429  
    5151
    5252/*
     53
    5354*/
    5455konqueror = mybrowser.konqueror || false;
     
    119120
    120121    if (ret_element != "")
    121         return ret_element;
     122    return ret_element;
    122123
    123124    if (typeof (element) == "string") {
     
    134135    } else if (element == document) {
    135136
    136         ret_element = jQuery(element);
    137         return ret_element;
     137    ret_element = jQuery(element);
     138    return ret_element;
    138139
    139140
     
    165166    function (jQuery) {
    166167      jQuery(window).load(function () {
     168       
    167169        //============================================================
    168         if(jQuery("#check_auto_w").length>0){
    169         var cl_visible = jQuery("#check_auto_w").get(0).checked;
    170         if (!cl_visible) {
    171           jQuery("#table0 :text[name*='_width'] ").hide();
    172         } else {
    173           jQuery("#table0 :text[name*='_width']    ").show();
    174         }
     170        if (jQuery("#check_auto_w").length > 0) {
     171          var cl_visible = jQuery("#check_auto_w").get(0).checked;
     172          if (!cl_visible) {
     173            jQuery("#table0 :text[name*='_width'] ").hide();
     174          } else {
     175            jQuery("#table0 :text[name*='_width']    ").show();
     176          }
    175177        }
    176178        //==============================================================
     
    181183
    182184            if (this.checked)
    183               obj.css({backgroundColor:"green",color:"white"});
     185              obj.css({ backgroundColor: "green", color: "white" });
    184186            else
    185               obj.css({backgroundColor: "red",color:"white"});
     187              obj.css({ backgroundColor: "red", color: "white" });
    186188
    187189            return;
     
    205207        jQuery("#icon_gmaps").bind('click', function () {
    206208          //jQuery("#iGMapsIconContent").dialog("open");
    207           if (Version_pwg > '2.2.0' )
    208           return;
     209          if (Version_pwg > '2.2.0')
     210            return;
    209211          jQuery('html,body').stop().scrollTop(0);
    210212          jQuery('html,body').stop().scrollLeft(0);
     
    232234    this.detachEvent("on" + B, A);
    233235  } return this;
    234 } ,
     236 },
    235237    //---------------- luciano -------------------------------
    236238    $Luciano: function (el, nc) {
     
    364366            state_ff = callstack.join('\n');
    365367            isCallstackPopulated = false;
    366         }
     368           }
    367369        if (window.opera && e.message && isCallstackPopulated == false) {
    368370            callstack = [];
     
    527529    if (jQuery('#browser').length > 0) {
    528530        jQuery('#browser').val(browser.browser);
    529     }
    530     if (typeof (Parent) == "undefined")
    531         Parent = "#theImage";
    532     info_image = jQuery(Parent).infos();
    533     p0 = jQuery(Parent);
    534     if (p0.length > 0) {
    535         //======================================================
    536         if (info_image.position != "static") {
    537             try {
    538                 if (theme.match("gally", "gi")) {
    539                     if (typeof gallyPP != "undefined") {
    540 
    541                     } else if (jQuery.isFunction(inittoolbar)) {
    542                         if (typeof (currentTab) == "undefined") inittoolbar();
    543                         else initializeImageMode("resize");
    544                     };
    545                     //==== compatibilité Gally/LLGBO ===
    546                     jQuery(Parent).css({ position: "static" });
    547                 }
    548             } catch (e) {
    549             }
    550 
    551         }
    552     }
    553 
    554     $_2 = $;
    555     return
     531  }
     532
     533  if (typeof (Parent) == "undefined") return;
     534
     535  info_image = jQuery(Parent).infos();
     536  p0 = jQuery(Parent);
     537  if (p0.length > 0) {
     538    //======================================================
     539    if (info_image.position != "static") {
     540      try {
     541        if (theme.match("gally", "gi")) {
     542          if (typeof gallyPP != "undefined") {
     543
     544          } else if (jQuery.isFunction(inittoolbar)) {
     545            if (typeof (currentTab) == "undefined") inittoolbar();
     546            else initializeImageMode("resize");
     547          };
     548          //==== compatibilité Gally/LLGBO ===
     549          jQuery(Parent).css({ position: "static" });
     550        }
     551      } catch (e) {
     552      }
     553
     554    }
     555  }
     556
     557  $_2 = $;
     558  return
    556559}
    557560
    558561(function ($) {
    559     $(document).ready(function () {
    560         //=================================================
    561         if (typeof jQuery.fn.infos != "function") {
    562             jQuery = myjQuery;
    563             $ = my$;
    564         }
    565          
    566    
    567 
    568     });
     562  $(document).ready(function () {
     563    //=================================================
     564    if (typeof jQuery.fn.infos != "function") {
     565      jQuery = myjQuery;
     566      $ = my$;
     567    }
     568  });
    569569
    570570})(jQuery);
    571571
    572572
    573     //--------------------------------------------------------------
    574     $_0 = $;
    575     function $(element, nc0) {
    576         if (typeof jQuery.fn.infos != "function")
    577             if (typeof myjQuery != "undefined")
    578                 jQuery = myjQuery;
    579         a = conflit(element, nc0);
    580         return a;
    581     }
    582     //=== ajout des fonctions jQuery ===
    583     jQuery.extend($, jQuery);
     573//--------------------------------------------------------------
     574$_0 = $;
     575
     576//=== ajout des fonctions jQuery ===
     577$ = jQuery.fn.$;
     578
     579if (typeof $mootools != "undefined")
     580  jQuery.extend($, $mootools);
     581
     582jQuery.extend($, $_0);
  • extensions/Autosize/js/conflit_2.js

    r11277 r11429  
    1 if (typeof Type_Img ) {
     1
    22  //=== ajout des fonctions jQuery ===
    3   if (typeof MooTools == "undefined" && typeof Prototype == "undefined") {
     3  if (typeof MooTools!= "undefined" && typeof Prototype == "undefined") {
    44    $mootools = window.$;
    55  } else {
     
    88        if (typeof (gmaps) != "undefined") {
    99        }
    10         $ = jQuery.fn.$;
     10        if (jQuery.fn.$) $ = jQuery.fn.$;
    1111        jQuery.extend($, $mootools);
    1212        jQuery.extend($, jQuery.fn);
    1313      } else {
    14         $ = jQuery.fn.$;
    15         jQuery.extend($, jQuery.fn);
     14        if (jQuery.fn.$) $ = jQuery.fn.$;
     15        jQuery.extend($, jQuery);
    1616      }
    1717    }
    1818  }
    19 }
     19if (typeof Type_Img ) {}
  • extensions/Autosize/template/conflit.tpl

    r10845 r11429  
    1212     {if not empty($cl_plugins )}
    1313       {foreach from=$cl_plugins item=cl_plug }
    14             value="{$cl_plug}";cl_plugins.push(value);           
     14      value='{$cl_plug}';cl_plugins.push(value);           
    1515        {/foreach}
    1616     {/if}
    1717{/if}
    18 </script>
    19 {/html_head}
     18</script>{/html_head} 
  • extensions/Autosize/template/header_2_1.tpl

    r10846 r11429  
    11{html_head}
    22{known_script id="jquery" src = $ROOT_URL|@cat:"themes/default/js/jquery.packed.js" }
    3 {known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.js"}
     3{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"}
    44{known_script id="conflit_script" src = $AUTOSIZE_PATH|@cat:"js/conflit.js" }
    55{known_script id="autosize.dimensions" src = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" }
  • extensions/Autosize/template/header_2_2.tpl

    r11277 r11429  
    55{/if}
    66{* au cas ou jquery non défini  *}
     7{combine_script id="conflit_script0" load="header" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" }
    78{combine_script id="jquery" load="header" path = "themes/default/js/jquery.min.js"}
    8 {combine_script id="conflit_script0" load="header" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" require="jquery" }
    9 {combine_script id="conflit_script"  path = $AUTOSIZE_PATH|@cat:"js/conflit.js" require="jquery" }
     9
     10{if $combine_file}
     11{combine_script id="cl_dimensions" path = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" require="jquery"}
     12{combine_script id="conflit_script" path = $AUTOSIZE_PATH|@cat:"js/conflit.js" require="jquery,cl_dimensions"   }
     13{else}
     14{combine_script id="cl_dimensions" path = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" require="jquery"}
     15{ combine_script id="conflit_script" load="footer" path = $AUTOSIZE_PATH|@cat:"js/conflit.js" require="jquery,cl_dimensions"}
     16
     17{/if}
    1018{combine_script id="jquery.cluetip" path = "themes/default/js/plugins/jquery.cluetip.js" require="jquery" }
    11 {combine_script id="autosize.dimensions" path = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" require="jquery,conflit_script0"}
    1219{combine_script id="autosize.cookie" path = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" require="jquery,conflit_script0"}
    1320
    1421
    15 {combine_script id="conflit_script2" load="async" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" require="jquery" }
     22{combine_script id="conflit_script2" load="async" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" require="jquery,conflit_script" }
    1623
    1724 
Note: See TracChangeset for help on using the changeset viewer.