summaryrefslogtreecommitdiffstats
path: root/extensions/BMO
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-10-14 18:19:50 +0200
committerDylan William Hardison <dylan@hardison.net>2018-10-14 18:19:50 +0200
commitce00a61057535d49aa0e83181a1d317d7842571b (patch)
tree280243de9ff791449fb2c82f3f0f2b9bd931d5b2 /extensions/BMO
parent6367a26da4093a8379e370ef328e9507c98b2e7e (diff)
parent6657fa9f5210d5b5a9b14c0cba6882bd56232054 (diff)
downloadbugzilla-ce00a61057535d49aa0e83181a1d317d7842571b.tar.gz
bugzilla-ce00a61057535d49aa0e83181a1d317d7842571b.tar.xz
Merge remote-tracking branch 'bmo/master'
Diffstat (limited to 'extensions/BMO')
-rw-r--r--extensions/BMO/lib/Data.pm17
-rw-r--r--extensions/BMO/lib/Reports/ReleaseTracking.pm10
-rw-r--r--extensions/BMO/template/en/default/bug/create/comment-finance.txt.tmpl4
-rw-r--r--extensions/BMO/template/en/default/bug/create/comment-mozlist.txt.tmpl2
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl4
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-finance.html.tmpl4
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-mozlist.html.tmpl4
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-recoverykey.html.tmpl40
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-trademark.html.tmpl62
-rw-r--r--extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl6
-rw-r--r--extensions/BMO/template/en/default/email/bugmail.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/global/choose-product.html.tmpl24
-rw-r--r--extensions/BMO/template/en/default/hook/bug/field-help-end.none.tmpl20
-rw-r--r--extensions/BMO/template/en/default/hook/bug/show-header-end.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl202
-rw-r--r--extensions/BMO/template/en/default/hook/global/header-additional_header.html.tmpl1
-rw-r--r--extensions/BMO/template/en/default/hook/index-intro.html.tmpl10
-rw-r--r--extensions/BMO/template/en/default/pages/persona_deprecated.html.tmpl53
-rw-r--r--extensions/BMO/template/en/default/pages/release_tracking_report.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/pages/upgrade-3.6.html.tmpl16
-rw-r--r--extensions/BMO/template/en/default/pages/user_activity.html.tmpl2
-rw-r--r--extensions/BMO/web/js/new-bug-frequent-comp.js123
-rw-r--r--extensions/BMO/web/js/release_tracking_report.js2
-rw-r--r--extensions/BMO/web/js/sorttable.js52
-rw-r--r--extensions/BMO/web/js/swag.js18
-rw-r--r--extensions/BMO/web/styles/choose_product.css21
26 files changed, 494 insertions, 209 deletions
diff --git a/extensions/BMO/lib/Data.pm b/extensions/BMO/lib/Data.pm
index 30a32c95e..349f88093 100644
--- a/extensions/BMO/lib/Data.pm
+++ b/extensions/BMO/lib/Data.pm
@@ -58,7 +58,7 @@ our %autodetect_attach_urls = (
title => 'MozReview',
regex => $mozreview_url_re,
content_type => 'text/x-review-board-request',
- can_review => 1,
+ can_review => 0,
},
Phabricator => {
title => 'Phabricator',
@@ -114,6 +114,7 @@ tie(%$cf_visible_in_products, "Tie::IxHash",
"External Software Affecting Firefox" => [],
"Firefox" => [],
"Firefox for Android" => [],
+ "GeckoView" => [],
"JSS" => [],
"MailNews Core" => [],
"Mozilla Labs" => [],
@@ -140,6 +141,7 @@ tie(%$cf_visible_in_products, "Tie::IxHash",
"Data & BI Services Team" => [],
"Data Compliance" => [],
"Developer Engagement" => [],
+ "Firefox" => ["Security: Review Requests"],
"Infrastructure & Operations" => [],
"Marketing" => [],
"mozilla.org" => ["Security Assurance: Review Request"],
@@ -162,24 +164,27 @@ tie(%$cf_visible_in_products, "Tie::IxHash",
"Firefox for Android" => [],
"Firefox for iOS" => [],
"Firefox" => [],
+ "GeckoView" => [],
"Hello (Loop)" => [],
"Cloud Services" => [],
"Tech Evangelism" => [],
"Toolkit" => [],
},
qr/^cf_has_regression_range$/ => {
- "Core" => [],
+ "Core" => [],
"Firefox for Android" => [],
"Firefox for iOS" => [],
- "Firefox" => [],
- "Toolkit" => [],
+ "Firefox" => [],
+ "GeckoView" => [],
+ "Toolkit" => [],
},
qr/^cf_has_str$/ => {
"Core" => [],
"Firefox for Android" => [],
"Firefox for iOS" => [],
- "Firefox" => [],
- "Toolkit" => [],
+ "Firefox" => [],
+ "GeckoView" => [],
+ "Toolkit" => [],
},
qr/^cf_cab_review$/ => {
"Infrastructure & Operations Graveyard" => [],
diff --git a/extensions/BMO/lib/Reports/ReleaseTracking.pm b/extensions/BMO/lib/Reports/ReleaseTracking.pm
index 42ef24b47..9fba1e14b 100644
--- a/extensions/BMO/lib/Reports/ReleaseTracking.pm
+++ b/extensions/BMO/lib/Reports/ReleaseTracking.pm
@@ -421,16 +421,6 @@ sub report {
$query .= join("\nAND ", @where);
- if ($input->{debug}) {
- print "Content-Type: text/plain\n\n";
- $query =~ s/\?/\000/g;
- foreach my $param (@params) {
- $query =~ s/\000/'$param'/;
- }
- print "$query\n";
- exit;
- }
-
my $bugs = $dbh->selectcol_arrayref($query, undef, @params);
push @$bugs, 0 unless @$bugs;
diff --git a/extensions/BMO/template/en/default/bug/create/comment-finance.txt.tmpl b/extensions/BMO/template/en/default/bug/create/comment-finance.txt.tmpl
index f0427b4c5..c55ea1d96 100644
--- a/extensions/BMO/template/en/default/bug/create/comment-finance.txt.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/comment-finance.txt.tmpl
@@ -14,10 +14,10 @@ Summary: [% cgi.param('short_desc') %]
Priority to your Team: [% cgi.param('team_priority') %]
Timeframe for Signature: [% cgi.param('signature_time') %]
-Name of Other Party:
+Name of Other Party:
[%+ cgi.param('other_party') %]
-Business Objective:
+Business Objective:
[%+ cgi.param('business_obj') %]
What is this purchase?:
diff --git a/extensions/BMO/template/en/default/bug/create/comment-mozlist.txt.tmpl b/extensions/BMO/template/en/default/bug/create/comment-mozlist.txt.tmpl
index c62461d42..7c14ec95f 100644
--- a/extensions/BMO/template/en/default/bug/create/comment-mozlist.txt.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/comment-mozlist.txt.tmpl
@@ -24,7 +24,7 @@
# enter_bug.cgi) can be access via Bugzilla.cgi.param. It can be used to
# pull out various custom fields and format an initial Description entry
# from them.
- #%]
+ #%]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
List Name: [% cgi.param("listName") %]
diff --git a/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl
index becbb2b56..9ff4ef2e3 100644
--- a/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-doc.html.tmpl
@@ -106,10 +106,10 @@ function validateAndSubmit() {
<td colspan="3">
<div id="possible_duplicates"></div>
<script>
- var dt_columns = [
+ var dt_columns = [
{ key: "id", label: "[% field_descs.bug_id FILTER js %]",
formatter: YAHOO.bugzilla.dupTable.formatBugLink },
- { key: "summary",
+ { key: "summary",
label: "[% field_descs.short_desc FILTER js %]",
formatter: "text" },
{ key: "status",
diff --git a/extensions/BMO/template/en/default/bug/create/create-finance.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-finance.html.tmpl
index 8b2fd63da..434c82fa3 100644
--- a/extensions/BMO/template/en/default/bug/create/create-finance.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-finance.html.tmpl
@@ -181,7 +181,7 @@
</th>
<td>
<i>
- Describe your request, what items are we purchasing, including number of
+ Describe your request, what items are we purchasing, including number of
units if available.<br>Also provide context and background. Enter No if not
a purchase order.</i><br>
<textarea name="what_purchase" id="what_purchase" rows="5" cols="40"></textarea>
@@ -235,7 +235,7 @@
<label for="attachment">Attachment:</label>
</th>
<td>
- <i>Upload document that needs to be signed. If this is a Purchase Request form,<br>
+ <i>Upload document that needs to be signed. If this is a Purchase Request form,<br>
also upload any supporting document such as draft SOW, quote, order form, etc.</i>
<div>
<input type="file" id="attachment" name="data" size="50">
diff --git a/extensions/BMO/template/en/default/bug/create/create-mozlist.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-mozlist.html.tmpl
index 841477099..8c54bc803 100644
--- a/extensions/BMO/template/en/default/bug/create/create-mozlist.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-mozlist.html.tmpl
@@ -55,7 +55,7 @@
<div id="message">
<b>Note:</b>
- You must use <a href="https://mozilla.service-now.com/"><b>Service Now</b></a>
+ You must use <a href="https://mozilla.service-now.com/"><b>Service Now</b></a>
to request a distribution list or a standard mailing list.
</div>
<br>
@@ -79,7 +79,7 @@
<span class="mandatory" title="Required">*</span> List Name:
</th>
<td>
- The desired name for the newsgroup. Should start with 'mozilla.' and fit somewhere
+ The desired name for the newsgroup. Should start with 'mozilla.' and fit somewhere
in the hierarchy described <a href="https://www.mozilla.org/about/forums/">here</a>.<br>
<input name="listName" id="listName" size="60" value="[% listName FILTER html %]">
</td>
diff --git a/extensions/BMO/template/en/default/bug/create/create-recoverykey.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-recoverykey.html.tmpl
index ffe9b3482..3ede350a2 100644
--- a/extensions/BMO/template/en/default/bug/create/create-recoverykey.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-recoverykey.html.tmpl
@@ -1,33 +1,33 @@
-[%# The contents of this file are subject to the Mozilla Public
- # License Version 1.1 (the "License"); you may not use this file
- # except in compliance with the License. You may obtain a copy of
- # the License at http://www.mozilla.org/MPL/
- #
- # Software distributed under the License is distributed on an "AS
- # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- # implied. See the License for the specific language governing
- # rights and limitations under the License.
- #
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
# The Original Code is the BMO Bugzilla Extension.
#
# The Initial Developer of the Original Code is the Mozilla Foundation
# Portions created by the Initial Developers are Copyright (C) 2011 the
# Initial Developer. All Rights Reserved.
#
- # Contributor(s):
+ # Contributor(s):
# David Lawrence <dkl@mozilla.com>
- #%]
-
-[% PROCESS global/variables.none.tmpl %]
-
-[% PROCESS global/header.html.tmpl
- title = "Mozilla Corporation/Foundation Encryption Recovery Key"
+ #%]
+
+[% PROCESS global/variables.none.tmpl %]
+
+[% PROCESS global/header.html.tmpl
+ title = "Mozilla Corporation/Foundation Encryption Recovery Key"
%]
-
+
<p>Please complete the following information as you are encrypting your laptop.</p>
<ul>
- <li>The Recovery Key will be displayed during the encryption process
+ <li>The Recovery Key will be displayed during the encryption process
(<a href="https://mana.mozilla.org/wiki/display/INFRASEC/Desktop+Security#DesktopSecurity-DiskencryptionFileVault">more info</a>)
</li>
<li>The asset tag number is located on a sticker typically on the bottom of the device.</li>
@@ -67,4 +67,4 @@
</table>
</form>
-[% PROCESS global/footer.html.tmpl %]
+[% PROCESS global/footer.html.tmpl %]
diff --git a/extensions/BMO/template/en/default/bug/create/create-trademark.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-trademark.html.tmpl
index 90da895b2..0a7629a88 100644
--- a/extensions/BMO/template/en/default/bug/create/create-trademark.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-trademark.html.tmpl
@@ -1,36 +1,36 @@
-[%# 1.0@bugzilla.org %]
-[%# The contents of this file are subject to the Mozilla Public
- # License Version 1.1 (the "License"); you may not use this file
- # except in compliance with the License. You may obtain a copy of
- # the License at http://www.mozilla.org/MPL/
- #
- # Software distributed under the License is distributed on an "AS
- # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- # implied. See the License for the specific language governing
- # rights and limitations under the License.
- #
- # The Original Code is the Bugzilla Bug Tracking System.
- #
- # The Initial Developer of the Original Code is Netscape Communications
- # Corporation. Portions created by Netscape are
- # Copyright (C) 1998 Netscape Communications Corporation. All
- # Rights Reserved.
- #
- # Contributor(s): Gervase Markham <gerv@gerv.net>
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Gervase Markham <gerv@gerv.net>
# Ville Skyttä <ville.skytta@iki.fi>
# John Hoogstrate <hoogstrate@zeelandnet.nl>
- #%]
-
-[% PROCESS global/variables.none.tmpl %]
-
-[% PROCESS global/header.html.tmpl
- title = "Trademark Usage Requests"
+ #%]
+
+[% PROCESS global/variables.none.tmpl %]
+
+[% PROCESS global/header.html.tmpl
+ title = "Trademark Usage Requests"
%]
-
-[% USE Bugzilla %]
+
+[% USE Bugzilla %]
<p>
- If, after reading
+ If, after reading
<a href="https://www.mozilla.org/foundation/trademarks/">the trademark policy
documents</a>, you know you need permission to use a certain trademark, this
is the place to be.
@@ -39,7 +39,7 @@
<p><strong>Please use this form for trademark requests only!</strong></p>
<form method="post" action="post_bug.cgi" id="tmRequestForm">
-
+
<input type="hidden" name="product" value="Marketing">
<input type="hidden" name="component" value="Trademark Permissions">
<input type="hidden" name="bug_severity" value="enhancement">
@@ -79,9 +79,9 @@
<input type="submit" id="commit" value="Submit Request">
</form>
-<p>Thanks for contacting us.
+<p>Thanks for contacting us.
You will be notified by email of any progress made in resolving your
request.
</p>
-[% PROCESS global/footer.html.tmpl %]
+[% PROCESS global/footer.html.tmpl %]
diff --git a/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl b/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl
index 7b588f765..0d37a1386 100644
--- a/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl
@@ -168,12 +168,6 @@ custom_forms = {
title => "Intern Requests",
},
]
- "Mozilla Labs" => [
- {
- link => "https://github.com/mozilla/personas-plus/issues",
- title => "Report issue with Personas Plus on Github"
- }
- ],
"Legal" => [
{
title => 'Mozilla Foundation Vendor Request',
diff --git a/extensions/BMO/template/en/default/email/bugmail.html.tmpl b/extensions/BMO/template/en/default/email/bugmail.html.tmpl
index 0b08e4a86..7f2754fdc 100644
--- a/extensions/BMO/template/en/default/email/bugmail.html.tmpl
+++ b/extensions/BMO/template/en/default/email/bugmail.html.tmpl
@@ -111,7 +111,7 @@
[% END %]
[% END %]
</ul>
- Configure your email settings at
+ Configure your email settings at
<a href="[% urlbase FILTER none %]userprefs.cgi?tab=email">[% urlbase FILTER none %]userprefs.cgi?tab=email</a>.
</div>
diff --git a/extensions/BMO/template/en/default/global/choose-product.html.tmpl b/extensions/BMO/template/en/default/global/choose-product.html.tmpl
index dfa9b5af4..74c9f7b0d 100644
--- a/extensions/BMO/template/en/default/global/choose-product.html.tmpl
+++ b/extensions/BMO/template/en/default/global/choose-product.html.tmpl
@@ -36,7 +36,10 @@
"extensions/BMO/web/styles/choose_product.css",
"extensions/ProdCompSearch/web/styles/prod_comp_search.css",
];
- javascript_urls = [ "extensions/ProdCompSearch/web/js/prod_comp_search.js" ];
+ javascript_urls = [
+ "extensions/BMO/web/js/new-bug-frequent-comp.js",
+ "extensions/ProdCompSearch/web/js/prod_comp_search.js",
+ ];
cgi = Bugzilla.cgi;
classification = cgi.param('classification');
@@ -68,6 +71,13 @@
%]
</div>
+[% IF NOT is_describe %]
+<section id="frequent-components" hidden>
+ <h2>Choose from your most-used components</h2>
+ <div class="results"></div>
+</section>
+[% END %]
+
<section id="product-list">
<h2>or choose from the following selections</h2>
@@ -103,10 +113,18 @@
icon="component.png"
%]
[% INCLUDE easyproduct
+ name="GeckoView"
+ icon="firefox_android.png"
+ %]
+ [% INCLUDE easyproduct
name="Mozilla Localizations"
icon="localization.png"
%]
[% INCLUDE easyproduct
+ name="Data Platform and Tools"
+ icon="telemetry.png"
+ %]
+ [% INCLUDE easyproduct
name="Thunderbird"
icon="thunderbird.png"
%]
@@ -114,10 +132,6 @@
name="SeaMonkey"
icon="seamonkey.png"
%]
- [% INCLUDE easyproduct
- name="Data Platform and Tools"
- icon="telemetry.png"
- %]
<section class="product other">
<h3>
<a href="[% target FILTER uri %]?full=1
diff --git a/extensions/BMO/template/en/default/hook/bug/field-help-end.none.tmpl b/extensions/BMO/template/en/default/hook/bug/field-help-end.none.tmpl
index dda75a9c6..c70b35825 100644
--- a/extensions/BMO/template/en/default/hook/bug/field-help-end.none.tmpl
+++ b/extensions/BMO/template/en/default/hook/bug/field-help-end.none.tmpl
@@ -20,13 +20,13 @@
[% USE Bugzilla %]
[% IF Bugzilla.request_cache.bmo_fields_page %]
- [%
+ [%
vars.help_html.priority =
"This field describes the importance and order in which $terms.abug
should be fixed compared to other ${terms.bugs}. This field is utilized
by the programmers/engineers to prioritize their work to be done where
P1 is considered the highest and P5 is the lowest."
-
+
vars.help_html.bug_severity =
"This field describes the impact of ${terms.abug}.
<table>
@@ -60,9 +60,9 @@
<th>enhancement</th>
<td>Request for enhancement</td>
</table>"
-
- vars.help_html.rep_platform =
- "This is the hardware platform against which the $terms.bug was reported.
+
+ vars.help_html.rep_platform =
+ "This is the hardware platform against which the $terms.bug was reported.
Legal platforms include:
<ul>
<li>All (happens on all platforms; cross-platform ${terms.bug})</li>
@@ -71,10 +71,10 @@
</ul>
<b>Note:</b> When searching, selecting the option
<em>All</em> does not
- select $terms.bugs assigned against any platform. It merely selects
- $terms.bugs that are marked as occurring on all platforms, i.e. are
+ select $terms.bugs assigned against any platform. It merely selects
+ $terms.bugs that are marked as occurring on all platforms, i.e. are
designated <em>All</em>.",
-
+
vars.help_html.op_sys =
"This is the operating system against which the $terms.bug was
reported. Legal operating systems include:
@@ -86,10 +86,10 @@
</ul>
Sometimes the operating system implies the platform, but not
always. For example, Linux can run on x86_64, ARM, and others.",
-
+
vars.help_html.assigned_to =
"This is the person in charge of resolving the ${terms.bug}. Every time
- this field changes, the status changes to
+ this field changes, the status changes to
<b>NEW</b> to make it
easy to see which new $terms.bugs have appeared on a person's list.</p>",
%]
diff --git a/extensions/BMO/template/en/default/hook/bug/show-header-end.html.tmpl b/extensions/BMO/template/en/default/hook/bug/show-header-end.html.tmpl
index c49d06b73..9458fd375 100644
--- a/extensions/BMO/template/en/default/hook/bug/show-header-end.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/bug/show-header-end.html.tmpl
@@ -18,7 +18,7 @@
[% title = title _ "($filtered_alias) " %]
[% END %]
[% title = title _ filtered_desc %]
-[% javascript = javascript _
+[% javascript = javascript _
"document.title = document.title.replace(/^" _ terms.Bug _ " /, '');"
%]
[% js_bug_id = bug.bug_id FILTER js %]
diff --git a/extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl b/extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl
new file mode 100644
index 000000000..7703bed74
--- /dev/null
+++ b/extensions/BMO/template/en/default/hook/flag/type_comment-form.html.tmpl
@@ -0,0 +1,202 @@
+[%# This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ #
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
+ # defined by the Mozilla Public License, v. 2.0.
+ #%]
+
+<template class="approval-request" data-flags="approval‑mozilla‑beta approval‑mozilla‑release">
+ <fieldset>
+ <legend>Beta/Release Uplift Approval Request</legend>
+ <table>
+ <tr>
+ <th id="_ar_beta_i1_label">Feature/[% terms.Bug %] causing the regression</th>
+ <td><input type="text" placeholder="[% terms.Bug %] ID" aria-labelledby="_ar_beta_i1_label" data-type="b[% %]ug"></td>
+ </tr>
+ <tr>
+ <th id="_ar_beta_i2_label">User impact if declined</th>
+ <td><textarea aria-labelledby="_ar_beta_i2_label"></textarea></td>
+ </tr>
+ <tr>
+ <th id="_ar_beta_i3_label">Is this code covered by automated tests?</th>
+ <td>
+ <div role="radiogroup" class="buttons toggle" aria-labelledby="_ar_beta_i3_label">
+ <div class="item"><input id="_ar_beta_i3_r1" type="radio" name="_ar_beta_i3_radio" value="Yes"><label for="_ar_beta_i3_r1">Yes</label></div>
+ <div class="item"><input id="_ar_beta_i3_r2" type="radio" name="_ar_beta_i3_radio" value="No"><label for="_ar_beta_i3_r2">No</label></div>
+ <div class="item"><input id="_ar_beta_i3_r3" type="radio" name="_ar_beta_i3_radio" value="Unknown"><label for="_ar_beta_i3_r3">Unknown</label></div>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <th id="_ar_beta_i4_label">Has the fix been verified in Nightly?</th>
+ <td>
+ <div role="radiogroup" class="buttons toggle" aria-labelledby="_ar_beta_i4_label">
+ <div class="item"><input id="_ar_beta_i4_r1" type="radio" name="_ar_beta_i4_radio" value="Yes"><label for="_ar_beta_i4_r1">Yes</label></div>
+ <div class="item"><input id="_ar_beta_i4_r2" type="radio" name="_ar_beta_i4_radio" value="No"><label for="_ar_beta_i4_r2">No</label></div>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <th id="_ar_beta_i5_label">Needs manual test from QE?</th>
+ <td>
+ <div role="radiogroup" class="buttons toggle" aria-labelledby="_ar_beta_i5_label">
+ <div class="item"><input id="_ar_beta_i5_r1" type="radio" name="_ar_beta_i5_radio" value="Yes"><label for="_ar_beta_i5_r1">Yes</label></div>
+ <div class="item"><input id="_ar_beta_i5_r2" type="radio" name="_ar_beta_i5_radio" value="No"><label for="_ar_beta_i5_r2">No</label></div>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <th id="_ar_beta_i6_label">If yes, steps to reproduce</th>
+ <td><textarea aria-labelledby="_ar_beta_i6_label"></textarea></td>
+ </tr>
+ <tr>
+ <th id="_ar_beta_i7_label">List of other uplifts needed</th>
+ <td><input type="text" placeholder="[% terms.Bug %] IDs" aria-labelledby="_ar_beta_i7_label" data-type="b[% %]ugs"></td>
+ </tr>
+ <tr>
+ <th id="_ar_beta_i8_label">Risk to taking this patch</th>
+ <td>
+ <div role="radiogroup" class="buttons toggle" aria-labelledby="_ar_beta_i8_label">
+ <div class="item"><input id="_ar_beta_i8_r1" type="radio" name="_ar_beta_i8_radio" value="Low"><label for="_ar_beta_i8_r1">Low</label></div>
+ <div class="item"><input id="_ar_beta_i8_r2" type="radio" name="_ar_beta_i8_radio" value="Medium"><label for="_ar_beta_i8_r2">Medium</label></div>
+ <div class="item"><input id="_ar_beta_i8_r3" type="radio" name="_ar_beta_i8_radio" value="High"><label for="_ar_beta_i8_r3">High</label></div>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <th id="_ar_beta_i9_label">Why is the change risky/not risky?<br>(and alternatives if risky)</th>
+ <td><textarea aria-labelledby="_ar_beta_i9_label"></textarea></td>
+ </tr>
+ <tr>
+ <th id="_ar_beta_i10_label">String changes made/needed</th>
+ <td><input type="text" class="long" aria-labelledby="_ar_beta_i10_label"></td>
+ </tr>
+ </table>
+ </fieldset>
+</template>
+
+<template class="approval-request" data-flags="approval‑mozilla‑esr*">
+ <fieldset>
+ <legend>ESR Uplift Approval Request</legend>
+ <table>
+ <tr>
+ <th id="_ar_esr_i1_label">If this is not a sec:{high,crit} [% terms.bug %], please state case for ESR consideration</th>
+ <td><textarea aria-labelledby="_ar_esr_i1_label"></textarea></td>
+ </tr>
+ <tr>
+ <th id="_ar_esr_i2_label">User impact if declined</th>
+ <td><textarea aria-labelledby="_ar_esr_i2_label"></textarea></td>
+ </tr>
+ <tr>
+ <th id="_ar_esr_i3_label">Fix Landed on Version</th>
+ <td><input type="text" aria-labelledby="_ar_esr_i3_label"></td>
+ </tr>
+ <tr>
+ <th id="_ar_esr_i4_label">Risk to taking this patch</th>
+ <td>
+ <div role="radiogroup" class="buttons toggle" aria-labelledby="_ar_esr_i4_label">
+ <div class="item"><input id="_ar_esr_i4_r1" type="radio" name="_ar_esr_i4_radio" value="Low"><label for="_ar_esr_i4_r1">Low</label></div>
+ <div class="item"><input id="_ar_esr_i4_r2" type="radio" name="_ar_esr_i4_radio" value="Medium"><label for="_ar_esr_i4_r2">Medium</label></div>
+ <div class="item"><input id="_ar_esr_i4_r3" type="radio" name="_ar_esr_i4_radio" value="High"><label for="_ar_esr_i4_r3">High</label></div>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <th id="_ar_esr_i5_label">Why is the change risky/not risky?<br>(and alternatives if risky)</th>
+ <td><textarea aria-labelledby="_ar_esr_i5_label"></textarea></td>
+ </tr>
+ <tr>
+ <th id="_ar_esr_i6_label">String or UUID changes made by this patch</th>
+ <td><input type="text" class="long" aria-labelledby="_ar_esr_i6_label"></td>
+ </tr>
+ </table>
+ <p>See <a href="https://wiki.mozilla.org/Release_Management/ESR_Landing_Process" target="_blank">ESR Landing Process</a> for more info.</p>
+ </fieldset>
+</template>
+
+<template class="approval-request" data-flags="approval‑mozilla‑geckoview*">
+ <fieldset>
+ <legend>GeckoView Uplift Approval Request</legend>
+ <table>
+ <tr>
+ <th id="_ar_gkv_i1_label">If this is not a sec:{high,crit} [% terms.bug %], please state case for consideration</th>
+ <td><textarea aria-labelledby="_ar_gkv_i1_label"></textarea></td>
+ </tr>
+ <tr>
+ <th id="_ar_gkv_i2_label">User impact if declined</th>
+ <td><textarea aria-labelledby="_ar_gkv_i2_label"></textarea></td>
+ </tr>
+ <tr>
+ <th id="_ar_gkv_i3_label">Fix Landed on Version</th>
+ <td><input type="text" aria-labelledby="_ar_gkv_i3_label"></td>
+ </tr>
+ <tr>
+ <th id="_ar_gkv_i4_label">Risk to taking this patch</th>
+ <td>
+ <div role="radiogroup" class="buttons toggle" aria-labelledby="_ar_gkv_i4_label">
+ <div class="item"><input id="_ar_gkv_i4_r1" type="radio" name="_ar_gkv_i4_radio" value="Low"><label for="_ar_gkv_i4_r1">Low</label></div>
+ <div class="item"><input id="_ar_gkv_i4_r2" type="radio" name="_ar_gkv_i4_radio" value="Medium"><label for="_ar_gkv_i4_r2">Medium</label></div>
+ <div class="item"><input id="_ar_gkv_i4_r3" type="radio" name="_ar_gkv_i4_radio" value="High"><label for="_ar_gkv_i4_r3">High</label></div>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <th id="_ar_gkv_i5_label">Why is the change risky/not risky?<br>(and alternatives if risky)</th>
+ <td><textarea aria-labelledby="_ar_gkv_i5_label"></textarea></td>
+ </tr>
+ <tr>
+ <th id="_ar_gkv_i6_label">String or UUID changes made by this patch</th>
+ <td><input type="text" class="long" aria-labelledby="_ar_gkv_i6_label"></td>
+ </tr>
+ </table>
+ <p>See <a href="https://wiki.mozilla.org/Release_Management/Uplift_rules" target="_blank">Patch uplifting rules</a> for more info.</p>
+ </fieldset>
+</template>
+
+<template class="approval-request" data-flags="sec‑approval">
+ <fieldset>
+ <legend>Security Approval Request</legend>
+ <table>
+ <tr>
+ <th id="_ar_sec_i1_label">How easily could an exploit be constructed based on the patch?</th>
+ <td><textarea aria-labelledby="_ar_sec_i1_label"></textarea></td>
+ </tr>
+ <tr>
+ <th id="_ar_sec_i2_label">Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?</th>
+ <td>
+ <div role="radiogroup" class="buttons toggle" aria-labelledby="_ar_sec_i2_label">
+ <div class="item"><input id="_ar_sec_i2_r1" type="radio" name="_ar_sec_i2_radio" value="Yes"><label for="_ar_sec_i2_r1">Yes</label></div>
+ <div class="item"><input id="_ar_sec_i2_r2" type="radio" name="_ar_sec_i2_radio" value="No"><label for="_ar_sec_i2_r2">No</label></div>
+ <div class="item"><input id="_ar_sec_i2_r3" type="radio" name="_ar_sec_i2_radio" value="Unknown"><label for="_ar_sec_i2_r3">Unknown</label></div>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <th id="_ar_sec_i3_label">Which older supported branches are affected by this flaw?</th>
+ <td><input type="text" aria-labelledby="_ar_sec_i3_label"></td>
+ </tr>
+ <tr>
+ <th id="_ar_sec_i4_label">If not all supported branches, which [% terms.bug %] introduced the flaw?</th>
+ <td><input type="text" placeholder="[% terms.Bug %] ID" aria-labelledby="_ar_sec_i4_label" data-type="b[% %]ug"></td>
+ </tr>
+ <tr>
+ <th id="_ar_sec_i5_label">Do you have backports for the affected branches?</th>
+ <td>
+ <div role="radiogroup" class="buttons toggle" aria-labelledby="_ar_sec_i5_label">
+ <div class="item"><input id="_ar_sec_i5_r1" type="radio" name="_ar_sec_i5_radio" value="Yes"><label for="_ar_sec_i5_r1">Yes</label></div>
+ <div class="item"><input id="_ar_sec_i5_r2" type="radio" name="_ar_sec_i5_radio" value="No"><label for="_ar_sec_i5_r2">No</label></div>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <th id="_ar_sec_i6_label">If not, how different, hard to create, and risky will they be?</th>
+ <td><textarea aria-labelledby="_ar_sec_i6_label"></textarea></td>
+ </tr>
+ <tr>
+ <th id="_ar_sec_i7_label">How likely is this patch to cause regressions; how much testing does it need?</th>
+ <td><textarea aria-labelledby="_ar_sec_i7_label"></textarea></td>
+ </tr>
+ </table>
+ </fieldset>
+</template>
diff --git a/extensions/BMO/template/en/default/hook/global/header-additional_header.html.tmpl b/extensions/BMO/template/en/default/hook/global/header-additional_header.html.tmpl
index 0566f48b3..6300b0d15 100644
--- a/extensions/BMO/template/en/default/hook/global/header-additional_header.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/global/header-additional_header.html.tmpl
@@ -22,6 +22,7 @@
<link rel="shortcut icon" href="extensions/BMO/web/images/favicon.ico">
[% IF bug %]
<link rel="canonical" href="[% Bugzilla.localconfig.canonical_urlbase FILTER none %]show_bug.cgi?id=[% bug.bug_id FILTER uri %]">
+<link rel="shorturl" href="[% Bugzilla.localconfig.canonical_urlbase FILTER none %][% bug.bug_id FILTER uri %]">
[% END %]
[%# *** Bug List Navigation *** %]
diff --git a/extensions/BMO/template/en/default/hook/index-intro.html.tmpl b/extensions/BMO/template/en/default/hook/index-intro.html.tmpl
deleted file mode 100644
index ddee1db2f..000000000
--- a/extensions/BMO/template/en/default/hook/index-intro.html.tmpl
+++ /dev/null
@@ -1,10 +0,0 @@
-[%# This Source Code Form is subject to the terms of the Mozilla Public
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- #
- # This Source Code Form is "Incompatible With Secondary Licenses", as
- # defined by the Mozilla Public License, v. 2.0.
- #%]
-
-<a id="docs" class="bz_common_actions"
- href="https://bmo.readthedocs.org/"><span>Documentation</span></a>
diff --git a/extensions/BMO/template/en/default/pages/persona_deprecated.html.tmpl b/extensions/BMO/template/en/default/pages/persona_deprecated.html.tmpl
deleted file mode 100644
index 18b7a3f60..000000000
--- a/extensions/BMO/template/en/default/pages/persona_deprecated.html.tmpl
+++ /dev/null
@@ -1,53 +0,0 @@
-[%# This Source Code Form is subject to the terms of the Mozilla Public
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- #
- # This Source Code Form is "Incompatible With Secondary Licenses", as
- # defined by the Mozilla Public License, v. 2.0.
- #%]
-
-[% PROCESS global/header.html.tmpl
- title = "Persona Deprecated"
-%]
-
-<h2>Persona Deprecated</h2>
-
-<p>
- Beginning on October 25th, 2016, <a href="https://login.persona.org">Persona</a> is no longer a supported authentication method
- for bugzilla.mozilla.org (BMO). The Mozilla supported Persona service will cease operations on November 30th, 2016 so therefore
- BMO will not longer be able to use the service for authentication. You can go
- <a href="https://wiki.mozilla.org/Identity/Persona_Shutdown_Guidelines_for_Reliers">here</a> for more information about Persona
- and the reasons for shutting down service.
-</p>
-
-<p>
- For users of Persona on BMO, there are two other methods for authentication that are supported and you will need to switch
- over to one of them after your current session expires starting October 25th, 2016.
-</p>
-
-<h3>Native Login</h3>
-
-<p>
- BMO has always supported native authentication using a password securely stored in our database. If you have used Persona since
- first creating your BMO account, you will probably not know this password. But you can reset it to something you do know by first
- logging out, and then clicking on 'Forgot Password' at the right-hand top of the page. Enter your email you used with Persona in
- the text field and click 'Reset Password'.
-</p>
-
-<p>
- You will receive an email with a link you can use to reset your current password to something you can use from now on.
- After you reset your password, simply enter your login and the password in the login fields at the top of any BMO page.
-</p>
-
-<h3>Github Login</h3>
-
-<p>
- <a href="https://github.com">Github</a> is also a BMO supported method of authentication. To use Github, first log out and then
- click 'Login' at the top of any BMO page and then click on the 'Github' login image. You will need to have a Github account that
- has an email address the same as the Persona email you were using, otherwise a different BMO account will be created. You will
- be able to choose the email address you want to use for BMO if you have more than one configured in your Github profile. If none
- of the email addresses you have configured in Github match what you were using for Persona, native login described above may be
- your best choice if you want to retain your BMO data.
-</p>
-
-[% PROCESS global/footer.html.tmpl %]
diff --git a/extensions/BMO/template/en/default/pages/release_tracking_report.html.tmpl b/extensions/BMO/template/en/default/pages/release_tracking_report.html.tmpl
index 8ee3d0d59..6c0387ec0 100644
--- a/extensions/BMO/template/en/default/pages/release_tracking_report.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/release_tracking_report.html.tmpl
@@ -97,7 +97,7 @@ var default_query = '[% default_query FILTER js %]';
</span>
</td>
</tr>
-
+
<tr>
<td>&nbsp;</td>
<td colspan="2">
diff --git a/extensions/BMO/template/en/default/pages/upgrade-3.6.html.tmpl b/extensions/BMO/template/en/default/pages/upgrade-3.6.html.tmpl
index 9e6d72d66..6091810db 100644
--- a/extensions/BMO/template/en/default/pages/upgrade-3.6.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/upgrade-3.6.html.tmpl
@@ -74,7 +74,7 @@
<p>Work continues on improving usability for the next release of
[%+ terms.Bugzilla %], but the results of the research have already
had an impact on this 3.6 release.</p>
-
+
<h4>Improved Quicksearch</h4>
<p>The "quicksearch" box that appears on the front page of
@@ -113,7 +113,7 @@
<p>There is now a "Browse" link in the header of each [% terms.Bugzilla %]
page that presents a very basic interface that allows users to simply
browse through all open [% terms.bugs %] in particular components.</p>
-
+
<h4>JSON-RPC Interface</h4>
<p>[% terms.Bugzilla %] now has support for the
@@ -134,7 +134,7 @@
mandatory.</li>
<li><b>[% terms.Bug %] Filing:</b> "Bookmarkable templates" now
support the "alias" and "estimated hours" fields.</li>
-
+
<li><b>[% terms.Bug %] Editing:</b> In previous versions of
[%+ terms.Bugzilla %], if you added a private comment to [% terms.abug %],
then <em>none</em> of the changes that you made at that time were
@@ -165,10 +165,10 @@
<li><b>Attachments:</b> When you click on an "attachment 12345" link
in a comment, if the attachment is a patch, you will now see the
formatted "Diff" view instead of the raw patch.</li>
- <li><b>Attachments</b>: For text attachments, we now let the browser
+ <li><b>Attachments</b>: For text attachments, we now let the browser
auto-detect the character encoding, instead of forcing the browser to
always assume the attachment is in UTF-8.</li>
-
+
<li><b>Search:</b> You can now display [% terms.bug %] flags as a column
in search results.</li>
<li><b>Search:</b> When viewing search results, you can see which columns are
@@ -188,7 +188,7 @@
<kbd>buglist.cgi</kbd> now accepts nearly every valid field in
[%+ terms.Bugzilla %] as a direct URL parameter, like
<kbd>&amp;field=value</kbd>.</li>
-
+
<li><b>Requests:</b> When viewing the "My Requests" page, you can now
see the lists as a normal search result by clicking a link at the
bottom of each table.</li>
@@ -208,7 +208,7 @@
if there are no [% terms.bugs %] that match your searches.</li>
<li>The arrows in dependency graphs now point the other way, so that
[%+ terms.bugs %] point at their dependencies.</li>
-
+
<li><b>New Charts:</b> You can now convert an existing Saved Search
into a data series for New Charts.</li>
<li><b>New Charts:</b> There is now an interface that allows you to
@@ -241,7 +241,7 @@
<li>Information about duplicates is now stored in the database instead
of being stored in the <kbd>data/</kbd> directory. On large installations
this could save several hundred megabytes of disk space.</li>
-
+
<li>When editing a group, you can now specify that members of a group
are allowed to grant others membership in that group itself.</li>
<li>The ability to compress BMP attachments to PNGs is now an Extension.
diff --git a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl
index 5603b943f..1d6e222c6 100644
--- a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl
@@ -99,7 +99,7 @@
There used to be an issue in <a href="https://www.bugzilla.org/">Bugzilla</a>
which caused activity data to be lost if there were a large number of cc's
or dependencies. That has been fixed, but some data was already lost in
- your activity table that could not be regenerated. The changes that
+ your activity table that could not be regenerated. The changes that
could not reliably determine are prefixed by '?'.
</p>
[% END %]
diff --git a/extensions/BMO/web/js/new-bug-frequent-comp.js b/extensions/BMO/web/js/new-bug-frequent-comp.js
new file mode 100644
index 000000000..88879738d
--- /dev/null
+++ b/extensions/BMO/web/js/new-bug-frequent-comp.js
@@ -0,0 +1,123 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This Source Code Form is "Incompatible With Secondary Licenses", as
+ * defined by the Mozilla Public License, v. 2.0. */
+
+/**
+ * Reference or define the Bugzilla app namespace.
+ * @namespace
+ */
+var Bugzilla = Bugzilla || {}; // eslint-disable-line no-var
+
+/**
+ * Show the current user's most-used components on the New Bug page.
+ */
+Bugzilla.NewBugFrequentComp = class NewBugFrequentComp {
+ /**
+ * Initialize a new NewBugFrequentComp instance.
+ */
+ constructor() {
+ this.$container = document.querySelector('#frequent-components');
+
+ if (this.$container && BUGZILLA.user.login) {
+ this.init();
+ }
+ }
+
+ /**
+ * Initialize the UI.
+ */
+ async init() {
+ this.$results = this.$container.querySelector('.results');
+ this.$message = this.$results.appendChild(document.createElement('p'));
+ this.$message.textContent = 'Loading...';
+ this.$results.setAttribute('aria-busy', 'true');
+ this.$container.hidden = false;
+
+ // Get the current params that may contain `cloned_bug_id` and `format`
+ const current_params = new URLSearchParams(location.search);
+
+ try {
+ const links = (await this.fetch()).map(({ product, component }) => {
+ const params = new URLSearchParams(current_params);
+
+ params.append('product', product);
+ params.append('component', component);
+
+ return {
+ href: `/enter_bug.cgi?${params.toString()}`,
+ text: `${product} :: ${component}`,
+ };
+ });
+
+ this.$message.remove();
+ this.$results.insertAdjacentHTML('beforeend',
+ `<ul>${links.map(({ href, text }) =>
+ `<li><a href="${href.htmlEncode()}">${text.htmlEncode()}</a></li>`
+ ).join('')}</ul>`
+ );
+ } catch (error) {
+ this.$message.textContent = error.message || 'Your frequent components could not be retrieved.';
+ }
+
+ this.$results.removeAttribute('aria-busy');
+ }
+
+ /**
+ * Retrieve frequently used components.
+ * @param {Number} [max=10] Maximum number of results.
+ * @returns {Promise} Results or error.
+ */
+ async fetch(max = 10) {
+ const params = new URLSearchParams({
+ email1: BUGZILLA.user.login,
+ emailreporter1: '1',
+ emailtype1: 'exact',
+ chfield: '[Bug creation]',
+ chfieldfrom: '-1y',
+ chfieldto: 'Now',
+ include_fields: 'product,component',
+ });
+
+ return new Promise((resolve, reject) => {
+ bugzilla_ajax({
+ url: `/rest/bug?${params.toString()}`
+ }, response => {
+ if (!response.bugs) {
+ reject(new Error('Your frequent components could not be retrieved.'));
+
+ return;
+ }
+
+ if (!response.bugs.length) {
+ reject(new Error(('Your frequent components could not be found.')));
+
+ return;
+ }
+
+ const results = [];
+
+ for (const { product, component } of response.bugs) {
+ const index = results.findIndex(result => product === result.product && component === result.component);
+
+ if (index > -1) {
+ results[index].count++;
+ } else {
+ results.push({ product, component, count: 1 });
+ }
+ }
+
+ // Sort in descending order
+ results.sort((a, b) => (a.count < b.count ? 1 : a.count > b.count ? -1 : 0));
+
+ resolve(results.slice(0, max));
+ }, () => {
+ reject(new Error('Your frequent components could not be retrieved.'));
+ });
+ });
+ }
+};
+
+window.addEventListener('DOMContentLoaded', () => new Bugzilla.NewBugFrequentComp(), { once: true });
diff --git a/extensions/BMO/web/js/release_tracking_report.js b/extensions/BMO/web/js/release_tracking_report.js
index c91222e0f..158cc7521 100644
--- a/extensions/BMO/web/js/release_tracking_report.js
+++ b/extensions/BMO/web/js/release_tracking_report.js
@@ -41,7 +41,7 @@ function onProductChange() {
'<input type="checkbox" id="field_' + field.id + '_cb" ' +
'onClick="onFieldToggle(this,' + field.id + ')">' +
'</td>' +
- '<td class="disabled" id="field_' + field.id + '_td">' +
+ '<td class="disabled" id="field_' + field.id + '_td">' +
'<label for="field_' + field.id + '_cb">' +
field.desc.htmlEncode() + ':</label>' +
'</td>' +
diff --git a/extensions/BMO/web/js/sorttable.js b/extensions/BMO/web/js/sorttable.js
index 0873dc20a..c20f02647 100644
--- a/extensions/BMO/web/js/sorttable.js
+++ b/extensions/BMO/web/js/sorttable.js
@@ -3,13 +3,13 @@
version 2
7th April 2007
Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/
-
+
Instructions:
Download this file
Add <script src="sorttable.js"></script> to your HTML
Add class="sortable" to any table you'd like to make sortable
Click on the headers to sort
-
+
Thanks to many, many people for contributions and suggestions.
Licenced as X11: http://www.kryogenix.org/code/browser/licence.html
This basically means: do what you want with it.
@@ -25,20 +25,20 @@ sorttable = {
arguments.callee.done = true;
// kill the timer
if (_timer) clearInterval(_timer);
-
+
if (!document.createElement || !document.getElementsByTagName) return;
-
+
sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/;
-
+
forEach(document.getElementsByTagName('table'), function(table) {
if (table.className.search(/\bsortable\b/) != -1) {
sorttable.makeSortable(table);
}
});
-
+
},
- /*
+ /*
* Prepares the table so that it can be sorted
*
*/
@@ -53,9 +53,9 @@ sorttable = {
}
// Safari doesn't support table.tHead, sigh
if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0];
-
+
//if (table.tHead.rows.length != 1) return; // can't cope with two header rows
-
+
// Sorttable v1 put rows with a class of "sortbottom" at the bottom (as
// "total" rows, for example). This is B&R, since what you're supposed
// to do is put them in a tfoot. So, if there are sortbottom rows,
@@ -106,7 +106,7 @@ sorttable = {
table.sorttable_rows = table_rows;
table.sorttable_body_size = body_size;
table.sorttable_bodies = bodies;
-
+
// work through each column and calculate its type
@@ -185,7 +185,7 @@ sorttable = {
_check_already_sorted: function(cell) {
if (cell.className.search(/\bsorttable_sorted\b/) != -1) {
- // if we're already sorted by this column, just
+ // if we're already sorted by this column, just
// reverse the table, which is quicker
sorttable.reverse_table(cell);
@@ -194,7 +194,7 @@ sorttable = {
}
if (cell.className.search(/\bsorttable_sorted_reverse\b/) != -1) {
- // if we're already sorted by this column in reverse, just
+ // if we're already sorted by this column in reverse, just
// re-reverse the table, which is quicker
sorttable.reverse_table(cell);
@@ -271,7 +271,7 @@ sorttable = {
return;
- // First, remove sorttable_sorted classes from the other header
+ // First, remove sorttable_sorted classes from the other header
// that is currently sorted and its marker (the simbol indicating
// that its sorted.
sorttable._remove_sorted_classes(this.table.tHead);
@@ -285,7 +285,7 @@ sorttable = {
sorttable._mark_column_as_sorted(this, '&#x25BC;', 0);
sorttable.sort_table(this);
-
+
},
sort_table: function(cell) {
@@ -312,7 +312,7 @@ sorttable = {
body_size = cell.table.sorttable_body_size;
body_index = 0;
- for (var j=0; j<rows.length; j++) {
+ for (var j=0; j<rows.length; j++) {
if (j % 2)
rows[j].className = rows[j].className.replace('bz_row_even',
'bz_row_odd');
@@ -336,7 +336,7 @@ sorttable = {
cell.table.sorttable_rows = rows;
},
-
+
reverse_table: function(cell) {
oldrows = cell.table.sorttable_rows;
newrows = [];
@@ -348,7 +348,7 @@ sorttable = {
tb = cell.table.sorttable_bodies[0];
body_size = cell.table.sorttable_body_size;
body_index = 0;
-
+
var BUGLIST = '';
cell.table.sorttable_rows = [];
@@ -379,17 +379,17 @@ sorttable = {
delete newrows;
},
-
+
guessType: function(table, column) {
// guess the type of a column based on its first non-blank row
sortfn = sorttable.sort_alpha;
for (var i=0; i<table.sorttable_bodies[0].rows.length; i++) {
text = sorttable.getInnerText(table.sorttable_bodies[0].rows[i].cells[column]);
if (text != '') {
- if (text.match(/^-?[£$¤]?[\d,.]+%?$/)) {
+ if (text.match(/^-?[£$¤]?[\d,.]+%?$/)) {
return sorttable.sort_numeric;
}
- // check for a date: dd/mm/yyyy or dd/mm/yy
+ // check for a date: dd/mm/yyyy or dd/mm/yy
// can have / or . or - as separator
// can be mm/dd as well
possdate = text.match(sorttable.DATE_RE)
@@ -412,7 +412,7 @@ sorttable = {
}
return sortfn;
},
-
+
getInnerText: function(node) {
// gets the text we want to use for sorting for a cell.
// strips leading and trailing whitespace.
@@ -422,7 +422,7 @@ sorttable = {
hasInputs = (typeof node.getElementsByTagName == 'function') &&
node.getElementsByTagName('input').length;
-
+
if (typeof node.getAttribute != 'undefined' && node.getAttribute("sorttable_customkey") != null) {
return node.getAttribute("sorttable_customkey");
}
@@ -457,14 +457,14 @@ sorttable = {
}
}
},
-
+
/* sort functions
each sort function takes two parameters, a and b
you are comparing a.sort_data and b.sort_data */
sort_numeric: function(a,b) {
aa = parseFloat(a.sort_data.replace(/[^0-9.-]/g,''));
if (isNaN(aa)) aa = 0;
- bb = parseFloat(b.sort_data.replace(/[^0-9.-]/g,''));
+ bb = parseFloat(b.sort_data.replace(/[^0-9.-]/g,''));
if (isNaN(bb)) bb = 0;
return aa-bb;
},
@@ -506,7 +506,7 @@ sorttable = {
if (dt1<dt2) return -1;
return 1;
},
-
+
shaker_sort: function(list, comp_func) {
// A stable sort function to allow multi-level sorting of data
// see: http://en.wikipedia.org/wiki/Cocktail_sort
@@ -536,7 +536,7 @@ sorttable = {
b++;
} // while(swap)
- }
+ }
}
/* ******************************************************************
diff --git a/extensions/BMO/web/js/swag.js b/extensions/BMO/web/js/swag.js
index cd9561b54..2a86c90f4 100644
--- a/extensions/BMO/web/js/swag.js
+++ b/extensions/BMO/web/js/swag.js
@@ -24,37 +24,37 @@ function getTotal(item_array) {
return total;
}
-function calculateTotalSwag() {
- document.getElementById('Totalswag').value =
+function calculateTotalSwag() {
+ document.getElementById('Totalswag').value =
getTotal( new Array('Lanyards',
'Stickers',
'Bracelets',
'Tattoos',
'Buttons',
'Posters'));
-
+
}
-function calculateTotalMensShirts() {
- document.getElementById('mens_total').value =
+function calculateTotalMensShirts() {
+ document.getElementById('mens_total').value =
getTotal( new Array('mens_s',
'mens_m',
'mens_l',
'mens_xl',
'mens_xxl',
'mens_xxxl'));
-
+
}
-function calculateTotalWomensShirts() {
- document.getElementById('womens_total').value =
+function calculateTotalWomensShirts() {
+ document.getElementById('womens_total').value =
getTotal( new Array('womens_s',
'womens_m',
'womens_l',
'womens_xl',
'womens_xxl',
'womens_xxxl'));
-
+
}
diff --git a/extensions/BMO/web/styles/choose_product.css b/extensions/BMO/web/styles/choose_product.css
index bcca3428e..a4ecf749f 100644
--- a/extensions/BMO/web/styles/choose_product.css
+++ b/extensions/BMO/web/styles/choose_product.css
@@ -16,6 +16,22 @@
text-align: left;
}
+#frequent-components ul {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ margin: 8px auto;
+ padding: 0;
+ list-style-type: none;
+ white-space: nowrap;
+}
+
+#frequent-components li {
+ flex: none;
+ margin: 8px 16px;
+ padding: 0;
+}
+
#product-list {
margin: 32px 0;
}
@@ -23,7 +39,7 @@
#product-list .tile {
display: flex;
flex-wrap: wrap;
- justify-content: flex-start;
+ justify-content: center;
margin: 0 auto;
}
@@ -55,6 +71,7 @@
}
@media screen and (min-width: 1024px) {
+ #frequent-components ul,
#product-list .tile {
width: 960px;
}
@@ -65,6 +82,7 @@
}
@media screen and (min-width: 768px) and (max-width: 1023px) {
+ #frequent-components ul,
#product-list .tile {
width: 720px;
}
@@ -75,6 +93,7 @@
}
@media screen and (max-width: 767px) {
+ #frequent-components ul,
#product-list .tile {
width: auto;
max-width: 480px;