1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Don't confirm deleting drafts with no original

This commit is contained in:
Jermolene 2014-11-10 08:49:20 +00:00
parent 1dfa6f369b
commit 145713e766

View File

@ -220,7 +220,7 @@ NavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {
confirmationTitle = title;
}
// Seek confirmation
if(!confirm($tw.language.getString(
if(this.wiki.getTiddler(originalTitle) && !confirm($tw.language.getString(
"ConfirmDeleteTiddler",
{variables:
{title: confirmationTitle}
@ -360,7 +360,9 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
} else {
this.removeTitleFromStory(storyList,draftTitle);
}
this.saveStoryList(storyList);
this.saveStoryList(storyList);
// Trigger an autosave
$tw.rootWidget.dispatchEvent({type: "tm-auto-save-wiki"});
}
}
return false;