Ignore:
Timestamp:
04/20/10 16:39:19 (14 years ago)
Author:
rodsouza
Message:

Ticket #1009 - Garantindo que a variável URL_SERVER esteja populada.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/filemanager/inc/class.uifilemanager.inc.php

    r2490 r2608  
    325325                        //$GLOBALS['phpgw']->common->phpgw_header(); 
    326326 
    327                         echo "<script src='{$GLOBALS['phpgw'] -> link( '/filemanager/js/global.js' )}'></script>"; 
    328                         echo "<script src='{$GLOBALS['phpgw'] -> link( '/filemanager/js/main.js' )}'></script>"; 
    329                         echo "<script src='{$GLOBALS['phpgw'] -> link( '/filemanager/js/common_functions.js' )}'></script>"; 
    330                         echo "<script src='{$GLOBALS['phpgw'] -> link( '/filemanager/js/connector.js' )}'></script>"; 
    331                         echo "<script src='{$GLOBALS['phpgw'] -> link( '/filemanager/js/draw_api.js' )}'></script>"; 
    332                         echo "<script src='{$GLOBALS['phpgw'] -> link( '/filemanager/js/drag_area.js' )}'></script>"; 
    333                         echo "<script src='{$GLOBALS['phpgw'] -> link( '/filemanager/js/handler.js' )}'></script>"; 
    334                         echo "<script src='{$GLOBALS['phpgw'] -> link( '/phpgwapi/js/dftree/dftree.js' )}'></script>"; 
    335  
    336                         include('load_lang.php'); 
     327                        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'dftree', 'dftree' ); 
     328 
     329                        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'global', 'filemanager' ); 
     330                        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'load_lang', 'filemanager' ); 
     331                        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'main', 'filemanager' ); 
     332                        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'common_functions', 'filemanager' ); 
     333                        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'connector', 'filemanager' ); 
     334                        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'draw_api', 'filemanager' ); 
     335                        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'drag_area', 'filemanager' ); 
     336                        $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'handler', 'filemanager' ); 
     337 
     338                        //include('load_lang.php'); 
    337339 
    338340                        # Page to process users 
     
    603605                                $_SESSION['phpgw_info']['filemanager']['user']['sec_key'] = $key; 
    604606                                $vars['sec_key']='<input type="hidden" id="userKey" value=\''.$key.'\'>'; 
    605                                 $vars['script']='<script>initDrawApi();</script>'; 
    606                                  
     607 
     608                                $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script' ] .=  '<script>' 
     609                                        . ( ( array_key_exists( 'HTTP_BACKGROUNDREQUEST', $_SERVER ) || array_key_exists( 'BackgroundRequest', $_GET ) ) ? 'initDrawApi( )' : 'XEvents.add( window, "onload", initDrawApi )' ) 
     610                                        . ';</script>'; 
     611 
    607612                                $vars['new_button']=$this->toolButton('new','createfile',lang('New...')); 
    608613                                $vars['new_button'].='<input type="hidden" id="newfile_or_dir" name="newfile_or_dir" value="" />'; 
    609                                  
     614 
    610615                                // reload button with this url 
    611616                                $vars['refresh_button']=$this->toolButton('reload','reload',lang('reload')); 
Note: See TracChangeset for help on using the changeset viewer.