aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-09-23 14:23:25 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-09-23 14:23:25 +0200
commit38c0e794b2a46545ed2b31d5ddfd27cd533c1d3d (patch)
tree6910103b37026a8ea38bff25719920a32d375ab5 /lib
parentc1a5120e976d18072e80a6086ff0a6a8ef83cb88 (diff)
downloadbugzilla-triage-38c0e794b2a46545ed2b31d5ddfd27cd533c1d3d.tar.gz
innerHTML is a good servant ... scrap it, it is bad servant even.
Diffstat (limited to 'lib')
-rw-r--r--lib/rhbzpage.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js
index c3d86ba..9bbc81f 100644
--- a/lib/rhbzpage.js
+++ b/lib/rhbzpage.js
@@ -311,13 +311,9 @@ RHBugzillaPage.prototype.pasteBacktraceInComments = function() {
// TODO we need to go through all backtrace attachments, but
// just the first one will do for now, we would need to do async
// parsing
- console.log("btAttachments = " + btAttachments.toSource());
btAttachments.forEach(function(x) {
var attURL = "https://bugzilla.redhat.com/attachment.cgi?id="
+ x[1];
- console.log("attURL = " + attURL);
- console.log("this.btSnippet = " + this.btSnippet);
- console.log("btparsed = " + this.idContainsWord("status_whiteboard", 'btparsed'));
if ((!this.btSnippet) &&
(!this.idContainsWord("status_whiteboard", 'btparsed'))) {
var that = this;
@@ -388,8 +384,10 @@ RHBugzillaPage.prototype.addNewAttachmentRow = function addNewAttachmentRow(orig
var newTRElem = origAtt[4].cloneNode(true);
// fix number of the attachment
- newTRElem.innerHTML = newTRElem.innerHTML.replace(origAtt[1], newAttId);
- console.log("newTRElem = " + newTRElem.innerHTML);
+ Array.forEach(newTRElem.getElementsByTagName("a"), function (aEl) {
+ aEl.setAttribute("href",
+ aEl.getAttribute("href").replace(origAtt[1], newAttId));
+ });
var aElements = newTRElem.getElementsByTagName("a");
aElements[0].setAttribute("name","parsed-backtrace.txt");
@@ -402,7 +400,6 @@ RHBugzillaPage.prototype.addNewAttachmentRow = function addNewAttachmentRow(orig
var vcardSpan = newTRElem.getElementsByClassName("vcard")[0];
if (vcardSpan !== undefined) {
- console.log("vcardSpan = " + vcardSpan);
var vcardSpanClassList = vcardSpan.classList;
if (/@redhat\.com/.test(this.login) && !vcardSpanClassList.contains("redhat_user")) {
vcardSpanClassList.add("redhat_user");
@@ -415,7 +412,6 @@ RHBugzillaPage.prototype.addNewAttachmentRow = function addNewAttachmentRow(orig
}
var elem = newTRElem.querySelector("td:last-of-type");
- console.log("elem.innerHTML = " + elem.innerHTML);
this.createDeadLink("showBacktrace", "show BT", elem,
this.showAttachment, newAttId, false);