mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Update XUL/JS.
This commit is contained in:
parent
03cc69b254
commit
3cd62f9729
@ -35,7 +35,7 @@
|
||||
<template>
|
||||
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
|
||||
<treechildren>
|
||||
<treeitem uri="...">
|
||||
<treeitem uri="..." rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
|
||||
<treerow>
|
||||
<treecell>
|
||||
<html:hr width="75%" align="center" size="1" />
|
||||
@ -47,7 +47,7 @@
|
||||
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="...">
|
||||
<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>
|
||||
<treeindentation />
|
||||
|
@ -30,46 +30,49 @@
|
||||
|
||||
<html:script src="find.js" />
|
||||
|
||||
<html:table>
|
||||
<html:tr>
|
||||
<html:td>
|
||||
Find items in
|
||||
<html:select id="datasource">
|
||||
<html:option value="rdf:bookmarks">&bookmarks.label;</html:option>
|
||||
<html:option value="rdf:history">&history.label;</html:option>
|
||||
</html:select>
|
||||
whose
|
||||
<html:p />
|
||||
</html:td>
|
||||
</html:tr>
|
||||
<spring align="horizontal" flex="100%" />
|
||||
<box align="horizontal" style="width: 100%;" >
|
||||
<html:table>
|
||||
<html:tr>
|
||||
<html:td>
|
||||
Find items in
|
||||
<html:select id="datasource">
|
||||
<html:option value="rdf:bookmarks">&bookmarks.label;</html:option>
|
||||
<html:option value="rdf:history">&history.label;</html:option>
|
||||
</html:select>
|
||||
whose
|
||||
<html:p />
|
||||
</html:td>
|
||||
</html:tr>
|
||||
|
||||
<html:tr>
|
||||
<html:td>
|
||||
<html:select id="match">
|
||||
<html:option value="http://home.netscape.com/NC-rdf#Name">&name.label;</html:option>
|
||||
<html:option value="http://home.netscape.com/NC-rdf#URL">&url.label;</html:option>
|
||||
<html:option value="http://home.netscape.com/NC-rdf#ShortcutURL">&shortcut.label;</html:option>
|
||||
<html:option value="http://home.netscape.com/NC-Description">&description.label;</html:option>
|
||||
</html:select>
|
||||
<html:select id="method">
|
||||
<html:option value="contains">&contains.label;</html:option>
|
||||
<html:option value="startswith">&startswith.label;</html:option>
|
||||
<html:option value="endswith">&endswith.label;</html:option>
|
||||
<html:option value="is">&is.label;</html:option>
|
||||
<html:option value="isnot">&isnot.label;</html:option>
|
||||
<html:option value="doesntcontain">&doesntcontain.label;</html:option>
|
||||
</html:select>
|
||||
<html:input id="findtext" type="text" width="20" onkeyup="if (event.which == 13) { doFind(); }" />
|
||||
</html:td>
|
||||
</html:tr>
|
||||
<html:tr>
|
||||
<html:td>
|
||||
<html:select id="match">
|
||||
<html:option value="http://home.netscape.com/NC-rdf#Name">&name.label;</html:option>
|
||||
<html:option value="http://home.netscape.com/NC-rdf#URL">&url.label;</html:option>
|
||||
<html:option value="http://home.netscape.com/NC-rdf#ShortcutURL">&shortcut.label;</html:option>
|
||||
<html:option value="http://home.netscape.com/NC-Description">&description.label;</html:option>
|
||||
</html:select>
|
||||
<html:select id="method">
|
||||
<html:option value="contains">&contains.label;</html:option>
|
||||
<html:option value="startswith">&startswith.label;</html:option>
|
||||
<html:option value="endswith">&endswith.label;</html:option>
|
||||
<html:option value="is">&is.label;</html:option>
|
||||
<html:option value="isnot">&isnot.label;</html:option>
|
||||
<html:option value="doesntcontain">&doesntcontain.label;</html:option>
|
||||
</html:select>
|
||||
<html:input id="findtext" type="text" width="20" onkeyup="if (event.which == 13) { doFind(); }" />
|
||||
</html:td>
|
||||
</html:tr>
|
||||
|
||||
<html:tr>
|
||||
<html:td align="right">
|
||||
<html:input type="button" value="Find" onclick="return doFind();" />
|
||||
</html:td>
|
||||
</html:tr>
|
||||
</html:table>
|
||||
<html:p />
|
||||
<html:tr>
|
||||
<html:td align="right">
|
||||
<html:input type="button" value="Find" onclick="return doFind();" />
|
||||
</html:td>
|
||||
</html:tr>
|
||||
</html:table>
|
||||
<html:p />
|
||||
<spring align="horizontal" flex="100%" />
|
||||
</box>
|
||||
<spring flex="100%" align="horizontal" />
|
||||
|
||||
</window>
|
||||
|
@ -86,18 +86,32 @@ function doSearch()
|
||||
function doUncheckAll()
|
||||
{
|
||||
// get selected search engines
|
||||
var treeBody = document.getElementById("NC:SearchEngineRoot");
|
||||
if (!treeBody) return(false);
|
||||
var treeNode = document.getElementById("NC:SearchEngineRoot");
|
||||
if (!treeNode) return(false);
|
||||
var treeChildrenNode = null;
|
||||
var numChildren = treeNode.childNodes.length;
|
||||
for (var x = 0; x<numChildren; x++)
|
||||
{
|
||||
if (treeNode.childNodes[x].tagName == "treechildren")
|
||||
{
|
||||
treeChildrenNode = treeNode.childNodes[x];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (treeChildrenNode == null) return(false);
|
||||
|
||||
var numEngines = treeBody.childNodes.length;
|
||||
var numEngines = treeChildrenNode.childNodes.length;
|
||||
dump("Found treebody, it has " + numEngines + " kids\n");
|
||||
for (var x = 0; x<numEngines; x++)
|
||||
{
|
||||
var treeItem = treeBody.childNodes[x];
|
||||
var treeItem = treeChildrenNode.childNodes[x];
|
||||
if (!treeItem) continue;
|
||||
// XXX when its fully implemented, instead use
|
||||
// var engines = document.getElementsByTagName("checkbox");
|
||||
treeItem.childNodes[0].childNodes[0].childNodes[0].setAttribute("value", "0");
|
||||
if (treeItem.childNodes[0].childNodes[0].childNodes[0].getAttribute("value") == "1")
|
||||
{
|
||||
treeItem.childNodes[0].childNodes[0].childNodes[0].setAttribute("value", "0");
|
||||
}
|
||||
}
|
||||
|
||||
dump("doUncheckAll() done.\n");
|
||||
|
@ -35,7 +35,7 @@
|
||||
<template>
|
||||
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
|
||||
<treechildren>
|
||||
<treeitem uri="...">
|
||||
<treeitem uri="..." rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
|
||||
<treerow>
|
||||
<treecell>
|
||||
<html:hr width="75%" align="center" size="1" />
|
||||
@ -47,7 +47,7 @@
|
||||
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="...">
|
||||
<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>
|
||||
<treeindentation />
|
||||
|
@ -13,7 +13,7 @@ function loadPage(thePage)
|
||||
content="internet.xul";
|
||||
results="internetresults.xul";
|
||||
}
|
||||
else if (thePage == "mailnews")
|
||||
else if (thePage == "mail")
|
||||
{
|
||||
content="about:blank";
|
||||
results="about:blank";
|
||||
@ -23,6 +23,7 @@ function loadPage(thePage)
|
||||
content="about:blank";
|
||||
results="about:blank";
|
||||
}
|
||||
|
||||
if ((content != "") && (results != ""))
|
||||
{
|
||||
var contentFrame = document.getElementById("content");
|
||||
|
@ -5,9 +5,9 @@
|
||||
|
||||
<!DOCTYPE window
|
||||
[
|
||||
<!ENTITY window.title.label "Super Search">
|
||||
<!ENTITY find.title.label "Find Local Data">
|
||||
<!ENTITY internet.title.label "Search Internet">
|
||||
<!ENTITY window.title.label "Smart 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">
|
||||
]>
|
||||
@ -16,7 +16,8 @@
|
||||
<window title="&window.title.label;" style="width: 100%; height: 100%" 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">
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="loadPage(window.arguments[0])" >
|
||||
|
||||
<html:script src="search.js" />
|
||||
|
||||
@ -26,7 +27,7 @@
|
||||
<spring align="horizontal" flex="5%"/>
|
||||
<titledbutton value="&internet.title.label;" onclick="return loadPage('internet');" />
|
||||
<spring align="horizontal" flex="5%"/>
|
||||
<titledbutton value="&mailnews.title.label;" onclick="return loadPage('mailnews');" />
|
||||
<titledbutton value="&mailnews.title.label;" onclick="return loadPage('mail');" />
|
||||
<spring align="horizontal" flex="5%"/>
|
||||
<titledbutton value="&addressbook.title.label;" onclick="return loadPage('addressbook');" />
|
||||
<spring align="horizontal" flex="100%" />
|
||||
@ -35,9 +36,4 @@
|
||||
<html:iframe style="height: 50%; width: 100%;" flex="100%" id="content" src="about:blank" />
|
||||
<html:iframe style="height: 50%; width: 100%;" flex="100%" id="results" src="about:blank" />
|
||||
</box>
|
||||
|
||||
<html:script>
|
||||
// load initial page
|
||||
loadPage('find');
|
||||
</html:script>
|
||||
</window>
|
||||
|
Loading…
Reference in New Issue
Block a user