зеркало из https://github.com/mozilla/gecko-dev.git
Bug 252698: Use buttonlabel attributes in <dialog>s
r+sr=neil
This commit is contained in:
Родитель
0375dee12c
Коммит
d2ff91327c
|
@ -84,9 +84,6 @@ function onLoad()
|
|||
dialog.openAppList.selectedItem = dialog.openTopWindow;
|
||||
}
|
||||
|
||||
// change OK button text to 'open'
|
||||
dialog.open.label = dialog.bundle.getString("openButtonLabel");
|
||||
|
||||
if (pref) {
|
||||
try {
|
||||
var value = pref.getIntPref("general.open_location.last_window_choice");
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
title="&caption.label;"
|
||||
onload="onLoad()"
|
||||
ondialogaccept="open()"
|
||||
buttonlabelaccept="&open.label;"
|
||||
style="width: 40em;"
|
||||
persist="screenX screenY"
|
||||
screenX="24" screenY="24">
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<!ENTITY newTab.label "New Navigator tab">
|
||||
<!ENTITY topWindow.label "Current Navigator window">
|
||||
<!ENTITY editNewWindow.label "New Composer window">
|
||||
<!ENTITY cancel.label "Cancel">
|
||||
<!ENTITY open.label "Open">
|
||||
<!ENTITY caption.label "Open Web Location">
|
||||
<!ENTITY openWhere.label "Open in:">
|
||||
<!ENTITY openWhere.accesskey "O">
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
openButtonLabel=Open
|
||||
chooseFileDialogTitle=Choose File
|
||||
existingNavigatorWindow=Existing Navigator window
|
||||
|
|
|
@ -43,7 +43,6 @@ function Startup()
|
|||
initServices();
|
||||
initBMService();
|
||||
gOKButton = document.documentElement.getButton("accept");
|
||||
gOKButton.label = BookmarksUtils.getLocaleString("search_button_label");
|
||||
gOKButton.disabled = true;
|
||||
gSearchField = document.getElementById("searchField");
|
||||
gSearchField.focus();
|
||||
|
|
|
@ -51,7 +51,8 @@
|
|||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&findBookmark.title;"
|
||||
onload="Startup();"
|
||||
ondialogaccept="return find();">
|
||||
ondialogaccept="return find();"
|
||||
buttonlabelaccept="&findButton.label;">
|
||||
|
||||
<stringbundle id="bookmarksBundle" src="chrome://communicator/locale/bookmarks/bookmarks.properties"/>
|
||||
|
||||
|
|
|
@ -98,5 +98,3 @@ DefaultPersonalToolbarFolder = Personal Toolbar Folder
|
|||
SelectOpen = Open Bookmarks File
|
||||
SelectImport = Import Bookmarks File
|
||||
EnterExport = Export Bookmarks File
|
||||
|
||||
search_button_label = Find
|
||||
|
|
|
@ -12,4 +12,4 @@
|
|||
<!ENTITY save.query.label "Save query in bookmarks">
|
||||
<!ENTITY search.for.label "Find Bookmarks whose">
|
||||
<!ENTITY findBookmark.title "Find Bookmarks">
|
||||
|
||||
<!ENTITY findButton.label "Find">
|
||||
|
|
|
@ -99,10 +99,6 @@ function onLoad()
|
|||
{
|
||||
initDialogObject();
|
||||
|
||||
// Change "OK" to "Find".
|
||||
dialog.find.label = document.getElementById("fBLT").getAttribute("label");
|
||||
dialog.find.accessKey = document.getElementById("fBLT").getAttribute("accesskey");
|
||||
|
||||
// get the find instance
|
||||
var arg0 = window.arguments[0];
|
||||
// If the dialog was opened from window.find(),
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
buttonpack="center"
|
||||
ondialogaccept="return onAccept();"
|
||||
buttonlabelaccept="&findButton.label;"
|
||||
windowtype="findInPage"
|
||||
onload="onLoad();"
|
||||
onunload="onUnload();"
|
||||
|
@ -87,8 +88,4 @@
|
|||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<!-- used to store the find text -->
|
||||
<data style="display:none;" id="fBLT" label="&findButton.label;" accesskey="&findButton.accesskey;"/>
|
||||
|
||||
</dialog>
|
||||
|
|
|
@ -42,7 +42,6 @@ function Startup()
|
|||
{
|
||||
var bundle = document.getElementById("historyBundle");
|
||||
gOKButton = document.documentElement.getButton("accept");
|
||||
gOKButton.label = bundle.getString("search_button_label");
|
||||
gOKButton.disabled = true;
|
||||
gSearchField = document.getElementById("searchField");
|
||||
gSearchField.focus();
|
||||
|
|
|
@ -49,7 +49,8 @@
|
|||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&findHistory.title;"
|
||||
onload="Startup();"
|
||||
ondialogaccept="return find();">
|
||||
ondialogaccept="return find();"
|
||||
buttonlabelaccept="&findButton.label;">
|
||||
|
||||
<stringbundle id="historyBundle" src="chrome://communicator/locale/history/history.properties"/>
|
||||
|
||||
|
|
|
@ -9,4 +9,5 @@
|
|||
<!ENTITY search.doesntcontain.label "doesn't contain">
|
||||
<!ENTITY search.for.label "Find visited documents whose">
|
||||
<!ENTITY findHistory.title "Find in History">
|
||||
<!ENTITY findButton.label "Find">
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ finduri-AgeInDays-isgreater=Older than %S days
|
|||
|
||||
finduri-Hostname-is-=(no host)
|
||||
|
||||
search_button_label=Find
|
||||
search_results_title=Search Results
|
||||
|
||||
collapseLabel=Collapse
|
||||
|
|
|
@ -91,8 +91,7 @@ function initDialog()
|
|||
|
||||
dialog.printButton = document.documentElement.getButton("accept");
|
||||
|
||||
// <data> elements
|
||||
dialog.printName = document.getElementById("printButton");
|
||||
// <data> element
|
||||
dialog.fpDialog = document.getElementById("fpDialog");
|
||||
|
||||
dialog.enabled = false;
|
||||
|
@ -379,8 +378,6 @@ function loadDialog()
|
|||
dialog.eachframesepRadio.setAttribute("disabled","true");
|
||||
dialog.printframeGroupLabel.setAttribute("disabled","true");
|
||||
}
|
||||
|
||||
dialog.printButton.label = dialog.printName.getAttribute("label");
|
||||
}
|
||||
|
||||
//---------------------------------------------------
|
||||
|
|
|
@ -46,8 +46,10 @@
|
|||
<!DOCTYPE dialog SYSTEM "chrome://global/locale/printdialog.dtd">
|
||||
|
||||
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="printDialog"
|
||||
onload="onLoad();"
|
||||
ondialogaccept="return onAccept();"
|
||||
buttonlabelaccept="&printButton.label;"
|
||||
oncancel="return onCancel();"
|
||||
title="&printDialog.title;"
|
||||
persist="screenX screenY"
|
||||
|
@ -136,8 +138,7 @@
|
|||
</radiogroup>
|
||||
</groupbox>
|
||||
|
||||
<!-- used to store titles and labels -->
|
||||
<data style="display:none;" id="printButton" label="&printButton.label;"/>
|
||||
<!-- used to store the title of the filepicker -->
|
||||
<data style="display:none;" id="fpDialog" label="&fpDialog.title;"/>
|
||||
|
||||
</dialog>
|
||||
|
|
Загрузка…
Ссылка в новой задаче