source: trunk/instant_messenger/xsl/contacts.xsl @ 151

Revision 151, 2.2 KB checked in by niltonneto, 16 years ago (diff)

Commit da nova versão do módulo, usando agente em C.
Vide Página do módulo do Trac:
http://www.expressolivre.org/dev/wiki/messenger

A versão anterior encontra-se na subpasta bkp (32/64).

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
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
5<xsl:template match="iq/query">
6                <xsl:apply-templates select="." mode="list" /> 
7</xsl:template>
8
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)">
15                                        <img id="group_{group[current()]}" src="/instant_messenger/templates/default/images/group_open.gif" onclick="javascript:im.group_close('{group[current()]}');"/>
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>   
25</xsl:template>
26
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}');">
32                                <img id="img_{@jid}" src="/instant_messenger/templates/default/images/unavailable.gif" style="margin:0px 2px" />
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>
37                        <div id="sub_{@jid}"></div>                                                     
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}');">
41                                <img id="img_{@jid}" src="/instant_messenger/templates/default/images/unavailable.gif" style="margin:0px 2px" />
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>
46                        <div id="sub_{@jid}"></div>                     
47                </xsl:otherwise>
48        </xsl:choose>
49       
50</xsl:template>
51
52</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.