mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-08 01:38:06 +00:00
Add a close all tiddlers button
For @pmario
This commit is contained in:
@@ -36,6 +36,7 @@ NavigatorWidget.prototype.generate = function() {
|
||||
{name: "tw-save-tiddler", handlerObject: this, handlerMethod: "handleSaveTiddlerEvent"},
|
||||
{name: "tw-cancel-tiddler", handlerObject: this, handlerMethod: "handleCancelTiddlerEvent"},
|
||||
{name: "tw-close-tiddler", handlerObject: this, handlerMethod: "handleCloseTiddlerEvent"},
|
||||
{name: "tw-close-all-tiddlers", handlerObject: this, handlerMethod: "handleCloseAllTiddlersEvent"},
|
||||
{name: "tw-new-tiddler", handlerObject: this, handlerMethod: "handleNewTiddlerEvent"}
|
||||
];
|
||||
};
|
||||
@@ -114,6 +115,14 @@ NavigatorWidget.prototype.handleCloseTiddlerEvent = function(event) {
|
||||
return false;
|
||||
};
|
||||
|
||||
// Close all tiddlers
|
||||
NavigatorWidget.prototype.handleCloseAllTiddlersEvent = function(event) {
|
||||
this.storyList = [];
|
||||
this.saveStoryList();
|
||||
event.stopPropagation();
|
||||
return false;
|
||||
};
|
||||
|
||||
// Place a tiddler in edit mode
|
||||
NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
|
||||
this.getStoryList();
|
||||
|
||||
Reference in New Issue
Block a user