Changeset 2340 for sandbox/jabberit_messenger
- Timestamp:
- 03/24/10 16:39:08 (14 years ago)
- Location:
- sandbox/jabberit_messenger/trophy
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/jabberit_messenger/trophy/js/trophyim.js
r2339 r2340 782 782 } 783 783 784 // Presence 785 var presence = 'unavailable'; 784 // Presence e Status 785 var presence = "unavailable"; 786 var status = ""; 787 var statusDisplay = "none"; 786 788 787 789 if (objContact.presence) … … 790 792 { 791 793 presence = objContact.presence[resource].show; 794 795 if( objContact.presence[resource].status ) 796 { 797 status = " ( " + objContact.presence[resource].status + " ) "; 798 statusDisplay = "block"; 799 } 792 800 } 793 801 } … … 795 803 var paramsContact = 796 804 { 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 801 811 } 802 812 … … 805 815 else 806 816 { 807 // Presence 808 var presence = 'unavailable'; 817 // Presence e Status 818 var presence = "unavailable"; 819 var status = ""; 820 var statusDisplay = "none"; 809 821 810 822 if (objContact.presence) 811 823 { 812 for (var resource in objContact.presence) 824 for (var resource in objContact.presence) 825 { 813 826 presence = objContact.presence[resource].show; 827 828 if( objContact.presence[resource].status ) 829 { 830 status = objContact.presence[resource].status; 831 statusDisplay = "block"; 832 } 833 } 814 834 } 815 835 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 + " ) "; 817 839 } 818 840 } -
sandbox/jabberit_messenger/trophy/xsl/itensGroup.xsl
r2339 r2340 7 7 <xsl:param name="id" /> 8 8 <xsl:param name="presence" /> 9 <xsl:param name="status"/> 10 <xsl:param name="statusDisplay"/> 9 11 10 12 <xsl:template match="itens_group"> 11 13 12 14 <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> 14 17 </div> 15 18
Note: See TracChangeset
for help on using the changeset viewer.