From 9c78d98edef12613da157c8cfa366bf937edd422 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Mon, 21 Jun 2010 01:21:23 +0200 Subject: Logger works and some cleanup Juhuuu, logger works (almost, I haven't tested generation of reports yet) remove all trailing blank space --- lib/bzpage.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/bzpage.js') diff --git a/lib/bzpage.js b/lib/bzpage.js index 1b44b97..5344fbb 100644 --- a/lib/bzpage.js +++ b/lib/bzpage.js @@ -32,24 +32,25 @@ var BZPage = function BZPage(doc, config) { this.packages = this.getInstalledPackages(config); if ("commentStrings" in config.gJSONData) { - this.commentStrings = config.gJSONData.commentStrings; + this.commentStrings = config.gJSONData.commentStrings; } - + if ("constantData" in config.gJSONData) { this.constantData = config.gJSONData.constantData; } - + if ("CCmaintainer" in config.gJSONData.constantData) { this.defBugzillaMaintainerArr = config.gJSONData.constantData.CCmaintainer; } if ("suspiciousComponents" in config.gJSONData.configData) { - this.suspiciousComponents = config.gJSONData.configData.suspiciousComponents; + this.suspiciousComponents = config.gJSONData.configData.suspiciousComponents; } - + if ("submitsLogging" in config.gJSONData.configData && config.gJSONData.configData.submitsLogging) { this.log = config.logger; + console.log("this.log = " + this.log.toSource()); this.setUpLogging(); } @@ -62,7 +63,7 @@ var BZPage = function BZPage(doc, config) { this.version = this.getVersion(); this.title = this.doc.getElementById("short_desc_nonedit_display").textContent; this.CCList = this.getCCList(); - + // Prepare for query buttons // FIXME getting null for commentArea sometimes var commentArea = this.doc.getElementById("comment_status_commit"); @@ -659,6 +660,7 @@ BZPage.prototype.setUpLogging = function setUpLogging () { console.log("Installing submit callback!"); this.doc.forms.namedItem("changeform").addEventListener("submit",function (evt) { console.log("Submit callback!"); + var resp = that.log.addLogRecord(that); console.log("resp = " + resp); if (resp === null) { -- cgit