mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-20 16:42:02 +00:00
Improve save notifications for TiddlySpot
This commit is contained in:
@@ -21,7 +21,7 @@ var UploadSaver = function(wiki) {
|
||||
this.wiki = wiki;
|
||||
};
|
||||
|
||||
UploadSaver.prototype.save = function(text) {
|
||||
UploadSaver.prototype.save = function(text,callback) {
|
||||
// Get the various parameters we need
|
||||
var backupDir = ".",
|
||||
username = this.wiki.getTextReference("$:/UploadName"),
|
||||
@@ -56,7 +56,11 @@ UploadSaver.prototype.save = function(text) {
|
||||
http.setRequestHeader("Content-Type","multipart/form-data; ;charset=UTF-8; boundary=" + boundary);
|
||||
http.onreadystatechange = function() {
|
||||
if(http.readyState == 4 && http.status == 200) {
|
||||
window.alert(http.responseText);
|
||||
if(http.responseText.trim() === "0 - Fileindex.html") {
|
||||
callback(null);
|
||||
} else {
|
||||
callback(http.responseText);
|
||||
}
|
||||
}
|
||||
};
|
||||
http.send(data);
|
||||
|
||||
Reference in New Issue
Block a user