aboutsummaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/lib/bzpage.js12
-rw-r--r--data/lib/logging-front.js4
2 files changed, 11 insertions, 5 deletions
diff --git a/data/lib/bzpage.js b/data/lib/bzpage.js
index bd8e6ce..1a3e6b4 100644
--- a/data/lib/bzpage.js
+++ b/data/lib/bzpage.js
@@ -75,6 +75,7 @@ function centralCommandDispatch (cmdLabel, cmdParams) {
console.log("centralCommandDispatch : cmdLabel = " + cmdLabel);
switch (cmdLabel) {
case "name":
+ case "position":
break;
case "resolution":
case "product":
@@ -248,22 +249,25 @@ function changeAssignee (newAssignee) {
function addToCommentsDropdown (cmdObj) {
var select = document.getElementById("comment_action");
if (!select) {
+ config.commandsList = [];
document.getElementById("comments").innerHTML +=
"<div id='make_bugzilla_comment_action'>" +
" <label for='comment_action'>Add Comment: </label>" +
" <select id='comment_action'>" +
" <option value=''>-- Select Comment from List --</option>" +
+ " </select>" +
"</div>";
select = document.getElementById("comment_action");
select.addEventListener("change", function (evt) {
var value = select.options[select.selectedIndex].value;
- log("value = " + value);
- executeCommand(value);
+ executeCommand(config.commandsList[value]);
}, false);
}
var opt = document.createElement("option");
- opt.value = cmdObj;
+ var objIdx = config.commandsList.length + 1;
+ opt.value = objIdx;
+ config.commandsList[objIdx] = cmdObj;
opt.textContent = cmdObj.name;
select.appendChild(opt);
}
@@ -332,7 +336,7 @@ function generateButtons (pkgs, kNodes) {
// =========================================================
if (kNodes && window.location.hostname in kNodes) {
- var killConf = killNodes[window.location.hostname];
+ var killConf = kNodes[window.location.hostname];
killNodes(document, killConf[0], killConf[1]);
}
diff --git a/data/lib/logging-front.js b/data/lib/logging-front.js
index b3a175d..f6b3546 100644
--- a/data/lib/logging-front.js
+++ b/data/lib/logging-front.js
@@ -82,4 +82,6 @@ function setUpLogging () {
*/
}
-setUpLogging();
+if (window.location.hostname == "bugzilla.redhat.com") {
+ setUpLogging();
+}