Changeset 6447 for trunk


Ignore:
Timestamp:
06/08/12 10:36:20 (12 years ago)
Author:
marcieli
Message:

Ticket #2769 - Commit da melhoria implementada/testada no trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/draw_api.js

    r6393 r6447  
    38803880 
    38813881        var el_shared_users = Element("el_shared_users"); 
     3882        /* Recupera a pasta atual do usuário (selecionada) */ 
     3883        var user_shared = folder.split(cyrus_delimiter); 
     3884        /* Verifica se está nas próprias pastas */ 
     3885        if(user_shared[0] == "INBOX"){ 
     3886                user_shared = User.me.uid; 
     3887        }else{ 
     3888                user_shared = user_shared[1]; 
     3889        }        
    38823890        // The element was loaded and populated...so return. 
    38833891        if(el_shared_users){ 
     
    38903898                        _option.text = el_shared_users.options[x].text; 
    38913899                        _option.value = el_shared_users.options[x].value; 
     3900                        /* Faz o tratamento do nome da pasta para fazer a verificação e selecionar o valor no select */ 
     3901                        var str_begin_name = _option.text.indexOf('<') + 1; 
     3902                        var str_end_name = _option.text.indexOf('@'); 
     3903                        var user_selected_name = _option.text.substring(str_begin_name, str_end_name); 
     3904                        /* Verifica se é o usuário da pasta selecionada */                       
     3905                        if(user_selected_name == user_shared){ 
     3906                                _option.selected = 'selected'; 
     3907                        } 
    38923908                        sel_from.options[sel_from.options.length] = _option     ; 
    38933909                } 
     
    39153931                if(data.length > 0) { 
    39163932                        tr1_1.style.display = ''; 
    3917                         var mycn = typeof(data.myname != 'undefined') ? data.myname : ''; 
     3933            var mycn = typeof(data.myname != 'undefined') ? data.myname : ''; 
    39183934                        var _option = document.createElement("OPTION"); 
    39193935                        _option.text =  '"'+mycn+'" <'+Element("user_email").value+'>'; 
    39203936                        _option.value  = mycn+";"+Element("user_email").value; 
     3937                        /* Verifica se é o usuário logado */ 
     3938                        if(user_shared == User.me.uid) 
     3939                                _option.selected = 'selected'; 
    39213940                        sel_from.options[sel_from.options.length] = _option; 
    39223941 
    39233942                        var options = ''; 
    3924                         var cn = ''; 
    3925                                                                  
     3943            var cn = ''; 
    39263944                        for (var x = 0; x < data.length; x++)   { 
    39273945                                cn = typeof(data[x].cn[0] != 'undefined') ? data[x].cn[0] : ''; 
     
    39293947                                _option.text = '"'+cn+'" <'+data[x].mail[0]+'>'; 
    39303948                                _option.value = cn+';'+data[x].mail[0]+';'+data[x].save_shared[0]+';'+data[x].uid[0]; 
     3949                                /* Faz o tratamento do nome da pasta para fazer a verificação e selecionar o valor no select */ 
     3950                                var str_begin_name = _option.text.indexOf('<') + 1; 
     3951                                var str_end_name = _option.text.indexOf('@'); 
     3952                                var user_selected_name = _option.text.substring(str_begin_name, str_end_name);  
     3953                                /* Verifica se é o usuário da pasta selecionada */ 
     3954                                if(user_selected_name == user_shared){ 
     3955                                        _option.selected = 'selected'; 
     3956                                } 
    39313957                                sel_from.options[sel_from.options.length] = _option     ; 
    39323958                        } 
Note: See TracChangeset for help on using the changeset viewer.