1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-06-20 23:44:07 +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; confirmationTitle = title;
} }
// Seek confirmation // Seek confirmation
if(!confirm($tw.language.getString( if(this.wiki.getTiddler(originalTitle) && !confirm($tw.language.getString(
"ConfirmDeleteTiddler", "ConfirmDeleteTiddler",
{variables: {variables:
{title: confirmationTitle} {title: confirmationTitle}
@ -361,6 +361,8 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
this.removeTitleFromStory(storyList,draftTitle); this.removeTitleFromStory(storyList,draftTitle);
} }
this.saveStoryList(storyList); this.saveStoryList(storyList);
// Trigger an autosave
$tw.rootWidget.dispatchEvent({type: "tm-auto-save-wiki"});
} }
} }
return false; return false;