aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/otherButtons.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/lib/otherButtons.js')
-rw-r--r--data/lib/otherButtons.js79
1 files changed, 43 insertions, 36 deletions
diff --git a/data/lib/otherButtons.js b/data/lib/otherButtons.js
index 66b5a9b..ab8ec35 100644
--- a/data/lib/otherButtons.js
+++ b/data/lib/otherButtons.js
@@ -4,9 +4,9 @@
/**
* Set background color of all comments made by reporter in ReporterColor color
- *
+ *
*/
-function checkComments () {
+function checkComments() {
var reporter = getReporter();
commentsWalker(function(x) {
var email = parseMailto(x.getElementsByClassName("vcard")[0]
@@ -17,39 +17,39 @@ function checkComments () {
});
}
-function collectComments () {
+function collectComments() {
var outStr = "";
commentsWalker(function(x) {
- outStr += x.getElementsByTagName("pre")[0].textContent + "\n";
+ outStr += x.getElementsByTagName("pre")[0].textContent
+ + "\n";
});
return outStr.trim();
}
/**
* Find default assignee based on the current component
- *
- * @return String what would be a default assignee if
- * we haven't set it up.
+ *
+ * @return String what would be a default assignee if we haven't set it up.
*/
function getDefaultAssignee() {
return filterByRegexp(constantData.defaultAssignee,
- getComponent());
+ getComponent());
}
/**
* Set default assignee
- *
- * @return none
- * sets this.defaultAssignee property according to defaultAssignee list
+ *
+ * @return none sets this.defaultAssignee property according to defaultAssignee
+ * list
*/
function setDefaultAssignee() {
var defAss = getDefaultAssignee();
// Add setting default assignee
if (defAss && (defAss !== getOwner())) {
- createNewButton("bz_assignee_edit_container",true, {
- "name": "Def. Assignee",
- "assignee": "default"
+ createNewButton("bz_assignee_edit_container", true, {
+ "name" : "Def. Assignee",
+ "assignee" : "default"
});
}
}
@@ -67,7 +67,7 @@ function markBugTriaged() {
alert("This won't do! Specify some severity!");
}
else {
- addStuffToTextBox("keywords","Triaged");
+ addStuffToTextBox("keywords", "Triaged");
}
}
@@ -78,12 +78,13 @@ function addingEmbelishments(list) {
var maintCCAddr = "";
if (constantData.CCmaintainer) {
maintCCAddr = filterByRegexp(constantData.CCmaintainer,
- getComponent())[0]; // filterByRegexp returns array, not string
+ getComponent())[0]; // filterByRegexp returns array, not string
}
// we should make visible whether maintCCAddr is in CCList
if (maintCCAddr && isInList(maintCCAddr, getCCList())) {
- var ccEditBoxElem = document.getElementById("cc_edit_area_showhide");
+ var ccEditBoxElem = document
+ .getElementById("cc_edit_area_showhide");
ccEditBoxElem.style.color = "navy";
ccEditBoxElem.style.fontWeight = "bolder";
ccEditBoxElem.style.textDecoration = "underline";
@@ -93,8 +94,8 @@ function addingEmbelishments(list) {
if (config.signature && config.signature.length > 0) {
var signaturesCounter = 0;
var signatureFedoraString = config.signature;
- document.forms.namedItem("changeform").addEventListener("submit",
- function(aEvt) {
+ document.forms.namedItem("changeform").addEventListener(
+ "submit", function(aEvt) {
if (signaturesCounter < 1) {
addStuffToTextBox("comment", signatureFedoraString);
signaturesCounter += 1;
@@ -105,19 +106,19 @@ function addingEmbelishments(list) {
// set default assignee on change of the component
var compElement = document.getElementById("component");
if (compElement && (compElement.options)) {
- document.getElementById("component").addEventListener("change",
- function() {
+ document.getElementById("component").addEventListener(
+ "change", function() {
changeAssignee("default");
}, false);
}
// TODO Get compiz bugs as well
- if ((constantData.chipNames) &&
- (list[0]) &&
- (!FillMagicDoneRE.test(getSummary())) &&
- (maintCCAddr === "xgl-maint@redhat.com")) {
+ if ((constantData.chipNames) && (list[0])
+ && (!FillMagicDoneRE.test(getSummary()))
+ && (maintCCAddr === "xgl-maint@redhat.com")) {
// Add find chip magic button
- var whiteboard_string = document.getElementById("status_whiteboard").value;
+ var whiteboard_string = document
+ .getElementById("status_whiteboard").value;
if (!/card_/.test(whiteboard_string)) {
fillInChipMagic(list[0][1]);
}
@@ -126,10 +127,13 @@ function addingEmbelishments(list) {
/**
* Set branding colours to easily distinguish between Fedora and RHEL bugs
- *
- * @param brand String with product of the current bug
- * @param version String with the version of the bug
- * @param its String with the IsueTracker numbers
+ *
+ * @param brand
+ * String with product of the current bug
+ * @param version
+ * String with the version of the bug
+ * @param its
+ * String with the IsueTracker numbers
* @return none
*/
function setBranding(xLogAtts) {
@@ -147,8 +151,8 @@ function setBranding(xLogAtts) {
brandColor = RHColor;
}
}
- else if (new RegExp("Fedora").test(document.
- getElementById("product").value)) {
+ else if (new RegExp("Fedora").test(document
+ .getElementById("product").value)) {
if (document.getElementById("version").value === "rawhide") {
brandColor = RawhideColor;
}
@@ -161,7 +165,8 @@ function setBranding(xLogAtts) {
document.getElementsByTagName("body")[0].style.background = brandColor
.toString()
+ " none";
- document.getElementById("titles").style.background = brandColor.toString()
+ document.getElementById("titles").style.background = brandColor
+ .toString()
+ " none";
// Remove "Bug" from the title of the bug page, so we have more space with
@@ -169,7 +174,8 @@ function setBranding(xLogAtts) {
var titleElem = document.getElementsByTagName("title")[0];
titleElem.textContent = titleElem.textContent.slice(4);
- var bodyTitleParent = document.getElementById("summary_alias_container").parentNode;
+ var bodyTitleParent = document
+ .getElementById("summary_alias_container").parentNode;
var bodyTitleElem = bodyTitleParent.getElementsByTagName("b")[0];
bodyTitleElem.textContent = bodyTitleElem.textContent.slice(4);
@@ -177,7 +183,8 @@ function setBranding(xLogAtts) {
// for security bugs.
if (hasKeyword("Security")) {
document.getElementById("bugzilla-body").style.background = SalmonPink
- .toString() + ' none';
+ .toString()
+ + ' none';
}
// Make it visible whether the bug has been triaged
@@ -194,6 +201,6 @@ function setBranding(xLogAtts) {
.getElementById("bz_component_edit_container"))) {
compElems.style.background = "red none";
}
-
+
addingEmbelishments(xLogAtts);
}