aboutsummaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-03-01 22:52:30 +0100
committerMatěj Cepl <mcepl@redhat.com>2011-03-01 22:54:12 +0100
commit5957bf89411f587d6070afadfd33cbacbc173b45 (patch)
treeaf7ddc655656d4caf0261e835854430e3b6d12df /data
parentb8b0a3b659141021e5f53fe55000eac22aa1d45a (diff)
downloadbugzilla-triage-5957bf89411f587d6070afadfd33cbacbc173b45.tar.gz
Logger at least creates new records.
Diffstat (limited to 'data')
-rw-r--r--data/lib/bzpage.js29
-rw-r--r--data/lib/skip-bug.js1
-rw-r--r--data/lib/util.js2
3 files changed, 12 insertions, 20 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();
}
diff --git a/data/lib/skip-bug.js b/data/lib/skip-bug.js
index 9fcb531..da6f606 100644
--- a/data/lib/skip-bug.js
+++ b/data/lib/skip-bug.js
@@ -10,7 +10,6 @@ function reloadPage() {
exec(titleElems[0].textContent);
var hostname = document.location.hostname;
if (REArr) {
- console.log("Reloading bug " + REArr[1] + "!");
document.location = stemURL.
replace('HOSTNAME',hostname) + REArr[1];
}
diff --git a/data/lib/util.js b/data/lib/util.js
index 8232e9f..6c204ff 100644
--- a/data/lib/util.js
+++ b/data/lib/util.js
@@ -74,9 +74,7 @@ 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;
}