diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-03-25 20:23:55 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2011-06-05 14:44:01 +0200 |
commit | fb9466fb0147ae296d0657cda851ae707f5453d4 (patch) | |
tree | ff4bf6e565f0e19435fb28e5cab8168966870230 /data/lib/addNewLinks.js | |
parent | 71fc5197d1a71a9f2efd1b4f83c7d3b0de539e10 (diff) | |
download | bugzilla-triage-fb9466fb0147ae296d0657cda851ae707f5453d4.tar.gz |
Make new links work on RH BZ.
Fix #74
Diffstat (limited to 'data/lib/addNewLinks.js')
-rw-r--r-- | data/lib/addNewLinks.js | 8 |
1 files changed, 8 insertions, 0 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"); } } |