From 25028bef747da268b7a2923916a835f232820860 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Tue, 18 May 2010 01:36:19 +0200 Subject: Fix "Def. Assignee" button. Also remove eclipsization. --- bugzillaBugTriage.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'bugzillaBugTriage.js') diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js index 67fe8d5..f0a5d59 100644 --- a/bugzillaBugTriage.js +++ b/bugzillaBugTriage.js @@ -627,7 +627,6 @@ function BZPage(doc) { this.product = this.getOptionValue("product"); this.component = this.getOptionValue("component"); this.version = this.getVersion(); - this.defaultAssignee = this.setDefaultAssignee(); this.title = this.doc.getElementById("short_desc_nonedit_display").textContent; this.CCList = this.getCCList(); @@ -789,10 +788,15 @@ BZPage.prototype.changeAssignee = function(newAssignee) { if (newAssignee === null) { this.doc.getElementById("set_default_assignee").removeAttribute( "checked"); + return ; } - - if (newAssignee == "default" && this.defaultAssignee) { - newAssignee = this.defaultAssignee; + + if (this.getDefaultAssignee) { + let defAss = this.getDefaultAssignee(); + console.log("defAss = " + defAss); + if (newAssignee == "default" && defAss) { + newAssignee = defAss; + } } if (newAssignee) { @@ -1302,6 +1306,9 @@ BZPage.prototype.setUpLoggingButtons = function() { */ BZPage.prototype.addToCCList = function(who) { console.log("who = " + who); + if (!who) { + return ; + } if (who == "self") { this.doc.getElementById("addselfcc").checked = true; } else { @@ -1359,6 +1366,7 @@ RHBugzillaPage = function(doc) { // END OF CONSTANTS // Prepare for query buttons + // FIXME getting null for commentArea sometimes let commentArea = doc.getElementById("comment_status_commit"); let brElementPlacer = commentArea.getElementsByTagName("br")[0]; brElementPlacer.setAttribute("id","brElementPlacer_location"); @@ -1393,6 +1401,7 @@ RHBugzillaPage = function(doc) { this.XorgLogAttListIndex = 0; this.attachments = this.getAttachments(); this.markBadAttachments(); + this.setDefaultAssignee(); // Dig out backtrace this.btSnippet = ""; @@ -1441,7 +1450,6 @@ RHBugzillaPage.prototype.getDefaultAssignee = function() { this.component).toLowerCase(); } - /** * Set default assignee * @@ -1451,6 +1459,7 @@ RHBugzillaPage.prototype.getDefaultAssignee = function() { RHBugzillaPage.prototype.setDefaultAssignee = function() { this.defaultAssignee = this.getDefaultAssignee(); let defAss = this.defaultAssignee; + console.log("defAss = " + defAss); // Add setting default assignee if ((defAss.length > 0) && (defAss !== this.getOwner())) { @@ -2400,14 +2409,6 @@ RHBugzillaPage.prototype.markBugTriaged = function() { // for