mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-22 14:00:03 +00:00
Improve save notifications for TiddlySpot
This commit is contained in:
parent
d96f85ac83
commit
42fce1929c
@ -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);
|
||||
|
@ -875,7 +875,11 @@ exports.saveWiki = function(options) {
|
||||
downloadType = options.downloadType || "text/plain";
|
||||
var text = this.renderTiddler(downloadType,template);
|
||||
this.callSaver("save",text,function(err) {
|
||||
$tw.notifier.display("$:/messages/Saved");
|
||||
if(err) {
|
||||
alert("Error while saving:\n\n" + err);
|
||||
} else {
|
||||
$tw.notifier.display("$:/messages/Saved");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -17,6 +17,7 @@ tags: releasenote
|
||||
** [[$:/TopSideBar]] and [[$:/LeftSideBar]] are no longer specially treated; use the new tag instead
|
||||
* Fixed problem that prevented tag configured items from shadow tiddlers interleaving with items from ordinary tiddlers
|
||||
* Refactored control panel to add ''Saving'' tab that includes TiddlySpot options
|
||||
* Improved notifications when saving to TiddlySpot
|
||||
* Added backup URL to TiddlySpot control panel tab
|
||||
|
||||
!! Bug fixes
|
||||
|
@ -12,6 +12,6 @@ TiddlyWiki5 isn't yet built in to TiddlySpot but you can use it by following the
|
||||
# Sign up for a new wiki at http://tiddlyspot.com/, and remember the wiki name and password
|
||||
# Open TiddlyWiki5 in your browser from http://five.tiddlywiki.com/empty.html
|
||||
# Fill in the TiddlySpot wikiname and password in the control panel
|
||||
# Click the "Save Changes" button. You should get a confirmation message `0 - Fileindex.html`
|
||||
# Click the "Save Changes" button. You should get a confirmation notification at the top right saying ''Saved wiki''. Saving can take several seconds if you're on a slow connection or working with a large wiki.
|
||||
# Navigate to your TiddlySpot URL at http://{wikiname}.tiddlyspot.com/
|
||||
# You should see a copy of TiddlyWiki5. You can edit and create tiddlers, and click "Save Changes" to save changes back up to TiddlySpot (you'll need to re-enter your password the first time you visit the wiki on TiddlySpot)
|
||||
|
Loading…
x
Reference in New Issue
Block a user