aboutsummaryrefslogtreecommitdiffstats
path: root/data/rhlib/rhbzpage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-05-31 01:39:46 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-06-05 14:53:48 +0200
commit3a7b19da58572396648df1ab215228d01129aede (patch)
treea4cdf30fe609e0c0336c089906995053c14f4475 /data/rhlib/rhbzpage.js
parent16b78ccadf021cc9255016ab5dac31558d28dea4 (diff)
downloadbugzilla-triage-3a7b19da58572396648df1ab215228d01129aede.tar.gz
First draft of the flags handling for Mozilla bugzilla.
Will fix #103 (when reviewed)
Diffstat (limited to 'data/rhlib/rhbzpage.js')
-rw-r--r--data/rhlib/rhbzpage.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/data/rhlib/rhbzpage.js b/data/rhlib/rhbzpage.js
index b9325a1..a130306 100644
--- a/data/rhlib/rhbzpage.js
+++ b/data/rhlib/rhbzpage.js
@@ -56,7 +56,8 @@ var ProfessionalProducts = [
var btSnippet = null;
-function RHOnMessageHandler(msg) {
+
+function RHOnMessageHandler(msg, nextHandler) {
switch (msg.cmd) {
case "Error":
alert("Error " + msg.data);
@@ -77,7 +78,15 @@ function RHOnMessageHandler(msg) {
queryUpstreamCallback(msg.data, constantData.queryUpstreamBug);
break;
default:
- console.error("Error: unknown RPC call " + msg.toSource());
+ if (nextHandler) {
+ var nextHandler = nextHandlerList.splice(0, 1);
+ if (nextHandler[0]) {
+ nextHandler[0](msg, nextHandlerList);
+ }
+ }
+ else {
+ console.error("Error: unknown RPC call " + msg.toSource());
+ }
break;
}
}
@@ -136,7 +145,12 @@ function RHcentralCommandDispatch(cmdLabel, cmdParams) {
break;
// If we don't have it here, call superclass method
default:
- console.error("Unknown command:\n" + cmdLabel + "\nparameters:\n" + cmdParams);
+ if (MozCentralCommandDispatch) {
+ MozCentralCommandDispatch(cmdLabel, cmdParams);
+ }
+ else {
+ console.error("Unknown command:\n" + cmdLabel + "\nparameters:\n" + cmdParams);
+ }
break;
}
}