aboutsummaryrefslogtreecommitdiffstats
path: root/data/bzpage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-02-20 03:23:27 +0100
committerMatěj Cepl <mcepl@redhat.com>2011-02-20 03:23:27 +0100
commit35067b1111ec50471e670eb0d264ca29d9f66692 (patch)
tree1340b038ac0330a4ab5e3627f8f59e926f40b5d1 /data/bzpage.js
parentbd116ff3ac5cc62bbd85ef7036bc64f3f14ce794 (diff)
downloadbugzilla-triage-35067b1111ec50471e670eb0d264ca29d9f66692.tar.gz
Most of logger recovered.
Diffstat (limited to 'data/bzpage.js')
-rw-r--r--data/bzpage.js12
1 files changed, 10 insertions, 2 deletions
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();
}