diff options
Diffstat (limited to 'data/lib')
-rw-r--r-- | data/lib/addNewLinks.js | 9 | ||||
-rw-r--r-- | data/lib/bug-page-mod.js | 4 | ||||
-rw-r--r-- | data/lib/fixingAttMIME.js | 2 | ||||
-rw-r--r-- | data/lib/otherButtons.js | 2 | ||||
-rw-r--r-- | data/lib/rhbzpage.js | 4 | ||||
-rw-r--r-- | data/lib/util.js | 4 |
6 files changed, 15 insertions, 10 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"); } } 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); diff --git a/data/lib/fixingAttMIME.js b/data/lib/fixingAttMIME.js index 9297c06..99c32f7 100644 --- a/data/lib/fixingAttMIME.js +++ b/data/lib/fixingAttMIME.js @@ -43,7 +43,7 @@ function XMLRPCcallback() { * this change }; * */ -function fixAttachById(id, type, email, XMLRPCURL) { +function fixAttachById(id, XMLRPCURL, type, email) { var params = []; if (type === undefined) { diff --git a/data/lib/otherButtons.js b/data/lib/otherButtons.js index 6bc0499..3a1f76a 100644 --- a/data/lib/otherButtons.js +++ b/data/lib/otherButtons.js @@ -110,7 +110,7 @@ function addingEmbelishments(list) { // Add find chip magic button var whiteboard_string = document.getElementById("status_whiteboard").value; if (!/card_/.test(whiteboard_string)) { - fillInChipMagic(XorgLogAttList[0][1]); + fillInChipMagic(list[0][1]); } } } diff --git a/data/lib/rhbzpage.js b/data/lib/rhbzpage.js index 81116ba..8831b24 100644 --- a/data/lib/rhbzpage.js +++ b/data/lib/rhbzpage.js @@ -140,8 +140,6 @@ function RHcentralCommandDispatch(cmdLabel, cmdParams) { } } -/* === Bugzilla functions === */ - /** * Make it sailent that the some attachments with bad MIME type are present * @@ -296,7 +294,6 @@ function analyzeXorg(results) { innerString += "No matching lines found!"; } - document.body.style.cursor = "auto"; postMessage(new Message("OpenStringInPanel", '<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">' + "<html><head><title>Xorg.0.log analysis</title></head><body><pre>\n" + @@ -305,7 +302,6 @@ function analyzeXorg(results) { } function analyzeXorgLog(attachID, backMsg) { - document.body.style.cursor = "wait"; postMessage(new Message("GetURL", { url: "https://" + window.location.hostname + "/attachment.cgi?id=" + attachID, backMessage: backMsg diff --git a/data/lib/util.js b/data/lib/util.js index 611d353..6256171 100644 --- a/data/lib/util.js +++ b/data/lib/util.js @@ -140,10 +140,10 @@ function createDeadLink (id, text, parent, callback, params, before, covered, ac locParent.appendChild(newAElem); if ((before === "br") || (before === true)) { - locParent.appendChild(document.createElement("br")); + locParent.insertBefore(document.createElement("br"), newAElem); } else if (before === "dash") { - locParent.appendChild(document.createTextNode("\u00A0-\u00A0")); + locParent.insertBefore(document.createTextNode("\u00A0-\u00A0"), newAElem); } else if (before === "parens") { locParent.appendChild(document.createTextNode(")")); |