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-04-28 18:26:14 +0200
commit32af48e442a960b8c3f199f5ffad28a34590fcda (patch)
treec291cb97627bd2cfb65167347261d5ef8f521bfd /data/lib/addNewLinks.js
parent2382ba19afc84e9b747a7981ebf72aaa704f08b6 (diff)
downloadbugzilla-triage-32af48e442a960b8c3f199f5ffad28a34590fcda.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");
}
}
}