зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1371860 - The 'Search' placeholder should appear immediately on about:home and about:newtab, r=nhnt11.
This commit is contained in:
Родитель
d0a8fb470b
Коммит
70bba4163d
|
@ -42,6 +42,7 @@
|
|||
<div id="searchIconAndTextContainer">
|
||||
<div id="searchIcon"/>
|
||||
<input type="text" name="q" value="" id="searchText" maxlength="256"
|
||||
placeholder="&searchInput.placeholder;"
|
||||
aria-label="&contentSearchInput.label;" autofocus="autofocus"/>
|
||||
<input id="searchSubmit" type="button" onclick="onSearchSubmit(event)"
|
||||
title="&contentSearchSubmit.tooltip;"/>
|
||||
|
|
|
@ -599,7 +599,6 @@ ContentSearchUIController.prototype = {
|
|||
this._updateSearchWithHeader();
|
||||
document.getElementById("contentSearchSettingsButton").textContent =
|
||||
this._strings.searchSettings;
|
||||
this.input.setAttribute("placeholder", this._strings.searchPlaceholder);
|
||||
},
|
||||
|
||||
_updateDefaultEngineHeader() {
|
||||
|
|
|
@ -71,7 +71,8 @@
|
|||
<div id="newtab-search-form">
|
||||
<div id="newtab-search-icon"/>
|
||||
<input type="text" name="q" value="" id="newtab-search-text"
|
||||
aria-label="&contentSearchInput.label;" maxlength="256"/>
|
||||
placeholder="&searchInput.placeholder;"
|
||||
aria-label="&contentSearchInput.label;" maxlength="256"/>
|
||||
<input id="newtab-search-submit" type="button"
|
||||
title="&contentSearchSubmit.tooltip;"/>
|
||||
</div>
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
<!-- global XULCommandEvent -->
|
||||
|
||||
<!DOCTYPE bindings [
|
||||
<!ENTITY % searchBarDTD SYSTEM "chrome://browser/locale/searchbar.dtd" >
|
||||
%searchBarDTD;
|
||||
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
|
||||
%browserDTD;
|
||||
]>
|
||||
|
@ -38,6 +36,7 @@
|
|||
anonid="searchbar-textbox"
|
||||
type="autocomplete"
|
||||
inputtype="search"
|
||||
placeholder="&searchInput.placeholder;"
|
||||
flex="1"
|
||||
autocompletepopup="PopupSearchAutoComplete"
|
||||
autocompletesearch="search-autocomplete"
|
||||
|
@ -56,22 +55,20 @@
|
|||
<xul:image class="searchbar-search-button"
|
||||
anonid="searchbar-search-button"
|
||||
xbl:inherits="addengines"
|
||||
tooltiptext="&searchEndCap.label;"/>
|
||||
tooltiptext="&searchIcon.tooltip;"/>
|
||||
</xul:hbox>
|
||||
</xul:box>
|
||||
<xul:hbox class="search-go-container">
|
||||
<xul:image class="search-go-button" hidden="true"
|
||||
anonid="search-go-button"
|
||||
onclick="handleSearchCommand(event);"
|
||||
tooltiptext="&searchEndCap.label;"/>
|
||||
tooltiptext="&contentSearchSubmit.tooltip;"/>
|
||||
</xul:hbox>
|
||||
</xul:textbox>
|
||||
</content>
|
||||
|
||||
<implementation implements="nsIObserver">
|
||||
<constructor><![CDATA[
|
||||
this._textbox.placeholder = this._stringBundle.getString("searchPlaceholder");
|
||||
|
||||
if (this.parentNode.parentNode.localName == "toolbarpaletteitem")
|
||||
return;
|
||||
|
||||
|
|
|
@ -470,6 +470,11 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
|||
<!ENTITY contentSearchInput.label "Search query">
|
||||
<!ENTITY contentSearchSubmit.tooltip "Submit search">
|
||||
|
||||
<!-- LOCALIZATION NOTE (searchInput.placeholder):
|
||||
This string is displayed in the search box when the input field is empty. -->
|
||||
<!ENTITY searchInput.placeholder "Search">
|
||||
<!ENTITY searchIcon.tooltip "Search">
|
||||
|
||||
<!-- LOCALIZATION NOTE (searchFor.label, searchWith.label):
|
||||
These two strings are used to build the header above the list of one-click
|
||||
search providers: "Search for <used typed keywords> with:" -->
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!ENTITY cmd_engineManager.label "Manage Search Engines…">
|
||||
<!ENTITY searchEndCap.label "Search">
|
|
@ -33,7 +33,6 @@
|
|||
locale/browser/safeMode.dtd (%chrome/browser/safeMode.dtd)
|
||||
locale/browser/sanitize.dtd (%chrome/browser/sanitize.dtd)
|
||||
locale/browser/search.properties (%chrome/browser/search.properties)
|
||||
locale/browser/searchbar.dtd (%chrome/browser/searchbar.dtd)
|
||||
locale/browser/sitePermissions.properties (%chrome/browser/sitePermissions.properties)
|
||||
locale/browser/engineManager.properties (%chrome/browser/engineManager.properties)
|
||||
locale/browser/setDesktopBackground.dtd (%chrome/browser/setDesktopBackground.dtd)
|
||||
|
|
|
@ -119,7 +119,7 @@ this.ContentSearch = {
|
|||
}
|
||||
this._searchSuggestionUIStrings = {};
|
||||
let searchBundle = Services.strings.createBundle("chrome://browser/locale/search.properties");
|
||||
let stringNames = ["searchHeader", "searchPlaceholder", "searchForSomethingWith",
|
||||
let stringNames = ["searchHeader", "searchForSomethingWith",
|
||||
"searchWithHeader", "searchSettings"];
|
||||
|
||||
for (let name of stringNames) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче