summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/web
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2016-10-27 12:42:51 +0200
committerDavid Lawrence <dkl@mozilla.com>2016-10-27 12:42:51 +0200
commitad6aa9fa0b82043ed4f2ff25081cef22434d9a0d (patch)
tree9ee01b949847b13b30fdb633098ab0ace3ea56a4 /extensions/BMO/web
parentf2fb476fa7ea46496f195f56034de5a59c61aa27 (diff)
downloadbugzilla-ad6aa9fa0b82043ed4f2ff25081cef22434d9a0d.tar.gz
bugzilla-ad6aa9fa0b82043ed4f2ff25081cef22434d9a0d.tar.xz
Bug 1309965 - Report: List of Triage Owners which can be sorted and filtered on product and component
Diffstat (limited to 'extensions/BMO/web')
-rw-r--r--extensions/BMO/web/js/triage_owners.js54
-rw-r--r--extensions/BMO/web/styles/triage_reports.css22
2 files changed, 75 insertions, 1 deletions
diff --git a/extensions/BMO/web/js/triage_owners.js b/extensions/BMO/web/js/triage_owners.js
new file mode 100644
index 000000000..212225586
--- /dev/null
+++ b/extensions/BMO/web/js/triage_owners.js
@@ -0,0 +1,54 @@
+/* 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. */
+
+$(function() {
+ 'use strict';
+
+ var json_data = {};
+
+ function onSelectProduct() {
+ var component = $('#component');
+ var product = $('#product');
+
+ if (product.val() == '') {
+ component.empty();
+ return;
+ }
+
+ if (!json_data) return;
+
+ component.empty();
+ component.append(new Option('__Any__', ''));
+
+ var products = json_data.products;
+ for (var i = 0, l = products.length; i < l; i++) {
+ if (products[i].name != product.val()) continue;
+ var components = products[i].components;
+ for (var j = 0, k = components.length; j < k; j++) {
+ var selected = !!components[j].selected;
+ component.append(new Option(components[j].name,
+ components[j].name,
+ selected, selected));
+ }
+ }
+ }
+
+ $('#product').change(function() {
+ onSelectProduct();
+ });
+
+ $('#triageOwners').submit(function() {
+ // do not pass json_data in the params
+ $('#json_data').remove();
+ return true;
+ });
+
+ $(document).ready(function () {
+ json_data = $('#json_data').data('json_data');
+ onSelectProduct();
+ });
+});
diff --git a/extensions/BMO/web/styles/triage_reports.css b/extensions/BMO/web/styles/triage_reports.css
index 6190fd32c..8eb2c6e87 100644
--- a/extensions/BMO/web/styles/triage_reports.css
+++ b/extensions/BMO/web/styles/triage_reports.css
@@ -1,3 +1,10 @@
+/* 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. */
+
.hidden {
display: none;
}
@@ -14,10 +21,23 @@
background: #ccccff;
}
-#report td {
+#report th, #report td {
padding: 1px 10px 1px 10px;
}
#report-header {
background: #dddddd;
}
+
+tr.product_header {
+ background: #dddddd;
+}
+
+#triage_owners_form th {
+ text-align: right;
+ vertical-align: top;
+}
+
+#report th, #report td {
+ text-align: left;
+}