Prepare to fix bug # 19564... search dialogs need to be skinnable, by using chrome: URLs and DTDs.

This commit is contained in:
rjc%netscape.com 1999-11-24 04:47:26 +00:00
Родитель f331c15d73
Коммит 66d8ae3585
9 изменённых файлов: 88 добавлений и 121 удалений

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

@ -1,28 +1,16 @@
<?xml version="1.0"?>
<?xml-stylesheet href="internetresults.css" type="text/css"?>
<?xml-stylesheet href="icons.css" type="text/css"?>
<!DOCTYPE window
[
<!ENTITY results.title.label "Results:">
<!ENTITY name.column.label "Name">
<!ENTITY relevance.column.label "Relevance">
<!ENTITY site.column.label "Internet Site">
<!ENTITY engine.column.label "Search Engine">
<!ENTITY allresults.title.label "All Search Results">
]>
<?xml-stylesheet href="chrome://search/skin/internetresults.css" type="text/css"?>
<?xml-stylesheet href="chrome://search/skin/icons.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://search/locale/internetresults.dtd">
<window style="width:100%; height:100%; background-color:white" align="vertical" onload="onLoadInternetResults()"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="internetresults.js" />
<html:script src="shared.js" />
<html:script src="chrome://search/content/internetresults.js" />
<html:script src="chrome://search/content/shared.js" />
<box id="NC:SearchResultsSitesRoot" datasources="rdf:internetsearch" style="height: 64;" align="horizontal">
<template>
@ -32,7 +20,9 @@
<titledbutton id="allEngines" onclick="doEngineClick(this)" class="engine" value="&allresults.title.label;" align="left" />
</box>
<tree id="internetresultstree" ref="" style="height: 70%; width: 100%;" flex="100%" datasources="rdf:internetsearch" onclick="doResultClick(event.target.parentNode.parentNode)" ondblclick="return OpenURL(event, event.target.parentNode.parentNode);">
<tree id="internetresultstree" ref="" style="height: 70%; width: 100%;" flex="100%" datasources="rdf:internetsearch"
onclick="if (event.clickCount == 2) return OpenURL(event, event.target.parentNode.parentNode); else doResultClick(event.target.parentNode.parentNode);">
<treecol id="NameColumn" rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
<treecol id="RelevanceColumn" rdf:resource="http://home.netscape.com/NC-rdf#Relevance" sortActive="true" sortDirection="descending" />
<treecol id="SiteColumn" rdf:resource="http://home.netscape.com/NC-rdf#Site"/>
@ -87,4 +77,16 @@
<splitter id="searchHtmlAreaSplitter" persist="state" style="border-top:solid black 1px; border-bottom:solid black 1px; background-color:lightgray;" collapse="after" />
<html:iframe id="content" type="content-primary" style="height: 100; width: 100%;" flex="100%" src="resource:/res/samples/default.htm" />
<!--
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 15px 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:15px; max-height:15px;">
<titledbutton class="status-bar" align="left" value=""/>
</box>
</window>

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

@ -0,0 +1,11 @@
default.htm
find.js
find.xul
findresults.xul
internet.js
internet.xul
internetresults.js
internetresults.xul
search.js
search.xul
shared.js

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

@ -0,0 +1,5 @@
findresults.css
icons.css
internet.css
internetresults.css
search.css

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

@ -1,39 +1,13 @@
<?xml version="1.0"?>
<!DOCTYPE window
[
<!ENTITY window.title.label "Find Local Data">
<!ENTITY search1.label "Search for items in ">
<!ENTITY search2.label " whose ">
<!ENTITY search.button.label "Search">
<!ENTITY save.button.label "Save Search in Bookmarks">
<!ENTITY bookmarks.label "Bookmarks">
<!ENTITY history.label "History">
<!ENTITY name.label "Name">
<!ENTITY url.label "URL">
<!ENTITY shortcut.label "Custom Keyword">
<!ENTITY description.label "Description">
<!ENTITY contains.label "contains">
<!ENTITY startswith.label "starts with">
<!ENTITY endswith.label "ends with">
<!ENTITY is.label "is">
<!ENTITY isnot.label "is not">
<!ENTITY doesntcontain.label "doesn't contain">
]>
<!DOCTYPE window SYSTEM "chrome://search/locale/find.dtd">
<window title="&window.title.label;" style="width:100%; height:100%; background-color:white" align="horizontal" flex="100%"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="find.js" />
<html:script src="chrome://search/content/find.js" />
<spring align="horizontal" flex="100%" />
<box align="horizontal" style="width: 100%;" >

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

