aboutsummaryrefslogtreecommitdiffstats
path: root/data/tweaks/bug-page-mod.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-05-13 12:20:05 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-05-13 12:20:05 +0200
commit97f8f5ad45a8dfbde27f555eafec5d8318ad67b2 (patch)
treea81faa56305eba7d3900257b971d9eafac0dbd89 /data/tweaks/bug-page-mod.js
parent95c260d3edeeb85194193bfcbd1e991e4dadadbc (diff)
downloadbugzilla-triage-97f8f5ad45a8dfbde27f555eafec5d8318ad67b2.tar.gz
Really Eclipseize formatting.
Diffstat (limited to 'data/tweaks/bug-page-mod.js')
-rw-r--r--data/tweaks/bug-page-mod.js167
1 files changed, 45 insertions, 122 deletions
diff --git a/data/tweaks/bug-page-mod.js b/data/tweaks/bug-page-mod.js
index 2b29dc0..f4b75aa 100644
--- a/data/tweaks/bug-page-mod.js
+++ b/data/tweaks/bug-page-mod.js
@@ -53,7 +53,9 @@ function TweakOnMessageHandler(msg, nextHandler) {
/**
* generate XML-RPC call to collect complete history of the bug
- * @param XMLRPCURL URL of the XML-RPC gateway on the particular bugzilla
+ *
+ * @param XMLRPCURL
+ * URL of the XML-RPC gateway on the particular bugzilla
* @returns nothing
*
* As part of the message is name of the signal "returnedHistory"
@@ -172,116 +174,36 @@ function tweakBugzilla(atts, cData) {
// ===================================================
function processHistory(history) {
// FIXME Remove remaining code to special function ... callback
-// preprocessDuplicateMarkers(document, iframe.contentDocument);
-
-/*
-This is an example of the history we get:
-{
- "version": "1.1",
- "result": {
- "bugs": [
- {
- "history": [
- {
- "when": "2011-04-04T00:19:04Z",
- "who": "cebbert@redhat.com",
- "changes": [
- {
- "removed": "",
- "added": "xgl-maint@redhat.com",
- "field_name": "cc",
- "field": "CC"
- },
- {
- "removed": "kernel",
- "added": "xorg-x11-drv-ati",
- "field_name": "component",
- "field": "Component"
- },
- {
- "removed": "kernel-maint@redhat.com",
- "added": "xgl-maint@redhat.com",
- "field_name": "assigned_to",
- "field": "AssignedTo"
- }
- ]
- },
- {
- "when": "2011-04-12T22:48:22Z",
- "who": "mcepl@redhat.com",
- "changes": [
- {
- "attachment_id": 488889,
- "removed": "application/octet-stream",
- "added": "text/plain",
- "field_name": "attachments.mimetype",
- "field": "Attachment mime type"
- }
- ]
- },
- {
- "when": "2011-04-13T17:07:04Z",
- "who": "mcepl@redhat.com",
- "changes": [
- {
- "removed": "",
- "added": "needinfo?(suckfish@ihug.co.nz)",
- "field_name": "flagtypes.name",
- "field": "Flags"
- }
- ]
- },
- {
- "when": "2011-04-21T12:17:33Z",
- "who": "mcepl@redhat.com",
- "changes": [
- {
- "removed": "xgl-maint@redhat.com",
- "added": "jglisse@redhat.com",
- "field_name": "assigned_to",
- "field": "AssignedTo"
- }
- ]
- },
- {
- "when": "2011-04-28T22:53:58Z",
- "who": "mcepl@redhat.com",
- "changes": [
- {
- "attachment_id": 488889,
- "removed": "text/plain",
- "added": "application/octet-stream",
- "field_name": "attachments.mimetype",
- "field": "Attachment mime type"
- }
- ]
- },
- {
- "when": "2011-04-28T22:59:18Z",
- "who": "mcepl@redhat.com",
- "changes": [
- {
- "attachment_id": 488889,
- "removed": "application/octet-stream",
- "added": "text/plain",
- "field_name": "attachments.mimetype",
- "field": "Attachment mime type"
- }
- ]
- }
- ],
- "id": 692250,
- "alias": [
-
- ]
- }
- ],
- "faults": [
-
- ]
- }
-}
- */
+// preprocessDuplicateMarkers(document, iframe.contentDocument);
+
+ /*
+ * This is an example of the history we get: { "version": "1.1", "result": {
+ * "bugs": [ { "history": [ { "when": "2011-04-04T00:19:04Z", "who":
+ * "cebbert@redhat.com", "changes": [ { "removed": "", "added":
+ * "xgl-maint@redhat.com", "field_name": "cc", "field": "CC" }, { "removed":
+ * "kernel", "added": "xorg-x11-drv-ati", "field_name": "component", "field":
+ * "Component" }, { "removed": "kernel-maint@redhat.com", "added":
+ * "xgl-maint@redhat.com", "field_name": "assigned_to", "field": "AssignedTo" } ] }, {
+ * "when": "2011-04-12T22:48:22Z", "who": "mcepl@redhat.com", "changes": [ {
+ * "attachment_id": 488889, "removed": "application/octet-stream", "added":
+ * "text/plain", "field_name": "attachments.mimetype", "field": "Attachment
+ * mime type" } ] }, { "when": "2011-04-13T17:07:04Z", "who":
+ * "mcepl@redhat.com", "changes": [ { "removed": "", "added":
+ * "needinfo?(suckfish@ihug.co.nz)", "field_name": "flagtypes.name", "field":
+ * "Flags" } ] }, { "when": "2011-04-21T12:17:33Z", "who": "mcepl@redhat.com",
+ * "changes": [ { "removed": "xgl-maint@redhat.com", "added":
+ * "jglisse@redhat.com", "field_name": "assigned_to", "field": "AssignedTo" } ] }, {
+ * "when": "2011-04-28T22:53:58Z", "who": "mcepl@redhat.com", "changes": [ {
+ * "attachment_id": 488889, "removed": "text/plain", "added":
+ * "application/octet-stream", "field_name": "attachments.mimetype", "field":
+ * "Attachment mime type" } ] }, { "when": "2011-04-28T22:59:18Z", "who":
+ * "mcepl@redhat.com", "changes": [ { "attachment_id": 488889, "removed":
+ * "application/octet-stream", "added": "text/plain", "field_name":
+ * "attachments.mimetype", "field": "Attachment mime type" } ] } ], "id":
+ * 692250, "alias": [
+ * ] } ], "faults": [
+ * ] } }
+ */
// UserNameCache
var userNameCache = {};
@@ -299,12 +221,13 @@ This is an example of the history we get:
}
if (history) {
-// console.log("processHistory: history = " + history.toSource());
+// console.log("processHistory: history = " + history.toSource());
return ;
}
-// var historyItems = iframe.contentDocument.querySelectorAll('#bugzilla-body tr');
-// var cmtTimes = document.querySelectorAll('.bz_comment_time');
+// var historyItems = iframe.contentDocument.querySelectorAll('#bugzilla-body
+// tr');
+// var cmtTimes = document.querySelectorAll('.bz_comment_time');
// Sometimes the history will stack several changes together,
// and we'll want to append the data from the Nth item to the
@@ -312,19 +235,19 @@ This is an example of the history we get:
var i=0, j=0, flagsFound;
if (history) {
Array.forEach(history, function (item) {
- processHistoryItem(cmtTimes, item);
+ processHistoryItem(cmtTimes, item);
});
}
-
+
handleEmptyCollapsedBoxes(document);
-// // Set the latest flag links if necessary
-// for (var flagName in flagOccurrences) {
-// flags[flagName].innerHTML = '<a href="#' + flagOccurrences[flagName] + '">'
-// + flags[flagName].innerHTML + '</a>';
-// }
+// // Set the latest flag links if necessary
+// for (var flagName in flagOccurrences) {
+// flags[flagName].innerHTML = '<a href="#' + flagOccurrences[flagName] + '">'
+// + flags[flagName].innerHTML + '</a>';
+// }
-// AttachmentFlagHandler.setupLinks(document);
+// AttachmentFlagHandler.setupLinks(document);
// END OF load event handler
}