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
parent f2c7c9c6b9
commit b237f353c8
3 changed files with 10 additions and 1 deletions

View File

@ -19,6 +19,7 @@
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Ehsan Akhgari <ehsan.akhgari@gmail.com>
#
# 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
@ -45,6 +46,7 @@ function init(aEvent)
var button = document.documentElement.getButton("extra2");
button.setAttribute("label", document.documentElement.getAttribute("creditslabel"));
button.setAttribute("accesskey", document.documentElement.getAttribute("creditsaccesskey"));
button.addEventListener("command", switchPage, false);
document.documentElement.getButton("accept").focus();
@ -73,11 +75,13 @@ function switchPage(aEvent)
if (gSelectedPage == 0) {
iframe.setAttribute("src", "chrome://browser/content/credits.xhtml");
button.setAttribute("label", document.documentElement.getAttribute("aboutlabel"));
button.setAttribute("accesskey", document.documentElement.getAttribute("aboutaccesskey"));
gSelectedPage = 1;
}
else {
iframe.setAttribute("src", "");
button.setAttribute("label", document.documentElement.getAttribute("creditslabel"));
button.setAttribute("accesskey", document.documentElement.getAttribute("creditsaccesskey"));
gSelectedPage = 0;
}
var modes = document.getElementById("modes");

View File

@ -21,6 +21,7 @@
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Ehsan Akhgari <ehsan.akhgari@gmail.com>
#
# 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
@ -63,7 +64,9 @@
buttons="accept,extra2"
#endif
creditslabel="&copyright;"
aboutlabel="&aboutLink;">
creditsaccesskey="&copyright.accesskey;"
aboutlabel="&aboutLink;"
aboutaccesskey="&aboutLink.accesskey;">
<script type="application/x-javascript" src="chrome://browser/content/aboutDialog.js"/>

View File

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