From 29699cd28c82b221a79feaa7dbb4a46beb51b5d8 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 30 Sep 2010 00:22:24 +0200 Subject: Use createDeadLink method, it's better for your soul. --- lib/rhbzpage.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js index 20dac39..463a546 100644 --- a/lib/rhbzpage.js +++ b/lib/rhbzpage.js @@ -624,13 +624,9 @@ RHBugzillaPage.prototype.addCheckXorgLogLink = function addCheckXorgLogLink() { this.XorgLogAttList.forEach(function (row) { var elemS = row[4].getElementsByTagName("td"); var elem = elemS[elemS.length - 1]; - elem.innerHTML += "
check"; - elem.addEventListener("click", function(x) { - that.analyzeXorgLog(row[1]); - evt.stopPropagation(); - evt.preventDefault(); - }, false); - }, this); + that.createDeadLink("xorgLogAnalyzeLink", "check", elem, + that.analyzeXorgLog, row[1], "br"); + }); } }; @@ -905,13 +901,10 @@ RHBugzillaPage.prototype.fixAttachById = function fixAttachById(id, type, email) * @return none */ RHBugzillaPage.prototype.addTextLink = function addTextLink(row) { - var that = this; var elemS = row[4].getElementsByTagName("td"); var elem = elemS[elemS.length - 1]; - elem.innerHTML += "
Text"; - elem.addEventListener("click", function(x) { - that.fixAttachById(row[1]); - }, false); + this.createDeadLink("addFix2TextLink", "text", elem, + this.fixAttachById, row[1], "br"); }; /** -- cgit