Bug 404279 - Suggest automatic filling of 'name' field after selecting "add a keyword for this search" from context menu, r=mak77 ui-r=beltzner

This commit is contained in:
Michael Kohler 2009-05-11 11:06:02 +02:00
parent 35dff56288
commit 28dca3265f
2 changed files with 9 additions and 2 deletions

View File

@ -5764,6 +5764,10 @@ function AddKeywordForSearchField()
&& (node.form.enctype == "application/x-www-form-urlencoded" ||
node.form.enctype == ""));
var title = gNavigatorBundle.getFormattedString("addKeywordTitleAutoFill",
[node.ownerDocument.title]);
var description = PlacesUIUtils.getDescriptionFromDocument(node.ownerDocument);
var el, type;
var formData = [];
@ -5801,8 +5805,7 @@ function AddKeywordForSearchField()
else
spec += "?" + formData.join("&");
var description = PlacesUIUtils.getDescriptionFromDocument(node.ownerDocument);
PlacesUIUtils.showMinimalAddBookmarkUI(makeURI(spec), "", description, null,
PlacesUIUtils.showMinimalAddBookmarkUI(makeURI(spec), title, description, null,
null, null, "", postData, charset);
}

View File

@ -208,3 +208,7 @@ privateBrowsingMessage=%S will save your current tabs for when you are done with
privateBrowsingYesTitle=&Start Private Browsing
privateBrowsingNoTitle=&Cancel
privateBrowsingNeverAsk=&Do not show this message again
# LOCALIZATION NOTE (addKeywordTitleAutoFill): %S will be replaced by the page's title
# Used as the bookmark name when saving a keyword for a search field.
addKeywordTitleAutoFill=Search %S