Changeset 2707


Ignore:
Timestamp:
05/04/10 18:58:04 (14 years ago)
Author:
rodsouza
Message:

Ticket #1058 - Corrigindo problemas no expressoAdmin1_2.

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoAdmin1_2/inc/class.db_functions.inc.php

    r2469 r2707  
    683683                } 
    684684                         
    685                 return $result; 
     685                return json_encode( $result ); 
    686686        } 
    687687         
  • trunk/expressoAdmin1_2/inc/class.institutional_accounts.inc.php

    r2549 r2707  
    2929                                        $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); 
    3030                                } 
    31                                 $GLOBALS['phpgw']->js->validate_file('jscode','connector','expressoAdmin1_2');#diretorio, arquivo.js, aplicacao 
     31 
     32                                $GLOBALS['phpgw']->js->validate_file('jscode','globals','expressoAdmin1_2'); 
     33                                $GLOBALS['phpgw']->js->validate_file('jscode','connector','expressoAdmin1_2'); 
    3234                                $GLOBALS['phpgw']->js->validate_file('jscode','institutional_accounts','expressoAdmin1_2'); 
    3335                                $GLOBALS['phpgw']->js->validate_file('modal','modal','expressoAdmin1_2'); 
  • trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php

    r2459 r2707  
    750750                                unset($u_tmp); 
    751751                        }                        
    752                 return $options; 
     752                return json_encode( $options ); 
    753753                } 
    754754        } 
     
    22922292        $return['status'] = 'true'; 
    22932293        $return['trs'] = $trs_string; 
    2294         return $return; 
     2294        return json_encode( $return ); 
    22952295}        
    22962296         
     
    23862386        $return['status'] = 'true'; 
    23872387        $return['trs'] = $trs_string; 
    2388         return $return; 
     2388        return json_encode( $return ); 
    23892389        } 
    23902390         
  • trunk/expressoAdmin1_2/inc/class.shared_accounts.inc.php

    r1983 r2707  
    110110                        $return['mailquota_used'] = $quota['mailquota_used'];                         
    111111                        $i = 0; 
     112                                                error_log( var_export( $owners_acl, true ), 3, '/tmp/log' ); 
    112113                        if( is_array($owners_acl) ){ 
    113114                                foreach($owners_acl as $key => $value) 
     
    124125                                $return['owners_acl'] = false; 
    125126                        }                         
    126                         return $return; 
     127                                                error_log( var_export( $return, true ), 3, '/tmp/log' ); 
     128                        return json_encode( $return ); 
    127129                } 
    128130                function delete($params){ 
  • trunk/expressoAdmin1_2/inc/class.uimanagers.inc.php

    r2459 r2707  
    3535                                $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); 
    3636                        } 
    37                         $GLOBALS['phpgw']->js->validate_file('jscode','connector','expressoAdmin1_2');#diretorio, arquivo.js, aplicacao 
     37                        $GLOBALS['phpgw']->js->validate_file('jscode','globals','expressoAdmin1_2'); 
     38                        $GLOBALS['phpgw']->js->validate_file('jscode','connector','expressoAdmin1_2'); 
    3839                        $GLOBALS['phpgw']->js->validate_file('jscode','expressoadmin','expressoAdmin1_2'); 
    3940                        $GLOBALS['phpgw']->js->validate_file('jscode','managers','expressoAdmin1_2'); 
     
    124125 
    125126                        $p->set_var($var); 
    126                         echo "<script>var expressoAdmin_controller = '{$GLOBALS[ 'phpgw' ] -> link( '/controller.php' )}?action=';</script>" . $GLOBALS['phpgw']->js->get_script_links( ); 
     127                        $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script_thirst' ] .= "<script>var expressoAdmin_controller = '{$GLOBALS[ 'phpgw' ] -> link( '/expressoAdmin1_2/controller.php' )}?action=';</script>"; 
     128                        //echo "<script>var expressoAdmin_controller = '{$GLOBALS[ 'phpgw' ] -> link( '/controller.php' )}?action=';</script>" . $GLOBALS['phpgw']->js->get_script_links( ); 
    127129                        $p->pfp('out','body'); 
    128130                } 
     
    170172                        // Seta variaveis que estao no TPL 
    171173                        $var = Array( 
    172                                 'scripts_java'                  =>      $scripts_java,   
     174                                'scripts_java'                  =>      '',//$scripts_java,      
    173175                                //'action'                              => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoAdmin1_2.uimanagers.validate'), 
    174176                                //'action'                              => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoAdmin1_2.bomanagers.add_managers'), 
     
    302304 
    303305                        $var = Array( 
    304                                 'scripts_java'                          => $scripts_java, 
     306                                'scripts_java'                          => '',//$scripts_java, 
    305307                                'action'                                        => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoAdmin1_2.uimanagers.validate'), 
    306308                                'display_samba_suport'          => $this->config['expressoAdmin_samba_support'] == 'true' ? '' : 'display:none', 
     
    344346                                } 
    345347                        } 
    346                          
    347                         echo "<script>var expressoAdmin_controller = '{$GLOBALS[ 'phpgw' ] -> link( '/expressoAdmin1_2/controller.php' )}?action=';</script>" . $GLOBALS['phpgw']->js->get_script_links( ); 
     348 
     349                        $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script_thirst' ] .= "<script>var expressoAdmin_controller = '{$GLOBALS[ 'phpgw' ] -> link( '/expressoAdmin1_2/controller.php' )}?action=';</script>"; 
    348350                        echo $p->fp('out','form'); 
    349351                } 
  • trunk/expressoAdmin1_2/inc/class.uishared_accounts.inc.php

    r2549 r2707  
    3131                                        $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); 
    3232                                } 
    33                                 $GLOBALS['phpgw']->js->validate_file('jscode','connector','expressoAdmin1_2');#diretorio, arquivo.js, aplicacao 
     33                                $GLOBALS['phpgw']->js->validate_file('jscode','globals','expressoAdmin1_2'); 
     34                                $GLOBALS['phpgw']->js->validate_file('jscode','connector','expressoAdmin1_2'); 
    3435                                $GLOBALS['phpgw']->js->validate_file('jscode','shared_accounts','expressoAdmin1_2'); 
    3536                                $GLOBALS['phpgw']->js->validate_file('modal','modal','expressoAdmin1_2'); 
  • trunk/expressoAdmin1_2/js/jscode/expressoadmin.js

    r2604 r2707  
    5252                } 
    5353        } 
    54         _controller.go( { 
    55                 "access" : "$this.ldap_functions.get_associated_domain&context=" + context, 
     54        ExpressoLivre.go( { 
     55                "access" : "expressoAdmin1_2.ldap_functions.get_associated_domain&context=" + escape( context ), 
    5656                "handler" : function( data ) 
    5757                { 
  • trunk/expressoAdmin1_2/js/jscode/institutional_accounts.js

    r2352 r2707  
    6060                } 
    6161        } 
    62         cExecute ('$this.ldap_functions.get_available_users&context='+context, handler_get_users); 
     62        ExpressoLivre.go( { 
     63                "access" : 'expressoAdmin1_2.ldap_functions.get_available_users&context=' + escape(context), 
     64                "handler" : handler_get_users 
     65        } ); 
    6366} 
    6467 
     
    114117         
    115118        //Inclui usuario comecando com a pesquisa 
    116         for(i = 0; i < select_available_users_clone.length; i++){ 
    117                 if ( RegExp_name.test(select_available_users_clone[i].text) || (select_available_users_clone[i].value == -1) ) 
    118                 { 
    119                         sel = select_available_users_tmp.options; 
    120                         option = new Option(select_available_users_clone[i].text,select_available_users_clone[i].value); 
    121  
    122                         if (select_available_users_clone[i].value == -1) 
    123                                 option.disabled = true; 
    124  
    125                         sel[sel.length] = option; 
    126                 } 
    127         } 
     119        //for(i = 0; i < select_available_users_clone.length; i++){ 
     120        //      if ( RegExp_name.test(select_available_users_clone[i].text) || (select_available_users_clone[i].value == -1) ) 
     121        //      { 
     122        //              sel = select_available_users_tmp.options; 
     123        //              option = new Option(select_available_users_clone[i].text,select_available_users_clone[i].value); 
     124// 
     125//                      if (select_available_users_clone[i].value == -1) 
     126//                              option.disabled = true; 
     127// 
     128//                      sel[sel.length] = option; 
     129//              } 
     130//      } 
    128131        oWait.innerHTML = '&nbsp;'; 
    129132}                        
     
    202205        var handler_get_institutional_accounts = function(data) 
    203206        { 
     207                data = data.JSON( ); 
    204208                if (data.status == 'true') 
    205209                { 
     
    210214                        write_msg(data.msg, 'error'); 
    211215        } 
    212         cExecute ('$this.ldap_functions.get_institutional_accounts&input='+input, handler_get_institutional_accounts); 
     216        ExpressoLivre.go( { 
     217                "access" : 'expressoAdmin1_2.ldap_functions.get_institutional_accounts&input='+input, 
     218                "handler" : handler_get_institutional_accounts 
     219        } ); 
    213220} 
    214221 
  • trunk/expressoAdmin1_2/js/jscode/shared_accounts.js

    r2352 r2707  
    6262        var     handler_get_users = function(data) 
    6363        { 
     64                data = data.JSON( ); 
    6465                select_available_users = Element('ea_select_available_users'); 
    6566                 
     
    8283                } 
    8384        } 
    84         cExecute ('$this.ldap_functions.get_available_users2&context='+context, handler_get_users); 
     85        ExpressoLivre.go( { 
     86                "access" : 'expressoAdmin1_2.ldap_functions.get_available_users2&context='+context, 
     87                "handler" : handler_get_users 
     88        } ); 
    8589} 
    8690 
     
    239243        var handler_get_shared_accounts = function(data) 
    240244        { 
     245                data = data.JSON( ); 
    241246                if (data.status == 'true') 
    242247                { 
     
    247252                        write_msg(data.msg, 'error'); 
    248253        } 
    249         cExecute ('$this.ldap_functions.get_shared_accounts&input='+input, handler_get_shared_accounts); 
     254        ExpressoLivre.go( { 
     255                "access" : 'expressoAdmin1_2.ldap_functions.get_shared_accounts&input='+input, 
     256                "handler" : handler_get_shared_accounts 
     257        } ); 
    250258} 
    251259 
     
    254262        var handle_edit_shared_account = function(data) 
    255263        { 
     264                data = data.JSON( ); 
    256265                if (data.status == 'true') 
    257266                { 
     
    300309                        sinc_combos_org(data.user_context); 
    301310                        sharemailbox.ownersAcl = new Array(); 
    302             if( data.owners != "undefined" && data.owners_acl != "undefined" ){  
     311            if( data.owners && data.owners != "undefined" && data.owners_acl != "undefined" ){  
    303312                                for (i=0; i<data.owners.length; i++){ 
    304313                                                sharemailbox.ownersAcl[ data.owners[i] ] = data.owners_acl[i];   
     
    309318                        write_msg(data.msg, 'error'); 
    310319        } 
    311         cExecute ('$this.shared_accounts.get_data&uid='+uid, handle_edit_shared_account); 
     320        ExpressoLivre.go( { 
     321                "access" : 'expressoAdmin1_2.shared_accounts.get_data&uid='+uid, 
     322                "handler" : handle_edit_shared_account 
     323        } ); 
    312324} 
    313325 
     
    383395                var handler_get_available_users = function(data) 
    384396                { 
     397                        data = data.JSON( ); 
     398 
    385399                        select_available_users = document.getElementById('em_select_available_users'); 
    386400                 
     
    403417                        } 
    404418                } 
    405                 cExecute ("$this.ldap_functions.get_available_users2&context="+context, handler_get_available_users); 
     419                ExpressoLivre.go( { 
     420                        "access" : 'expressoAdmin1_2.ldap_functions.get_available_users2&context='+context, 
     421                        "handler" : handler_get_available_users 
     422                } ); 
    406423        } 
    407424 
  • trunk/expressoAdmin1_2/templates/default/config.tpl

    r2703 r2707  
    22<form method="POST" action="{action_url}"> 
    33<table border="0" align="center"> 
    4 <script src="./expressoAdmin1_2/js/jscode/connector.js" type="text/javascript" language="JavaScript1.2"></script> 
    54<script> 
    65function test_db_connection() 
     
    87        var handler_test = function(data) 
    98        { 
     9                data = data.JSON( ); 
    1010                var result = document.getElementById('nextid_db_result'); 
    1111                if (data.status) 
     
    2121        var pass = document.getElementById('nextid_db_password').value; 
    2222         
    23         cExecute ('$this.db_functions.test_db_connection&host='+host+'&port='+port+'&name='+name+'&user='+user+'&pass='+pass, handler_test); 
     23        ExpressoLivre.go( { 
     24                "access" : 'expressoAdmin1_2.db_functions.test_db_connection&host='+host+'&port='+port+'&name='+name+'&user='+user+'&pass='+pass, 
     25                "handler" : handler_test 
     26        } ); 
    2427} 
    2528</script> 
  • trunk/index.php

    r2703 r2707  
    9090 
    9191        $GLOBALS[$class] = CreateObject(sprintf('%s.%s',$app,$class)); 
    92         if((is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions[$method]) && ! $invalid_data) 
     92        if ( is_object( $GLOBALS[ $class ] ) && ( ( ! property_exists( $class, 'public_functions' ) ) || (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions[$method]) && ! $invalid_data ) ) 
    9393        { 
    94                 execmethod($_GET['menuaction']); 
     94                $menuaction = $_GET[ 'menuaction' ]; 
     95                unset( $_GET[ 'menuaction' ] ); 
     96                echo execmethod( $menuaction, $_GET ); 
    9597                unset($app); 
    9698                unset($class); 
     
    137139                } 
    138140 
    139                 echo '<script>ExpressoLivre.link( "' . $GLOBALS[ 'phpgw' ] -> link( '/home.php' ) . '", true );</script>'; 
     141                echo '<script>ExpressoLivre.link( "' . $GLOBALS[ 'phpgw' ] -> link( '/home.php' ) . '", true );/* ??? */</script>'; 
    140142                exit; 
    141143        } 
  • trunk/phpgwapi/js/expressolivre/expressolivre.js

    r2704 r2707  
    4848 
    4949        _xconnector = new XConnector( { 
    50                 "path" : ExpressoLivre.path( ) 
     50                "path" : ExpressoLivre.path( ), 
     51                "controller" : "?menuaction=" 
    5152        } ); 
    5253 
Note: See TracChangeset for help on using the changeset viewer.