diff options
author | Matěj Cepl <mcepl@redhat.com> | 2010-07-16 19:01:46 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2010-07-16 19:01:46 +0200 |
commit | f77aee9c533e72cfbc141755894946f09a256c9e (patch) | |
tree | f93eb6fce81e485cdff249c61c8af543e1f987ac /lib/bzpage.js | |
parent | 255e556c63171704c28c00dfeffc71d79bc9d78a (diff) | |
download | bugzilla-triage-f77aee9c533e72cfbc141755894946f09a256c9e.tar.gz |
Make "Query upstream" button working again.
Fix #22
Diffstat (limited to 'lib/bzpage.js')
-rw-r--r-- | lib/bzpage.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/bzpage.js b/lib/bzpage.js index f8c46c8..a088259 100644 --- a/lib/bzpage.js +++ b/lib/bzpage.js @@ -5,6 +5,7 @@ var util = require("util"); var passUtils = require("passwords"); var apiUtils = require("api-utils"); +var selfMod = require("self"); var simpleStorage = require("simple-storage"); var preferences = require("preferences-service"); var prompts = require("prompts"); @@ -65,6 +66,8 @@ var BZPage = function BZPage(win, config) { if ("constantData" in config.gJSONData) { this.constantData = config.gJSONData.constantData; + this.constantData.queryUpstreamBug = JSON.parse( + selfMod.data.load("queryUpstreamBug.json")); } if ("CCmaintainer" in config.gJSONData.constantData) { @@ -374,6 +377,7 @@ BZPage.prototype.createNewButton = function createNewButton (location, after, pk // creation of button might be conditional on existence of data in constantData if ("ifExist" in cmdObj) { + console.log("checking ifExist:\n" + this.constantData.toSource()); if (!(cmdObj.ifExist in this.constantData)) { return ; } @@ -388,9 +392,6 @@ BZPage.prototype.createNewButton = function createNewButton (location, after, pk }, false); var originalLocation = this.doc.getElementById(location); - if (!originalLocation) { - console.log("location = " + location); - } if (after) { originalLocation.parentNode.insertBefore(newButton, @@ -538,7 +539,7 @@ BZPage.prototype.collectComments = function collectComments () { * */ BZPage.prototype.selectOption = function selectOption (id, label, fireEvent) { - if (fireEvent === null) { + if (!fireEvent) { fireEvent = true; } var sel = this.doc.getElementById(id); |