aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/bugzillaDOMFunctions.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/lib/bugzillaDOMFunctions.js')
-rw-r--r--data/lib/bugzillaDOMFunctions.js122
1 files changed, 69 insertions, 53 deletions
diff --git a/data/lib/bugzillaDOMFunctions.js b/data/lib/bugzillaDOMFunctions.js
index 8392b87..f58f0d9 100644
--- a/data/lib/bugzillaDOMFunctions.js
+++ b/data/lib/bugzillaDOMFunctions.js
@@ -4,13 +4,13 @@
/**
* Select option with given value on the <SELECT> element with given id.
- *
+ *
* Also execute change HTMLEvent, so that the form behaves accordingly.
- *
+ *
* @param id
* @param label
* @return none
- *
+ *
*/
function selectOption (id, label, fireEvent) {
if (!fireEvent) {
@@ -48,10 +48,12 @@ function selectOptionByLabel(id, label, fireEvent) {
/**
* Add object to the text box (comment box or status whiteboard)
- *
- * @param id String with the id of the element
- * @param stuff String/Array to be added to the comment box
- *
+ *
+ * @param id
+ * String with the id of the element
+ * @param stuff
+ * String/Array to be added to the comment box
+ *
* @return none
*/
function addStuffToTextBox (id, stuff) {
@@ -67,9 +69,11 @@ function addStuffToTextBox (id, stuff) {
/**
* Remove a keyword from the element if it is there
- *
- * @param id String with the id of the element
- * @param stuff String/Array with keyword(s) to be removed
+ *
+ * @param id
+ * String with the id of the element
+ * @param stuff
+ * String/Array with keyword(s) to be removed
*/
function removeStuffFromTextBox (id, stuff) {
var changedElement = document.getElementById(id);
@@ -78,9 +82,11 @@ function removeStuffFromTextBox (id, stuff) {
/**
* generalized hasKeyword ... search in the value of the box with given id
- *
- * @param id String with ID of the element we want to check
- * @param str String to be searched for
+ *
+ * @param id
+ * String with ID of the element we want to check
+ * @param str
+ * String to be searched for
* @return Boolean found?
*/
function idContainsWord (id, str) {
@@ -96,8 +102,9 @@ function idContainsWord (id, str) {
/**
* Check for the presence of a keyword
- *
- * @param str String with the keyword
+ *
+ * @param str
+ * String with the keyword
* @return Boolean
*/
function hasKeyword (str) {
@@ -106,11 +113,12 @@ function hasKeyword (str) {
/**
* Set the bug to NEEDINFO state
- *
+ *
* Working function.
+ *
* @return none
- * @todo TODO we may extend this to general setNeedinfo function
- * with parameter [reporter|assignee|general-email-address]
+ * @todo TODO we may extend this to general setNeedinfo function with parameter
+ * [reporter|assignee|general-email-address]
*/
function setNeedinfoReporter () {
clickMouse("needinfo");
@@ -118,7 +126,7 @@ function setNeedinfoReporter () {
}
/**
- *
+ *
*/
function getOwner () {
// TODO(maemo) doesn't work on maemo
@@ -127,9 +135,9 @@ function getOwner () {
}
/**
- * Return maintainer which is per default by bugzilla
- * (which is not necessarily the one who is default maintainer per component)
- *
+ * Return maintainer which is per default by bugzilla (which is not necessarily
+ * the one who is default maintainer per component)
+ *
* @return String with the maintainer's email address
*/
function getDefaultBugzillaMaintainer (component) {
@@ -139,11 +147,15 @@ function getDefaultBugzillaMaintainer (component) {
/**
* Generic function to add new button to the page. Actually copies new button
* from the old one (in order to have the same look-and-feel, etc.
- *
- * @param location Object around which the new button will be added
- * @param after Boolean before or after location ?
- * @param pkg String which package to take the command from
- * @param id String which command to take
+ *
+ * @param location
+ * Object around which the new button will be added
+ * @param after
+ * Boolean before or after location ?
+ * @param pkg
+ * String which package to take the command from
+ * @param id
+ * String which command to take
* @return none
*/
function createNewButton (location, after, cmdObj) {
@@ -195,7 +207,7 @@ function createNewButton (location, after, cmdObj) {
/**
* Get the current title of the bug
- *
+ *
* @return string
*/
function getSummary() {
@@ -204,7 +216,7 @@ function getSummary() {
/**
* Get the current title of the bug
- *
+ *
* @return string
*/
function getSeverity() {
@@ -213,7 +225,7 @@ function getSeverity() {
/**
* Get the current email of the reporter of the bug.
- *
+ *
* @return string
*/
function getReporter () {
@@ -222,7 +234,8 @@ function getReporter () {
if (!reporterElement) {
reporterElement = getOptionTableCell("bz_show_bug_column_1", "Reported", true);
}
- // Maemo calls the label "Reporter" and it doesn't have ids on table columns ... TODO(maemo)
+ // Maemo calls the label "Reporter" and it doesn't have ids on table columns
+ // ... TODO(maemo)
return parseMailto(reporterElement);
}
@@ -252,11 +265,10 @@ function commentsWalker (fce) {
/**
* collect the list of attachments in a structured format
- *
- * @return Array of arrays, one for each attachments;
- * each record has string name of the attachment, integer its id number,
- * string of MIME type, integer of size in kilobytes, and the whole
- * element itself
+ *
+ * @return Array of arrays, one for each attachments; each record has string
+ * name of the attachment, integer its id number, string of MIME type,
+ * integer of size in kilobytes, and the whole element itself
*/
function getAttachments () {
var outAtts = [];
@@ -270,7 +282,7 @@ function getAttachments () {
/**
* Get login of the currently logged-in user.
- *
+ *
* @return String with the login name of the currently logged-in user
*/
function getLogin () {
@@ -282,9 +294,10 @@ function getLogin () {
/**
* adds a person to the CC list, if it isn't already there
- *
- * @param who String with email address or "self" if the current user
- * of the bugzilla should be added
+ *
+ * @param who
+ * String with email address or "self" if the current user of the
+ * bugzilla should be added
*/
function addToCCList (who) {
if (!who) {
@@ -303,7 +316,7 @@ function addToCCList (who) {
/**
* a collect a list of emails on CC list
- *
+ *
* @return Array with email addresses as Strings.
*/
function getCCList () {
@@ -319,14 +332,16 @@ function getCCList () {
/**
* remove elements from the page based on their IDs
- *
- * @param doc Document object
- * @param target String/Array with ID(s)
- * @param remove Boolean indicating whether the node should be
- * actually removed or just hidden.
- * @return none
- * TODO remove parameter could be replaced by function which would
- * do actual activity.
+ *
+ * @param doc
+ * Document object
+ * @param target
+ * String/Array with ID(s)
+ * @param remove
+ * Boolean indicating whether the node should be actually removed or
+ * just hidden.
+ * @return none TODO remove parameter could be replaced by function which would
+ * do actual activity.
*/
function killNodes(doc, target, remove) {
var targetArr = target instanceof Array ? target : target.trim().split(/[,\s]+/);
@@ -343,7 +358,7 @@ function killNodes(doc, target, remove) {
/**
* Is this bug a RHEL bug?
- *
+ *
* @return Boolean true if it is a RHEL bug
*/
function isEnterprise() {
@@ -355,7 +370,7 @@ function isEnterprise() {
/**
* Find out whether the bug is needed an attention of bugZappers
- *
+ *
* @return Boolean whether the bug has been triaged or not
*/
function isTriaged() {
@@ -364,8 +379,9 @@ function isTriaged() {
/**
* Return string with the ID for the external_id SELECT for external bugzilla
- *
- * @param URLhostname String hostname of the external bugzilla
+ *
+ * @param URLhostname
+ * String hostname of the external bugzilla
* @return String with the string for the external_id SELECT
*/
function getBugzillaName(URLhostname, bzLabelNames) {