aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/bzpage.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/bzpage.js
parent34bbe8e7306a0d0ec014db7512788ed92c625d19 (diff)
downloadbugzilla-triage-55d9a312fbba91f1bcf5e3f3291b7bece8abb178.tar.gz
Reformatting to MoFo coding style
Diffstat (limited to 'data/lib/bzpage.js')
-rw-r--r--data/lib/bzpage.js74
1 files changed, 42 insertions, 32 deletions
diff --git a/data/lib/bzpage.js b/data/lib/bzpage.js
index 3a832ea..9e65794 100644
--- a/data/lib/bzpage.js
+++ b/data/lib/bzpage.js
@@ -19,8 +19,8 @@ var constantData = {}; // This should be probably eliminated ASAP or
// or done by other means. TODO
var equivalentComponents = null;
/**
-* central handler processing messages from the main script.
-*/
+ * central handler processing messages from the main script.
+ */
onMessage = function onMessage(msg) {
console.log("onMessage - incoming : msg.cmd = " + msg.cmd);
switch (msg.cmd) {
@@ -53,15 +53,17 @@ onMessage = function onMessage(msg) {
};
/**
- * @param cmd Object with all commands to be executed
- *
- * PROBLEM: according to https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference\
- * /Statements/for...in there is no guaranteed order of execution of
- * commands (i.e., key, commentObj[key] pairs) in for..in cycle.
- * According to https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference\
- * /Operators/Special_Operators/delete_Operator#Cross-browser_issues it seems that
- * everywhere except of Internet Explorer this should work well, but waiting
- * impatiently when this bite us.
+ * @param cmd
+ * Object with all commands to be executed
+ *
+ * PROBLEM: according to
+ * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference\
+ * /Statements/for...in there is no guaranteed order of execution of commands
+ * (i.e., key, commentObj[key] pairs) in for..in cycle. According to
+ * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference\
+ * /Operators/Special_Operators/delete_Operator#Cross-browser_issues it seems
+ * that everywhere except of Internet Explorer this should work well, but
+ * waiting impatiently when this bite us.
*/
function executeCommand(cmdObj) {
for (var key in cmdObj) {
@@ -71,9 +73,11 @@ function executeCommand(cmdObj) {
/**
* Actual execution function
- *
- * @param cmdLabel String with the name of the command to be executed
- * @param cmdParams Object with the appropriate parameters for the command
+ *
+ * @param cmdLabel
+ * String with the name of the command to be executed
+ * @param cmdParams
+ * Object with the appropriate parameters for the command
*/
function centralCommandDispatch (cmdLabel, cmdParams) {
console.log("centralCommandDispatch : cmdLabel = " + cmdLabel);
@@ -180,10 +184,11 @@ function centralCommandDispatch (cmdLabel, cmdParams) {
/**
* Change assignee of the bug
- *
- * @param newAssignee String with the email address of new assigneeAElement
- * or 'default' if the component's default assignee should be used.
- * Value null clears "Reset Assignee to default for component" checkbox
+ *
+ * @param newAssignee
+ * String with the email address of new assigneeAElement or 'default'
+ * if the component's default assignee should be used. Value null
+ * clears "Reset Assignee to default for component" checkbox
* @return none
*/
function changeAssignee (newAssignee) {
@@ -223,11 +228,12 @@ function changeAssignee (newAssignee) {
/**
* Adds new option to the 'comment_action' scroll down box
- *
- * @param pkg String package name
- * @param cmd String with the name of the command
- * If the 'comment_action' scroll down box doesn't exist, this
- * function will set up new one.
+ *
+ * @param pkg
+ * String package name
+ * @param cmd
+ * String with the name of the command If the 'comment_action' scroll
+ * down box doesn't exist, this function will set up new one.
*/
function addToCommentsDropdown (cmdObj) {
var select = document.getElementById("comment_action");
@@ -302,7 +308,8 @@ function generateButtons (pkgs, kNodes) {
}
}
}
- // TODO This is weird in this place, but that's the place where all constantData etc.
+ // TODO This is weird in this place, but that's the place where all
+ // constantData etc.
// are finally defined and available.
if (RHBZinit) {
RHBZinit();
@@ -326,7 +333,7 @@ function setConfigurationButton () {
/**
* dd
- *
+ *
* @return Element with the href attribute containng the information
*/
function getOptionTableCell(tableId, label) {
@@ -349,12 +356,13 @@ function getOptionTableCell(tableId, label) {
/**
* Parse the row with the attachment
- *
- * @param DOM element to be parsed
+ *
+ * @param DOM
+ * element to be parsed
* @return array with string name of the attachment, integer its id number,
- * string of MIME type, integer of size in kilobytes, and the whole
- * element itself
- *
+ * string of MIME type, integer of size in kilobytes, and the whole
+ * element itself
+ *
* TODO error handling is missing ... it's bleee
*/
function parseAttachmentLine(inElem) {
@@ -399,7 +407,8 @@ function startup() {
// Prepare for query buttons
// element ID brElementPlace_location is later used in JSON files
// Stay with this add_comment element even if RH BZ upgrades, this seems
- // to be generally much more stable (even with other bugzillas, e.g. b.gnome.org)
+ // to be generally much more stable (even with other bugzillas, e.g.
+ // b.gnome.org)
// then some getElementById.
var commentArea = document.getElementsByName("add_comment")[0].parentNode;
if (commentArea) {
@@ -412,7 +421,8 @@ function startup() {
}
}
- // TODO Probably could be ignored ... used only once on line 973 of rhbzpage.js
+ // TODO Probably could be ignored ... used only once on line 973 of
+ // rhbzpage.js
// if (parseAbrtBacktraces && this.RE.Abrt.test(getSummary())) {
// title = document.getElementById("short_desc_nonedit_display").textContent;