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

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

Issue 8937025: Encourage user to set email in issue reporter (Closed)
Patch Set: Created Nov. 22, 2012, 1:54 p.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 | « no previous file | chrome/content/ui/sendReport.xul » ('j') | chrome/locale/en-US/sendReport.dtd » ('J')
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
@@ -1323,13 +1323,19 @@
function initScreenshotPage()
{
+ document.documentElement.canAdvance = true;
Wladimir Palant 2012/11/22 14:16:29 I am mostly sure that canAdvance = true is set aut
Andrey Novikov 2012/11/22 14:44:15 It stays disabled in my case when I press Back on
+
E("progressBar").activeItem = E("screenshotHeader");
}
function initCommentPage()
{
+ document.documentElement.canAdvance = false;
+
E("progressBar").activeItem = E("commentPageHeader");
+ updateEmail();
Wladimir Palant 2012/11/22 14:16:29 This will already set the canAdvance property, I d
Andrey Novikov 2012/11/22 14:44:15 Done.
+
screenshotDataSource.exportData();
updateDataField();
}
@@ -1379,8 +1385,27 @@
function updateEmail()
{
removeReportElement("email");
- appendElement(reportData.documentElement, "email", null, E("email").value.replace(/\@/g, " at ").replace(/\./g, " dot "));
+
+ let value = E("email").value;
+ E("email").setAttribute("value", value); // https://bugzilla.mozilla.org/show_bug.cgi?id=111486
Wladimir Palant 2012/11/22 14:16:29 Please add a proper comment - the bug link is addi
Andrey Novikov 2012/11/22 14:44:15 Done.
+ appendElement(reportData.documentElement, "email", null, value);
updateDataField();
+
+ document.documentElement.canAdvance = /\S/.test(value);
+}
+
+function updateAnonymity(anonymous)
+{
+ if (anonymous)
+ {
+ E("email").value = "";
+ updateEmail();
+ }
+ E("email").disabled = anonymous;
+ E("emailLabel").disabled = anonymous;
Wladimir Palant 2012/11/22 14:16:29 I don't think we ever disable labels.
Andrey Novikov 2012/11/22 14:44:15 It looks much more user friendly in UI, have a try
+ E("anonymityWarning").setAttribute("visible", anonymous);
+
+ document.documentElement.canAdvance = anonymous;
}
Wladimir Palant 2012/11/22 14:16:29 The interaction of these two functions is pretty c
Andrey Novikov 2012/11/22 14:44:15 It sends empty value in that case. Redesigned it.
function updateExtensions(attach)
« no previous file with comments | « no previous file | chrome/content/ui/sendReport.xul » ('j') | chrome/locale/en-US/sendReport.dtd » ('J')

Powered by Google App Engine
This is Rietveld