@ -1,26 +1,18 @@
<?xml version="1.0"?>
<?xml-stylesheet href="findresults.css" type="text/css"?>
<!DOCTYPE window
[
<!ENTITY window.title.label "Find Results">
<!ENTITY name.column.label "Name">
<!ENTITY url.column.label "URL">
<!ENTITY shortcuturl.column.label "Custom Keyword">
<!ENTITY description.column.label "Description">
]>
<?xml-stylesheet href="chrome://search/skin/findresults.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://search/locale/findresults.dtd">
<window title="&window.title.label;" style="width:100%; height:100%; background-color:white" align="vertical"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="shared.js" />
<html:script src="chrome://search/content/shared.js" />
<tree id="findresultstree" style="height: 100%" flex="100%" datasources="rdf:bookmarks rdf:history rdf:localsearch"
onclick="if (event.clickCount == 2) return OpenURL(event, event.target.parentNode.parentNode);">
<tree id="findresultstree" style="height: 100%" flex="100%" datasources="rdf:bookmarks rdf:history rdf:localsearch" ondblclick="return OpenURL(event, event.target.parentNode.parentNode);">
<treecol id="NameColumn" rdf:resource="http://home.netscape.com/NC-rdf#Name" sortActive="true" sortDirection="ascending" />
<treecol id="URLColumn" rdf:resource="http://home.netscape.com/NC-rdf#URL"/>
<treecol id="ShortcutURLColumn" rdf:resource="http://home.netscape.com/NC-rdf#ShortcutURL"/>
@ -90,4 +82,16 @@
<treechildren open="true" />
</tree>
<spring flex="100%" align="horizontal" />
<!--
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 15px 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:15px; max-height:15px;">
<titledbutton class="status-bar" align="left" value=""/>
</box>
</window>

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

@ -1,29 +1,16 @@
<?xml version="1.0"?>
<?xml-stylesheet href="internet.css" type="text/css"?>
<?xml-stylesheet href="icons.css" type="text/css"?>
<!DOCTYPE window
[
<!ENTITY words.label "Words: ">
<!ENTITY checkbox.column.label "On">
<!ENTITY engine.column.label "Search Engines">
<!ENTITY search.button.label "Search">
<!ENTITY checkall.button.label "Check All">
<!ENTITY uncheckall.button.label "Uncheck All">
<!ENTITY savesearch.button.label "Save Search in Bookmarks">
]>
<?xml-stylesheet href="chrome://search/skin/internet.css" type="text/css"?>
<?xml-stylesheet href="chrome://search/skin/icons.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://search/locale/internet.dtd">
<window style="width:100%; height:100%; background-color:white" align="vertical"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="loadPage()" onunload="unloadPage()">
<html:script src="internet.js" />
<html:script src="shared.js" />
<html:script src="chrome://search/content/internet.js" />
<html:script src="chrome://search/content/shared.js" />
<box align="horizontal" style="width: 100%;" >
<spring align="horizontal" flex="100%" />

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

@ -1,28 +1,16 @@
<?xml version="1.0"?>
<?xml-stylesheet href="internetresults.css" type="text/css"?>
<?xml-stylesheet href="icons.css" type="text/css"?>
<!DOCTYPE window
[
<!ENTITY results.title.label "Results:">
<!ENTITY name.column.label "Name">
<!ENTITY relevance.column.label "Relevance">
<!ENTITY site.column.label "Internet Site">
<!ENTITY engine.column.label "Search Engine">
<!ENTITY allresults.title.label "All Search Results">
]>
<?xml-stylesheet href="chrome://search/skin/internetresults.css" type="text/css"?>
<?xml-stylesheet href="chrome://search/skin/icons.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://search/locale/internetresults.dtd">
<window style="width:100%; height:100%; background-color:white" align="vertical" onload="onLoadInternetResults()"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="internetresults.js" />
<html:script src="shared.js" />
<html:script src="chrome://search/content/internetresults.js" />
<html:script src="chrome://search/content/shared.js" />
<box id="NC:SearchResultsSitesRoot" datasources="rdf:internetsearch" style="height: 64;" align="horizontal">
<template>
@ -32,7 +20,9 @@
<titledbutton id="allEngines" onclick="doEngineClick(this)" class="engine" value="&allresults.title.label;" align="left" />
</box>
<tree id="internetresultstree" ref="" style="height: 70%; width: 100%;" flex="100%" datasources="rdf:internetsearch" onclick="doResultClick(event.target.parentNode.parentNode)" ondblclick="return OpenURL(event, event.target.parentNode.parentNode);">
<tree id="internetresultstree" ref="" style="height: 70%; width: 100%;" flex="100%" datasources="rdf:internetsearch"
onclick="if (event.clickCount == 2) return OpenURL(event, event.target.parentNode.parentNode); else doResultClick(event.target.parentNode.parentNode);">
<treecol id="NameColumn" rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
<treecol id="RelevanceColumn" rdf:resource="http://home.netscape.com/NC-rdf#Relevance" sortActive="true" sortDirection="descending" />
<treecol id="SiteColumn" rdf:resource="http://home.netscape.com/NC-rdf#Site"/>
@ -87,4 +77,16 @@
<splitter id="searchHtmlAreaSplitter" persist="state" style="border-top:solid black 1px; border-bottom:solid black 1px; background-color:lightgray;" collapse="after" />
<html:iframe id="content" type="content-primary" style="height: 100; width: 100%;" flex="100%" src="resource:/res/samples/default.htm" />
<!--
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 15px 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:15px; max-height:15px;">
<titledbutton class="status-bar" align="left" value=""/>
</box>
</window>

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

@ -9,13 +9,13 @@ function loadPage(thePage, searchStr)
if (thePage == "find")
{
content="find.xul";
results="findresults.xul";
content="chrome://search/content/find.xul";
results="chrome://search/content/findresults.xul";
}
else if (thePage == "internet")
{
content="internet.xul";
results="internetresults.xul";
content="chrome://search/content/internet.xul";
results="chrome://search/content/internetresults.xul";
if ((searchStr) && (searchStr != null))
{

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

@ -1,25 +1,7 @@
<?xml version="1.0"?>
<?xml-stylesheet href="search.css" type="text/css"?>
<!DOCTYPE window
[
<!ENTITY window.title.label "Search">
<!ENTITY find.title.label "Search Bookmarks/History">
<!ENTITY internet.title.label "Search the Internet">
<!ENTITY mailnews.title.label "Search Mail/News">
<!ENTITY addressbook.title.label "Search Addressbook">
<!ENTITY menu.file.label "File">
<!ENTITY menuitem.close.label "Close">
<!ENTITY menu.edit.label "Edit">
<!ENTITY menuitem.undo.label "Undo">
<!ENTITY menuitem.cut.label "Cut">
<!ENTITY menuitem.copy.label "Copy">
<!ENTITY menuitem.paste.label "Paste">
]>
<?xml-stylesheet href="chrome://search/skin/search.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://search/locale/search.dtd">
<window id="search-window" title="&window.title.label;"
width="500" height="400" x="20" y="20" persist="width height x y" align="vertical"
@ -45,7 +27,7 @@
</menu>
</menubar>
<html:script src="search.js" />
<html:script src="chrome://search/content/search.js" />
<tabcontrol align="vertical">
<tabbox align="horizontal">