1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-29 11:30:28 +00:00

Add confirmation when deleting tiddlers

Fixes #381
This commit is contained in:
Jermolene 2014-02-23 17:37:30 +00:00
parent a332b82df5
commit 99ccdf4584

View File

@ -203,6 +203,10 @@ NavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {
if(tiddler.hasField("draft.title")) {
// Delete the original tiddler
var originalTitle = tiddler.fields["draft.of"];
// Ask for confirmation if the tiddler has changed
if(!confirm("Do you wish to delete the tiddler '" + originalTitle + "'")) {
return false;
}
this.wiki.deleteTiddler(originalTitle);
this.removeTitleFromStory(storyList,originalTitle);
}