Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/ui/sendReport.js

Issue 11015083: Merge labels and access keys into one string in locales (Closed)
Patch Set: Created July 3, 2013, 9:11 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/content/ui/overlay.xul ('k') | chrome/content/ui/sendReport.xul » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/ui/sendReport.js
===================================================================
--- a/chrome/content/ui/sendReport.js
+++ b/chrome/content/ui/sendReport.js
@@ -813,18 +813,17 @@ let subscriptionUpdateDataSource =
if (filtersRemoved)
{
// Force the user to reload the page
E("updateFixedIssue").hidden = false;
document.documentElement.canAdvance = true;
let nextButton = document.documentElement.getButton("next");
- nextButton.label = E("updatePage").getAttribute("reloadButtonLabel");
- nextButton.accessKey = E("updatePage").getAttribute("reloadButtonAccesskey");
+ [nextButton.label, nextButton.accessKey] = Utils.splitLabel(E("updatePage").getAttribute("reloadButtonLabel"));
document.documentElement.addEventListener("wizardnext", function(event)
{
event.preventDefault();
event.stopPropagation();
window.close();
this.contentWnd.location.reload();
}.bind(this), true);
}
@@ -1065,18 +1064,17 @@ let issuesDataSource =
// to be reloaded
E("issuesOverride").hidden = true;
E("issuesChangeMessage").hidden = false;
document.documentElement.canRewind = false;
document.documentElement.canAdvance = true;
let contentWnd = this.contentWnd;
let nextButton = document.documentElement.getButton("next");
- nextButton.label = E("issuesPage").getAttribute("reloadButtonLabel");
- nextButton.accessKey = E("issuesPage").getAttribute("reloadButtonAccesskey");
+ [nextButton.label, nextButton.accessKey] = Utils.splitLabel(E("updatePage").getAttribute("reloadButtonLabel"));
document.documentElement.addEventListener("wizardnext", function(event)
{
event.preventDefault();
event.stopPropagation();
window.close();
contentWnd.location.reload();
}, true);
},
@@ -1200,30 +1198,29 @@ function updateNextButton()
let nextButton = document.documentElement.getButton("next");
if (!nextButton)
return;
if (document.documentElement.currentPage.id == "commentPage")
{
if (!nextButton.hasAttribute("_origLabel"))
{
- nextButton.setAttribute("_origLabel", nextButton.getAttribute("label"));
- nextButton.setAttribute("label", document.documentElement.getAttribute("sendbuttonlabel"));
- nextButton.setAttribute("_origAccessKey", nextButton.getAttribute("accesskey"));
- nextButton.setAttribute("accesskey", document.documentElement.getAttribute("sendbuttonaccesskey"));
+ nextButton._origLabel = nextButton.label;
+ nextButton._origAccessKey = nextButton.accessKey;
+ [nextButton.label, nextButton.accessKey] = Utils.splitLabel(document.documentElement.getAttribute("sendbuttonlabel"));
}
}
else
{
if (nextButton.hasAttribute("_origLabel"))
{
- nextButton.setAttribute("label", nextButton.getAttribute("_origLabel"));
- nextButton.removeAttribute("_origLabel");
- nextButton.setAttribute("accesskey", nextButton.getAttribute("_origAccessKey"));
- nextButton.removeAttribute("_origAccessKey");
+ nextButton.label = nextButton._origLabel;
+ nextButton.accessKey = nextButton._origAccessKey;
+ delete nextButton._origLabel;
Felix Dahlke 2013/07/03 15:20:47 Seems like an unrelated change, what's wrong with
Wladimir Palant 2013/07/09 12:10:59 Yes, this is somewhat unrelated. However, using an
+ delete nextButton._origAccessKey;
}
}
}
function initDataCollectorPage()
{
document.documentElement.canAdvance = false;
« no previous file with comments | « chrome/content/ui/overlay.xul ('k') | chrome/content/ui/sendReport.xul » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld