aboutsummaryrefslogtreecommitdiffstats
path: root/lib/logger.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/logger.js')
-rw-r--r--lib/logger.js48
1 files changed, 23 insertions, 25 deletions
diff --git a/lib/logger.js b/lib/logger.js
index cbe670d..659faac 100644
--- a/lib/logger.js
+++ b/lib/logger.js
@@ -10,6 +10,29 @@ var apiUtils = require("api-utils");
var xrpc = require("xmlrpc");
var myStorage = require("simple-storage");
+exports.addLogRecord = function addLogRecord(rec) {
+ if (myStorage.storage.logs[rec.key]) {
+ myStorage.storage.logs[rec.key].comment += "<br/>\n" + comment;
+ } else {
+ myStorage.storage.logs[rec.key] = rec;
+ }
+};
+
+exports.generateTimeSheet = function generateTimeSheet() {
+ ; // FIXME
+};
+
+exports.clearTimeSheet = function clearTimeSheet() {
+ ; // FIXME
+};
+
+exports.importTimeSheet = function importTimeSheet() {
+ ; /* FIXME
+ jsonPaths = prompts.promptFileOpenPicker(that.win);
+ that.log.importOtherStore(jsonPaths, clearLogAElem);
+ */
+};
+
var Logger = exports.Logger = function Logger(abbsMap) {
this.EmptyLogsColor = rgb(0, 255, 0);
this.FullLogsColor = rgb(0, 40, 103);
@@ -59,31 +82,6 @@ Logger.prototype.importOtherStore = function importOtherStore (filename, clearLi
}
};
-Logger.prototype.addLogRecord = function addLogRecord(page) {
- var rec = {};
- rec.date = new Date();
- rec.url = page.doc.location.toString();
- rec.title = page.title;
- var comment = prompts.prompt(
- "Enter comments for this comment");
- if (comment && comment.length > 0) {
- comment = comment.trim();
- rec.comment = comment;
- var dateStr = utilMod.getISODate(rec.date);
- var urlStr = urlMod.URL(rec.url).host;
- var recKey = dateStr + "+"
- + urlStr
- + "+" + page.bugNo;
-
- if (myStorage.storage.logs[recKey]) {
- myStorage.storage.logs[recKey].comment += "<br/>\n" + comment;
- } else {
- myStorage.storage.logs[recKey] = rec;
- }
- }
- return comment;
-};
-
Logger.prototype.getBugzillaAbbr = function(url) {
// for https://bugzilla.redhat.com/show_bug.cgi?id=579123 get RH
// for https://bugzilla.mozilla.org/show_bug.cgi?id=579123 get MoFo