aboutsummaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-03-25 20:23:55 +0100
committerMatěj Cepl <mcepl@redhat.com>2011-03-25 20:27:22 +0100
commite66b840d0387ea5d72a405b452786cb49cc34937 (patch)
treeae1909f0e9bcde09cd62857a1380ae0f3955611f /data
parent18763039c1fd5baa5c857fa594c832bdd9b3ba6d (diff)
downloadbugzilla-triage-e66b840d0387ea5d72a405b452786cb49cc34937.tar.gz
Make new links work on RH BZ.
Fix #74
Diffstat (limited to 'data')
-rw-r--r--data/lib/addNewLinks.js8
-rw-r--r--data/lib/bug-page-mod.js4
2 files changed, 10 insertions, 2 deletions
diff --git a/data/lib/addNewLinks.js b/data/lib/addNewLinks.js
index 7993e07..020dbb3 100644
--- a/data/lib/addNewLinks.js
+++ b/data/lib/addNewLinks.js
@@ -36,6 +36,9 @@
* ***** END LICENSE BLOCK ***** */
function addNewLinks(d) {
+ // Why we are using d.querySelector for something which could be
+ // getElementById().value? FIXME
+ // console.log("addNewLinks : product = " + document.getElementById("product").value);
var product = d.querySelector("#field_container_product option[selected]");
var component = d.querySelector("#component option[selected]");
@@ -54,6 +57,11 @@ function addNewLinks(d) {
var url = 'enter_bug.cgi?product=' + encodeURIComponent(product.value) +
'&component=' + encodeURIComponent(component.value);
if (label) {
+ var componentElement = document.getElementById("bz_component_input");
+ var computedStyle = window.getComputedStyle(componentElement);
+ if (computedStyle.display == "none") {
+ label = document.getElementById("bz_component_edit_container");
+ };
createDeadLink("file_new_bug_component", "new", label, url, [], "parens");
}
}
diff --git a/data/lib/bug-page-mod.js b/data/lib/bug-page-mod.js
index a5a908d..33742b3 100644
--- a/data/lib/bug-page-mod.js
+++ b/data/lib/bug-page-mod.js
@@ -37,8 +37,8 @@
function tweakBugzilla(d) {
// run on both bugzilla.m.o and bugzilla-stage-tip.m.o
- if (!onBugzillaPage(d.URL))
- return;
+ // if (!onBugzillaPage(d.URL))
+ // return;
// Put the quicksearch text in the quicksearch boxes
quicksearchHandler(d);