aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/logging-front.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-04-28 13:28:55 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-04-28 18:26:14 +0200
commit32af48e442a960b8c3f199f5ffad28a34590fcda (patch)
treec291cb97627bd2cfb65167347261d5ef8f521bfd /data/lib/logging-front.js
parent2382ba19afc84e9b747a7981ebf72aaa704f08b6 (diff)
downloadbugzilla-triage-32af48e442a960b8c3f199f5ffad28a34590fcda.tar.gz
Reformatting to MoFo coding style
Diffstat (limited to 'data/lib/logging-front.js')
-rw-r--r--data/lib/logging-front.js66
1 files changed, 31 insertions, 35 deletions
diff --git a/data/lib/logging-front.js b/data/lib/logging-front.js
index b8343a4..2f85a51 100644
--- a/data/lib/logging-front.js
+++ b/data/lib/logging-front.js
@@ -12,8 +12,7 @@ function addLogRecord() {
rec.date = new Date();
rec.url = document.location.toString();
rec.title = document.title;
- var comment = window.prompt(
- "Enter comments for this comment");
+ var comment = window.prompt("Enter comments for this comment");
if (comment !== null) {
comment = comment.trim();
if (comment.length > 0) {
@@ -22,8 +21,7 @@ function addLogRecord() {
var dateStr = getISODate(rec.date);
var urlStr = window.location.hostname;
var bugNo = getBugNoFromURL(window.location.href);
- rec.key = dateStr + "+" +
- urlStr + "+" + bugNo;
+ rec.key = dateStr + "+" + urlStr + "+" + bugNo;
self.postMessage(new Message("AddLogRecord", rec));
}
return rec;
@@ -33,52 +31,50 @@ function addLogRecord() {
/**
*/
-function setUpLogging () {
+function setUpLogging() {
// Protection against double-call
if (document.getElementById("generateTSButton")) {
- return ;
+ return;
}
// For adding additional buttons to the top toolbar
- var additionalButtons = document.querySelector("#bugzilla-body *.related_actions");
+ var additionalButtons = document
+ .querySelector("#bugzilla-body *.related_actions");
var that = this;
// logging all submits for timesheet
if (!submitHandlerInstalled) {
- document.forms.namedItem("changeform").addEventListener("submit",function (evt) {
- if (addLogRecord() === null) {
- evt.stopPropagation();
- evt.preventDefault();
- }
- }, false);
+ document.forms.namedItem("changeform").addEventListener(
+ "submit", function(evt) {
+ if (addLogRecord() === null) {
+ evt.stopPropagation();
+ evt.preventDefault();
+ }
+ }, false);
submitHandlerInstalled = true;
}
// (id, text, parent, callback, params, before, covered, accesskey)
- createDeadLink("generateTSButton", "Generate TS", additionalButtons,
- function(evt) {
- self.postMessage(new Message("GenerateTS"));
- }, [], "dash", "li");
+ createDeadLink("generateTSButton", "Generate TS",
+ additionalButtons, function(evt) {
+ self.postMessage(new Message("GenerateTS"));
+ }, [], "dash", "li");
createDeadLink("clearLogs", "Clear TS", additionalButtons,
- function(evt) {
- self.postMessage(new Message("ClearTS"));
- }, [], "dash", "li");
+ function(evt) {
+ self.postMessage(new Message("ClearTS"));
+ }, [], "dash", "li");
- createDeadLink("importTSButton", "Import TS", additionalButtons,
- function(evt) {
- self.postMessage(new Message("ImportTS"));
- }, [], "dash", "li");
+ createDeadLink("importTSButton", "Import TS",
+ additionalButtons, function(evt) {
+ self.postMessage(new Message("ImportTS"));
+ }, [], "dash", "li");
- /* TODO
- var clearLogAElem = document.getElementById("clearLogs");
- if (this.log.isEmpty()) {
- clearLogAElem.style.color = this.log.EmptyLogsColor;
- clearLogAElem.style.fontWeight = "normal";
- }
- else {
- clearLogAElem.style.color = this.log.FullLogsColor;
- clearLogAElem.style.fontWeight = "bolder";
- }
- */
+ /*
+ * TODO var clearLogAElem = document.getElementById("clearLogs"); if
+ * (this.log.isEmpty()) { clearLogAElem.style.color = this.log.EmptyLogsColor;
+ * clearLogAElem.style.fontWeight = "normal"; } else {
+ * clearLogAElem.style.color = this.log.FullLogsColor;
+ * clearLogAElem.style.fontWeight = "bolder"; }
+ */
}