From 6f0ab85c7c3c07f7b1c9e9c20e9a209ec68f02bd Mon Sep 17 00:00:00 2001 From: "rjc%netscape.com" Date: Wed, 23 Jun 1999 10:06:28 +0000 Subject: [PATCH] Update search XUL/JS/CSS to comply with new tree model specification. git-svn-id: svn://10.0.0.236/trunk@36554 18797224-902f-48f8-a5cc-f745e15eee43 --- .../suite/common/search/internetresults.xul | 86 ++++++++++--------- .../xpfe/components/search/resources/find.js | 2 + .../search/resources/findresults.css | 28 +++--- .../search/resources/findresults.xul | 46 +++++----- .../components/search/resources/internet.css | 28 +++--- .../components/search/resources/internet.js | 2 + .../components/search/resources/internet.xul | 36 ++++---- .../search/resources/internetresults.css | 28 +++--- .../search/resources/internetresults.xul | 86 ++++++++++--------- 9 files changed, 183 insertions(+), 159 deletions(-) diff --git a/mozilla/suite/common/search/internetresults.xul b/mozilla/suite/common/search/internetresults.xul index c512de9ea04..97b7164d5ec 100644 --- a/mozilla/suite/common/search/internetresults.xul +++ b/mozilla/suite/common/search/internetresults.xul @@ -31,60 +31,66 @@ - - - - &name.column.label; - - - - - &relevance.column.label; - - - - - &site.column.label; - - - - - &engine.column.label; - + + + + + &name.column.label; + + + + + &relevance.column.label; + + + + + &site.column.label; + + + + + &engine.column.label; + + - + diff --git a/mozilla/xpfe/components/search/resources/find.js b/mozilla/xpfe/components/search/resources/find.js index 3b1e6fb6520..97ed1ca8158 100644 --- a/mozilla/xpfe/components/search/resources/find.js +++ b/mozilla/xpfe/components/search/resources/find.js @@ -50,6 +50,8 @@ function doFind() // XXX shouldn't assume that treebody is the last child node in the tree! resultsTree.childNodes[x-1].setAttribute("id", url); + resultsTree.childNodes[x-1].setAttribute("open", "true"); + dump("doFind done.\n"); return(true); diff --git a/mozilla/xpfe/components/search/resources/findresults.css b/mozilla/xpfe/components/search/resources/findresults.css index 0e283ff5dbe..6c07ad64628 100755 --- a/mozilla/xpfe/components/search/resources/findresults.css +++ b/mozilla/xpfe/components/search/resources/findresults.css @@ -66,59 +66,59 @@ treehead treeitem treecell { vertical-align: middle; } -treeitem[container="true"][open="true"][loading="true"] > treecell > titledbutton { +treeitem[container="true"][open="true"][loading="true"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/rdf/loading.gif") ! important ; } -treeitem[type="http://home.netscape.com/NC-rdf#Folder"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#Folder"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/samples/bookmark-folder-closed.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#Folder"][open="true"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#Folder"][open="true"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/samples/bookmark-folder-open.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#Folder"][id="NC:PersonalToolbarFolder"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#Folder"][id="NC:PersonalToolbarFolder"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/samples/personal-folder-closed.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#Folder"][id="NC:PersonalToolbarFolder"][open="true"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#Folder"][id="NC:PersonalToolbarFolder"][open="true"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/samples/personal-folder-open.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#BookmarkSeparator"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#BookmarkSeparator"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/samples/bookmark-item.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#IEFavorite"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#IEFavorite"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/samples/IEFavorite.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#Bookmark"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#Bookmark"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/samples/bookmark-item.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"][container="true"][open="true"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"][container="true"][open="true"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/rdf/folder-open.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"][container="true"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"][container="true"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/rdf/folder-closed.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/rdf/article.gif"); } -treeitem[container="true"][open="true"] > treecell > titledbutton { +treeitem[container="true"][open="true"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/rdf/folder-open.gif"); } -treeitem[container="true"] > treecell > titledbutton { +treeitem[container="true"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/rdf/folder-closed.gif"); } -treeitem > treecell > titledbutton { +treeitem >treerow > treecell > titledbutton { list-style-image: url("resource:/res/rdf/document.gif"); } diff --git a/mozilla/xpfe/components/search/resources/findresults.xul b/mozilla/xpfe/components/search/resources/findresults.xul index 69d26042a03..36a4d72fd46 100644 --- a/mozilla/xpfe/components/search/resources/findresults.xul +++ b/mozilla/xpfe/components/search/resources/findresults.xul @@ -27,35 +27,39 @@ - + @@ -76,9 +80,9 @@ &description.column.label; - + - + diff --git a/mozilla/xpfe/components/search/resources/internet.css b/mozilla/xpfe/components/search/resources/internet.css index 4a7ac5c2fe3..fe398c2b40a 100755 --- a/mozilla/xpfe/components/search/resources/internet.css +++ b/mozilla/xpfe/components/search/resources/internet.css @@ -66,59 +66,59 @@ treehead treeitem treecell { vertical-align: middle; } -treeitem[container="true"][open="true"][loading="true"] > treecell > titledbutton { +treeitem[container="true"][open="true"][loading="true"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/rdf/loading.gif") ! important ; } -treeitem[type="http://home.netscape.com/NC-rdf#Folder"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#Folder"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/samples/bookmark-folder-closed.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#Folder"][open="true"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#Folder"][open="true"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/samples/bookmark-folder-open.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#Folder"][id="NC:PersonalToolbarFolder"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#Folder"][id="NC:PersonalToolbarFolder"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/samples/personal-folder-closed.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#Folder"][id="NC:PersonalToolbarFolder"][open="true"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#Folder"][id="NC:PersonalToolbarFolder"][open="true"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/samples/personal-folder-open.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#BookmarkSeparator"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#BookmarkSeparator"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/samples/bookmark-item.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#IEFavorite"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#IEFavorite"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/samples/IEFavorite.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#Bookmark"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#Bookmark"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/samples/bookmark-item.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"][container="true"][open="true"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"][container="true"][open="true"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/rdf/folder-open.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"][container="true"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"][container="true"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/rdf/folder-closed.gif"); } -treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"] > treecell > titledbutton { +treeitem[type="http://home.netscape.com/NC-rdf#FileSystemObject"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/rdf/article.gif"); } -treeitem[container="true"][open="true"] > treecell > titledbutton { +treeitem[container="true"][open="true"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/rdf/folder-open.gif"); } -treeitem[container="true"] > treecell > titledbutton { +treeitem[container="true"] >treerow > treecell > titledbutton { list-style-image: url("resource:/res/rdf/folder-closed.gif"); } -treeitem > treecell > titledbutton { +treeitem >treerow > treecell > titledbutton { list-style-image: url("resource:/res/rdf/document.gif"); } diff --git a/mozilla/xpfe/components/search/resources/internet.js b/mozilla/xpfe/components/search/resources/internet.js index 796f09f08fe..0bb24dadbdc 100644 --- a/mozilla/xpfe/components/search/resources/internet.js +++ b/mozilla/xpfe/components/search/resources/internet.js @@ -63,6 +63,8 @@ function doSearch() // XXX shouldn't assume that treebody is the last child node in the tree! resultsTree.childNodes[x-1].setAttribute("id", searchURL); + resultsTree.childNodes[x-1].setAttribute("open", "true"); + // enable "Save Search" button var searchButton = document.getElementById("SaveSearch"); if (searchButton) diff --git a/mozilla/xpfe/components/search/resources/internet.xul b/mozilla/xpfe/components/search/resources/internet.xul index 38f6e6932c1..3d40b0b0bbb 100644 --- a/mozilla/xpfe/components/search/resources/internet.xul +++ b/mozilla/xpfe/components/search/resources/internet.xul @@ -41,31 +41,35 @@ -