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 / filEA6C84CDD55126789E2170672EFBF318 < prev    next >
Extensible Markup Language  |  2010-07-12  |  4KB  |  102 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE stylesheet SYSTEM "chrome://yasearch/locale/yasearch.dtd">
  3.  
  4. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5.   xmlns:html="http://www.w3.org/1999/xhtml"
  6.   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  7. >
  8.  
  9. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  10.  
  11. <xsl:param name="cbl" select="'{'"/>
  12. <xsl:param name="cbr" select="'}'"/>
  13.  
  14. <xsl:param name="addToFolderOnTop" select="true"/>
  15.  
  16. <!-- page/*[1] - for <err> -->
  17. <xsl:template match="page/*[1]">
  18.   <menupopup id="yasearch-bookmarks-menupopup"
  19.              ondraggesture="nsDragAndDrop.startDrag(event, YaBookmarksUtils)"
  20.              contextmenu="yaBookmarksPopup"
  21.              tooltip="yasearch-bookmarks-tooltip">
  22.     <menuitem label="&yasearch.bookmarks.reload.label;"
  23.               oncommand="Ya.nsIYa.manualRefreshHTTPData('bookmarks')"/>
  24.     <menuseparator/>
  25.     <menuitem label="&yasearch.bookmarks.add.page.label;" anonid="menuitem-add"
  26.               oncommand="document.getElementById('yasearch-bookmarks-button')._doCommand(this)"/>
  27.     <menuitem label="&yasearch.bookmarks.edit.bookmark.label;" anonid="menuitem-edit"
  28.               oncommand="document.getElementById('yasearch-bookmarks-button')._doCommand(this)"/>
  29.     <menuseparator/>
  30.     <menuitem label="&yasearch.bookmarks.open.label;" oncommand="Ya.loadURI('zakladki.yandex.ru', event, {$cbl}action:1900{$cbr})"/>
  31.     
  32.     <xsl:if test="count(./folder|./links/link) > 0">
  33.       <menuseparator/>
  34.     </xsl:if>
  35.     
  36.     <xsl:apply-templates select="folder | links"/>
  37.   </menupopup>
  38. </xsl:template>
  39.  
  40. <xsl:template match="folder">
  41.   <menu container="true" class="menu-iconic bookmark-item" label="{@name}" yafolderid="{@id}">
  42.     <xsl:attribute name="descr">
  43.       <xsl:value-of select="descr"/>
  44.     </xsl:attribute>
  45.     <menupopup contextmenu="yaBookmarksPopup">
  46.       <xsl:if test="$addToFolderOnTop != false">
  47.         <xsl:apply-templates select="." mode="addMenuitem"/>
  48.       </xsl:if>
  49.       
  50.       <xsl:apply-templates select="folder"/>
  51.       <xsl:apply-templates select="links"/>
  52.       
  53.       <xsl:if test="count(links/link) > 1">
  54.         <menuseparator/>
  55.         <menuitem label="&yasearch.bookmarks.openAllInTabs.label;"
  56.                   accesskey="&yasearch.bookmarks.openAllInTabs.accesskey;"
  57.                   oncommand="YaBookmarksUtils.openAllInTabs(event);"/>
  58.       </xsl:if>
  59.       
  60.       <xsl:if test="$addToFolderOnTop = false">
  61.         <xsl:apply-templates select="." mode="addMenuitem"/>
  62.       </xsl:if>
  63.       
  64.     </menupopup>
  65.   </menu>
  66. </xsl:template>
  67.  
  68. <xsl:template match="folder" mode="addMenuitem">
  69.   <xsl:if test="$addToFolderOnTop = false">
  70.     <xsl:if test="count(./folder|./links/link) > 0">
  71.       <menuseparator/>
  72.     </xsl:if>
  73.   </xsl:if>
  74.   
  75.   <menuitem class="menuitem-iconic bookmark-item yasearch-add-page-to-folder"
  76.             label="&yasearch.bookmarks.add.pageToFolder.label;"
  77.             accesskey="&yasearch.bookmarks.add.pageToFolder.accesskey;"
  78.             oncommand="Ya.addBookmark({@id});"/>
  79.   
  80.   <xsl:if test="$addToFolderOnTop != false">
  81.     <xsl:if test="count(./folder|./links/link) > 0">
  82.       <menuseparator/>
  83.     </xsl:if>
  84.   </xsl:if>
  85. </xsl:template>
  86.  
  87. <xsl:template match="links">
  88.   <xsl:apply-templates select="link"/>
  89. </xsl:template>
  90.  
  91. <xsl:template match="links/link">
  92.   <menuitem yalinkid="{@id}" class="menuitem-iconic bookmark-item statusurl"
  93.             label="{@name}" statustext="{@url}"
  94.             oncommand="Ya.loadURI('{@url}', event, {$cbl}action:1910{$cbr});"
  95.             onload="YaBookmarksUtils.setFaviconForURL('{@url}',this)">
  96.     <xsl:attribute name="descr">
  97.       <xsl:value-of select="descr"/>
  98.     </xsl:attribute>
  99.   </menuitem>
  100. </xsl:template>
  101.  
  102. </xsl:stylesheet>