gecko-dev/xpfe/components/bookmarks/resources/bookmarks.xul
2000-06-20 00:06:02 +00:00

346 lines
14 KiB
XML

<?xml version="1.0"?> <!-- -*- Mode: HTML; indent-tabs-mode: nil; -*- -->
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is mozilla.org code.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/bookmarks/bookmarks.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/bookmarks/bookmarks.dtd">
<window title="&bookmarksWindowTitle.label;" id="bookmark-window" onunload="doUnload()"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:web="http://home.netscape.com/WEB-rdf#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
width="630" height="400" x="20" y="20" persist="width height x y" orient="vertical"
onload="Init();"
ondraggesture="return TopLevelDrag(event);"
windowtype="bookmarks:manager"
>
<script src="chrome://communicator/content/bookmarks/bookmarks.js"/>
<script src="chrome://communicator/content/bookmarks/bookmarksDD.js"/>
<script src="chrome://global/content/treePopups.js"/>
<script src="chrome://global/content/strres.js"/>
<script src="chrome://global/content/globalOverlay.js"/>
<commands id="commands">
<commandset id="CommandUpdate_Bookmarks"
commandupdater="true"
events="focus,tree-select"
oncommandupdate="CommandUpdate_Bookmarks()"/>
<commandset id="selectEditMenuItems"/>
<commandset id="globalEditMenuItems">
<command id="bm_cmd_find" oncommand="return OpenBookmarksFind();"/>
<command id="bm_cmd_properties" oncommand="return BookmarkProperties();"/>
</commandset>
</commands>
<broadcasterset id="broadcasterset">
<!-- File Menu -->
<broadcaster id="cmd_newNavigator"/>
<broadcaster id="cmd_newMessage"/>
<broadcaster id="cmd_newEditor"/>
<broadcaster id="cmd_close" oncommand="window.close()"/>
<broadcaster id="cmd_quit"/>
<broadcaster id="bm_cmd_saveas"/>
<!-- Edit Menu -->
<broadcaster id="cmd_undo"/>
<broadcaster id="cmd_cut"/>
<broadcaster id="cmd_copy"/>
<broadcaster id="cmd_paste"/>
<broadcaster id="cmd_delete"/>
<broadcaster id="cmd_selectAll"/>
</broadcasterset>
<keyset id="keyset">
<!-- File Menu -->
<key id="key_newNavigator"/>
<key id="key_newMessage"/>
<key id="key_newEditor"/>
<key id="key_close"/>
<key id="key_quit"/>
<key id="bm_key_saveas" xulkey="true" key="&file.saveas.keybinding;"
observes="bm_cmd_saveas"/>
<!-- Edit Menu -->
<key id="key_undo"/>
<key id="key_cut"/>
<key id="key_copy"/>
<key id="key_paste"/>
<key id="key_delete"/>
<key id="key_selectAll"/>
<key id="bm_key_find" xulkey="true" key="&edit.find.keybinding;"/>
<key id="bm_key_properties" xulkey="true"
key="&edit.properties.keybinding;"/>
</keyset>
<toolbox class="toolbox-top">
<menubar>
<menu id="menu_File">
<menupopup id="menu_FilePopup">
<menuitem accesskey="&menuitem.newBookmark.accesskey;" value="&menuitem.newBookmark.label;" oncommand="return doContextCmd('http://home.netscape.com/NC-rdf#command?cmd=newbookmark');" />
<menu id="menu_New">
<menupopup id="menu_NewPopup">
<menuitem value="&menuitem.newFolder.label;" oncommand="return doContextCmd('http://home.netscape.com/NC-rdf#command?cmd=newfolder');"/>
<menuitem value="&menuitem.newSeparator.label;" oncommand="return doContextCmd('http://home.netscape.com/NC-rdf#command?cmd=newseparator');"/>
<menuseparator/>
<menuitem id="menu_newNavigator"/>
<menuitem id="menu_newMessage"/>
<menuitem id="cmd_newCard"/>
<menuitem id="menu_newEditor"/>
</menupopup>
</menu>
<menuseparator/>
<menuitem id="menu_close"/>
<menuitem observes="bm_cmd_saveas" key="bm_key_saveas"
accesskey="&menuitem.saveas.accesskey;"
value="&menuitem.saveas.label;" disabled="true" />
<menuseparator/>
<menuitem value="&menuitem.import.label;" oncommand="return doContextCmd('http://home.netscape.com/NC-rdf#command?cmd=import');" />
<menuitem value="&menuitem.export.label;" oncommand="return doContextCmd('http://home.netscape.com/NC-rdf#command?cmd=export');" />
<menuseparator/>
</menupopup>
</menu>
<menu id="menu_Edit">
<menupopup>
<menuitem id="menu_undo" disabled="true" />
<menuseparator/>
<menuitem id="menu_cut"/>
<menuitem id="menu_copy"/>
<menuitem id="menu_paste"/>
<menuitem id="menu_delete"/>
<menuitem id="menu_selectAll"/>
<menuseparator/>
<menuitem observes="bm_cmd_find" key="bm_key_find"
value="&menuitem.find.label;"/>
<menuseparator/>
<menuitem observes="bm_cmd_properties" key="bm_key_properties"
value="&menuitem.properties.label;" />
</menupopup>
</menu>
<menu id="menu_View">
<menupopup oncreate="fillViewMenu(this)">
<menuitem type="radio" name="sort_column" id="unsorted_menuitem"
value="&menuitem.view.unsorted.label;"
oncommand="return SetSortDirection('natural');"/>
<menuseparator id="fill_after_this_node" collapsed="true" />
<menuseparator id="fill_before_this_node"/>
<menuitem type="radio" name="sort_direction" id="sort_ascending"
value="&menuitem.view.ascending.label;"
oncommand="return SetSortDirection('ascending');"/>
<menuitem type="radio" name="sort_direction" id="sort_descending"
value="&menuitem.view.descending.label;"
oncommand="return SetSortDirection('descending');"/>
<menuseparator/>
<menu value="&menuitem.view.show_columns.label;">
<menupopup
oncreate="BuildTreePopup(document.getElementById('theColumns'),
document.getElementById('headRow'), this,
document.getElementById('popupCell'))"/>
</menu>
<menuseparator/>
<menuitem value="&menuitem.newbookmarkfolder.label;"
oncommand="return doContextCmd(NC+'command?cmd=setnewbookmarkfolder')"/>
<menuitem value="&menuitem.newinternetsearchfolder.label;"
oncommand="return doContextCmd(NC+'command?cmd=setnewsearchfolder')"/>
<menuitem value="&menuitem.personaltoolbarfolder.label;"
oncommand="return doContextCmd(NC+'command?cmd=setpersonaltoolbarfolder')"/>
</menupopup>
</menu>
<menu id="tasksMenu" accesskey="t" />
<menu id="menu_Help" accesskey="h" />
</menubar>
</toolbox>
<popupset>
<popup id="contextual" oncreate="return fillContextMenu('contextual');" >
<menu />
</popup>
</popupset>
<tree id="bookmarksTree" ref="NC:BookmarksRoot" context="contextual"
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch rdf:httpindex"
multiple="true"
onselect="bookmarkSelect();"
ondragover="return DragOverTree(event);"
ondraggesture="return BeginDragTree(event);"
ondragdrop="return DropOnTree(event);"
style="height:0px" flex="2">
<template>
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<treechildren>
<treeitem uri="rdf:*"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
loading="rdf:http://home.netscape.com/NC-rdf#loading">
<treerow>
<treecell><treeindentation/>
<separator class="groove" flex="1" align="center"/></treecell>
<treecell>
<separator class="groove" flex="1" align="center"/></treecell>
<treecell>
<separator class="groove" flex="1" align="center"/></treecell>
<treecell>
<separator class="groove" flex="1" align="center"/></treecell>
<treecell>
<separator class="groove" flex="1" align="center"/></treecell>
<treecell>
<separator class="groove" flex="1" align="center"/></treecell>
<treecell>
<separator class="groove" flex="1" align="center"/></treecell>
</treerow>
</treeitem>
</treechildren>
</rule>
<rule>
<treechildren>
<treeitem uri="rdf:*" persist="open"
web:status="rdf:http://home.netscape.com/WEB-rdf#status"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
loading="rdf:http://home.netscape.com/NC-rdf#loading">
<treerow>
<treecell class="treecell-bookmark treecell-indent"
value="rdf:http://home.netscape.com/NC-rdf#Name"
src="rdf:http://home.netscape.com/NC-rdf#Icon"
web:status="rdf:http://home.netscape.com/WEB-rdf#status"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
loading="rdf:http://home.netscape.com/NC-rdf#loading" />
<treecell crop="center"
value="rdf:http://home.netscape.com/NC-rdf#URL"/>
<treecell
value="rdf:http://home.netscape.com/NC-rdf#ShortcutURL"/>
<treecell
value="rdf:http://home.netscape.com/NC-rdf#Description"/>
<treecell
value="rdf:http://home.netscape.com/WEB-rdf#LastVisitDate"/>
<treecell
value="rdf:http://home.netscape.com/NC-rdf#BookmarkAddDate"/>
<treecell
value="rdf:http://home.netscape.com/WEB-rdf#LastModifiedDate"/>
</treerow>
</treeitem>
</treechildren>
</rule>
</template>
<treecolgroup id="theColumns">
<treecol id="Name"
sortSeparators="true" persist="hidden width" width="4*" flex="4"
rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
<treecol id="URL"
sortSeparators="true" persist="hidden width" width="4*" flex="4"
rdf:resource="http://home.netscape.com/NC-rdf#URL"
rdf:resource2="http://home.netscape.com/NC-rdf#Name"/>
<treecol id="ShortcutURL"
sortSeparators="true" persist="hidden width" width="1*" flex="1"
rdf:resource="http://home.netscape.com/NC-rdf#ShortcutURL"
rdf:resource2="http://home.netscape.com/NC-rdf#Name"/>
<treecol id="Description"
sortSeparators="true" persist="hidden width" width="1*" flex="1"
rdf:resource="http://home.netscape.com/NC-rdf#Description"
rdf:resource2="http://home.netscape.com/NC-rdf#Name"/>
<treecol id="LastVisitDate"
sortSeparators="true" persist="hidden width" width="1*" flex="1"
rdf:resource="http://home.netscape.com/WEB-rdf#LastVisitDate"
rdf:resource2="http://home.netscape.com/NC-rdf#Name"/>
<treecol id="BookmarkAddDate"
sortSeparators="true" persist="hidden width" width="1*" flex="1"
rdf:resource="http://home.netscape.com/NC-rdf#BookmarkAddDate"
rdf:resource2="http://home.netscape.com/NC-rdf#Name"/>
<treecol id="LastModifiedDate"
sortSeparators="true" persist="hidden width" width="1*" flex="1"
rdf:resource="http://home.netscape.com/WEB-rdf#LastModifiedDate"
rdf:resource2="http://home.netscape.com/NC-rdf#Name"/>
<treecol persist="width" fixed="true" width="14" id="PopupColumn"/>
</treecolgroup>
<treehead>
<treerow id="headRow">
<treecell class="treecell-header sortDirectionIndicator"
value="&tree.header.name.label;"
onclick="return TriStateColumnSort('Name');"
observes="Name" />
<treecell class="treecell-header sortDirectionIndicator"
value="&tree.header.url.label;"
onclick="return TriStateColumnSort('URL');"
observes="URL" />
<treecell class="treecell-header sortDirectionIndicator"
value="&tree.header.shortcut.label;"
onclick="return TriStateColumnSort('ShortcutURL');"
observes="ShortcutURL" />
<treecell class="treecell-header sortDirectionIndicator"
value="&tree.header.description.label;"
onclick="return TriStateColumnSort('Description');"
observes="Description" />
<treecell class="treecell-header sortDirectionIndicator"
value="&tree.header.lastvisit.label;"
onclick="return TriStateColumnSort('LastVisitDate');"
observes="LastVisitDate" />
<treecell class="treecell-header sortDirectionIndicator"
value="&tree.header.addedon.label;"
onclick="return TriStateColumnSort('BookmarkAddDate');"
observes="BookmarkAddDate" />
<treecell class="treecell-header sortDirectionIndicator"
value="&tree.header.lastmod.label;"
onclick="return TriStateColumnSort('LastModifiedDate');"
observes="LastModifiedDate" />
<treecell class="treecell-header" allowevents="true" id="popupCell">
<menu>
<image class="treecell-popup-icon"/>
<menupopup popupanchor="bottomright"
popupalign="topright"
oncreate="BuildTreePopup(document.getElementById('theColumns'),
document.getElementById('headRow'), this,
document.getElementById('popupCell'))"/>
</menu>
</treecell>
</treerow>
</treehead>
<treechildren flex="1" id="treechildren-bookmarks"
onclick="return OpenURL(event, event.target.parentNode.parentNode,
'bookmarksTree');"/>
</tree>
<!--
pinkerton
This extra "status" bar is necessary because the bottom right corner of
the window on MacOS is taken up by the growBox. If this window had a
horizontal scrollbar, we'd be alright, but since it doesn't the bottom
arrow on the vertical scrollbar was being hidden by this growBox. To
combat this, we can just stick in a 16px high bar to bump up the bottom
of the tree so that the scrollbar is visible. Yes, I know this is not
necessary for win32 or gtk, but we can use this area for information
(maybe full URL of selected item or the like) in the future.
-->
<box id="status-bar" style="height:16px; max-height:16px;">
<text id="statusbar-text" />
</box>
</window>