зеркало из https://github.com/mozilla/pjs.git
b=335382
- add improved automated lookup for build ID - require 10-digit build ID - add global framework for help text
This commit is contained in:
Родитель
19a37839ee
Коммит
ef6c8c235b
|
@ -848,6 +848,64 @@ div.login_form {
|
|||
color: #000000;
|
||||
}
|
||||
|
||||
/* 15 Help Display ******************************************* */
|
||||
|
||||
#help {
|
||||
position: fixed;
|
||||
display: none;
|
||||
top: -1px;
|
||||
left: 200px;
|
||||
right: 200px;
|
||||
z-index: 4000;
|
||||
opacity: 0.95;
|
||||
}
|
||||
|
||||
#help div.container {
|
||||
position: relative;
|
||||
width: 400px;
|
||||
margin: 0px auto;
|
||||
height: 400px;
|
||||
min-height: 32px;
|
||||
padding: 5px 25px 16px 46px;
|
||||
background: #F7FDCB url(../images/info.png) no-repeat;
|
||||
background-position: 10px 10px;
|
||||
border: 1px solid #C2D071;
|
||||
}
|
||||
|
||||
div.title {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 5px;
|
||||
font-weight: bold;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
div.content {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 350px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
div.content ol {
|
||||
margin-left: 1em;
|
||||
padding-left: 1em;
|
||||
list-style: decimal outside;
|
||||
}
|
||||
|
||||
div.content li {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
div.closeLink {
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
div.closeLink a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Misc ************************************************************** */
|
||||
|
||||
fieldset {
|
||||
|
@ -1050,6 +1108,13 @@ table.section td.subsection {
|
|||
vertical-align: top;
|
||||
}
|
||||
|
||||
img.chrome {
|
||||
padding-right: 2px;
|
||||
vertical-align: middle;
|
||||
border: 0;
|
||||
height: 1em;
|
||||
}
|
||||
|
||||
img.icon {
|
||||
vertical-align: middle;
|
||||
border: 0;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
var iBugNumber = "This field must be a valid, positive integer (>0). Please re-enter it now.";
|
||||
var iNumber = iBugNumber;
|
||||
var iEmail = "This field must be a valid email address (like foo@bar.com). Please re-enter it now.";
|
||||
var iBuildId = "This field must be a valid build id, which is a string of 8 digits most easily found in the About dialog. Please re-enter it now.";
|
||||
var iBuildId = "This field must be a valid build ID, which is a string of 10 digits. Please follow the 'How do I determine the build ID?' link for more information.";
|
||||
var iPasswordMismatch = "The passwords you entered did not match.";
|
||||
var iPasswordLength = "Your password must be longer than 4 characters.";
|
||||
var defaultEmptyOK = false;
|
||||
|
@ -201,7 +201,7 @@ function checkBuildId (theField, emptyOK)
|
|||
if ((emptyOK == true) && (isEmpty(theField.value))) {
|
||||
return true;
|
||||
} else {
|
||||
if (!/\d{8,}/.test(theField.value)) {
|
||||
if (!/^\d{10,10}$/.test(theField.value)) {
|
||||
return warnInvalid (theField, iBuildId);
|
||||
} else {
|
||||
return true;
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
<script type="text/javascript" src="js/FormPersist.js"></script>
|
||||
|
||||
<div id="message"></div>
|
||||
<div id="help"></div>
|
||||
|
||||
<div id="container">
|
||||
|
||||
|
|
|
@ -44,16 +44,40 @@
|
|||
[% PROCESS global/selects.none.tmpl %]
|
||||
|
||||
[% includeselects=1 %]
|
||||
[% INCLUDE global/html_header.tmpl js_files=['js/SelectBoxes.js','js/FormValidation.js'] %]
|
||||
[% INCLUDE global/html_header.tmpl js_files=['js/SelectBoxes.js','js/FormValidation.js','js/Help.js'] %]
|
||||
[% INCLUDE global/litmus_header.tmpl %]
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function checkFormContents(f) {
|
||||
return (
|
||||
checkBuildId(f.buildid)
|
||||
);
|
||||
}
|
||||
|
||||
var appBuildID = "0000000000";
|
||||
try {
|
||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
|
||||
var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
|
||||
.getService(Components.interfaces.nsIXULAppInfo);
|
||||
if(appInfo.appBuildID) {
|
||||
appBuildID = appInfo.appBuildID;
|
||||
}
|
||||
} catch (e) {
|
||||
// Cascade to the next lookup method.
|
||||
}
|
||||
|
||||
if (appBuildID == '0000000000') {
|
||||
var ua = navigator.userAgent;
|
||||
var cap = ua.match(/rv:([\d.ab+]+).*Gecko\/(\d{8,8}) ([\S]+)\/([\d.]+)/);
|
||||
|
||||
if (cap && cap.length == 5) {
|
||||
appBuildID = cap[2] + '00';
|
||||
}
|
||||
}
|
||||
|
||||
var buildIDHelpTitle = 'How do I determine the build ID?';
|
||||
var buildIDHelpText = '<p>The build ID is a 10-digit number that identifies a Mozilla product build down to the date and hour of the build. By supplying the full, correct build ID, you will be making the job of the Mozilla QA team <em>much</em> easier. There are several different ways to determine the build ID of the build you are testing.</p><ol><li><b>Manually</b>: Provided you have installed Talkback, this is the fail-safe method, and allows you to submit the build ID for products other than the one currently being used to submit the results. The Mozilla Quality Assurance wiki has instructions on <a target="external_link_from_litmus" href="http://wiki.mozilla.org/MozillaQualityAssurance:Build_Ids">how to manually verify the build ID</a>.</li><li><b>Nightly Tester Tools</b>: Available for both Firefox and Thunderbird, the Nightly Tester Tools extension adds a number of useful features for testing Mozilla products. This includes a handy display of the build ID of the running build in the title bar. You can download this extension from <a target="external_link_from_litmus" href="https://addons.mozilla.org/search.php?q=Nightly+Tester+Tools">addons.mozilla.org</a>.</li><li><b>Automatic detection</b>: Litmus has JavaScript code built-in to automatically detect the build ID of the current build, but it relies on <a target="external_link_from_litmus" href="http://www.mozilla.org/projects/security/components/signed-scripts.html#codebase">JavaScript codebase principals</a> to do so. To enable codebase principals, testers must add this line to the prefs.js file in their Mozilla user profile dir, or simply edit the pref directly in <a target="external_link_from_litmus" href="http://kb.mozillazine.org/About:config">about:config</a>:<br/><br/><b><code>user_pref("signed.applets.codebase_principal_support", true);</code></b><br/><br/><b>NOTE</b>: this will only be useful if you are submitting results for the currently running version of Firefox. If you are concerned about the security issues of enabling codebase support, you can <a target="external_link_from_litmus" href="http://www.mozilla.org/projects/security/components/signed-scripts.html#codebase">read more about codebase principals here</a>.</li></ol>';
|
||||
|
||||
</script>
|
||||
|
||||
<div id="page">
|
||||
|
@ -104,11 +128,14 @@ System Information
|
|||
[% # display the product selection list then %]
|
||||
[% INCLUDE productbox products=products %]
|
||||
[% END %]
|
||||
</td></tr>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div align="right">Platform: </div></td>
|
||||
<td>[% INCLUDE platformbox platforms=platforms defaultplatform=ua.platform(product) %]
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div align="right">Operating System: </div></td>
|
||||
|
@ -116,18 +143,27 @@ System Information
|
|||
[% INCLUDE opsysbox opsyses=opsyses defaultopsys=defaultopsys %]
|
||||
<br>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div align="right">Branch: </div></td>
|
||||
<td>[% INCLUDE branchbox branches=branches defaultbranch=ua.branch(product) %]</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div align="right">Locale: </div></td>
|
||||
<td>[% INCLUDE form_widgets/select_locale.tmpl name="locale" defaults.locale=ua.locale %]</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div align="right">Build ID:</div></td>
|
||||
<td><input type="text" id="buildid" name="buildid" size="25" value="[% ua.buildid FILTER html %]"></td>
|
||||
<td><input type="text" id="buildid" name="buildid" size="25" value="">
|
||||
<script type="text/javascript">
|
||||
var em = document.getElementById("buildid");
|
||||
em.value = appBuildID;
|
||||
</script>
|
||||
</td>
|
||||
<td>⇐ <a name="showBuildIDHelpText" onclick="toggleHelp(buildIDHelpTitle,buildIDHelpText);">How do I determine the build ID?</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
|
Загрузка…
Ссылка в новой задаче