Bug 387015 - The 'Credits' button on Help -> About Dialog does not have an access key, patch by Ehsan Akhgari <ehsan.akhgari@gmail.com>, r=mano

This commit is contained in:
philringnalda@gmail.com 2007-07-08 18:30:54 -07:00
Родитель f2c7c9c6b9
Коммит b237f353c8
3 изменённых файлов: 10 добавлений и 1 удалений

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

@ -19,6 +19,7 @@
# the Initial Developer. All Rights Reserved. # the Initial Developer. All Rights Reserved.
# #
# Contributor(s): # Contributor(s):
# Ehsan Akhgari <ehsan.akhgari@gmail.com>
# #
# Alternatively, the contents of this file may be used under the terms of # Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or # either the GNU General Public License Version 2 or later (the "GPL"), or
@ -45,6 +46,7 @@ function init(aEvent)
var button = document.documentElement.getButton("extra2"); var button = document.documentElement.getButton("extra2");
button.setAttribute("label", document.documentElement.getAttribute("creditslabel")); button.setAttribute("label", document.documentElement.getAttribute("creditslabel"));
button.setAttribute("accesskey", document.documentElement.getAttribute("creditsaccesskey"));
button.addEventListener("command", switchPage, false); button.addEventListener("command", switchPage, false);
document.documentElement.getButton("accept").focus(); document.documentElement.getButton("accept").focus();
@ -73,11 +75,13 @@ function switchPage(aEvent)
if (gSelectedPage == 0) { if (gSelectedPage == 0) {
iframe.setAttribute("src", "chrome://browser/content/credits.xhtml"); iframe.setAttribute("src", "chrome://browser/content/credits.xhtml");
button.setAttribute("label", document.documentElement.getAttribute("aboutlabel")); button.setAttribute("label", document.documentElement.getAttribute("aboutlabel"));
button.setAttribute("accesskey", document.documentElement.getAttribute("aboutaccesskey"));
gSelectedPage = 1; gSelectedPage = 1;
} }
else { else {
iframe.setAttribute("src", ""); iframe.setAttribute("src", "");
button.setAttribute("label", document.documentElement.getAttribute("creditslabel")); button.setAttribute("label", document.documentElement.getAttribute("creditslabel"));
button.setAttribute("accesskey", document.documentElement.getAttribute("creditsaccesskey"));
gSelectedPage = 0; gSelectedPage = 0;
} }
var modes = document.getElementById("modes"); var modes = document.getElementById("modes");

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

@ -21,6 +21,7 @@
# the Initial Developer. All Rights Reserved. # the Initial Developer. All Rights Reserved.
# #
# Contributor(s): # Contributor(s):
# Ehsan Akhgari <ehsan.akhgari@gmail.com>
# #
# Alternatively, the contents of this file may be used under the terms of # Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or # either the GNU General Public License Version 2 or later (the "GPL"), or
@ -63,7 +64,9 @@
buttons="accept,extra2" buttons="accept,extra2"
#endif #endif
creditslabel="&copyright;" creditslabel="&copyright;"
aboutlabel="&aboutLink;"> creditsaccesskey="&copyright.accesskey;"
aboutlabel="&aboutLink;"
aboutaccesskey="&aboutLink.accesskey;">
<script type="application/x-javascript" src="chrome://browser/content/aboutDialog.js"/> <script type="application/x-javascript" src="chrome://browser/content/aboutDialog.js"/>

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

@ -1,6 +1,8 @@
<!ENTITY aboutDialog.title "About &brandFullName;"> <!ENTITY aboutDialog.title "About &brandFullName;">
<!ENTITY copyright "Credits"> <!ENTITY copyright "Credits">
<!ENTITY copyright.accesskey "C">
<!ENTITY aboutLink "&lt; About &brandFullName;"> <!ENTITY aboutLink "&lt; About &brandFullName;">
<!ENTITY aboutLink.accesskey "A">
<!ENTITY aboutVersion "version"> <!ENTITY aboutVersion "version">
<!ENTITY copyrightText "&#169;1998-2007 Contributors. All Rights Reserved. Firefox and the <!ENTITY copyrightText "&#169;1998-2007 Contributors. All Rights Reserved. Firefox and the
Firefox logos are trademarks of the Mozilla Foundation. All rights Firefox logos are trademarks of the Mozilla Foundation. All rights