aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rhbzpage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-06-27 15:23:12 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-06-27 15:23:12 +0200
commit890dd7f9adcbe1ef7c4218edc89ee7075a12e211 (patch)
tree855893c690ebfbe5502b8151e3d3009501957091 /lib/rhbzpage.js
parent955f77978ea6f3f5730571698de07cc77d1fc5a4 (diff)
downloadbugzilla-triage-890dd7f9adcbe1ef7c4218edc89ee7075a12e211.tar.gz
Move all constant data out of the main JSON
Diffstat (limited to 'lib/rhbzpage.js')
-rw-r--r--lib/rhbzpage.js12
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 = "";
}