diff options
author | Matěj Cepl <mcepl@redhat.com> | 2010-06-20 10:49:59 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2010-06-20 10:49:59 +0200 |
commit | 47b6e6fb91372b54bb309e57c14e3f9f987e0322 (patch) | |
tree | 1ba20a3031716e1130d36fa49d03714e8365c0d6 /lib/logger.js | |
parent | a43c259f9d15f0334612844a94233ccc03592b22 (diff) | |
download | bugzilla-triage-47b6e6fb91372b54bb309e57c14e3f9f987e0322.tar.gz |
Trying to use api-utils.publicConstructor failed.
rhbzpage.markingBugTriaged should have hardcoded F-12 as the limit.
Diffstat (limited to 'lib/logger.js')
-rw-r--r-- | lib/logger.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/logger.js b/lib/logger.js index 3a534d4..1aec908 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -5,8 +5,9 @@ var urlMod = require("url"); var urilMod = require("util"); var Color = require("color").Color; var tabs = require("tabs"); +var apiUtils = require("api-utils"); -var Logger = exports.Logger = function Logger(store, abbsMap) { +function Logger(store, abbsMap) { this.EmptyLogsColor = new Color(0, 255, 0); this.FullLogsColor = new Color(0, 40, 103); @@ -14,6 +15,8 @@ var Logger = exports.Logger = function Logger(store, abbsMap) { this.abbsMap = abbsMap; }; +exports.Logger = apiUtils.publicConstructor(Logger); + Logger.prototype.addLogRecord = function(that) { var rec = {}; rec.date = new Date(); @@ -30,14 +33,14 @@ Logger.prototype.addLogRecord = function(that) { console.log("rec = " + rec.toSource()); var clearLogAElem = that.doc.getElementById("clearLogs"); - if (clearLogAElem.style.color != this.FullLogsColor) { - clearLogAElem.style.color = this.FullLogsColor; + if (clearLogAElem.style.color != that.FullLogsColor) { + clearLogAElem.style.color = that.FullLogsColor; clearLogAElem.style.fontWeight = "bolder"; } - if (this.store[recKey]) { - this.store[recKey].comment += "<br/>\n" + comment; + if (that.store[recKey]) { + that.store[recKey].comment += "<br/>\n" + comment; } else { - this.store[recKey] = rec; + that.store[recKey] = rec; } } return comment; @@ -112,4 +115,4 @@ Logger.prototype.createBlankPage = function (ttl, bodyBuildCB) { Logger.prototype.generateTimeSheet = function(body) { var doc = body.ownerDocument; this.timeSheetRecordsPrinter(body, this.store); -}; +};
\ No newline at end of file |