Ignore:
Timestamp:
04/13/10 17:48:28 (14 years ago)
Author:
alexandrecorreia
Message:

Ticket #986 - Implementado o status de mensagem e a busca da foto no ldap.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/jabberit_messenger/trophy_expresso/js/loadIM.js

    r2491 r2511  
    167167                                _optionsItens.setAttribute("style", "margin: 20px 0px 0px -4px;"); 
    168168                                _optionsItens.className         = "x-menu"; 
    169                                 _optionsItens.style.zIndex      = '99999'; 
     169                                _optionsItens.style.zIndex      = '999999'; 
    170170                                _optionsItens.innerHTML         = _itens;   
    171171                                                                                   
     
    182182        { 
    183183                return document.getElementById( elementId ); 
     184        } 
     185         
     186        function getPhotoUser( jid ) 
     187        { 
     188                var _divPhoto = getElement( jid + '__photo' ); 
     189 
     190                if( _divPhoto.style.backgroundImage.indexOf('photo.png') > 0 ) 
     191                { 
     192                        var _imgUser  = path_jabberit + 'inc/WebService.php?' + Date.parse( new Date ); 
     193                                _imgUser += '&photo_ldap=' + jid; 
     194 
     195                        _divPhoto.style.backgroundImage = 'url(' + _imgUser + ')'; 
     196                } 
    184197        } 
    185198         
     
    332345                                _optionsItens.setAttribute("style", "margin: -10px 0px 0px 20px;"); 
    333346                                _optionsItens.className         = "x-menu"; 
    334                                 _optionsItens.style.zIndex      = '99999'; 
     347                                _optionsItens.style.zIndex      = zIndex++; 
    335348                                _optionsItens.innerHTML         = _itens;   
    336349                                _optionsItens.onmouseout        = function(){ showhidden.hiddenObject(false); };         
     
    373386                var paramListContact =  
    374387                { 
     388                        'idUser'                : getUserCurrent().jid, 
     389                        'full_name'             : (( fullName.length < 25 ) ? fullName : ( fullName.substring( 0, 25) + "...")), 
    375390                        'path_jabberit' : path_jabberit, 
    376                         'full_name'             : (( fullName.length < 25 ) ? fullName : ( fullName.substring( 0, 25) + "..."))  
     391                        'zIndex_'               : zIndex++ 
    377392                }; 
    378393                 
     
    394409                 
    395410                _winBuild( winRosterDiv ); 
     411 
     412                // Photo User 
     413                getPhotoUser(getUserCurrent().jid); 
    396414        } 
    397415 
     
    442460                                               ['Não Disponível', 'xa', '<img src="'+path_jabberit+'templates/default/images/xa.gif" />'], 
    443461                                               ['Ocupado', 'dnd', '<img src="'+path_jabberit+'templates/default/images/dnd.gif" />'], 
     462                                               ['Mensagem de Status...', 'status', '<img src="'+path_jabberit+'templates/default/images/message_normal.gif" />']                                                 
    444463                                          ]; 
    445464                         
     
    477496                if( arguments.length > 0 ) 
    478497                { 
    479                         var _text       = arguments[0]; 
    480                         var _img        = arguments[1]; 
    481                          
    482                         getElement('statusJabberImg').setAttribute("style", "background-image: url('"+path_jabberit+"templates/default/images/"+_img+".gif'); margin-left: 13px;width:15px; height:15px;"); 
    483                         getElement('statusJabberText').innerHTML = _text; 
    484                         getElement('status_jabber_expresso').style.background = "url('"+path_jabberit+"templates/default/images/"+_img+".gif') no-repeat"; 
     498                        if( arguments[1] != 'status' ) 
     499                        { 
     500                                var _text       = arguments[0]; 
     501                                var _img        = arguments[1]; 
     502                                 
     503                                getElement('statusJabberImg').setAttribute("style", "background-image: url('"+path_jabberit+"templates/default/images/"+_img+".gif'); margin-left: 13px;width:15px; height:15px;"); 
     504                                getElement('statusJabberText').innerHTML = _text; 
     505                                getElement('status_jabber_expresso').style.background = "url('"+path_jabberit+"templates/default/images/"+_img+".gif') no-repeat"; 
     506                        } 
    485507                }        
    486508        } 
     
    550572        loadIM.prototype.addContact                     = addContact; 
    551573        loadIM.prototype.configEvents           = configEvents; 
     574        loadIM.prototype.getPhotoUser           = getPhotoUser; 
    552575        loadIM.prototype.getUserCurrent         = getUserCurrent; 
    553576        loadIM.prototype.getZIndex                      = getZindex; 
Note: See TracChangeset for help on using the changeset viewer.