home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2011 November
/
CHIP_2011_11.iso
/
Programy
/
Narzedzia
/
AIMP2
/
aimp_2.61.583.exe
/
$TEMP
/
YandexPackSetup.msi
/
fil159CC2EA226DFFC5725AFE76A3C934C9
< prev
next >
Wrap
Extensible Markup Language
|
2010-07-12
|
5KB
|
119 lines
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE stylesheet [
<!ENTITY % yaBrandDTD SYSTEM "chrome://yasearch/locale/yasearch.dtd">
<!ENTITY % yaLinksDTD SYSTEM "chrome://yasearch/locale/links/links.dtd">
%yaBrandDTD;
%yaLinksDTD;
]>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
<xsl:param name="cbl" select="'{'"/>
<xsl:param name="cbr" select="'}'"/>
<xsl:key name="titleKey" match="lists/list/item" use="concat(../@boxname,@title)"/>
<xsl:template match="lists">
<vbox>
<xsl:if test="count(list) > 0">
<menuitem label="&yasearch.mail.reloadCounter.label;"
oncommand="Ya.nsIYa.manualRefreshHTTPData('mail')"/>
<xsl:apply-templates select="list"/>
<menuseparator/>
</xsl:if>
<xsl:if test="count(list[@type='yandex']) = 0">
<menuitem label="&yasearch.mail.login.yandex.label;"
oncommand="Ya.openWelcomeWindow('mail', 'yasearch-mail', {$cbl}view:'auth'{$cbr})"/>
</xsl:if>
<menuitem label="&yasearch.mail.login.mfd.label;"
oncommand="Ya.openWelcomeWindow('mfd', null, {$cbl}view:'auth'{$cbr})"/>
</vbox>
</xsl:template>
<xsl:template match="list">
<menuseparator/>
<menuitem disabled="true" crop="center">
<xsl:attribute name="label">
<xsl:value-of select="@boxname"/>
<xsl:if test="number(@counter) > 0">
<xsl:value-of select="concat(' (', @counter, ')')"/>
</xsl:if>
</xsl:attribute>
</menuitem>
<xsl:choose>
<xsl:when test="@type='mfd'">
<menuitem label="&yasearch.mail.open.label;"
oncommand="Ya.MFD.loadURI('{@domain}', 'messages', event, {$cbl}action:1005{$cbr});"/>
<menuitem label="&yasearch.mail.openAdBook.label;"
oncommand="Ya.MFD.loadURI('{@domain}', 'abook', event, {$cbl}action:1015{$cbr});"/>
<menuitem label="&yasearch.mail.writeMail.label;"
oncommand="Ya.MFD.loadURI('{@domain}', 'compose', event, {$cbl}action:1025{$cbr});"/>
<xsl:if test="position() = 1">
<menuitem label="&yasearch.mail.sendPage.label;"
oncommand="Ya.pageDataSender.sendToService('mfd:{@domain}', event, {$cbl}action:1055{$cbr})"/>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<menuitem label="&yasearch.mail.open.label;"
oncommand="Ya.loadConditionalURI('mail', event, {$cbl}action:1000{$cbr});"/>
<menuitem label="&yasearch.mail.openAdBook.label;"
oncommand="Ya.loadURI('&yasearch.link.mail.host;abook', event, {$cbl}action:1010{$cbr});"/>
<menuitem label="&yasearch.mail.writeMail.label;"
oncommand="Ya.loadURI('&yasearch.link.mail.host;compose', event, {$cbl}action:1020{$cbr});"/>
<xsl:if test="position() = 1">
<menuitem label="&yasearch.mail.sendPage.label;"
oncommand="Ya.pageDataSender.sendToService('mail', event, {$cbl}action:1050{$cbr})"/>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="item[generate-id() = generate-id(key('titleKey', concat(../@boxname, @title)))]"/>
<menuitem label="&yasearch.mail.logout.label;">
<xsl:attribute name="oncommand">
<xsl:choose>
<xsl:when test="@type='mfd'">
<xsl:value-of select="concat('Ya.MFD.dropAuthForLogin("', @boxname, '");')"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>Ya.nsIYa.yaAuth.fireAfterLogout(true, false);</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</menuitem>
</xsl:template>
<xsl:template match="item">
<xsl:variable name="Title" select="@title"/>
<xsl:variable name="Group" select="parent::list/item[@title = $Title]/item"/>
<menu container="true" class="menu-iconic bookmark-item" label="{@title} ({count($Group)})">
<menupopup>
<xsl:apply-templates select="$Group"/>
</menupopup>
</menu>
</xsl:template>
<xsl:template match="item/item">
<menuitem id="{@url}" label="{@title} ({@from})"
oncommand="Ya.clickMail(event, '{../../@type}');"
yamailfrom="{@from}" yamailsubject="{@title}" tooltip="yasearch-mail-tooltip"/>
</xsl:template>
</xsl:stylesheet>