1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-10-01 08:20:46 +00:00

Merge pull request #212 from grayeul/closeAllOthers

Add support for close-others
This commit is contained in:
Jeremy Ruston 2013-11-11 14:46:05 -08:00
commit 8681e0228d

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-other-tiddlers", handler: "handleCloseOtherTiddlersEvent"},
{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 other tiddlers
NavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) {
this.storyList = [event.tiddlerTitle];
this.saveStoryList();
return false;
};
// Place a tiddler in edit mode
NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {