Changeset 7873 for extensions/Autosize


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

[Autosize][beta] fix compatiblity with theme stripped.

Location:
extensions/Autosize
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/js/Affiche_script.js

    r7872 r7873  
    33} else {
    44    // jQuery est chargé
     5}
     6try {
     7    Autosize = { version: Version };
     8} catch (e) {
     9
    510}
    611function Toggle_bp() {
     
    150155             if (Zone_Affichage.width == 0)
    151156                 Parent = Parent + "Box";
     157
     158             Parent = "#theImage";
    152159             Zone_Affichage = jQuery(Parent).infos();
    153160             //   
     
    188195         */
    189196         //=========================================================
    190 
     197         old_window  ={width:0,height:0};
    191198
    192199         jQuery.fn.extend({
     
    235242                 var winwidth = jQuery(window).width();
    236243                 var winheight = jQuery(window).height();
    237 
     244                 n = winwidth - old_window.width;
     245                 if (n == 0) {
     246                     n = winheight - old_window.height;
     247                     if (n == 0) return true;
     248                 }
    238249                 old_window = jQuery(window).infos();
    239250                 //===========================================================================
     
    269280                 var info_ToolBar = jQuery("#imageToolBar").infos();
    270281                 var marge = 0;
    271                  if (info_ToolBar.width > 0)
    272                      marge = (Zone_Affichage.width - info_ToolBar.width) / 2;
    273 
    274                  var marge_right = marge;
    275                  var marge_left = marge;
    276 
    277                  if (info_content.width > 100) {
    278                      marge_left = 0;
    279                      marge_right = (info_imageInfoBar.margin.left + info_imageInfoBar.margin.right);
    280                      winwidth = info_content.width;
    281                      marge_right = info_imageInfoBar.width + marge_right;
    282 
     282                 marge_right = 0;
     283                 marge_left = 0;
     284                 if (theme.match(RegExp("simple", "g"))) {
     285                     if (info_ToolBar.width > 0)
     286                         marge = (Zone_Affichage.width - info_ToolBar.width) / 2;
     287
     288                     var marge_right = marge;
     289                     var marge_left = marge;
     290
     291                     if (info_content.width > 100) {
     292
     293                         marge_left = 0;
     294                         marge_right = (info_imageInfoBar.margin.left + info_imageInfoBar.margin.right);
     295                         winwidth = info_content.width;
     296                         marge_right = info_imageInfoBar.width + marge_right;
     297
     298                     }
    283299                 }
    284300                 else
     
    286302
    287303
    288                  marge_right -= Zone_Affichage.borderwidth.right;
     304
     305                 marge_right += Zone_Affichage.borderwidth.right;
    289306                 marge_left += Zone_Affichage.borderwidth.left;
    290307                 winwidth -= (marge_right + marge_left);
     
    542559                         widthmin = parseInt(width_user);
    543560                     var marges = marges_llgbo;
    544                      if (typeof(info_img)!="undefined")
    545                      {
    546                      widthmin -= info_img.borderwidth.left||0;
    547                      widthmin -= info_img.borderwidth.right || 0;
     561                     if (typeof (info_img) != "undefined") {
     562                         widthmin -= info_img.borderwidth.left || 0;
     563                         widthmin -= info_img.borderwidth.right || 0;
    548564                     }
    549565                     widthmin -= marges;
     
    867883                 if (pos != jQuery("#copyright").infos())
    868884                     pos = jQuery("#copyright").infos();
    869                  if (pos.top > 100) jQuery("#the_page").height(pos.top);
     885                 if (!theme.match(RegExp("stripped", "gi"))) {
     886                     if (pos.top > 100)
     887
     888                         jQuery("#the_page").height(pos.top);
     889                 }
     890
    870891                 if (!theme.match(RegExp("luciano", "gi"))) {
    871892                     jQuery("#linkNext").css({ height: "80px", width: "200px", overflow: "hidden" });
     
    924945                     return myImg;
    925946                 }
    926 //====================================================
    927947
    928948                 //============================================================
  • extensions/Autosize/js/conflit.js

    r7872 r7873  
    11//==== autosize  remplace $(... avec jQuery( ====
    22/*
    3 * A faire Compatibilité entre LLGBO GMAPS
    4 *           Infobulles spécifiques pour les EXIFS au survol du bouton :  Non  pour être ok
    5 *147 llgbo2 main.php.   //      $template->Clear_assign('metadata');// hide original metadata
    63*[gmaps=id:1;width:800;height:640;]
    74*       Luciano rv_gmaps
     
    2320var detect = navigator.userAgent.toLowerCase();
    2421var OS, version;
    25 
    2622//==============================================================================
    27 
    28 
    2923browser = detect_browser();
    30 
    31 
    32 
    3324
    3425function detect_browser() {
     
    163154    if (DEBUG == "true") {
    164155        retour = (getStackTrace());
    165         alert("element : " + element + " retour : " + retour);
     156        alert("element : " + element + " retour : " + retour + "Fonctions:" + Fn);
    166157
    167158    }
     
    189180                jQuery(".gmapsPopup").css("top", h1 + "px");
    190181            })
    191             //=============================================================               
    192             p0 = jQuery("#theImage");
    193             if (p0.length) {
    194 
     182            //============================================================= 
     183            if (typeof(Parent)=="undefined")
     184                Parent = "#theImage";
     185
     186            info_image = jQuery(Parent).infos();
     187            if (info_image.height==0) {
     188                Parent = "#theImageBox";
     189            }
     190
     191
     192            p0 = jQuery(Parent);
     193
     194            if (p0.length > 0) {
     195             
     196 
    195197                //======================================================
    196198                if (theme.match("gally", "gi"))
     
    200202                    };
    201203
    202                 p1 = jQuery("#theImage").css("position");
    203                 if (p1 != "static") {
     204                    if (info_image.position != "static") {
    204205                    //==== compatibilité Gally/LLGBO ===
    205206                    //--- passage relative ==> static ===/
    206                     jQuery("#theImage").css({ position: "static"
    207                     }
    208 
    209                     );
     207                    jQuery(Parent).css({ position: "static" } );
    210208                    jQuery("#imageToolBar").css({ position: "relative", top: "0px" });
    211209                }
     
    547545$_ = $;
    548546function save_framework(page) {
     547    Conflit = { version: Version };
    549548    $_ = $;
    550     Conflit = { version: Version };
    551549    return
    552550
  • extensions/Autosize/main.inc.php

    r7872 r7873  
    1717        $path = AUTOSIZE_PATH;
    1818          $plg_data = implode( '', file($path.'main.inc.php') );
     19                   
    1920          if ( preg_match("|Plugin Name: (.*)|", $plg_data, $val) )
    2021          {
Note: See TracChangeset for help on using the changeset viewer.