From efef6261b821d7bce68136c9922aef05f6865490 Mon Sep 17 00:00:00 2001 From: Grayeul Date: Sun, 10 Nov 2013 22:09:52 -0600 Subject: [PATCH 1/5] Add support for close-all-others --- core/images/close-others-button.tid | 23 +++++++++++++++++++++++ core/modules/widgets/navigator.js | 7 +++++++ 2 files changed, 30 insertions(+) create mode 100644 core/images/close-others-button.tid diff --git a/core/images/close-others-button.tid b/core/images/close-others-button.tid new file mode 100644 index 000000000..e9f24f304 --- /dev/null +++ b/core/images/close-others-button.tid @@ -0,0 +1,23 @@ +title: $:/core/images/close-others-button + + + + + + + + diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index cd1276a16..f003059ac 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-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) { From c930d84d01c253fb2abd6f94c684d59b5c2f2226 Mon Sep 17 00:00:00 2001 From: Grayeul Date: Sun, 10 Nov 2013 22:09:52 -0600 Subject: [PATCH 2/5] Add support for close-all-others --- core/images/close-others-button.tid | 23 +++++++++++++++++++++++ core/modules/widgets/navigator.js | 7 +++++++ 2 files changed, 30 insertions(+) create mode 100644 core/images/close-others-button.tid diff --git a/core/images/close-others-button.tid b/core/images/close-others-button.tid new file mode 100644 index 000000000..e9f24f304 --- /dev/null +++ b/core/images/close-others-button.tid @@ -0,0 +1,23 @@ +title: $:/core/images/close-others-button + + + + + + + + diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index be969bd5d..ff9898577 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-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) { From da54236f5a785834e413fafb6c441b9b8ab0035f Mon Sep 17 00:00:00 2001 From: Grayeul Date: Mon, 11 Nov 2013 07:34:19 -0600 Subject: [PATCH 3/5] Change names to tw=close-other-tiddlers and handleCloseOtherTiddlersEvent --- core/modules/widgets/navigator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index ff9898577..fe2a6cd43 100755 --- a/core/modules/widgets/navigator.js +++ b/core/modules/widgets/navigator.js @@ -24,7 +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-close-other-tiddlers", handler: "handleCloseOtherTiddlersEvent"}, {type: "tw-new-tiddler", handler: "handleNewTiddlerEvent"}, {type: "tw-import-tiddlers", handler: "handleImportTiddlersEvent"}, ]); From 3d0c6cf41efbd5079e3080792e29973f3750bbb7 Mon Sep 17 00:00:00 2001 From: Grayeul Date: Mon, 11 Nov 2013 07:48:54 -0600 Subject: [PATCH 4/5] Fixed missing reference to old CloseAllOthers --- core/modules/widgets/navigator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index fe2a6cd43..4bc217a6a 100755 --- a/core/modules/widgets/navigator.js +++ b/core/modules/widgets/navigator.js @@ -135,8 +135,8 @@ NavigatorWidget.prototype.handleCloseAllTiddlersEvent = function(event) { this.saveStoryList(); return false; }; -// Close all other tiddlers -NavigatorWidget.prototype.handleCloseAllOtherTiddlersEvent = function(event) { +// Close other tiddlers +NavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) { this.storyList = [event.tiddlerTitle]; this.saveStoryList(); return false; From 9c4ffae1b33666c3c238d9012a606b3b3247aa6e Mon Sep 17 00:00:00 2001 From: Grayeul Date: Mon, 11 Nov 2013 07:52:04 -0600 Subject: [PATCH 5/5] Remove close-others-button from core/images --- core/images/close-others-button.tid | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 core/images/close-others-button.tid diff --git a/core/images/close-others-button.tid b/core/images/close-others-button.tid deleted file mode 100644 index e9f24f304..000000000 --- a/core/images/close-others-button.tid +++ /dev/null @@ -1,23 +0,0 @@ -title: $:/core/images/close-others-button - - - - - - - -