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

Delta Between Two Patch Sets: chrome/content/ui/sendReport.js

Issue 8937025: Encourage user to set email in issue reporter (Closed)
Left Patch Set: Encourage user to set email in issue reporter Created Nov. 22, 2012, 2:43 p.m.
Right Patch Set: Encourage user to set email in issue reporter Created Nov. 23, 2012, 6:31 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | chrome/content/ui/sendReport.xul » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of the Adblock Plus, 2 * This file is part of the Adblock Plus,
3 * Copyright (C) 2006-2012 Eyeo GmbH 3 * Copyright (C) 2006-2012 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 E("commentLengthWarning").setAttribute("visible", value.length > 1000); 1379 E("commentLengthWarning").setAttribute("visible", value.length > 1000);
1380 updateDataField(); 1380 updateDataField();
1381 } 1381 }
1382 1382
1383 function updateEmail() 1383 function updateEmail()
1384 { 1384 {
1385 removeReportElement("email"); 1385 removeReportElement("email");
1386 1386
1387 let anonymous = E("anonymousCheckbox").checked; 1387 let anonymous = E("anonymousCheckbox").checked;
1388 1388
1389 if (anonymous)
1390 E("email").value = "";
Wladimir Palant 2012/11/22 15:08:21 Please don't do that, disabling it is sufficient -
Andrey Novikov 2012/11/23 06:32:16 It will be not obvious that nothing will be sent i
1391
1392 let value = E("email").value; 1389 let value = E("email").value;
1393 E("email").setAttribute("value", value); // required for persist to work on te xtbox, see: https://bugzilla.mozilla.org/show_bug.cgi?id=111486 1390
Wladimir Palant 2012/11/22 15:08:21 Please put that comment on the line(s) before - we
Andrey Novikov 2012/11/23 06:32:16 Done.
1391 // required for persist to work on textbox, see: https://bugzilla.mozilla.org/ show_bug.cgi?id=111486
1392 E("email").setAttribute("value", value);
1394 1393
1395 E("email").disabled = anonymous; 1394 E("email").disabled = anonymous;
1396 E("emailLabel").disabled = anonymous; 1395 E("emailLabel").disabled = anonymous;
1397 E("anonymityWarning").setAttribute("visible", anonymous); 1396 E("anonymityWarning").setAttribute("visible", anonymous);
1398 1397
1399 if (!anonymous) 1398 if (!anonymous)
1400 appendElement(reportData.documentElement, "email", null, value); 1399 appendElement(reportData.documentElement, "email", null, value);
1401 1400
1402 updateDataField(); 1401 updateDataField();
1403 1402
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 1559
1561 function censorURL(url) 1560 function censorURL(url)
1562 { 1561 {
1563 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*"); 1562 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*");
1564 } 1563 }
1565 1564
1566 function encodeHTML(str) 1565 function encodeHTML(str)
1567 { 1566 {
1568 return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"). replace(/"/g, "&quot;"); 1567 return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"). replace(/"/g, "&quot;");
1569 } 1568 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld