Model history after bookmarks. Share the css and js files with bookmarks.

Fix overlaping columns, bug #17975. r=mcafee
This commit is contained in:
slamm%netscape.com 1999-11-30 01:03:28 +00:00
Родитель ac8b0bdc14
Коммит c0edc4e68a
5 изменённых файлов: 164 добавлений и 139 удалений

Просмотреть файл

@ -1,4 +1,4 @@
<?xml version="1.0"?> <!-- -*- Mode: SGML -*- -->
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--
The contents of this file are subject to the Netscape Public
@ -22,25 +22,24 @@
-->
<?xml-stylesheet href="chrome://history/skin/history.css" type="text/css"?>
<?xml-stylesheet href="chrome://bookmarks/skin/manage-bookmarks.css" type="text/css"?>
<?xml-stylesheet href="chrome://bookmarks/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://history/locale/history.dtd" >
<window title="&historyWindowTitle.label;"
<window title="&historyWindowTitle.label;" id="bookmark-window" onunload="doUnload()"
xmlns:html="http://www.w3.org/TR/REC-html40"
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"
align="vertical"
width="400"
height="300">
width="500" height="400" x="20" y="20" persist="width height x y" align="vertical"
ondraggesture="return TopLevelDrag(event);">
<html:script src="chrome://history/content/history.js" />
<html:script src="chrome://bookmarks/content/bookmarks.js"/>
<menubar>
<menu value="&fileMenu.label;">
<menupopup>
<menuitem value="&newWinCmd.label;" oncommand="HistoryNewWindow();"/>
<menuseparator/>
<menuitem value="&closeCmd.label;"/>
<menuitem value="&closeCmd.label;" oncommand="window.close()"/>
</menupopup>
</menu>
<menu value="&editMenu.label;">
@ -59,58 +58,78 @@
</menupopup>
</menu>
</menubar>
<html:div flex="100%">
<tree rdf:datasources="rdf:history rdf:localsearch"
onclick="if (event.clickCount == 2) OpenURL(event,event.target.parentNode.parentNode);"
ref="NC:HistoryRoot"
style="height:100%;">
<template>
<popupset>
<popup id="contextual" oncreate="return fillContextMenu('contextual');" >
<menu />
</popup>
</popupset>
<html:div style="width: 100px; height: 100px;" flex="1">
<tree id="bookmarksTree" ref="NC:HistoryRoot" context="contextual"
datasources="rdf:history rdf:localsearch"
style="width:100%;height:100%"
ondragover="return DragOverTree(event);"
ondraggesture="return BeginDragTree(event);"
ondragdrop="return DropOnTree(event);">
<template>
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<treechildren>
<treeitem uri="...">
<treerow>
<treecell>
<treeindentation />
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#Name" align="left"
style="list-style-image: none;" />
</treecell>
<treecell>
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#URL" align="left"
style="list-style-image: none;" />
</treecell>
<treecell>
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#Date" align="left"
style="list-style-image: none;" />
</treecell>
</treerow>
</treeitem>
<treeitem uri="..." 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><html:hr width="100%" align="center" size="1" /></treecell>
<treecell><html:hr width="100%" align="center" size="1" /></treecell>
<treecell><html:hr width="100%" align="center" size="1" /></treecell>
<treecell><html:hr width="100%" align="center" size="1" /></treecell>
<treecell><html:hr width="100%" align="center" size="1" /></treecell>
<treecell><html:hr width="100%" align="center" size="1" /></treecell>
<treecell><html:hr width="100%" align="center" size="1" /></treecell>
</treerow>
</treeitem>
</treechildren>
</template>
</rule>
<treecol id="NameColumn" rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
<treecol id="URLColumn" rdf:resource="http://home.netscape.com/NC-rdf#URL"/>
<treecol id="DateColumn" rdf:resource="http://home.netscape.com/NC-rdf#Date"/>
<rule>
<treechildren onclick="if (event.clickCount == 2) return OpenURL(event, event.target.parentNode.parentNode, 'bookmarksTree');"
>
<treeitem uri="..." 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 value="rdf:http://home.netscape.com/NC-rdf#Name"
indent="true" />
<treecell value="rdf:http://home.netscape.com/NC-rdf#URL"/>
<treecell value="rdf:http://home.netscape.com/NC-rdf#Date"/>
</treerow>
</treeitem>
</treechildren>
</rule>
</template>
<treehead>
<treerow>
<treecell onclick="return doSort('NameColumn');">
<observes element="NameColumn" attribute="sortActive"/>
<observes element="NameColumn" attribute="sortDirection"/>
&name.column.label;</treecell>
<treecell onclick="return doSort('URLColumn');">
<observes element="URLColumn" attribute="sortActive"/>
<observes element="URLColumn" attribute="sortDirection"/>
&url.column.label;</treecell>
<treecell onclick="return doSort('DateColumn');">
<observes element="DateColumn" attribute="sortActive"/>
<observes element="DateColumn" attribute="sortDirection"/>
&lastvisited.column.label;</treecell>
</treerow>
</treehead>
<treecol persist="width" id="NameColumn" sortSeparators="true" rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
<treecol persist="width" id="URLColumn" sortSeparators="true" rdf:resource="http://home.netscape.com/NC-rdf#URL"/>
<treecol persist="width" id="ShortcutURLColumn" sortSeparators="true" rdf:resource="http://home.netscape.com/NC-rdf#Date"/>
<treehead>
<treerow>
<treecell value="&tree.header.name.label;" onclick="return doSort('NameColumn');" observes="NameColumn" />
<treecell value="&tree.header.url.label;" onclick="return doSort('URLColumn');" observes="URLColumn" />
<treecell value="&tree.header.date.label;" onclick="return doSort('DateColumn');" observes="DateColumn" />
</treerow>
</treehead>
</tree>
</html:div>
<!--
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="min-height:16px; max-height:16px;">
<titledbutton class="status-bar" align="left" value=""/>
</box>
<!-- TREECHILDREN are built *here* -->
</tree>
</html:div>
</window>

Просмотреть файл

@ -2,8 +2,7 @@
<!ENTITY fileMenu.label "File">
<!ENTITY newWinCmd.label "New Window">
<!ENTITY closeCmd.label ".Close">
<!ENTITY closeCmd.label "Close">
<!ENTITY editMenu.label "Edit">
<!ENTITY undoCmd.label "Undo">
<!ENTITY redoCmd.label "Redo">
@ -17,6 +16,6 @@
<!ENTITY historyBySite.label "History By Site">
<!ENTITY historyByDate.label "History By Date">
<!ENTITY historyWindowTitle.label "History">
<!ENTITY name.column.label "Title">
<!ENTITY url.column.label "URL">
<!ENTITY lastvisited.column.label "Last Visited">
<!ENTITY tree.header.name.label "Title">
<!ENTITY tree.header.url.label "URL">
<!ENTITY tree.header.date.label "Last Visited">

Просмотреть файл

@ -26,23 +26,12 @@
*/
treeitem[type="http://home.netscape.com/NC-rdf#Folder"] > treerow > treecell > titledbutton
treeitem[type="http://home.netscape.com/NC-rdf#Folder"] > treerow > treecell > .tree-icon
{
list-style-image: url("resource:/res/rdf/bookmark-folder-closed.gif");
}
treeitem[type="http://home.netscape.com/NC-rdf#Folder"][open="true"] > treerow > treecell > titledbutton
treeitem[type="http://home.netscape.com/NC-rdf#Folder"][open="true"] > treerow > treecell > .tree-icon
{
list-style-image: url("resource:/res/rdf/bookmark-folder-open.gif");
}
treeitem > treerow > treecell > titledbutton
{
height: 16px;
width: 16px;
color: inherit;
border: none;
padding: 0px;
margin: 0px;
font: inherit;
}

Просмотреть файл

