Ignore:
Timestamp:
04/30/08 17:15:14 (16 years ago)
Author:
niltonneto
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/instant_messenger/js/functions.js

    r268 r275  
    301301        "ldap_search_ou" : function(pElement) 
    302302        { 
    303                 var ldap_ou = ""; 
    304  
    305                 for(var i=0; i < pElement.options.length; i++) 
    306                         if( pElement.options[i].selected == true ) 
    307                         { 
    308                                 ldap_ou = pElement.options[i].value; 
     303                var ldap_ou = null; 
     304                var element_select = document.getElementById('im_ldap_ou'); 
     305                 
     306                for(var i=0; i < element_select.options.length; i++) 
     307                { 
     308                        if( element_select.options[i].value == pElement.value ) 
     309                        { 
     310                                ldap_ou = pElement.value; 
     311                                element_select.options.selectedIndex = i; 
     312                                element_select.options[i].focus(); 
    309313                                document.getElementById('im_jid').value = ""; 
    310314                                document.getElementById('im_name').value = ""; 
    311315                                document.getElementById('im_ldap_user').innerHTML = ""; 
    312316                        } 
    313  
     317                } 
     318                 
    314319                if(ldap_ou) 
    315320                        this.ldap_search_contacts(ldap_ou); 
     
    326331                        document.getElementById('__span_load_im').style.display = "none";                        
    327332                } 
    328  
    329333                this.conn.go('$this.contacts_im.list_contacts',{'request':handler_ldap}, 'ou='+pOu); 
    330334        }, 
     
    582586                var jabber = new Jabber(); 
    583587                var iframe = document.getElementById('iframe_' + pJid); 
    584                 jabber.doIt('sendMessage',{'message' : iframe.contentWindow.document.getElementsByTagName('body').item(0), 'from' : pJid });             
     588                jabber.doIt('sendMessage',{'message' : iframe.contentWindow.document.getElementsByTagName('body').item(0), 'from' : pJid }); 
    585589        }, 
    586590 
Note: See TracChangeset for help on using the changeset viewer.