aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-02-15 00:37:57 +0100
committerMatěj Cepl <mcepl@redhat.com>2011-02-15 00:37:57 +0100
commit10dcf8de5c6965832452c538451d6170b3bafb66 (patch)
tree26a485d017ce2d3ea2032293687827f6c6d3a3e8 /lib
parent04657077ba12e8f23feaa0c3787b590c44446056 (diff)
downloadbugzilla-triage-10dcf8de5c6965832452c538451d6170b3bafb66.tar.gz
Bit of reorganization
Also add an event handler on changes in assigned_to input box
Diffstat (limited to 'lib')
-rw-r--r--lib/main.js3
-rw-r--r--lib/util.js12
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/main.js b/lib/main.js
index be4ff8d..0348842 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -16,6 +16,7 @@ var pageMod = require("page-mod");
var libbz = require("libbugzilla");
var tabs = require("tabs");
var logger = require("logger");
+var Message = require("util").Message;
function isOurPage(window, matchingURLs) {
var url = window.location.href;
@@ -115,7 +116,7 @@ var contentScriptLibraries = {
"bugzilla.redhat.com": [
self.data.url("util.js"),
self.data.url("color.js"),
- self.data.url("rhbzpage.js"),
+ self.data.url("rhbzpage.js"),
self.data.url("bzpage.js")
]
};
diff --git a/lib/util.js b/lib/util.js
index 3532203..089e31c 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -63,3 +63,15 @@ exports.getISODate = function getISODate(dateStr) {
return date.getFullYear() + '-' + pad(date.getMonth() + 1) + '-' +
pad(date.getDate());
};
+
+/**
+ * object to pack messaging. Use as in
+ postMessage(new Message("GetPassword", {
+ login: login,
+ hostname: location.hostname
+ }));
+ */
+exports.Message = function Message(cmd, data) {
+ this.cmd = cmd;
+ this.data = data;
+};