diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index be969bd5d..4bc217a6a 100755 --- a/core/modules/widgets/navigator.js +++ b/core/modules/widgets/navigator.js @@ -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) {