From 66275e3a326dc771c04cb6fbfdee68f09b66ee6c Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 17 Feb 2011 18:15:57 +0100 Subject: Make queryLocal and XML-RPC generally work again. --- data/bzpage.js | 14 +++++++------- data/rhbzpage.js | 5 +++-- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'data') diff --git a/data/bzpage.js b/data/bzpage.js index 872f4f1..c1ff730 100644 --- a/data/bzpage.js +++ b/data/bzpage.js @@ -30,7 +30,7 @@ onMessage = function onMessage(msg) { document.location.reload(true); break; case "queryLocal": - queryInNewTab(msg.data.data, getComponent(), getProduct()); + queryInNewTab(msg.data, getComponent(), getProduct()); break; case "CreateButtons": constantData = msg.data.constData; @@ -602,7 +602,7 @@ function addStuffToTextBox (id, stuff) { * @param stuff String/Array with keyword(s) to be removed */ function removeStuffFromTextBox (id, stuff) { - var changedElement = this.getElementById(id); + var changedElement = document.getElementById(id); changedElement.value = removeCSVValue(changedElement.value,stuff); } @@ -686,7 +686,7 @@ function getOwner () { * @return String with the maintainer's email address */ function getDefaultBugzillaMaintainer (component) { - var address = filterByRegexp(this.defBugzillaMaintainerArr, component); + var address = filterByRegexp(constantData.defBugzillaMaintainerArr, component); return address; } @@ -854,10 +854,10 @@ function queryInNewTab(text, component, product) { urlStr += "&product=" + product.trim(); } if (component) { - if ("equivalentComponents" in this.constantData) { - var equivCompsArr = this.constantData["equivalentComponents"]. + if ("equivalentComponents" in constantData) { + var equivCompsArr = constantData.equivalentComponents. filter(function (REstr) { - return new RegExp(REstr).test(this.getComponent()); + return new RegExp(REstr).test(getComponent()); }, this); if (equivCompsArr.length > 0) { component = equivCompsArr[0]; @@ -882,7 +882,7 @@ function queryInNewTab(text, component, product) { + "&field1-0-2=status_whiteboard&type1-0-2=substring&value1-0-2=" + text; urlStr += searchText; - postMessage(new Message("OpenURLinPanel", urlStr)); + postMessage(new Message("OpenURLinTab", urlStr)); } } diff --git a/data/rhbzpage.js b/data/rhbzpage.js index ce0d3fd..15bbd0c 100644 --- a/data/rhbzpage.js +++ b/data/rhbzpage.js @@ -172,7 +172,7 @@ function addAttachment(data, callback, param) { }); postMessage(new Message("MakeXMLRPCall", { - url: constantData.XMLRPCData[window.location.hostname], + url: constantData.XMLRPCData[window.location.hostname].url, login: getLogin(), method: "bugzilla.addAttachment", params: params, @@ -658,6 +658,7 @@ function fillInChipMagic(XorgLogAttList, XorgLogAttListIndex) { replace(/[\s"]+/g," ").trim(); // that.packages["rh-xorg"].chipMagic.chipMagic = interestingLine+"\t"+interestingArray[1] // .toUpperCase(); + console.log("interestingLineArr = " + interestingLineArr.toSource()); createNewButton("status_whiteboard", true, { "name": "Fill In", "chipMagic": true @@ -781,7 +782,7 @@ function fixAttachById(id, type, email) { }); postMessage(new Message("MakeXMLRPCall", { - url: constantData.XMLRPCData[window.location.hostname], + url: constantData.XMLRPCData[window.location.hostname].url, login: getLogin(), method: "bugzilla.updateAttachMimeType", params: params, -- cgit