aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-08-08 23:18:28 -0400
committerMatěj Cepl <mcepl@redhat.com>2010-08-08 23:18:28 -0400
commitff3ee8ca4f8ea9f30655c714d2fe91b3c43cd0a8 (patch)
treef82735fe4d9e11ae928993df2891e1b916457b77 /lib
parentea31bb39676ac5667dd6f481408280201675fcc3 (diff)
downloadbugzilla-triage-ff3ee8ca4f8ea9f30655c714d2fe91b3c43cd0a8.tar.gz
Make scripts compatible with bugzilla.gnome.org
Fixes #38 - Eliminate automatic "all" packages for bugzillas undefined in enabledPackages object, - Config_data.json: do have enabledPackages with RH BZ "all" comments - Fix spread of buttons in Gnome BZ
Diffstat (limited to 'lib')
-rw-r--r--lib/bzpage.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/bzpage.js b/lib/bzpage.js
index 8b96c9c..878ce87 100644
--- a/lib/bzpage.js
+++ b/lib/bzpage.js
@@ -157,8 +157,9 @@ BZPage.prototype.getInstalledPackages = function getInstalledPackages(cfg) {
if ("any" in epObject) {
enabledPackages = enabledPackages.concat(epObject.any.split(/[, ]/));
}
- } else {
- // Default to collecting all comment packages available
+ }
+
+ if ((enabledPackages.length === 1) && (enabledPackages[0] === "all")) {
enabledPackages = [];
for (var key in cfg.gJSONData.commentPackages) {
enabledPackages.push(key);
@@ -694,7 +695,7 @@ BZPage.prototype.getOptionTableCell = function getOptionTableCell(tableId, label
var rows = this.doc.getElementById(tableId).getElementsByTagName("tr");
var ourLine = Array.filter(rows, function(row) {
var curLabel = row.getElementsByTagName("td")[0].textContent.toLowerCase();
- curLabel = curLabel.replace(cleanLabelRE,"$1");
+ curLabel = curLabel.replace(cleanLabelRE,"$1");
return (curLabel === label);
});
if (ourLine.length > 0) {