mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-26 10:00:34 +00:00
Add support for close-all-others
This commit is contained in:
parent
d5e1a9d7d0
commit
efef6261b8
23
core/images/close-others-button.tid
Normal file
23
core/images/close-others-button.tid
Normal file
@ -0,0 +1,23 @@
|
||||
title: $:/core/images/close-others-button
|
||||
|
||||
<svg
|
||||
class="tw-image-close-button"
|
||||
viewBox="222 150 56 56"
|
||||
width="22pt"
|
||||
height="22pt">
|
||||
<path
|
||||
d="m 235.6721,196.39471 7.43683,7.43686 c 0.93346,0.93345 2.44693,0.93345 3.38039,0 l 0,0 c 0.93347,-0.93347 0.93347,-2.44693 0,-3.38038 l -7.43684,-7.43685 7.59265,-7.59265 c 0.93345,-0.93345 0.93345,-2.44691 0,-3.38038 -0.93347,-0.93345 -2.44693,-0.93345 -3.38038,0 l -7.59265,7.59265 -7.43685,-7.43684 0,0 c 0,0 0,0 0,0 -0.93345,-0.93347 -2.44691,-0.93347 -3.38038,0 l 0,0 c -0.93345,0.93345 -0.93345,2.44693 0,3.38039 l 7.43685,7.43683 -7.28104,7.28103 0,0 0,0 c 0,0 0,0 0,0 -0.93347,0.93346 -0.93347,2.44694 0,3.38039 l 0,0 c 0.93346,0.93347 2.44693,0.93347 3.38039,0 z"
|
||||
/>
|
||||
<path
|
||||
d="m 264.72622,196.36066 7.43683,7.43686 c 0.93346,0.93345 2.44693,0.93345 3.38039,0 l 0,0 c 0.93347,-0.93347 0.93347,-2.44693 0,-3.38038 l -7.43684,-7.43685 7.59265,-7.59265 c 0.93345,-0.93345 0.93345,-2.44691 0,-3.38038 -0.93347,-0.93345 -2.44693,-0.93345 -3.38038,0 l -7.59265,7.59265 -7.43685,-7.43684 0,0 c 0,0 0,0 0,0 -0.93345,-0.93347 -2.44691,-0.93347 -3.38038,0 l 0,0 c -0.93345,0.93345 -0.93345,2.44693 0,3.38039 l 7.43686,7.43683 -7.28105,7.28103 0,0 0,0 c 0,0 0,0 0,0 -0.93347,0.93346 -0.93347,2.44694 0,3.38039 l 0,0 c 0.93346,0.93347 2.44693,0.93347 3.38039,0 z"
|
||||
/>
|
||||
<path
|
||||
d="m 264.81304,166.60929 7.43683,7.43685 c 0.93346,0.93345 2.44693,0.93345 3.38039,0 l 0,0 c 0.93347,-0.93347 0.93347,-2.44693 0,-3.38038 l -7.43684,-7.43685 7.59265,-7.59265 c 0.93345,-0.93345 0.93345,-2.44691 0,-3.38038 -0.93347,-0.93345 -2.44693,-0.93345 -3.38038,0 l -7.59265,7.59265 -7.43685,-7.43684 0,0 c 0,0 0,0 0,0 -0.93345,-0.93347 -2.44691,-0.93347 -3.38038,0 l 0,0 c -0.93345,0.93345 -0.93345,2.44693 0,3.38039 l 7.43686,7.43683 -7.28105,7.28103 0,0 0,0 c 0,0 0,0 0,0 -0.93347,0.93346 -0.93347,2.44694 0,3.38039 l 0,0 c 0.93346,0.93347 2.44693,0.93347 3.38039,0 z"
|
||||
/>
|
||||
<path
|
||||
d="m 12.688971,6.5714369 a 6.0560999,6.0560999 0 1 1 -12.11219974,0 6.0560999,6.0560999 0 1 1 12.11219974,0 z"
|
||||
transform="matrix(1.9670995,0,0,1.9670995,222.20774,150.11958)" />
|
||||
<path style="fill:#ffffff"
|
||||
d="m 7.2508409,4.8823209 a 1.7715123,1.7715123 0 1 1 -3.5430245,0 1.7715123,1.7715123 0 1 1 3.5430245,0 z"
|
||||
transform="matrix(4.3375825,-0.06820159,0.06861286,4.3637397,211.17234,142.00444)" />
|
||||
</svg>
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user