1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-07 09:18:06 +00:00

Add support for close-all-others

This commit is contained in:
Grayeul
2013-11-10 22:09:52 -06:00
parent c501e70512
commit c930d84d01
2 changed files with 30 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ var NavigatorWidget = function(parseTreeNode,options) {
{type: "tw-cancel-tiddler", handler: "handleCancelTiddlerEvent"},
{type: "tw-close-tiddler", handler: "handleCloseTiddlerEvent"},
{type: "tw-close-all-tiddlers", handler: "handleCloseAllTiddlersEvent"},
{type: "tw-close-all-other-tiddlers", handler: "handleCloseAllOtherTiddlersEvent"},
{type: "tw-new-tiddler", handler: "handleNewTiddlerEvent"},
{type: "tw-import-tiddlers", handler: "handleImportTiddlersEvent"},
]);
@@ -134,6 +135,12 @@ NavigatorWidget.prototype.handleCloseAllTiddlersEvent = function(event) {
this.saveStoryList();
return false;
};
// Close all other tiddlers
NavigatorWidget.prototype.handleCloseAllOtherTiddlersEvent = function(event) {
this.storyList = [event.tiddlerTitle];
this.saveStoryList();
return false;
};
// Place a tiddler in edit mode
NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {