aboutsummaryrefslogtreecommitdiffstats
path: root/data/rhlib
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-09-01 10:29:28 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-09-01 10:53:51 +0200
commit5efc52cf5cec2b9b5f75351da8e473c2f90266b5 (patch)
tree4bb5bbc15dde0607737e642c0a5075875ebf58bb /data/rhlib
parentb6b75faa9ef841396731398a2882e869df5b8ae7 (diff)
downloadbugzilla-triage-5efc52cf5cec2b9b5f75351da8e473c2f90266b5.tar.gz
Eliminating MakeJSONRPC calls and fixing multiple logins.
Fixes #113.
Diffstat (limited to 'data/rhlib')
-rw-r--r--data/rhlib/addAttachmentRow.js10
-rw-r--r--data/rhlib/fixingAttMIME.js16
-rw-r--r--data/rhlib/rhbzpage.js6
3 files changed, 6 insertions, 26 deletions
diff --git a/data/rhlib/addAttachmentRow.js b/data/rhlib/addAttachmentRow.js
index c8724e3..6fab1bd 100644
--- a/data/rhlib/addAttachmentRow.js
+++ b/data/rhlib/addAttachmentRow.js
@@ -2,7 +2,7 @@
//http://www.opensource.org/licenses/mit-license.php
"use strict";
-//FIXME resp is JSON, not XML anymore
+// FIXME resp is JSON, not XML anymore
function addAttachmentCallback(resp) {
var newAttachID = parseInt(
resp.params.param.value.array.data.value.int, 10);
@@ -51,12 +51,6 @@ function addAttachment(data, callback, param) {
nomail : true
};
- self.postMessage(new Message("MakeJSONRPCall", {
- url : constantData.XMLRPCData[window.location.hostname].url
- .replace("xmlrpc.cgi", "jsonrpc.cgi"),
- method : "bugzilla.addAttachment",
- params : params,
- callRPC : "AddAttachmentCallback"
- }));
+ makeJSONRPCCall("bugzilla.addAttachment", params, addAttachmentCallback);
reqCounter++;
}
diff --git a/data/rhlib/fixingAttMIME.js b/data/rhlib/fixingAttMIME.js
index f61ddbd..220b7ad 100644
--- a/data/rhlib/fixingAttMIME.js
+++ b/data/rhlib/fixingAttMIME.js
@@ -44,7 +44,7 @@ function XMLRPCcallback() {
* this change };
*
*/
-function fixAttachById(id, XMLRPCURL, type, email) {
+function fixAttachById(id, type, email) {
if (type === undefined) {
type = "text/plain";
}
@@ -61,13 +61,7 @@ function fixAttachById(id, XMLRPCURL, type, email) {
'nomail' : !email
};
- self.postMessage(new Message("MakeJSONRPCall", {
- url : XMLRPCURL.replace("xmlrpc.cgi", "jsonrpc.cgi"),
- method : "bugzilla.updateAttachMimeType",
- login : getLogin(),
- params : params,
- callRPC : "FixAttachmentMIMECallback"
- }));
+ makeJSONRPCCall("bugzilla.updateAttachMimeType", params, XMLRPCcallback);
reqCounter++;
}
@@ -78,11 +72,9 @@ function fixAttachById(id, XMLRPCURL, type, email) {
* <TR> DOM jQuery element with a bad attachment
* @return none
*/
-function addTextLink(att, xmlRpcUrl) {
+function addTextLink(att) {
var elemS = att.element.getElementsByTagName("td");
var elem = elemS[elemS.length - 1];
createDeadLink("addFix2TextLink", "text", elem, fixAttachById,
- [
- att.id, xmlRpcUrl
- ], "br");
+ [ att.id ], "br");
}
diff --git a/data/rhlib/rhbzpage.js b/data/rhlib/rhbzpage.js
index 944b9a6..abc84c7 100644
--- a/data/rhlib/rhbzpage.js
+++ b/data/rhlib/rhbzpage.js
@@ -71,12 +71,6 @@ function RHOnMessageHandler(msg, nextHandlerList) {
break;
case "Unhandled":
break;
- case "AddAttachmentCallback":
- addAttachmentCallback(msg.data);
- break;
- case "FixAttachmentMIMECallback":
- XMLRPCcallback();
- break;
case "queryUpstream":
queryUpstreamCallback(msg.data, constantData.queryUpstreamBug);
break;