Ignore:
Timestamp:
05/26/08 11:45:16 (16 years ago)
Author:
niltonneto
Message:

Verificar Wiki/Trac? do módulo.

File:
1 edited

Legend:

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

    r275 r287  
    2727                var content = get_Element(pJid); 
    2828                content.innerHTML += "" + this.insertEmoticons(pEmotion); 
     29                var smileWindow = document.getElementById(pJid+"__button_dest"); 
     30                if (smileWindow.firstChild) 
     31                        smileWindow.removeChild(smileWindow.firstChild); 
    2932        }, 
    3033 
     
    8891                } 
    8992                var content = get_Element(pJid); 
    90                  
     93                 
     94                var colorWindow = document.getElementById(pJid+"__button_dest"); 
     95                if (colorWindow.firstChild)  
     96                        colorWindow.removeChild(colorWindow.firstChild); 
     97 
    9198                if( _font_color = _document.contentWindow.document.getElementById('colors_'+pJid) ) 
    9299                        content.innerHTML = "<span id='colors_"+pJid+"'style='color:"+pColor+"'>"+_font_color.innerHTML+"</span>"; 
     
    346353                        { 
    347354                                var data = eval(XmlData); 
     355 
    348356                                if( data ) 
    349357                                { 
    350358                                        if( document.getElementById(pAvatar) != null ) 
    351359                                        { 
    352                                                 var photo_img = document.getElementById(pAvatar); 
    353                                                 photo_img.src = ( path_im + "inc/class.ldap_im.inc.php?user="+uid ) ? path_im + "inc/class.ldap_im.inc.php?user="+uid : im_photo.src ; 
     360                                                if( document.getElementById(pAvatar).src ) 
     361                                                { 
     362                                                        var photo_img = document.getElementById(pAvatar); 
     363                                                        photo_img.src = ( path_im + "inc/class.ldap_im.inc.php?user="+uid ) ? path_im + "inc/class.ldap_im.inc.php?user="+uid : im_photo.src ; 
     364                                                } 
     365                                                else 
     366                                                { 
     367                                                        var photo_img = document.getElementById(pAvatar); 
     368                                                        photo_img.style.backgroundImage = 'url(' + path_im + 'inc/class.ldap_im.inc.php?user='+uid+')'; 
     369                                                } 
    354370                                        }                
    355371                                } 
     
    361377        }, 
    362378         
    363         "newMessageNotification" : function() 
    364         { 
     379      "newMessageNotification" : function() 
     380      { 
    365381      if ( !focusFlag ) 
    366382      { 
     
    455471                { 
    456472                        if(imgStatus != null) 
    457                                 func.byId('im_status_src').src = eval('im_' + imgStatus + '.src'); 
     473                        { 
     474                                var img_status =  document.getElementById('im_status_src'); 
     475                                img_status.src = eval('im_' + imgStatus + '.src'); 
     476                        } 
    458477                } 
    459478                this.conn.go('$this.Ujabber.setPresence', {'request' : handler_presence}, this.status); 
     
    462481        "remove" : function(pJid) 
    463482        { 
     483                if (pJid == -1) 
     484                        return false; 
    464485                if(confirm('Deseja excluir o contato ' + pJid + ' ?')) 
    465486                { 
     
    488509                                if( func.byId(pElement).options[i].selected == true ) 
    489510                                         Jid = func.byId(pElement).options[i].value; 
    490                                           
    491                 if(confirm('Deseja excluir o contato ' + Jid + ' ?')) 
    492                 { 
    493                         if( Jid && Jid != -1 ) 
    494                         { 
     511                if (Jid == -1) 
     512                        return false; 
     513                else 
     514                        if(confirm('Deseja excluir o contato ' + Jid + ' ?')) 
     515                        { 
     516                                if( Jid && Jid != -1 ) 
     517                                { 
    495518                                function handler_remove(XmlData) 
    496519                                { 
     
    535558                { 
    536559                        if( XmlData != "OK" ) 
    537                                 alert('Vcard não cadastrado/atualizado !'); 
     560                                alert('Erro: Vcard não cadastrado/atualizado !'); 
    538561                        else 
    539562                                alert('Vcard cadastrado/atualizado !'); 
     563                        im_window.window_close('vcard_user_im'); 
    540564                } 
    541565                this.conn.go('$this.Ujabber.newVcard',{'request':handler_savevcard},"vcard="+xmlVcard); 
     
    571595                                im.off_line(); 
    572596                                alert('Preferências Salvas !'); 
     597                                im_window.window_close('my_settings_im'); 
    573598                        } 
    574599                } 
Note: See TracChangeset for help on using the changeset viewer.