Fix bug # 125801: find rdf service. r=bryner sr=ben

This commit is contained in:
rjc%netscape.com 2002-02-16 01:23:44 +00:00
Родитель 07ffca456b
Коммит 8c214026b7
4 изменённых файлов: 16 добавлений и 0 удалений

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

@ -36,6 +36,9 @@
*
* ***** END LICENSE BLOCK ***** */
const BMARKS_CONTRACTID = "@mozilla.org/browser/bookmarks-service;1";
const nsIBookmarksService = Components.interfaces.nsIBookmarksService;
var gOKButton;
var gSearchField;
function Startup()
@ -65,6 +68,16 @@ function find()
bmWindow.document.getElementById("bookmarks-view").outliner.setAttribute("ref", searchURI);
bmWindow.focus();
if (document.getElementById("saveQuery").checked == true)
{
var bundle = document.getElementById("bookmarksBundle");
var findTitle = bundle.stringBundle.formatStringFromName(
"ShortFindTitle", [gSearchField.value], 1);
var bmks = Components.classes[BMARKS_CONTRACTID].getService(nsIBookmarksService);
bmks.AddBookmark(searchURI, findTitle, bmks.BOOKMARK_FIND_TYPE, null);
}
return true;
}

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

@ -64,5 +64,6 @@
</menulist>
<textbox id="searchField" flex="1" oninput="doEnabling();"/>
</hbox>
<checkbox id="saveQuery" label="&save.query.label;" />
</dialog>

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

@ -65,6 +65,7 @@ pleaseSelectANotification = Please enter at least one notification method.
SortMenuItem = Sorted by %NAME%
ShortFindTitle = Find: '%S'
FindTitle = Find: %S %S '%S' in %S
ImportedIEFavorites = Imported IE Favorites

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

@ -9,6 +9,7 @@
<!ENTITY search.isnot.label "is not">
<!ENTITY search.contains.label "contains">
<!ENTITY search.doesntcontain.label "doesn't contain">
<!ENTITY save.query.label "Save query in bookmarks">
<!ENTITY search.for.label "Find Bookmarks whose">
<!ENTITY findBookmark.title "Find Bookmarks">