зеркало из https://github.com/mozilla/gecko-dev.git
More Search changes.
This commit is contained in:
Родитель
71f57e08a6
Коммит
cff5f78f40
|
@ -21,7 +21,7 @@
|
|||
|
||||
<html:script src="shared.js" />
|
||||
|
||||
<titledbutton id="internetresultssummary" value="&results.title.label;" width="200" size="200" />
|
||||
<titledbutton id="internetresultssummary" value="&results.title.label;" />
|
||||
<html:p />
|
||||
|
||||
<tree id="internetresultstree" flex="100%" border="1" datasources="rdf:internetsearch" ondblclick="return OpenURL(event,event.target.parentNode);">
|
||||
|
@ -85,5 +85,6 @@
|
|||
</treehead>
|
||||
|
||||
<treebody open="true" />
|
||||
|
||||
</tree>
|
||||
</window>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
]>
|
||||
|
||||
|
||||
<window title="&window.title.label;" style="width:100%; height:100%"
|
||||
<window title="&window.title.label;" style="width:100%; height:100%; background-color:white"
|
||||
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">
|
||||
|
|
|
@ -11,7 +11,7 @@ box {
|
|||
|
||||
tree {
|
||||
display: table;
|
||||
background-color: #FFFFFF;
|
||||
background-color: white;
|
||||
border: 1;
|
||||
border-spacing: 0px;
|
||||
width: 90%;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="resource:/res/samples/xul.css" type="text/css"?>
|
||||
<?xml-stylesheet href="findresults.css" type="text/css"?>
|
||||
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ tree[id="searchengines"] {
|
|||
background-color: #FFFFFF;
|
||||
border: 1;
|
||||
border-spacing: 0px;
|
||||
width: 300;
|
||||
// width: 300;
|
||||
align: center;
|
||||
}
|
||||
|
||||
|
|
|
@ -89,3 +89,25 @@ function doUncheckAll()
|
|||
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveSearch()
|
||||
{
|
||||
var resultsTree = parent.frames[1].document.getElementById("internetresultstree");
|
||||
if (!resultsTree) return(false);
|
||||
x = resultsTree.childNodes.length;
|
||||
if (x < 1) return(false);
|
||||
// XXX shouldn't assume that treebody is the last child node in the tree!
|
||||
var searchURL = resultsTree.childNodes[x-1].getAttribute("id");
|
||||
if (!searchURL) return(false);
|
||||
|
||||
dump("Bookmark search URL: " + searchURL + "\n");
|
||||
|
||||
var bmks = Components.classes["component://netscape/browser/bookmarks-service"].getService();
|
||||
bmks = bmks.QueryInterface(Components.interfaces.nsIBookmarksService);
|
||||
// XXX should construct a more interesting/useful title
|
||||
bmks.AddBookmark(searchURL, "Saved Internet Search");
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
|
||||
<!ENTITY checkbox.column.label "On">
|
||||
<!ENTITY engine.column.label "Search Engines">
|
||||
|
||||
<!ENTITY uncheckall.button.label "Uncheck All">
|
||||
<!ENTITY savesearch.button.label "Save Search in Bookmarks">
|
||||
]>
|
||||
|
||||
|
||||
|
@ -34,7 +37,7 @@
|
|||
</html:tr>
|
||||
|
||||
<html:tr><html:td>
|
||||
<tree id="searchengines" flex="100%" datasources="rdf:internetsearch" >
|
||||
<tree id="searchengines" border="1" flex="100%" datasources="rdf:internetsearch" >
|
||||
<treecol id="CheckboxColumn" />
|
||||
<treecol id="NameColumn" rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
|
||||
|
||||
|
@ -62,16 +65,16 @@
|
|||
</treeitem>
|
||||
</treehead>
|
||||
|
||||
<treebody id="NC:SearchEngineRoot" />
|
||||
<treebody id="NC:SearchEngineRoot" open="true" />
|
||||
</tree>
|
||||
</html:td></html:tr>
|
||||
|
||||
<html:tr><html:td>
|
||||
<html:input type="button" value="Uncheck All" onclick="return doUncheckAll();" />
|
||||
<html:input type="button" value="&uncheckall.button.label;" onclick="return doUncheckAll();" />
|
||||
<html:input type="button" value="&savesearch.button.label;" onclick="return saveSearch();" />
|
||||
</html:td></html:tr>
|
||||
</html:table>
|
||||
</html:center>
|
||||
<html:p />
|
||||
<spring flex="100%" align="horizontal" />
|
||||
</box>
|
||||
</window>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<html:script src="shared.js" />
|
||||
|
||||
<titledbutton id="internetresultssummary" value="&results.title.label;" width="200" size="200" />
|
||||
<titledbutton id="internetresultssummary" value="&results.title.label;" />
|
||||
<html:p />
|
||||
|
||||
<tree id="internetresultstree" flex="100%" border="1" datasources="rdf:internetsearch" ondblclick="return OpenURL(event,event.target.parentNode);">
|
||||
|
@ -85,5 +85,6 @@
|
|||
</treehead>
|
||||
|
||||
<treebody open="true" />
|
||||
|
||||
</tree>
|
||||
</window>
|
||||
|
|
|
@ -39,6 +39,6 @@
|
|||
|
||||
<html:script>
|
||||
// load initial page
|
||||
loadPage('internet');
|
||||
loadPage('find');
|
||||
</html:script>
|
||||
</window>
|
||||
|
|
Загрузка…
Ссылка в новой задаче