Changeset 2604


Ignore:
Timestamp:
04/20/10 11:59:40 (14 years ago)
Author:
rodsouza
Message:

Ticket #1009 - Corrigindo problemas causados por javascripts inseridos dentro de tags.

Location:
trunk/expressoAdmin1_2
Files:
1 added
4 edited

Legend:

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

    r2549 r2604  
    4747                                $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); 
    4848                        } 
    49                         $GLOBALS['phpgw']->js->validate_file('jscode','connector','expressoAdmin1_2');#diretorio, arquivo.js, aplicacao 
     49                        $GLOBALS['phpgw']->js->validate_file('jscode','globals','expressoAdmin1_2'); 
     50                        $GLOBALS['phpgw']->js->validate_file('jscode','connector','expressoAdmin1_2'); 
    5051                        $GLOBALS['phpgw']->js->validate_file('jscode','expressoadmin','expressoAdmin1_2'); 
    5152                        $GLOBALS['phpgw']->js->validate_file('jscode','tabs','expressoAdmin1_2'); 
     
    231232                function add_users() 
    232233                { 
    233                         $GLOBALS['phpgw']->js->validate_file('jscode','users','expressoAdmin1_2'); 
    234                          
    235                         $GLOBALS['phpgw']->js->set_onload('get_available_groups(document.forms[0].context.value);'); 
    236                         $GLOBALS['phpgw']->js->set_onload('get_available_maillists(document.forms[0].context.value);'); 
    237                         $GLOBALS['phpgw']->js->set_onload('get_associated_domain(document.forms[0].context.value);'); 
    238                         if ($this->current_config['expressoAdmin_samba_support'] == 'true') 
    239                                 $GLOBALS['phpgw']->js->set_onload('get_available_sambadomains(document.forms[0].context.value, \'create_user\');'); 
    240                          
    241234                        $manager_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; 
    242235                        $acl = $this->functions->read_acl($manager_lid); 
     
    257250                         
    258251                        // Seta template 
    259                         $GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); 
     252                        //$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript'); 
    260253                        $t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); 
    261254                        $t->set_file(array("body" => "accounts_form.tpl")); 
     
    355348                        $t->set_var($this->functions->make_dinamic_lang($t, 'main')); 
    356349                        $t->pfp('out','main'); 
     350 
     351                        $script = '<script>'; 
     352                        $script .= 'get_available_groups(document.forms[0].context.value);'; 
     353                        $script .= 'get_available_maillists(document.forms[0].context.value);'; 
     354                        $script .= 'get_associated_domain(document.forms[0].context.value);'; 
     355                        if ($this->current_config['expressoAdmin_samba_support'] == 'true') 
     356                                $script .= 'get_available_sambadomains(document.forms[0].context.value, \'create_user\');'; 
     357                        $script .= '</script>'; 
     358 
     359                        echo $script; 
     360 
    357361                } 
    358362                 
     
    465469                        } 
    466470                        // JavaScript 
    467                         $GLOBALS['phpgw']->js->validate_file("jscode","users","expressoAdmin1_2"); 
    468471                        $GLOBALS['phpgw']->js->set_onload("get_available_groups(document.forms[0].context.value);"); 
    469472                        $GLOBALS['phpgw']->js->set_onload("get_available_maillists(document.forms[0].context.value);"); 
  • trunk/expressoAdmin1_2/js/jscode/expressoadmin.js

    r2459 r2604  
    1010 
    1111function load_lang(){ 
    12         cExecute ('$this/inc/load_lang', handler_load_lang); 
     12        _controller.cache( ).go( { 
     13                "access" : "$this/inc/load_lang", 
     14                "handler" : function( data ) 
     15                { 
     16                        handler_load_lang( expresso.connector.unserialize( data ) ); 
     17                } 
     18        } ); 
    1319} 
    1420 
     
    4652                } 
    4753        } 
    48         cExecute ('$this.ldap_functions.get_associated_domain&context='+context, handler_associated_domain);     
     54        _controller.go( { 
     55                "access" : "$this.ldap_functions.get_associated_domain&context=" + context, 
     56                "handler" : function( data ) 
     57                { 
     58                        handler_associated_domain( expresso.connector.unserialize( data ) ); 
     59                } 
     60        } ); 
    4961} 
    5062 
  • trunk/expressoAdmin1_2/js/jscode/users.js

    r1913 r2604  
    276276        }        
    277277                 
    278         cExecute ('$this.ldap_functions.get_available_groups&context='+context, handler_get_available_groups); 
     278        _controller.go( { 
     279                "access" : "$this.ldap_functions.get_available_groups&context="+context, 
     280                "handler" : function( data ) 
     281                { 
     282                        handler_get_available_groups( expresso.connector.unserialize( data ) ); 
     283                } 
     284        } ); 
    279285} 
    280286         
     
    371377                } 
    372378        } 
    373         cExecute ('$this.ldap_functions.get_available_maillists&context='+context, handler_get_available_maillists); 
     379        _controller.go( { 
     380                "access" : "$this.ldap_functions.get_available_maillists&context=" + context, 
     381                "handler" : function( data ) 
     382                { 
     383                        handler_get_available_maillists( expresso.connector.unserialize( data ) ); 
     384                } 
     385        } ); 
    374386} 
    375387         
  • trunk/expressoAdmin1_2/templates/default/accounts_form.tpl

    r1991 r2604  
    384384</table> 
    385385 
     386</form> 
     387 
     388</center> 
     389 
    386390<script type="text/javascript"> 
    387391tab.display(1); 
    388392</script> 
    389  
    390 </form> 
    391 </center> 
    392393<!-- END main --> 
Note: See TracChangeset for help on using the changeset viewer.