diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-02-20 03:23:27 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2011-02-20 03:23:27 +0100 |
commit | 35067b1111ec50471e670eb0d264ca29d9f66692 (patch) | |
tree | 1340b038ac0330a4ab5e3627f8f59e926f40b5d1 /data | |
parent | bd116ff3ac5cc62bbd85ef7036bc64f3f14ce794 (diff) | |
download | bugzilla-triage-35067b1111ec50471e670eb0d264ca29d9f66692.tar.gz |
Most of logger recovered.
Diffstat (limited to 'data')
-rw-r--r-- | data/bzpage.js | 12 | ||||
-rw-r--r-- | data/util.js | 3 |
2 files changed, 13 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(); } diff --git a/data/util.js b/data/util.js index 6c5e7b0..8232e9f 100644 --- a/data/util.js +++ b/data/util.js @@ -64,6 +64,7 @@ function parseXMLfromString (inStuff) { * Get a bug no */ function getBugNo() { + console.log("bugNo = " + document.forms.namedItem('changeform').getElementsByName("id")[0].value); return document.forms.namedItem('changeform').getElementsByName("id")[0].value; } @@ -73,7 +74,9 @@ function getBugNo() { * @return String with the bug ID */ function getBugNoFromURL(url) { + console.log("getBugNoFromURL : url = " + url); var params = parseURL(url).params; + console.log("getBugNoFromURL : params = " + params.toSource()); if (params && params.id) { return params.id; } |