From 35067b1111ec50471e670eb0d264ca29d9f66692 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Sun, 20 Feb 2011 03:23:27 +0100 Subject: Most of logger recovered. --- data/bzpage.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'data/bzpage.js') diff --git a/data/bzpage.js b/data/bzpage.js index 0d3bcbe..807793a 100644 --- a/data/bzpage.js +++ b/data/bzpage.js @@ -758,19 +758,24 @@ function getLogin () { } function addLogRecord() { + console.log("addLogRecord entered"); var rec = {}; rec.date = new Date(); rec.url = document.location.toString(); rec.title = document.title; var comment = window.prompt( "Enter comments for this comment"); + console.log("window.prompt = " + window.prompt); + console.log("comment = " + comment); if (comment && comment.length > 0) { comment = comment.trim(); rec.comment = comment; var dateStr = getISODate(rec.date); var urlStr = window.location.hostname; + var bugNo = getBugNoFromURL(window.location.href); rec.key = dateStr + "+" + - urlStr + "+" + getBugNo(); + urlStr + "+" + bugNo; + console.log("addLogRecord : rec = " + rec.toSource()) postMessage(new Message("AddLogRecord", rec)); return rec; } @@ -792,7 +797,10 @@ function setUpLogging () { // logging all submits for timesheet if (!submitHandlerInstalled) { document.forms.namedItem("changeform").addEventListener("submit",function (evt) { - if (addLogRecord() === null) { + console.log("addLogRecord = " + addLogRecord); + var logRecord = addLogRecord(); + console.log("logRecord = " + logRecord.toSource()); + if (logRecord === null) { evt.stopPropagation(); evt.preventDefault(); } -- cgit