aboutsummaryrefslogtreecommitdiffstats
path: root/data/util.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-02-09 10:56:33 +0100
committerMatěj Cepl <mcepl@redhat.com>2011-02-09 10:56:33 +0100
commitba0b4d6110e5b50c15ce722a5a123bcf26bafe3e (patch)
treef3605fc899db3152068f9c4bfc6f840ea198b11d /data/util.js
parentcc50408c9661d35a81f921ff6347eee3c1781d0f (diff)
downloadbugzilla-triage-ba0b4d6110e5b50c15ce722a5a123bcf26bafe3e.tar.gz
Mainly add XML-RPC handling
In details: * add libbugzilla.makeXMLRPCCall * rewrite addAttachment and fixAttachById to use it * add RHOnMessageHandler to process RHBZ-specific RPC messages * fix the mess around getting passwords and not-provided passwords (there should be no password in a content script) * add libbugzilla.openURLinPanel and make showAttachment to use it * fix indentation of switch statements * remove JSLint strings, we need to fix the script, no screw up my ones
Diffstat (limited to 'data/util.js')
-rw-r--r--data/util.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/data/util.js b/data/util.js
index e6871eb..7753458 100644
--- a/data/util.js
+++ b/data/util.js
@@ -44,14 +44,18 @@ function parseXMLfromString (inStuff) {
}
/**
+ * Get a bug no
+ */
+function getBugNo() {
+ return document.forms.namedItem('changeform').getElementsByName("id")[0].value;
+}
+
+/**
* Get a bug no from URL ... fails with aliases
- * It should theoretically belong to bzpage.js, but we don't have
- * unit tests there yet, so keeping here.
- *
* @param url String with URL to be analyzed
- * @return String with the bug ID (hopefully number, but not for aliases)
+ * @return String with the bug ID
*/
-function getBugNo(url) {
+function getBugNoFromURL(url) {
var params = getParamsFromURL(url);
if (params && params.id) {
return params.id;