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.

File:
1 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);"); 
Note: See TracChangeset for help on using the changeset viewer.