aboutsummaryrefslogtreecommitdiffstats
path: root/bugzillaBugTriage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-01-13 00:21:24 +0100
committerMatěj Cepl <mcepl@redhat.com>2010-01-13 00:21:24 +0100
commit3bcce687eeac389760b96a6ba18a1e7ce74f7354 (patch)
tree29c884da2221dcf7219bc92752edd8b70a35993f /bugzillaBugTriage.js
parent8d88ce355ccfae51f5f8f710eb20393601f767ac (diff)
downloadbugzilla-triage-3bcce687eeac389760b96a6ba18a1e7ce74f7354.tar.gz
Some improvements in the offline handling.
Diffstat (limited to 'bugzillaBugTriage.js')
-rw-r--r--bugzillaBugTriage.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js
index c2a7094..f2252fc 100644
--- a/bugzillaBugTriage.js
+++ b/bugzillaBugTriage.js
@@ -486,6 +486,7 @@ BzPage.prototype.serializeForm = function (form) {
acceptCharset: form.acceptCharset,
action: form.action, // TODO shouldn't we get a non-relative URL?
enctype: form.enctype,
+ cookie: this.dok.cookie,
autocomplete: form.getAttribute("autocomplete"),
bugNo: this.bugNo
};
@@ -535,6 +536,8 @@ BzPage.prototype.serializeForm = function (form) {
BzPage.prototype.submitCallback = function(evt) {
if (jetpack.__parent__.navigator.onLine) {
+ var serForm = this.serializeForm(this.dok.forms.namedItem("changeform"));
+ console.log("serForm:\n"+serForm.toSource());
options.oldSubmit();
} else {
var serForm = this.serializeForm(this.dok.forms.namedItem("changeform"));
@@ -568,6 +571,16 @@ function onlineCallback() {
var bugID = formData.bugNo;
var req = new XMLHttpRequest();
req.open("POST",formData.action,true);
+ // FIXME co očekávám za odpověď? req.overrideMimeType("text/xml");
+ // * Accept-Encoding
+ // * Accept-Language
+ // * Accept (MIME types)
+ req.setRequestHeader("Connection","keep-alive");
+ req.setRequestHeader("Keep-Alive",300);
+ req.setRequestHeader("Content-Type",formData.enctype);
+ req.setRequestHeader("Referer",bugURL+bugID);
+ req.setRequestHeader("Accept-Charset",formData.acceptCharset);
+ req.setRequestHeader("Cookie",formData.cookie)
req.onreadystatechange = function (aEvt) {
if (req.readyState == 4) {
if (req.status == 200) {