Ignore:
Timestamp:
03/24/10 16:39:08 (14 years ago)
Author:
alexandrecorreia
Message:

Ticket #986 - inclusao do status ( mensagens personalizados pelo contato ) na lista de contatos.

Location:
sandbox/jabberit_messenger/trophy
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sandbox/jabberit_messenger/trophy/js/trophyim.js

    r2339 r2340  
    782782                                        } 
    783783                                         
    784                                         // Presence 
    785                                         var presence = 'unavailable'; 
     784                                        // Presence e Status 
     785                                        var presence            = "unavailable"; 
     786                                        var status                      = ""; 
     787                                        var statusDisplay       = "none"; 
    786788                                         
    787789                                        if (objContact.presence) 
     
    790792                                                { 
    791793                                                        presence = objContact.presence[resource].show; 
     794                                                         
     795                                                        if( objContact.presence[resource].status ) 
     796                                                        { 
     797                                                                status                  = " ( " + objContact.presence[resource].status + " ) "; 
     798                                                                statusDisplay   = "block"; 
     799                                                        } 
    792800                                                } 
    793801                                        } 
     
    795803                                        var paramsContact = 
    796804                                        { 
    797                                                 'nameContact' : nameContact, 
    798                                                 'jid'             : objContact.contact.jid,      
    799                                                 'id'              : 'itenContact_' + objContact.contact.jid, 
    800                                                 'presence'        : presence  
     805                                                'nameContact'   : nameContact, 
     806                                                'jid'                   : objContact.contact.jid,        
     807                                                'id'                    : 'itenContact_' + objContact.contact.jid, 
     808                                                'presence'              : presence, 
     809                                                'status'                : status, 
     810                                                'statusDisplay' : statusDisplay 
    801811                                        } 
    802812                                         
     
    805815                                else 
    806816                                { 
    807                                         // Presence 
    808                                         var presence = 'unavailable'; 
     817                                        // Presence e Status 
     818                                        var presence            = "unavailable"; 
     819                                        var status                      = ""; 
     820                                        var statusDisplay       = "none"; 
    809821                                         
    810822                                        if (objContact.presence) 
    811823                                        { 
    812                                                 for (var resource in objContact.presence)  
     824                                                for (var resource in objContact.presence) 
     825                                                { 
    813826                                                        presence = objContact.presence[resource].show; 
     827                                                         
     828                                                        if( objContact.presence[resource].status ) 
     829                                                        { 
     830                                                                status                  = objContact.presence[resource].status; 
     831                                                                statusDisplay   = "block"; 
     832                                                        } 
     833                                                } 
    814834                                        } 
    815835 
    816                                         itensGroup.style.background = "url('images/" + presence + ".gif')no-repeat center left";  
     836                                        itensGroup.style.background                     = "url('images/" + presence + ".gif')no-repeat center left"; 
     837                                        itensGroup.lastChild.style.display      = statusDisplay; 
     838                                        itensGroup.lastChild.innerHTML          = " ( " + status + " ) "; 
    817839                                } 
    818840                        } 
  • sandbox/jabberit_messenger/trophy/xsl/itensGroup.xsl

    r2339 r2340  
    77        <xsl:param name="id" /> 
    88        <xsl:param name="presence" /> 
     9        <xsl:param name="status"/> 
     10        <xsl:param name="statusDisplay"/> 
    911         
    1012        <xsl:template match="itens_group"> 
    1113 
    1214                        <div id="{$id}" onclick="TrophyIM.rosterClick('{$jid}');" style="background: url('images/{$presence}.gif')no-repeat center left; padding-left: 18px; margin:2px 0px 5px 10px; cursor:pointer;"> 
    13                                 <xsl:value-of select="$nameContact"/> 
     15                                <xsl:value-of select="$nameContact"/> <br/> 
     16                                <span style="font-size: 8pt; font-style:italic; display:{$statusDisplay};"><xsl:value-of select="$status"/></span> 
    1417                        </div> 
    1518                         
Note: See TracChangeset for help on using the changeset viewer.