diff options
author | csilv@chromium.org <csilv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-28 19:40:04 +0000 |
---|---|---|
committer | csilv@chromium.org <csilv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-28 19:40:04 +0000 |
commit | 625f12fa9952840a95eb6f7d24518db3fecf76a7 (patch) | |
tree | 6e1b3270a54aa0ea9450127aad99c95e053f6f2e /chrome | |
parent | c91ef06826355057b0d8ecfafe0069a9235bd050 (diff) | |
download | chromium_src-625f12fa9952840a95eb6f7d24518db3fecf76a7.zip chromium_src-625f12fa9952840a95eb6f7d24518db3fecf76a7.tar.gz chromium_src-625f12fa9952840a95eb6f7d24518db3fecf76a7.tar.bz2 |
web-ui settings: Remove unsupported search field attributes, add placeholder text.
BUG=72462
TEST=Verify that popup menu icon is no longer shown on search menu, but placeholder text is.
Review URL: http://codereview.chromium.org/6597025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76242 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/generated_resources.grd | 23 | ||||
-rw-r--r-- | chrome/browser/resources/options/search_page.js | 5 | ||||
-rw-r--r-- | chrome/browser/ui/webui/options/core_options_handler.cc | 2 |
3 files changed, 23 insertions, 7 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index e86ccfc..04104fb 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -7328,18 +7328,33 @@ This web page was killed, either because Chrome ran out of memory, or you chose </if> <!-- Options search page strings. --> - <message name="IDS_OPTIONS_SEARCH_PAGE_TITLE" desc=""> + <message name="IDS_OPTIONS_SEARCH_PAGE_TITLE" desc="Title of the settings search page."> Search Results </message> - <message name="IDS_OPTIONS_SEARCH_PAGE_NO_MATCHES" desc=""> + <message name="IDS_OPTIONS_SEARCH_PAGE_NO_MATCHES" desc="Text description of a search that has no results."> No matches were found. </message> - <message name="IDS_OPTIONS_SEARCH_PAGE_HELP_LABEL" desc=""> + <message name="IDS_OPTIONS_SEARCH_PAGE_HELP_LABEL" desc="Help text for a serach that has no results."> Can't find what you're looking for? </message> - <message name="IDS_OPTIONS_SEARCH_PAGE_HELP_TITLE" desc=""> + <message name="IDS_OPTIONS_SEARCH_PAGE_HELP_TITLE" desc="Help link for a search that has no results."> <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> Help </message> + <if expr="pp_ifdef('chromeos')"> + <message name="IDS_OPTIONS_SEARCH_PLACEHOLDER" desc="Text placeholder for an empty search field on ChromeOS."> + Search settings + </message> + </if> + <if expr="not pp_ifdef('chromeos') and (os == 'darwin' or os == 'linux2' or os.find('bsd') != -1)"> + <message name="IDS_OPTIONS_SEARCH_PLACEHOLDER" desc="Text placeholder for an empty search field on Mac/Linux."> + Search preferences + </message> + </if> + <if expr="os == 'win32'"> + <message name="IDS_OPTIONS_SEARCH_PLACEHOLDER" desc="Text placeholder for an empty search field on Windows."> + Search options + </message> + </if> <!-- Misc advanced option description strings. --> <message name="IDS_NETWORK_DNS_PREFETCH_ENABLED_DESCRIPTION" desc="In the advanced options tab, the text next to the checkbox that enables DNS prefetching. DNS prefetching involves scanning pages and user text entries, guessing what domain the user may next navigate to, and obtaining the domain's DNS information for that URL in advance. "> diff --git a/chrome/browser/resources/options/search_page.js b/chrome/browser/resources/options/search_page.js index dbd9e2f..e1b07ed 100644 --- a/chrome/browser/resources/options/search_page.js +++ b/chrome/browser/resources/options/search_page.js @@ -105,9 +105,8 @@ cr.define('options', function() { var searchField = document.createElement('input'); searchField.id = 'search-field'; searchField.type = 'search'; - searchField.setAttribute('autosave', 'org.chromium.options.search'); - searchField.setAttribute('results', '10'); - searchField.setAttribute('incremental', 'true'); + searchField.incremental = true; + searchField.placeholder = localStrings.getString('searchPlaceholder'); this.searchField = searchField; // Replace the contents of the navigation tab with the search field. diff --git a/chrome/browser/ui/webui/options/core_options_handler.cc b/chrome/browser/ui/webui/options/core_options_handler.cc index 8739756..5c42fdb 100644 --- a/chrome/browser/ui/webui/options/core_options_handler.cc +++ b/chrome/browser/ui/webui/options/core_options_handler.cc @@ -41,6 +41,8 @@ void CoreOptionsHandler::GetLocalizedValues( // Search RegisterTitle(localized_strings, "searchPage", IDS_OPTIONS_SEARCH_PAGE_TITLE); + localized_strings->SetString("searchPlaceholder", + l10n_util::GetStringUTF16(IDS_OPTIONS_SEARCH_PLACEHOLDER)); localized_strings->SetString("searchPageNoMatches", l10n_util::GetStringUTF16(IDS_OPTIONS_SEARCH_PAGE_NO_MATCHES)); localized_strings->SetString("searchPageHelpLabel", |