@ -1,4 +1,4 @@
<?xml version="1.0"?> <!-- -*- Mode: SGML -*- -->
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--
The contents of this file are subject to the Netscape Public
@ -22,25 +22,24 @@
-->
<?xml-stylesheet href="chrome://history/skin/history.css" type="text/css"?>
<?xml-stylesheet href="chrome://bookmarks/skin/manage-bookmarks.css" type="text/css"?>
<?xml-stylesheet href="chrome://bookmarks/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://history/locale/history.dtd" >
<window title="&historyWindowTitle.label;"
<window title="&historyWindowTitle.label;" id="bookmark-window" onunload="doUnload()"
xmlns:html="http://www.w3.org/TR/REC-html40"
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"
align="vertical"
width="400"
height="300">
width="500" height="400" x="20" y="20" persist="width height x y" align="vertical"
ondraggesture="return TopLevelDrag(event);">
<html:script src="chrome://history/content/history.js" />
<html:script src="chrome://bookmarks/content/bookmarks.js"/>
<menubar>
<menu value="&fileMenu.label;">
<menupopup>
<menuitem value="&newWinCmd.label;" oncommand="HistoryNewWindow();"/>
<menuseparator/>
<menuitem value="&closeCmd.label;"/>
<menuitem value="&closeCmd.label;" oncommand="window.close()"/>
</menupopup>
</menu>
<menu value="&editMenu.label;">
@ -59,58 +58,78 @@
</menupopup>
</menu>
</menubar>
<html:div flex="100%">
<tree rdf:datasources="rdf:history rdf:localsearch"
onclick="if (event.clickCount == 2) OpenURL(event,event.target.parentNode.parentNode);"
ref="NC:HistoryRoot"
style="height:100%;">
<template>
<popupset>
<popup id="contextual" oncreate="return fillContextMenu('contextual');" >
<menu />
</popup>
</popupset>
<html:div style="width: 100px; height: 100px;" flex="1">
<tree id="bookmarksTree" ref="NC:HistoryRoot" context="contextual"
datasources="rdf:history rdf:localsearch"
style="width:100%;height:100%"
ondragover="return DragOverTree(event);"
ondraggesture="return BeginDragTree(event);"
ondragdrop="return DropOnTree(event);">
<template>
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<treechildren>
<treeitem uri="...">
<treerow>
<treecell>
<treeindentation />
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#Name" align="left"
style="list-style-image: none;" />
</treecell>
<treecell>
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#URL" align="left"
style="list-style-image: none;" />
</treecell>
<treecell>
<titledbutton value="rdf:http://home.netscape.com/NC-rdf#Date" align="left"
style="list-style-image: none;" />
</treecell>
</treerow>
</treeitem>
<treeitem uri="..." 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><html:hr width="100%" align="center" size="1" /></treecell>
<treecell><html:hr width="100%" align="center" size="1" /></treecell>
<treecell><html:hr width="100%" align="center" size="1" /></treecell>
<treecell><html:hr width="100%" align="center" size="1" /></treecell>
<treecell><html:hr width="100%" align="center" size="1" /></treecell>
<treecell><html:hr width="100%" align="center" size="1" /></treecell>
<treecell><html:hr width="100%" align="center" size="1" /></treecell>
</treerow>
</treeitem>
</treechildren>
</template>
</rule>
<treecol id="NameColumn" rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
<treecol id="URLColumn" rdf:resource="http://home.netscape.com/NC-rdf#URL"/>
<treecol id="DateColumn" rdf:resource="http://home.netscape.com/NC-rdf#Date"/>
<rule>
<treechildren onclick="if (event.clickCount == 2) return OpenURL(event, event.target.parentNode.parentNode, 'bookmarksTree');"
>
<treeitem uri="..." 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 value="rdf:http://home.netscape.com/NC-rdf#Name"
indent="true" />
<treecell value="rdf:http://home.netscape.com/NC-rdf#URL"/>
<treecell value="rdf:http://home.netscape.com/NC-rdf#Date"/>
</treerow>
</treeitem>
</treechildren>
</rule>
</template>
<treehead>
<treerow>
<treecell onclick="return doSort('NameColumn');">
<observes element="NameColumn" attribute="sortActive"/>
<observes element="NameColumn" attribute="sortDirection"/>
&name.column.label;</treecell>
<treecell onclick="return doSort('URLColumn');">
<observes element="URLColumn" attribute="sortActive"/>
<observes element="URLColumn" attribute="sortDirection"/>
&url.column.label;</treecell>
<treecell onclick="return doSort('DateColumn');">
<observes element="DateColumn" attribute="sortActive"/>
<observes element="DateColumn" attribute="sortDirection"/>
&lastvisited.column.label;</treecell>
</treerow>
</treehead>
<treecol persist="width" id="NameColumn" sortSeparators="true" rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
<treecol persist="width" id="URLColumn" sortSeparators="true" rdf:resource="http://home.netscape.com/NC-rdf#URL"/>
<treecol persist="width" id="ShortcutURLColumn" sortSeparators="true" rdf:resource="http://home.netscape.com/NC-rdf#Date"/>
<treehead>
<treerow>
<treecell value="&tree.header.name.label;" onclick="return doSort('NameColumn');" observes="NameColumn" />
<treecell value="&tree.header.url.label;" onclick="return doSort('URLColumn');" observes="URLColumn" />
<treecell value="&tree.header.date.label;" onclick="return doSort('DateColumn');" observes="DateColumn" />
</treerow>
</treehead>
</tree>
</html:div>
<!--
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="min-height:16px; max-height:16px;">
<titledbutton class="status-bar" align="left" value=""/>
</box>
<!-- TREECHILDREN are built *here* -->
</tree>
</html:div>
</window>

Просмотреть файл

@ -2,8 +2,7 @@
<!ENTITY fileMenu.label "File">
<!ENTITY newWinCmd.label "New Window">
<!ENTITY closeCmd.label ".Close">
<!ENTITY closeCmd.label "Close">
<!ENTITY editMenu.label "Edit">
<!ENTITY undoCmd.label "Undo">
<!ENTITY redoCmd.label "Redo">
@ -17,6 +16,6 @@
<!ENTITY historyBySite.label "History By Site">
<!ENTITY historyByDate.label "History By Date">
<!ENTITY historyWindowTitle.label "History">
<!ENTITY name.column.label "Title">
<!ENTITY url.column.label "URL">
<!ENTITY lastvisited.column.label "Last Visited">
<!ENTITY tree.header.name.label "Title">
<!ENTITY tree.header.url.label "URL">
<!ENTITY tree.header.date.label "Last Visited">