aboutsummaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorSteve Fink <sfink@mozilla.com>2011-02-18 14:13:48 -0800
committerSteve Fink <sfink@mozilla.com>2011-02-18 14:13:48 -0800
commit19a64b3dfb86045dcb99593f5da8d66eb6556de9 (patch)
tree4c9fe65aa376ccb08766777b434ffb2efb6c82cf /data
parentddc145837e2b910d3655f3dca169c9297316dc0f (diff)
downloadbugzilla-triage-19a64b3dfb86045dcb99593f5da8d66eb6556de9.tar.gz
Add new bug links next to product, component to create bug in same area
Diffstat (limited to 'data')
-rw-r--r--data/js/bug-page-mod.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/data/js/bug-page-mod.js b/data/js/bug-page-mod.js
index 740ba1f..1fb70e8 100644
--- a/data/js/bug-page-mod.js
+++ b/data/js/bug-page-mod.js
@@ -85,6 +85,8 @@ function tweakBugzilla(d) {
if (commentBox)
commentBox.rows=20;
+ addNewLinks(d);
+
attachmentDiffLinkify(d);
viewAttachmentSource(d);
@@ -1137,6 +1139,31 @@ function htmlEncode(str) {
.replace('"', '&quot;', 'g');
}
+function addNewLinks(d) {
+ var product = d.querySelector("#field_container_product option[selected]");
+ var component = d.querySelector("#component option[selected]");
+
+ if (product) {
+ var label = d.getElementById('field_container_product');
+ var span = d.createElement('span');
+ var url = 'enter_bug.cgi?product=' + product.value;
+ span.innerHTML = "(<a href='" + url + "'>new</a>)";
+ if (label && span) {
+ label.appendChild(span);
+ }
+ }
+
+ if (product && component) {
+ var select = d.querySelector("select#component");
+ var span = d.createElement('span');
+ var url = 'enter_bug.cgi?product=' + product.value + '&component=' + component.value;
+ span.innerHTML = "(<a href='" + url + "'>new</a>)";
+ if (select && span) {
+ select.parentNode.appendChild(span);
+ }
+ }
+}
+
function tbplbotSpamCollapser(d) {
var collapseExpandBox = d.querySelector(".bz_collapse_expand_comments");
if (!collapseExpandBox) {