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 >
Extensible Markup Language  |  2010-07-12  |  5KB  |  119 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <!DOCTYPE stylesheet [
  4.   <!ENTITY % yaBrandDTD SYSTEM "chrome://yasearch/locale/yasearch.dtd">
  5.   <!ENTITY % yaLinksDTD SYSTEM "chrome://yasearch/locale/links/links.dtd">
  6.   %yaBrandDTD;
  7.   %yaLinksDTD;
  8. ]>
  9.  
  10. <xsl:stylesheet version="1.0"
  11.                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  12.                 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  13.  
  14. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  15.  
  16. <xsl:param name="cbl" select="'{'"/>
  17. <xsl:param name="cbr" select="'}'"/>
  18.  
  19. <xsl:key name="titleKey" match="lists/list/item" use="concat(../@boxname,@title)"/>
  20.  
  21. <xsl:template match="lists">
  22.   <vbox>
  23.     <xsl:if test="count(list) > 0">
  24.       <menuitem label="&yasearch.mail.reloadCounter.label;"
  25.                 oncommand="Ya.nsIYa.manualRefreshHTTPData('mail')"/>
  26.       
  27.       <xsl:apply-templates select="list"/>
  28.       
  29.       <menuseparator/>
  30.     </xsl:if>
  31.     
  32.     <xsl:if test="count(list[@type='yandex']) = 0">
  33.       <menuitem label="&yasearch.mail.login.yandex.label;"
  34.                 oncommand="Ya.openWelcomeWindow('mail', 'yasearch-mail', {$cbl}view:'auth'{$cbr})"/>
  35.     </xsl:if>
  36.     
  37.     <menuitem label="&yasearch.mail.login.mfd.label;"
  38.               oncommand="Ya.openWelcomeWindow('mfd', null, {$cbl}view:'auth'{$cbr})"/>
  39.   </vbox>
  40. </xsl:template>
  41.  
  42. <xsl:template match="list">
  43.   <menuseparator/>
  44.   
  45.   <menuitem disabled="true" crop="center">
  46.     <xsl:attribute name="label">
  47.       <xsl:value-of select="@boxname"/>
  48.       <xsl:if test="number(@counter) > 0">
  49.         <xsl:value-of select="concat(' (', @counter, ')')"/>
  50.       </xsl:if>
  51.     </xsl:attribute>
  52.   </menuitem>
  53.   
  54.   <xsl:choose>
  55.     <xsl:when test="@type='mfd'">
  56.       <menuitem label="&yasearch.mail.open.label;"
  57.                 oncommand="Ya.MFD.loadURI('{@domain}', 'messages', event, {$cbl}action:1005{$cbr});"/>
  58.       <menuitem label="&yasearch.mail.openAdBook.label;"
  59.                 oncommand="Ya.MFD.loadURI('{@domain}', 'abook', event, {$cbl}action:1015{$cbr});"/>
  60.       <menuitem label="&yasearch.mail.writeMail.label;"
  61.                 oncommand="Ya.MFD.loadURI('{@domain}', 'compose', event, {$cbl}action:1025{$cbr});"/>
  62.       
  63.       <xsl:if test="position() = 1">
  64.         <menuitem label="&yasearch.mail.sendPage.label;"
  65.                   oncommand="Ya.pageDataSender.sendToService('mfd:{@domain}', event, {$cbl}action:1055{$cbr})"/>
  66.       </xsl:if>
  67.     </xsl:when>
  68.     <xsl:otherwise>
  69.       <menuitem label="&yasearch.mail.open.label;"
  70.                 oncommand="Ya.loadConditionalURI('mail', event, {$cbl}action:1000{$cbr});"/>
  71.       <menuitem label="&yasearch.mail.openAdBook.label;"
  72.                 oncommand="Ya.loadURI('&yasearch.link.mail.host;abook', event, {$cbl}action:1010{$cbr});"/>
  73.       <menuitem label="&yasearch.mail.writeMail.label;"
  74.                 oncommand="Ya.loadURI('&yasearch.link.mail.host;compose', event, {$cbl}action:1020{$cbr});"/>
  75.       
  76.       <xsl:if test="position() = 1">
  77.         <menuitem label="&yasearch.mail.sendPage.label;"
  78.                   oncommand="Ya.pageDataSender.sendToService('mail', event, {$cbl}action:1050{$cbr})"/>
  79.       </xsl:if>
  80.     </xsl:otherwise>
  81.   </xsl:choose>
  82.   
  83.   <xsl:apply-templates select="item[generate-id() = generate-id(key('titleKey', concat(../@boxname, @title)))]"/>
  84.   
  85.   <menuitem label="&yasearch.mail.logout.label;">
  86.     <xsl:attribute name="oncommand">
  87.       <xsl:choose>
  88.         <xsl:when test="@type='mfd'">
  89.           <xsl:value-of select="concat('Ya.MFD.dropAuthForLogin("', @boxname, '");')"/>
  90.         </xsl:when>
  91.         <xsl:otherwise>
  92.           <xsl:text>Ya.nsIYa.yaAuth.fireAfterLogout(true, false);</xsl:text>
  93.         </xsl:otherwise>
  94.       </xsl:choose>
  95.     </xsl:attribute>
  96.   </menuitem>
  97.   
  98. </xsl:template>
  99.  
  100. <xsl:template match="item">
  101.   
  102.   <xsl:variable name="Title" select="@title"/>
  103.   <xsl:variable name="Group" select="parent::list/item[@title = $Title]/item"/>
  104.   
  105.   <menu container="true" class="menu-iconic bookmark-item" label="{@title} ({count($Group)})">
  106.     <menupopup>
  107.       <xsl:apply-templates select="$Group"/>
  108.     </menupopup>
  109.   </menu>
  110.     
  111. </xsl:template>
  112.  
  113. <xsl:template match="item/item">
  114.   <menuitem id="{@url}" label="{@title} ({@from})"
  115.             oncommand="Ya.clickMail(event, '{../../@type}');"
  116.             yamailfrom="{@from}" yamailsubject="{@title}" tooltip="yasearch-mail-tooltip"/>
  117. </xsl:template>
  118.  
  119. </xsl:stylesheet>