[55] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
| 2 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
| 3 | <xsl:output method="html" omit-xml-declaration="yes"/> |
---|
| 4 | |
---|
[151] | 5 | <xsl:template match="iq/query"> |
---|
| 6 | <xsl:apply-templates select="." mode="list" /> |
---|
[55] | 7 | </xsl:template> |
---|
| 8 | |
---|
[151] | 9 | <xsl:template match="*" mode="list"> |
---|
| 10 | <div id="im_contact_list" style="margin:2px;width:auto;height:200px;overflow-y:auto;"> |
---|
| 11 | <xsl:for-each select="item"> |
---|
| 12 | <xsl:sort select="group" case-order="upper-first" /> |
---|
| 13 | <xsl:choose> |
---|
| 14 | <xsl:when test="not(group = preceding-sibling::item/group)"> |
---|
[164] | 15 | <img id="group_{group[current()]}" src="instant_messenger/templates/default/images/group_open.gif" onclick="javascript:im.group_close('{group[current()]}');"/> |
---|
[151] | 16 | <b><xsl:value-of select="group[current()]" /><br/></b> |
---|
| 17 | <xsl:apply-templates select="." mode="contacts"/> |
---|
| 18 | </xsl:when> |
---|
| 19 | <xsl:otherwise> |
---|
| 20 | <xsl:apply-templates select="." mode="contacts"/> |
---|
| 21 | </xsl:otherwise> |
---|
| 22 | </xsl:choose> |
---|
| 23 | </xsl:for-each> |
---|
| 24 | </div> |
---|
[55] | 25 | </xsl:template> |
---|
| 26 | |
---|
[151] | 27 | <xsl:template match="*" mode="contacts"> |
---|
| 28 | |
---|
| 29 | <xsl:choose> |
---|
| 30 | <xsl:when test="@name"> |
---|
| 31 | <div style="margin-left:15px;cursor:pointer;display:block;" id="{@jid}" idgroup="{group}" idname="{@name}" onmousedown="templates.options(event, '{@jid}');"> |
---|
[164] | 32 | <img id="img_{@jid}" src="instant_messenger/templates/default/images/unavailable.gif" style="margin:0px 2px" /> |
---|
[151] | 33 | <xsl:value-of select="@name"/> |
---|
| 34 | <br/> |
---|
| 35 | <span id="status_{@jid}" style="font-size:8pt; font-family:Verdana, Arial, Helvetica, sans-serif; font-style:italic; display:none" /> |
---|
| 36 | </div> |
---|
[164] | 37 | <span id="sub_{@jid}"></span> |
---|
[151] | 38 | </xsl:when> |
---|
| 39 | <xsl:otherwise> |
---|
| 40 | <div style="margin-left:15px;cursor:pointer;display:block;" id="{@jid}" idgroup="{group}" idname="" onmousedown="templates.options(event, '{@jid}');"> |
---|
[164] | 41 | <img id="img_{@jid}" src="instant_messenger/templates/default/images/unavailable.gif" style="margin:0px 2px" /> |
---|
[151] | 42 | <xsl:value-of select="@jid"/> |
---|
| 43 | <br/> |
---|
| 44 | <span id="status_{@jid}" style="font-size:8pt; font-family:Verdana, Arial, Helvetica, sans-serif; font-style:italic; display:none;" /> |
---|
| 45 | </div> |
---|
[164] | 46 | <span id="sub_{@jid}"></span> |
---|
[151] | 47 | </xsl:otherwise> |
---|
| 48 | </xsl:choose> |
---|
| 49 | |
---|
[55] | 50 | </xsl:template> |
---|
| 51 | |
---|
[164] | 52 | </xsl:stylesheet> |
---|