aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-01-13 00:21:10 +0100
committerMatěj Cepl <mcepl@redhat.com>2010-01-13 00:21:10 +0100
commit7ae28278cf7f4920175058971dee2b06b0e331b8 (patch)
tree405ddae028931822c9ab36b74744e33a8644626e
parentb0cb50e7e4fc468284f78c6d2768454160c6b27a (diff)
downloadbugzilla-triage-7ae28278cf7f4920175058971dee2b06b0e331b8.tar.gz
One more weirdness of new bugzilla.
-rw-r--r--bugzillaBugTriage.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js
index aad78ce..06af057 100644
--- a/bugzillaBugTriage.js
+++ b/bugzillaBugTriage.js
@@ -563,7 +563,7 @@ BzPage.prototype.collectComments = function () {
this.commentsWalker( function (x) {
outStr += x.getElementsByTagName("pre")[0].textContent + "\n";
});
- return outStr;
+ return outStr.trim();
};
/**
@@ -1477,11 +1477,11 @@ BzPage.prototype.buildButtons = function (above,below) {
"Send upstream","","SENDUPSTREAM","",false);
}
- var brElement2BMoved = this.dok.querySelector("#comment_status_commit br:last-of-type");
+// var brElement2BMoved = this.dok.querySelector("#comment_status_commit br:last-of-type");
// var brWhereMove = this.dok.getElementsByClassName("status")[0];
// brWhereMove.parentNode.insertBefore(brElement2BMoved.cloneNode(true),
// brWhereMove);
- brElement2BMoved.parentNode.removeChild(brElement2BMoved);
+// brElement2BMoved.parentNode.removeChild(brElement2BMoved);
// TODO Get compiz bugs as well
if ((chipIDsGroupings.length >0) &&
@@ -1508,13 +1508,9 @@ function BzPage(doc) {
var that = this;
this.originalButton = this.dok.getElementById("commit");
- // FIXME more elegant way to do this with querySelector?
- // var loginArr = $("#header ul:first li:last", this.doc).
- // text().split("\n");
- var loginArrLiElements = this.dok.getElementById("header").
- getElementsByTagName("ul")[0].
- getElementsByTagName("li");
- var loginArr = loginArrLiElements[loginArrLiElements.length-1].
+ console.log(this.dok.querySelector("#header ul.links li:last-of-type"));
+ var loginArr = this.dok.
+ querySelector("#header ul.links li:last-of-type").
textContent.split("\n");
this.login = loginArr[loginArr.length-1].trim();
this.password = "";