summaryrefslogtreecommitdiff
path: root/lib/scripts/tw-sack.js
diff options
context:
space:
mode:
authorGina Haeussge <gina@foosel.net>2010-06-27 12:25:15 +0200
committerGina Haeussge <gina@foosel.net>2010-06-27 12:25:15 +0200
commit40f3c0b59813d467030d51948d518069141fd998 (patch)
tree6e8e8b6e1c4f4be48ac76600f15bb8ff2c1c5ef0 /lib/scripts/tw-sack.js
parent1a93c67cff4a7b3e30186141cd17f4ba6e113e84 (diff)
downloadrpg-40f3c0b59813d467030d51948d518069141fd998.tar.gz
rpg-40f3c0b59813d467030d51948d518069141fd998.tar.bz2
FS#433: Editor now uses onbeforeunload event to capture ANY leaving of it
besides via Save or Preview button. This has been successfully tested in FF, Chrome and IE6/7/8. Opera does not support onbeforeunload, therefore the draft is kept if the user navigates away from the editor. Please test this.
Diffstat (limited to 'lib/scripts/tw-sack.js')
-rw-r--r--lib/scripts/tw-sack.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/scripts/tw-sack.js b/lib/scripts/tw-sack.js
index cfcbe0ea9..b5a5c8861 100644
--- a/lib/scripts/tw-sack.js
+++ b/lib/scripts/tw-sack.js
@@ -10,6 +10,7 @@ function sack(file){
this.URLString = "";
this.encodeURIString = true;
this.execute = false;
+ this.asynchronous = true;
this.onLoading = function() { };
this.onLoaded = function() { };
@@ -86,9 +87,9 @@ function sack(file){
var self = this;
if (this.method == "GET") {
var totalurlstring = this.requestFile + "?" + this.URLString;
- this.xmlhttp.open(this.method, totalurlstring, true);
+ this.xmlhttp.open(this.method, totalurlstring, this.asynchronous);
} else {
- this.xmlhttp.open(this.method, this.requestFile, true);
+ this.xmlhttp.open(this.method, this.requestFile, this.asynchronous);
}
if (this.method == "POST"){
try {