aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/addNewLinks.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-04-28 13:28:55 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-06-05 14:47:40 +0200
commit55d9a312fbba91f1bcf5e3f3291b7bece8abb178 (patch)
treebb9ef165b425273da47aa000268395f87f26678e /data/lib/addNewLinks.js
parent34bbe8e7306a0d0ec014db7512788ed92c625d19 (diff)
downloadbugzilla-triage-55d9a312fbba91f1bcf5e3f3291b7bece8abb178.tar.gz
Reformatting to MoFo coding style
Diffstat (limited to 'data/lib/addNewLinks.js')
-rw-r--r--data/lib/addNewLinks.js35
1 files changed, 21 insertions, 14 deletions
diff --git a/data/lib/addNewLinks.js b/data/lib/addNewLinks.js
index 02bd658..b8e7bd2 100644
--- a/data/lib/addNewLinks.js
+++ b/data/lib/addNewLinks.js
@@ -36,35 +36,42 @@
* ***** END LICENSE BLOCK ***** */
function addNewLinks(d) {
- var product = d.querySelector("#field_container_product option[selected]");
+ var product = d
+ .querySelector("#field_container_product option[selected]");
var component = d.querySelector("#component option[selected]");
if (product) {
var label = d.getElementById('field_container_product');
- var url = 'enter_bug.cgi?product=' + encodeURIComponent(product.value);
+ var url = 'enter_bug.cgi?product='
+ + encodeURIComponent(product.value);
if (label) {
- createDeadLink("file_new_bug_product", "new", label,
- url, [], "parens");
+ createDeadLink("file_new_bug_product", "new", label, url,
+ [], "parens");
}
}
if (product && component) {
var select = d.querySelector("select#component");
var label = select.parentNode;
- var url = 'enter_bug.cgi?product=' + encodeURIComponent(product.value) +
- '&component=' + encodeURIComponent(component.value);
+ var url = 'enter_bug.cgi?product='
+ + encodeURIComponent(product.value) + '&component='
+ + encodeURIComponent(component.value);
if (label) {
- var componentElement = document.getElementById("bz_component_input");
+ var componentElement = document
+ .getElementById("bz_component_input");
if (componentElement) { // We are in the Red Hat bugzilla
- // do we have components list visible?
- if (document.getElementById('bz_component_input').
- classList.contains("bz_default_hidden")) {
- label = document.getElementById("bz_component_edit_container");
- }
- } else {
+ // do we have components list visible?
+ if (document.getElementById('bz_component_input').classList
+ .contains("bz_default_hidden")) {
+ label = document
+ .getElementById("bz_component_edit_container");
+ }
+ }
+ else {
label = document.getElementById('component').parentNode;
}
- createDeadLink("file_new_bug_component", "new", label, url, [], "parens");
+ createDeadLink("file_new_bug_component", "new", label,
+ url, [], "parens");
}
}
}