aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/bzpage.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/lib/bzpage.js')
-rw-r--r--data/lib/bzpage.js29
1 files changed, 12 insertions, 17 deletions
diff --git a/data/lib/bzpage.js b/data/lib/bzpage.js
index 807793a..e8b2b95 100644
--- a/data/lib/bzpage.js
+++ b/data/lib/bzpage.js
@@ -758,25 +758,23 @@ 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 + "+" + bugNo;
- console.log("addLogRecord : rec = " + rec.toSource())
- postMessage(new Message("AddLogRecord", rec));
+ if (comment) {
+ if (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 + "+" + bugNo;
+ postMessage(new Message("AddLogRecord", rec));
+ }
return rec;
}
return null;
@@ -797,10 +795,7 @@ function setUpLogging () {
// logging all submits for timesheet
if (!submitHandlerInstalled) {
document.forms.namedItem("changeform").addEventListener("submit",function (evt) {
- console.log("addLogRecord = " + addLogRecord);
- var logRecord = addLogRecord();
- console.log("logRecord = " + logRecord.toSource());
- if (logRecord === null) {
+ if (addLogRecord() === null) {
evt.stopPropagation();
evt.preventDefault();
}