aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/addAttachmentRow.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-05-13 12:20:05 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-06-05 14:53:47 +0200
commit83fd7fd92e5b21a177bc16cc7318792cf63a343b (patch)
tree20f3e5a59eb9ce32a9b9973d7131e7135bd94999 /data/lib/addAttachmentRow.js
parent5b837d6739a12a516203fa0505ca562839463a79 (diff)
downloadbugzilla-triage-83fd7fd92e5b21a177bc16cc7318792cf63a343b.tar.gz
Really Eclipseize formatting.
Diffstat (limited to 'data/lib/addAttachmentRow.js')
-rw-r--r--data/lib/addAttachmentRow.js48
1 files changed, 24 insertions, 24 deletions
diff --git a/data/lib/addAttachmentRow.js b/data/lib/addAttachmentRow.js
index 3bee73a..16eb02c 100644
--- a/data/lib/addAttachmentRow.js
+++ b/data/lib/addAttachmentRow.js
@@ -1,8 +1,8 @@
-// Released under the MIT/X11 license
-// http://www.opensource.org/licenses/mit-license.php
+//Released under the MIT/X11 license
+//http://www.opensource.org/licenses/mit-license.php
"use strict";
-// FIXME resp is JSON, not XML anymore
+//FIXME resp is JSON, not XML anymore
function addAttachmentCallback(resp) {
var newAttachID = parseInt(
resp.params.param.value.array.data.value.int, 10);
@@ -11,28 +11,28 @@ function addAttachmentCallback(resp) {
}
/**
- *
+ *
* This has to stay in RHBugzillaPage because upstream doesn't have
* addAttachment XML-RPC call yet.
*
Params: $params = {
- id => '<bug_id>', # ID of the bug report
- comment => "<Attachment Comment>", # OPTIONAL Text string containing comment to add.
- description => "<Attachment Description>", # REQUIRED Text Description of the attachment.
- isprivate => <Private Attachment ON/OFF 1/0>, # OPTIONAL Whether the Attachment
- will be private # Default: false
- filename => "<Attachment Filename>", REQUIRED The name of the file to attach to the bug report.
- obsoletes => [List of attach_id's to obsolete], OPTIONAL List if attachment ids that are
- obsoleted by this new attachment.
- ispatch => <Patch Attachment True/False 1/0>, OPTIONAL Whether the attachment is a Patch
- or not, if not provided the it will be considered NON Patch attachment.
- contenttype => "<Attachment Content Type>", OPTIONAL If the attachment is patch
- REQUIRED If the attachment is not a patch
- If the attachment is patch then contenttype will always be text/plain
- data => "<Encoded String of the Attachment Data>", REQUIRED It is a base64
- encoded string of the actual attachment data.
- nomail => 0, OPTIONAL Flag that is either 1 or 0 if you want email
- to be send ot not for this change }
+ id => '<bug_id>', # ID of the bug report
+ comment => "<Attachment Comment>", # OPTIONAL Text string containing comment to add.
+ description => "<Attachment Description>", # REQUIRED Text Description of the attachment.
+ isprivate => <Private Attachment ON/OFF 1/0>, # OPTIONAL Whether the Attachment
+ will be private # Default: false
+ filename => "<Attachment Filename>", REQUIRED The name of the file to attach to the bug report.
+ obsoletes => [List of attach_id's to obsolete], OPTIONAL List if attachment ids that are
+ obsoleted by this new attachment.
+ ispatch => <Patch Attachment True/False 1/0>, OPTIONAL Whether the attachment is a Patch
+ or not, if not provided the it will be considered NON Patch attachment.
+ contenttype => "<Attachment Content Type>", OPTIONAL If the attachment is patch
+ REQUIRED If the attachment is not a patch
+ If the attachment is patch then contenttype will always be text/plain
+ data => "<Encoded String of the Attachment Data>", REQUIRED It is a base64
+ encoded string of the actual attachment data.
+ nomail => 0, OPTIONAL Flag that is either 1 or 0 if you want email
+ to be send ot not for this change }
*/
function addAttachment(data, callback, param) {
var params = [];
@@ -44,7 +44,7 @@ function addAttachment(data, callback, param) {
}
var params = {
- id: getBugNo(),
+ id : getBugNo(),
description : titleParsedAttachment,
filename : "parsed-backtrace.txt",
contenttype : "text/plain",
@@ -53,8 +53,8 @@ function addAttachment(data, callback, param) {
};
self.postMessage(new Message("MakeJSONRPCCall", {
- url : constantData.XMLRPCData[window.location.hostname].url.
- replace("xmlrpc.cgi","jsonrpc.cgi"),
+ url : constantData.XMLRPCData[window.location.hostname].url
+ .replace("xmlrpc.cgi", "jsonrpc.cgi"),
method : "bugzilla.addAttachment",
params : params,
callRPC : "AddAttachmentCallback"