Changeset 11461


Ignore:
Timestamp:
06/21/11 10:00:39 (8 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix compatibility with gmaps

Location:
extensions/Autosize
Files:
8 edited

Legend:

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

    r11442 r11461  
    2020// | USA.                                                                  | 
    2121// +-----------------------------------------------------------------------+ 
    22 if (!defined('AUTOSIZE_PATH'))  
    23 define( 
    24   'AUTOSIZE_PATH', 
    25    PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' 
    26 ); 
    27 if (!defined('ROOT_URL'))  
    28 define(  'ROOT_URL',  get_root_url().'/' ); 
    29   
    30 if (!defined('AUTOSIZE_PATH_ABS'))  
    31 define( 
    32   'AUTOSIZE_PATH_ABS',  realpath(AUTOSIZE_PATH)."/" 
    33 ); 
    34  
    35  
    3622class autosize_controler { 
    3723 //============================================================ 
     
    5743    else  
    5844      $file =AUTOSIZE_PATH_ABS.'template/header_2_2.tpl' ; 
    59     
    60 ; 
    61  
    6245    $template->set_filenames(array('autosize_init_header'=> $file )); 
    6346    $template->set_filenames(array('autosize_init'=>AUTOSIZE_PATH_ABS. "template/conflit.tpl" ) ); 
  • extensions/Autosize/include/affiche.php

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

    r11429 r11461  
    6565nbpa = 0; 
    6666var Fn; 
     67if (typeof MooTools == "undefined" && typeof Prototype == "undefined") { 
     68 
     69} else { 
     70  $mootools = $; 
     71} 
     72//==================================================== 
    6773function conflit(element, nc) { 
    68   if(typeof DEBUG != "boolean") DEBUG = false ; 
    6974    //--- cl_conflit 
    7075    if (typeof MooTools == "undefined" && typeof Prototype == "undefined") { 
     
    530535        jQuery('#browser').val(browser.browser); 
    531536  } 
    532  
    533   if (typeof (Parent) == "undefined") return; 
    534  
     537    if (typeof (Parent) == "undefined") 
     538        Parent = "#theImage"; 
    535539  info_image = jQuery(Parent).infos(); 
    536540  p0 = jQuery(Parent); 
     
    573577//-------------------------------------------------------------- 
    574578$_0 = $; 
    575  
     579    function $(element, nc0) { 
     580        if (typeof jQuery.fn.infos != "function") 
     581            if (typeof myjQuery != "undefined") 
     582                jQuery = myjQuery; 
     583        a = conflit(element, nc0); 
     584        return a; 
     585    } 
    576586//=== ajout des fonctions jQuery === 
    577 $ = jQuery.fn.$; 
    578  
    579 if (typeof $mootools != "undefined") 
    580   jQuery.extend($, $mootools); 
    581  
    582 jQuery.extend($, $_0); 
     587    jQuery.extend($, jQuery); 
  • extensions/Autosize/js/conflit_2.js

    r11429 r11461  
    11 
    22  //=== ajout des fonctions jQuery === 
    3   if (typeof MooTools!= "undefined" && typeof Prototype == "undefined") { 
     3if (typeof MooTools == "undefined" && typeof Prototype == "undefined") { 
    44    $mootools = window.$; 
    55  } else { 
     
    1717    } 
    1818  } 
    19 if (typeof Type_Img ) {} 
  • extensions/Autosize/main.inc.php

    r11278 r11461  
    1212if (!defined('AUTOSIZE_PATH'))  
    1313define(  'AUTOSIZE_PATH',   PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' ); 
     14if (!defined('ROOT_URL'))  
     15define(  'ROOT_URL',  get_root_url().'/' ); 
     16  
     17if (!defined('AUTOSIZE_PATH_ABS'))  
     18define( 
     19  'AUTOSIZE_PATH_ABS',  realpath(AUTOSIZE_PATH)."/" 
     20); 
     21 
     22 
     23 
    1424 
    1525//================================================================== 
  • extensions/Autosize/template/conflit.tpl

    r11429 r11461  
    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>{/html_head}   
     18</script> 
     19{/html_head}  
  • extensions/Autosize/template/header_2_2.tpl

    r11429 r11461  
    44{else} 
    55{/if} 
     6{combine_script id="conflit_script0" load="header" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" require="jquery" } 
    67{* au cas ou jquery non défini  *} 
    7 {combine_script id="conflit_script0" load="header" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" }  
    8 {combine_script id="jquery" load="header" path = "themes/default/js/jquery.min.js"} 
    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} 
    18 {combine_script id="jquery.cluetip" path = "themes/default/js/plugins/jquery.cluetip.js" require="jquery" } 
    19 {combine_script id="autosize.cookie" path = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" require="jquery,conflit_script0"} 
    208 
    219 
    22 {combine_script id="conflit_script2" load="async" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" require="jquery,conflit_script" } 
     10 
     11{combine_script id="conflit_script"  path = $AUTOSIZE_PATH|@cat:"js/conflit.js" require="jquery" } 
     12{combine_script id="jquery.cluetip" path = "themes/default/js/plugins/jquery.cluetip.js" require="jquery" } 
     13{combine_script id="autosize.dimensions" path = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" require="jquery"} 
     14{combine_script id="autosize.cookie" path = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" require="jquery"} 
     15 
     16 
     17{combine_script id="conflit_script2" load="async" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" require="jquery" } 
    2318 
    2419  
  • extensions/Autosize/template/picture.tpl

    r11277 r11461  
    1   
    2  
    3  
    41 <style type="text/css"> 
    52         #bp_cla {ldelim} 
Note: See TracChangeset for help on using the changeset viewer.