Ignore:
Timestamp:
09/22/08 17:02:02 (16 years ago)
Author:
niltonneto
Message:

Alterações feitas por Alexandre Correia.
Vide alterações 0.79 (Trac).
Email: alexandrecorreia@…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/jabberit_messenger/js/ldap.js

    r382 r459  
    3939                                _status.innerHTML = ''; 
    4040                                _name.previousSibling.style.color = "#000"; 
    41                                 _group.previousSibling.style.color = "#000"; 
    4241 
    4342                                if ( !_jid ) 
     
    6463                                                if ( !(_group.value) ) 
    6564                                                { 
    66                                                         _group.previousSibling.style.color = "#f00"; 
    6765                                                        _status.innerHTML += '<br/>** Informe um "GRUPO" para o contato.'; 
    6866                                                } 
     
    7775                                                        _uid = _jid.substr(0, (_jid.indexOf('@') - 1)); 
    7876 
     77                                                 
    7978                                                _name.parentNode.style.display = 'none'; 
    8079                                                _name.parentNode.nextSibling.style.display = 'none'; 
     
    8685                                                        { 
    8786                                                                _status.innerHTML = '<br/>Contato adicionado !<br/>'; 
     87                                                                setTimeout('cleanStatusAddContactIM();',2500); 
    8888                                                        }, 
    8989                                                        'uid='+_uid+'&name='+_name.value+'&group='+_group.value 
     
    9292                                                _name.value = ''; 
    9393                                                _group.value = ''; 
     94                                                 
    9495                                        } 
    9596                                } 
     
    158159                                                        return false; 
    159160 
     161                                                document.getElementById('__span_load_im_group').style.display = 'block'; 
    160162                                                document.getElementById('im_jid').value = m.substr(0, m.indexOf(';')); 
    161163                                                document.getElementById('im_uid').value = m.substr((m.indexOf(';')+1)); 
    162164 
    163165                                                var _name = document.getElementById('im_name'); 
    164                                                 _name.value = m.substr(0, m.indexOf('@')); 
    165                                                 _name.previousSibling.style.color = "#000"; 
    166  
    167                                                 _name.parentNode.style.display = 'block'; 
    168                                                 _name.parentNode.nextSibling.style.display = 'block'; 
    169                                                 _name.parentNode.nextSibling.nextSibling.innerHTML = ''; 
    170  
    171                                                 var _group = document.getElementById('im_group'); 
    172                                                 _group.value = ''; 
    173                                                 _group.focus(); 
     166                                                        _name.value = document.getElementById(m).innerHTML;                                                      
     167                                                        _name.previousSibling.style.color = "#000"; 
     168 
     169                                                        _name.parentNode.style.display = 'block'; 
     170                                                        _name.parentNode.nextSibling.style.display = 'block'; 
     171                                                        _name.parentNode.nextSibling.nextSibling.innerHTML = ''; 
     172                                                 
     173                                                _conn.go('$this.ujabber.getGroupsJabber', 
     174                                                                function(data) 
     175                                                                { 
     176                                                                        if( data = data.replace(/(^\s*)|(\s*$)/g,'')) 
     177                                                                        { 
     178                                                                                var _group = document.getElementById('im_group'); 
     179                                                                                var _groupOptions = ''; 
     180 
     181                                                                                _group.setAttribute('selectBoxOptions', data); 
     182                                                                                if( document.getElementById('selectBox0') == null) 
     183                                                                                        editS.create(document.getElementById('im_group')); 
     184                                                                        } 
     185                                                                        document.getElementById('__span_load_im_group').style.display = 'none'; 
     186                                                                }); 
     187 
     188                                                document.getElementById('im_group').value = ''; 
     189                                                document.getElementById('im_group').focus(); 
    174190                                        } 
    175191 
    176192                                        var _member = _target.firstChild; 
     193                                         
    177194                                        while ( _member ) 
    178195                                        { 
     
    205222} 
    206223)(); 
     224 
     225function cleanStatusAddContactIM() 
     226{ 
     227        document.getElementById('im_status_add').innerHTML = ''; 
     228} 
Note: See TracChangeset for help on using the changeset viewer.