Changeset 11442


Ignore:
Timestamp:
Jun 20, 2011, 1:26:40 PM (13 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix compatibility with charlies

Location:
extensions/Autosize
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/admin/admin_autosize.php

    r10845 r11442  
    3131if (!defined('ROOT_URL'))
    3232define(  'ROOT_URL',  get_root_url().'/' );
     33
    3334if (!defined('AUTOSIZE_PATH_ABS'))
    34 define('AUTOSIZE_PATH_ABS', dirname(__FILE__).'/' );
     35define('AUTOSIZE_PATH_ABS', realpath(AUTOSIZE_PATH)."/");
    3536
    3637// +-----------------------------------------------------------------------+
  • extensions/Autosize/autosize.inc.php

    r11429 r11442  
    2727if (!defined('ROOT_URL'))
    2828define(  'ROOT_URL',  get_root_url().'/' );
    29 
    30 $AUTOSIZE_PATH_ABS=str_replace('\\','/',dirname(__FILE__) );
     29 
    3130if (!defined('AUTOSIZE_PATH_ABS'))
    3231define(
    33   'AUTOSIZE_PATH_ABS',   $AUTOSIZE_PATH_ABS."/"
     32  'AUTOSIZE_PATH_ABS',  realpath(AUTOSIZE_PATH)."/"
    3433);
    3534
     
    195194                                                array('autosize_content'=> $AUTOSIZE_PATH.'template/autosize.tpl')
    196195                                        );
    197                         $template->concat('autosize_content', $template->parse('autosize_content_header', true));                                                                               
    198                                 return $template->parse( 'autosize_content', false);
     196                        $template->concat('autosize_content', $template->parse('autosize_content_header', true));               
     197      if(isset($conf['go_up_down']) && ($conf['go_up_down']==true) ){
     198        $template->set_filenames(array('mes_script' => realpath(AUTOSIZE_PATH).'/template/mes_scripts.tpl') );
     199        $template->func_combine_script(array('id'=>'my_script_2',
     200        'path'=> AUTOSIZE_PATH.'/js/JScript.js',
     201        'require' => 'jquery'),
     202        $template->smarty);
     203        $template->assign(array(
     204                          'MY_FOOTER_PATH' =>AUTOSIZE_PATH
     205                          ));
     206                                       
     207        $template->parse('mes_script');
     208      }     
     209       
     210       
     211       
     212        return $template->parse( 'autosize_content', false);
    199213                                  }
    200214                }
  • extensions/Autosize/css/autosize.css

    r10913 r11442  
    6363}
    6464
    65 
  • extensions/Autosize/js/Affiche_script.js

    r11429 r11442  
    11Parent = "#theImage";
    2  
    3 
    42function Toggle_bp() {
    53    cl_visible = !cl_visible;
     
    310308         var old_window = { width: 0, height: 0 };
    311309
    312          Bandeau_bas = Info_Description_f(Parent);
     310         Bandeau_bas = Info_Description_f(Parent);       
     311         if (typeof Bandeau_bas == "undefined") {
     312 
     313         }
    313314         if (typeof Bandeau_bas != "undefined") Bandeau = Bandeau_bas.top;
    314315         else Bandeau = 0;
    315          if (typeof Bandeau_bas == "undefined") { }
    316316         old_window = { width: 0, height: 0 };
    317317         jQuery("#theImage").trigger('ON');
     
    376376         newResize: function () {
    377377           //
    378 
    379            if (typeof options != undefined)
     378          if (typeof options != undefined)
    380379             if (options.imageAutosize)
    381380               return true; //stripped
     
    464463           marge_left += Zone_Affichage.borderwidth.left;
    465464           winwidth -= (marge_right + marge_left);
    466 
     465           //---------------------------------------------
     466           /*
     467           jQuery(Parent).width(winwidth); // 1.6.2
     468           jQuery(Parent).css({ height: "auto" }); //1.6.2
     469           */
     470           //  jQuery(Parent).height(Zone_Affichage.height);
     471           //---------------------------------------------
    467472
    468473           if (Type_Img == "pamoorama") {
     
    600605               //info_theImage.height = img_reelle.height;
    601606
    602                info_theImage.height =info_theImage.height;
     607               info_theImage.height = info_theImage.height;
    603608
    604609               info_the_page = jQuery("#the_page").infos();
     
    641646
    642647           img_reelle.width = parseInt(img_reelle.width);
    643            // jQuery(Cadre).width(mini_width);
     648           // jQuery(Cadre).width(mini_width); 1.6.2
    644649
    645650
    646651           if (img_reelle.width < mini_width) {
    647              //jQuery(Cadre).width(mini_width);
     652             //jQuery(Cadre).width(mini_width); 1.6.2
    648653             return true;
    649654
     
    728733             Zone_Affichage.width = mini_width2;
    729734           //=========================================================================
    730            if (typeof (Bandeau_bas) != "undefined") {
     735           if (typeof (Bandeau_bas) != "undefined") {           
    731736             Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom);
    732 
    733 
    734            } else {
    735 
     737                        } else {
    736738           }
    737739
     
    923925           // jQuery(Cadre).width(Zone_Affichage.width);
    924926           jQuery(Cadre).css("width", "auto");
    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);
     927
     928           if (Type_Img == "panorama" || Type_Img == "pamoorama") {
     929             img_finale.height = info_theImage.height;
     930             Zone_Affichage.height = img_finale.height;
     931             jQuery(Cadre).height(Zone_Affichage.height);
     932           }
    929933
    930934           if (typeof (gmaps) != "undefined") {
     
    957961               width: img_finale.width + pdf,
    958962               height: img_finale.height,
    959                margin: "auto"
     963               marginLeft: "auto"
    960964             });
    961965
     
    972976             jQuery("object").height(img_finale.height);
    973977
     978             jQuery(Cadre).height(img_finale.height + Bandeau_bas.height); //??
     979             jQuery(theImg).height(img_finale.height);
     980
     981             jQuery(Cadre).css("height", "auto"); 
    974982
    975983           } else if (Type_Img == "panorama") {
     
    10641072           } else {
    10651073             //===map ? luciano ===
     1074
     1075        // jQuery(Cadre).height(Zone_Affichage.height + Bandeau_bas.height); //??
     1076              //     jQuery(Cadre).height(img_finale.height + Bandeau_bas.height); //??
     1077         jQuery(Cadre).css("height","auto"); //??
    10661078             jQuery(theImg).height(img_finale.height);
    10671079             jQuery(theImg).width(img_finale.width);
     
    13311343    if (jQuery("#charlie").length > 0) {
    13321344        Type_Img = "charlie";
     1345
    13331346    } else if (jQuery("#pamoorama").length) {
    13341347        Type_Img = "pamoorama";
     
    13571370
    13581371    if (llgboframe.height > 0) {
    1359  ll2 = jQuery("#gbo div:last").infos();
     1372        ll2 = jQuery("#gbo div:last").infos();
    13601373        ll1 = jQuery("#gbo div:first").infos();
    13611374        ll2 ="" ;
     
    14131426
    14141427
    1415     } else if (jQuery("#charlie").length > 0) {
    1416 
    1417         jQuery("#charlie").css({ padding: "0px"
    1418 
    1419         });
    1420         theImg = jQuery("#charlie")
     1428      } else if (jQuery("#charlie").length > 0) {
     1429   
     1430     if (jQuery("object").attr("type") == 'application/x-shockwave-flash') {
     1431          jQuery("#charlie").css({
     1432            paddingTop: "0px",
     1433            marginTop: "0px",
     1434            paddingBottom: "30px",
     1435            marginBottom: "0px"
     1436          });
     1437        } else {
     1438          jQuery("#charlie").css({
     1439            paddingTop: "0px",
     1440            marginTop: "0px",
     1441            paddingBottom: "10px",
     1442            marginBottom: "0px"
     1443          });
     1444        }
     1445        theImg = jQuery("#charlie");
    14211446        info_img = jQuery(theImg).infos();
    1422 
    1423 
    1424 
     1447 
    14251448    } else if (jQuery(Parent + " embed").length > 0) {
    14261449
     
    14331456        if (!nopano) {
    14341457            Wait_pamoorama();
    1435             return
     1458            return info_description;
    14361459        }
    14371460        theImg = jQuery("#pamoorama");
     
    14531476          }
    14541477
     1478        //theImg = Get_Img_Maxi(theImg);  //1.6.2
     1479        //if (!theImg) theImg = jQuery(Parent);   // 1.6.2sans img ??
    14551480        info_img = jQuery(theImg).infos();
    14561481    }
     
    15171542        check_desc_v = true;
    15181543
    1519     } else {
     1544      } else {
     1545        if (theme.match(RegExp("sobre", "gi"))) {
     1546          info_description.marge.top = -2;
     1547        }
    15201548        info_description.bottom = info_theImage.bottom;
    15211549        info_description.top = info_img.height + info_theImage.top;
     
    15241552    //
    15251553
    1526     info_description.height = info_description.bottom - info_description.top;
     1554    info_description.height =   info_description.bottom - info_description.top;
    15271555
    15281556    if (check_desc_v == false) {
Note: See TracChangeset for help on using the changeset viewer.