diff options
Diffstat (limited to 'lib/rhbzpage.js')
-rw-r--r-- | lib/rhbzpage.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js index ef28175..f61a88b 100644 --- a/lib/rhbzpage.js +++ b/lib/rhbzpage.js @@ -6,6 +6,7 @@ var util = require("util"); var xrpc = require("xmlrpc"); var apiUtils = require("api-utils"); var xhr = require("xhr"); +var self = require("self"); var clip = require("clipboard"); var Color = require("color").Color; var BZPage = require("bzpage").BZPage; @@ -410,7 +411,7 @@ RHBugzillaPage.prototype.fillInWhiteBoard = function(iLine, driverStr) { var that = this; function groupIDs(manStr, cardStrID) { - var outStr = util.filterByRegexp(chipIDsGroupings, manStr + "," + cardStrID); + var outStr = util.filterByRegexp(config.chipIDsGroupings, manStr + "," + cardStrID); if (outStr.length === 0) { outStr = "UNGROUPED_" + manStr + "/" + cardStrID; } @@ -597,7 +598,7 @@ RHBugzillaPage.prototype.queryUpstream = function() { var text = this.getSelectionOrClipboard(); if (text) { text = encodeURIComponent(text.trim()); - var queryUpstreamBugsURLArray = this.constantData.queryUpstreamBug; + var queryUpstreamBugsURLArray = self.data.load("queryUpstreamBug.json"); var urlBase = util.filterByRegexp(queryUpstreamBugsURLArray, this.component); tabs.open({ url: urlBase + text, @@ -614,7 +615,7 @@ RHBugzillaPage.prototype.queryUpstream = function() { */ RHBugzillaPage.prototype.sendBugUpstream = function() { var that = this; - var urlStr = util.filterByRegexp(this.constantData.newUpstreamBug, this + var urlStr = util.filterByRegexp(JSON.parse(self.data.load("newUpstreamBug.json")), this .getOptionValue("component")); var ret = tabs.open({ @@ -692,8 +693,9 @@ RHBugzillaPage.prototype.fixElement = function(elem, beforeText, accKey, afterTe */ RHBugzillaPage.prototype.getBugzillaName = function(URLhostname) { var bugzillaID = ""; - if (this.constantData.bugzillalabelNames[URLhostname]) { - bugzillaID = this.constantData.bugzillalabelNames[URLhostname]; + var bzLabelNames = JSON.parse(self.data.load("bugzillalabelNames.json")); + if (bzLabelNames[URLhostname]) { + bugzillaID = bzLabelNames[URLhostname]; } else { bugzillaID = ""; } |