From 6c712499e59c6a5d2067d189a27cc1e10008964d Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Fri, 18 Dec 2009 03:09:25 +0100 Subject: Some changes from offline branch and .gitignore --- bugzillaBugTriage.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'bugzillaBugTriage.js') diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js index 41ce1fc..e95a0ca 100644 --- a/bugzillaBugTriage.js +++ b/bugzillaBugTriage.js @@ -532,7 +532,8 @@ bzPage.prototype.isTriaged = function() { if (this.version > 11) { return this.hasKeyword("Triaged"); } else { - return this.getElementById("bug_status").value.toUpperCase() !== "NEW"; + return this.dok.getElementById("bug_status"). + value.toUpperCase() !== "NEW"; } }; @@ -1378,7 +1379,16 @@ function bzPage(doc) { if (myConfig.BZpassword) { this.password = myConfig.BZpassword; } else { - this.password = this.dok.defaultView.prompt("Enter your Bugzilla password",""); + let prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] + .getService(Components.interfaces.nsIPromptService); + let password = {value: ""}; // default the password to pass + let check = {value: true}; // default the checkbox to true + let result = prompts.promptPassword(null, + "Title", "Enter password:", password, null, check); + // result is true if OK was pressed, false if cancel was pressed. password.value is + // set if OK was pressed. The checkbox is not displayed. + if (result) { + this.password = password.value; myConfig.BZpassword = this.password; } -- cgit