aboutsummaryrefslogtreecommitdiffstats
path: root/data/bzpage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-01-28 16:38:36 +0100
committerMatěj Cepl <mcepl@redhat.com>2011-01-31 20:33:33 +0100
commit4a0bcc39b1e1b49dcaa0aa2ab674c6f1ba51e9e5 (patch)
tree642411d3b3b433e8903e0bbbbf46004a37477b58 /data/bzpage.js
parent83a7d703cbabd6e514a6d8a948b39325b59e9f58 (diff)
downloadbugzilla-triage-4a0bcc39b1e1b49dcaa0aa2ab674c6f1ba51e9e5.tar.gz
Tons of fixes, we are almost in state that the primitive run is possible.
TOOD: * The most important part is we have to run libbz.initialize() and wait until it is done.
Diffstat (limited to 'data/bzpage.js')
-rw-r--r--data/bzpage.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/data/bzpage.js b/data/bzpage.js
index 086fe44..11b38c7 100644
--- a/data/bzpage.js
+++ b/data/bzpage.js
@@ -7,7 +7,6 @@ var BTSPrefNS = "bugzilla-triage.setting.";
// Shared contstants
var NumberOfFrames = 7;
-exports.NumberOfFrames = NumberOfFrames;
// constants
var SalmonPink = new Color(255, 224, 176); // RGB 255, 224, 176; HSL 36, 2,
@@ -18,7 +17,7 @@ var ReporterColor = new Color(255, 255, 166); // RGB 255, 255, 166; HSL 60, 2,
// global variables
var constantData = {}; // This should be probably eliminated ASAP or
// or done by other means. TODO
-var submitHandlerInstalled = false; // for setUpLogging
+var submitHandlerInstalled = false; // for setUpLogging
// ============================================
/**
* object to pack messaging. Use as in
@@ -28,8 +27,10 @@ var submitHandlerInstalled = false; // for setUpLogging
}));
*/
function Message(cmd, data) {
+ console.log("Message: cmd = " + cmd + ", data = " + data);
this.cmd = cmd;
this.data = data;
+ console.log("Message JSONified: " + JSON.stringify(this));
}
function log(msg) {
@@ -44,7 +45,6 @@ var NotLoggedinException = function NotLoggedinException (message) {
NotLoggedinException.prototype.toString = function () {
return this.name + ': "' + this.message + '"';
};
-exports.NotLoggedinException = NotLoggedinException;
/**
* central handler processing messages from the main script.
@@ -368,7 +368,7 @@ function createNewButton (location, after, cmdObj) {
}
/**
- * Generate button based on
+ * Generate button based on
*/
function generateButtons (pkgs) {
var topRowPosition = "topRowPositionID";
@@ -866,7 +866,7 @@ function queryInNewTab(text, component, product) {
* function this.queryInNewTab, and run it.
*/
function queryForSelection() {
- var text = getSelection();
+ var text = getSelection();
if (!text) {
postMessage(new Message("GetClipboard", "queryLocal"));
} else {
@@ -923,7 +923,7 @@ function startup() {
// TODO Probably could be ignored ... used only once on line 973 of rhbzpage.js
// if (parseAbrtBacktraces && this.RE.Abrt.test(this.title)) {
- this.title = document.getElementById("short_desc_nonedit_display").textContent;
+ // title = document.getElementById("short_desc_nonedit_display").textContent;
// So, now we know we are logged in, so we can get to
// the real work.
@@ -933,5 +933,7 @@ function startup() {
checkComments();
var login = getLogin();
- postMessage(new Message("GetInstalledPackages", window.location));
+ postMessage(new Message("GetInstalledPackages", window.location.href));
}
+
+startup();