Changeset 2561 for trunk/phpgwapi


Ignore:
Timestamp:
04/16/10 12:11:51 (14 years ago)
Author:
rodsouza
Message:

Ticket #1009 - Corrigindo problemas com a execução de javascript no ExpressoMail?.

Location:
trunk/phpgwapi
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/class.common.inc.php

    r2549 r2561  
    395395                                        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'tools','xconnector', NULL, true ); 
    396396                                        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'tools','xevent', NULL, true ); 
     397                                        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'tools','xobject', NULL, true ); 
     398                                        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'cookieManager', 'phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] ); 
    397399 
    398400                                        $this -> phpgw_header( ); 
     
    11381140                @discussion *someone wanna add some detail here* 
    11391141                */ 
    1140                 function navbar() 
     1142                function navbar( ) 
    11411143                { 
    11421144                        $GLOBALS['phpgw_info']['navbar']['home']['title'] = 'Home'; 
     
    12521254                        header('Content-type: text/html; charset='.$GLOBALS['phpgw']->translation->charset()); 
    12531255 
    1254                         include(PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] . '/head.inc.php'); 
    1255  
    1256                         $this->navbar(False); 
    1257  
    1258                         include(PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] . '/navbar.inc.php'); 
     1256                        $path = PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set']; 
     1257 
     1258                        include_once( "{$path}/head.inc.php" ); 
     1259 
     1260                        $this -> navbar( false ); 
     1261 
     1262                        include_once( "{$path}/navbar.inc.php" ); 
    12591263 
    12601264                        if (!@$GLOBALS['phpgw_info']['flags']['nonavbar'] && !@$GLOBALS['phpgw_info']['flags']['navbar_target']) 
  • trunk/phpgwapi/inc/class.javascript.inc.php

    r2549 r2561  
    236236 
    237237                                if ( ! array_key_exists( $app, $this -> files ) ) 
    238                                         $this -> files[ $app ] = array( ); 
     238                                        if ( $stack ) 
     239                                                $this -> files = array_merge( array( $app => array( ) ), $this -> files) ; 
     240                                        else 
     241                                                $this -> files[ $app ] = array( ); 
    239242 
    240243                                if ( ! array_key_exists( $package, $this -> files[ $app ] ) ) 
    241                                         $this -> files[ $app ][ $package ] = array( ); 
     244                                        if ( $stack ) 
     245                                                $this -> files[ $app ] = array_merge( array( $package => array( ) ), $this -> files[ $app ] ); 
     246                                        else 
     247                                                $this -> files[ $app ][ $package ] = array( ); 
    242248 
    243249                                if ( $stack ) 
  • trunk/phpgwapi/templates/classic/head.tpl

    r2273 r2561  
    1919                {css} 
    2020                {java_script} 
    21                 {cookie_manager} 
    2221        </head> 
    2322        <!-- we don't need body tags anymore, do we?) we do!!! onload!! LK --> 
  • trunk/phpgwapi/templates/default/head.inc.php

    r2273 r2561  
    4545        } 
    4646 
    47         if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects']) 
    48         { 
    49                 $slider_effects_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/js/slidereffects.js'; 
    50                 $slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript"> 
    51                 </script>'; 
    52         } 
    53         else 
    54         { 
    55                 $simple_show_hide_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/js/simple_show_hide.js'; 
    56                 $simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript"> 
    57                 </script>'; 
    58         } 
     47        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 
     48                ( ( ! $GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'] ) ? 'slidereffects' : 'simple_show_hide' ), 
     49                'phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set'], true ); 
    5950 
    60         $cookie_manager = '<script src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/js/cookieManager.js" type="text/javascript"></script>';  
    6151        $tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); 
    6252        $tpl->set_unknowns('remove'); 
     
    8373                'pngfix'        => $pngfix, 
    8474                'slider_effects'=> $slider_effects, 
    85                 'simple_show_hide'=> $simple_show_hide, 
     75                'simple_show_hide'=> '',//$simple_show_hide, 
    8676                'lang_code'=> $lang_code, 
    8777                'charset'       => $GLOBALS['phpgw']->translation->charset(), 
     
    9181                'css'           => $GLOBALS['phpgw']->common->get_css(), 
    9282                'java_script'   => $GLOBALS['phpgw']->common->get_java_script(), 
    93                 'cookie_manager'=>      $cookie_manager 
     83                'cookie_manager'=> '' 
    9484        ); 
    9585        $tpl->set_var($var); 
  • trunk/phpgwapi/templates/default/head.tpl

    r2273 r2561  
    1919                {css} 
    2020                {java_script} 
    21                 {cookie_manager} 
    2221        </head> 
    2322        <!-- we don't need body tags anymore, do we?) we do!!! onload!! LK --> 
Note: See TracChangeset for help on using the changeset viewer.