aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/bzpage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-07-19 14:30:39 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-07-19 15:22:49 +0200
commitd75f36db36c442ae9621dc128fbd916c25d5735f (patch)
treec9ed3fcd6f86d28a9434b95e5060f3f64be17917 /data/lib/bzpage.js
parente06a2341056cabd82fae8527d30a9ec97b24dc10 (diff)
parent4ef203c974e889b74e4064ee04eddc55ba7b8c08 (diff)
downloadbugzilla-triage-d75f36db36c442ae9621dc128fbd916c25d5735f.tar.gz
Merge branch 'bugzillatweaks' into next.
This is a horribly botched branch merged. Conflicts: chip-data/chipNames.json data/lib/bugzillaDOMFunctions.js data/lib/bzpage.js data/lib/jumpNextBug.js data/lib/otherButtons.js data/lib/queries.js data/lib/util.js data/rhlib/addAttachmentRow.js data/rhlib/fixingAttMIME.js data/rhlib/rhbzpage.js data/tweaks/bug-page-mod.js data/tweaks/viewSource.js lib/libbugzilla.js lib/main.js package.json
Diffstat (limited to 'data/lib/bzpage.js')
-rw-r--r--data/lib/bzpage.js45
1 files changed, 16 insertions, 29 deletions
diff --git a/data/lib/bzpage.js b/data/lib/bzpage.js
index c1898eb..4401792 100644
--- a/data/lib/bzpage.js
+++ b/data/lib/bzpage.js
@@ -329,43 +329,25 @@ function setConfigurationButton () {
}
/**
- * dd
- *
- * @return Element with the href attribute containng the information
- */
-function getOptionTableCell(tableId, label) {
- var cleanLabelRE = new RegExp("^\\s*([^.:]*):?\\s*$");
- label = label.trim().replace(cleanLabelRE,"$1").toLowerCase();
-
- var rows = document.getElementById(tableId).getElementsByTagName("tr");
- var ourLine = Array.filter(rows, function(row) {
- var curLabel = row.getElementsByTagName("td")[0].textContent.toLowerCase();
- curLabel = curLabel.replace(cleanLabelRE,"$1");
- return (curLabel === label); // maybe this could be a RE match instead
- });
-
- if (ourLine.length > 0) {
- return ourLine[0].getElementsByTagName("td")[1].
- getElementsByTagName("a")[0];
- }
- return null;
-}
-
-
-/**
* Complete startup, mainly run alternate inits for non-standard BZ with proper
* arguments
*
*/
function completeInit() {
- var attachments = getAttachments();
+ // FIXME: add flags, and priority or others bits.
+ var things = {
+ attachments: new AttachList(document),
+ comments: new CommentList(document)
+ };
if (RHBZinit) {
- RHBZinit(attachments);
+ RHBZinit(things);
}
+ things.comments.colorComments();
+
if (tweakBugzilla && config.verboseInlineHistory) {
- tweakBugzilla(attachments, constantData);
+ tweakBugzilla(things, constantData);
}
}
@@ -398,6 +380,13 @@ function startup() {
}
}
+ // Prepare for adding external bugs
+ var a0Elements = document.getElementsByName("a0");
+ if (a0Elements.length > 0) {
+ var extBugsHeadline = a0Elements[a0Elements.length - 1];
+ extBugsHeadline.setAttribute("id", "external_bugs_headline");
+ }
+
// TODO Probably could be ignored ... used only once on line 973 of
// rhbzpage.js
// if (parseAbrtBacktraces && this.RE.Abrt.test(getSummary())) {
@@ -408,8 +397,6 @@ function startup() {
setConfigurationButton();
submitHandlerInstalled = false;
- checkComments();
-
self.postMessage(new Message("GetInstalledPackages", {
location: window.location.href,
login: getLogin()