aboutsummaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan@mozilla.com>2011-02-22 00:33:30 -0500
committerEhsan Akhgari <ehsan@mozilla.com>2011-02-22 00:33:30 -0500
commit7aaa7c6fe5e147ecff18d15bfd024f627247f8fe (patch)
treef47aff269326416b832b000aa5580ecf585f89ec /data
parentecae20f028473e4310929df022aa8136a9337021 (diff)
parent19a64b3dfb86045dcb99593f5da8d66eb6556de9 (diff)
downloadbugzilla-triage-7aaa7c6fe5e147ecff18d15bfd024f627247f8fe.tar.gz
Merge sfink's changeset pull
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 f5eea92..2af545d 100644
--- a/data/js/bug-page-mod.js
+++ b/data/js/bug-page-mod.js
@@ -101,6 +101,8 @@ function tweakBugzilla(d) {
if (commentBox)
commentBox.rows=20;
+ addNewLinks(d);
+
attachmentDiffLinkify(d);
viewAttachmentSource(d);
@@ -1153,6 +1155,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) {