1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-30 07:50:47 +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}
@ -360,7 +360,9 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {
} else { } else {
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;