Ignore:
Timestamp:
04/08/10 18:31:53 (14 years ago)
Author:
alexandrecorreia
Message:

Ticket #986 - Correção da lista de contatos para a leitura de um contato em varios grupos.

File:
1 edited

Legend:

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

    r2437 r2471  
    2525                if( arguments.length > 0 ) 
    2626                { 
    27                         var e   = arguments[0]; 
    28                         var jid = arguments[1]; 
     27                        var e           = arguments[0]; 
     28                        var jid         = arguments[1]; 
     29                        var index       = arguments[2]; 
    2930                 
    3031                        if ( !e ) 
     
    3738         
    3839                        if ( ( e.which && e.which > 1 ) || ( e.button && e.button > 1 ) ) 
    39                                 optionsItensContact(e, jid); 
     40                                optionsItensContact(jid, index); 
    4041                        else 
    4142                                TrophyIM.rosterClick(jid); 
     
    236237         
    237238                        if ( ev.keyCode == 13 ) 
    238                                 if( element.value.length >= 4 ) 
     239                                if( element.value.length >= 3 ) 
    239240                                        searchUser( element.value );     
    240241                                else 
    241                                         alert('Your search argument must be longer than 4 characters.'); 
     242                                        alert('Your search argument must be longer than 3 characters.'); 
    242243                } 
    243244        } 
     
    303304                if( arguments.length > 0 ) 
    304305                { 
    305                         var element = ( arguments[0].target ) ? arguments[0].target : arguments[0].srcElement; 
    306                         var jid         = arguments[1]; 
     306                        var jid         = arguments[0]; 
     307                        var index       = arguments[1]; 
     308                        var element = document.getElementById('itenContact_' + jid + '_' + index ); 
    307309                         
    308310                        if( showhidden == null ) 
     
    321323                        { 
    322324                                _itens += '<img src="'+arrow_right.src+'"/>'; 
    323                                 _itens += '<span style="cursor:pointer; margin:3px;" onclick='+_options[i][1]+'>'; 
     325                                _itens += '<span style="cursor:pointer; margin:3px; font-weight:normal;" onclick='+_options[i][1]+'>'; 
    324326                                _itens += _options[i][0] + '</span><br/>'; 
    325327                        } 
     
    330332                                _optionsItens.style.zIndex      = '99999'; 
    331333                                _optionsItens.innerHTML         = _itens;   
    332                                                                                    
     334                                _optionsItens.onclick           = function(){ showhidden.hiddenObject(false); };                                           
     335                                 
    333336                                showhidden.action('onmouseover', 'onmouseout', _optionsItens); 
    334337                                 
    335                         element.parentNode.onclick              = function(){ showhidden.hiddenObject(false); }; 
    336                         element.parentNode.onmouseout   = function(){ showhidden.hiddenObject(false); }; 
    337                         element.parentNode.onmouseover  = function(){ showhidden.hiddenObject(true); }; 
    338                         element.parentNode.appendChild( _optionsItens ); 
     338                        element.onmouseout      = function(){ showhidden.hiddenObject(false); }; 
     339                        element.onmouseover     = function(){ showhidden.hiddenObject(true); }; 
     340                        element.appendChild( _optionsItens ); 
    339341                } 
    340342                 
     
    352354        function removeContact(jid) 
    353355        { 
    354                 TrophyIM.removeContact(jid); 
     356                setTimeout(function() 
     357                { 
     358                        TrophyIM.removeContact(jid); 
     359                         
     360                }, 500); 
     361        } 
     362         
     363        function removeGroup() 
     364        { 
     365                var _parent = arguments[0]; 
     366                 
     367                if( _parent.childNodes.length <= 2 ) 
     368                        _parent.parentNode.removeChild(_parent); 
     369                 
    355370        } 
    356371         
     
    428443                                _statusItens.style.zIndex       = '99999'; 
    429444                                _statusItens.innerHTML          = _itens;   
     445                                _statusItens.onclick            = function(){ showhidden.hiddenObject(false); }; 
    430446                                                                                   
    431447                                showhidden.action('onmouseover', 'onmouseout', _statusItens); 
     
    526542        loadIM.prototype.setSelectEditable      = setSelectEditable; 
    527543        loadIM.prototype.removeContact          = removeContact; 
     544        loadIM.prototype.removeGroup            = removeGroup; 
    528545        loadIM.prototype.rosterDiv                      = rosterDiv; 
    529546         
Note: See TracChangeset for help on using the changeset viewer.