aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/addNewLinks.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/lib/addNewLinks.js')
-rw-r--r--data/lib/addNewLinks.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/data/lib/addNewLinks.js b/data/lib/addNewLinks.js
index 7993e07..735a0fc 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,12 @@ 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);
+ console.log("computedStyle.display = " + computedStyle.display);
+ if (computedStyle.display == "none") {
+ label = document.getElementById("bz_component_edit_container");
+ };
createDeadLink("file_new_bug_component", "new", label, url, [], "parens");
}
}