Add fold tiddler toolbar button

Addressing this tweet:
https://twitter.com/s_stryjecki/status/629349768280604672
This commit is contained in:
Jermolene
2015-08-09 11:10:04 +01:00
parent 6a3c4d6c91
commit 5d43cd7408
11 changed files with 77 additions and 4 deletions
+23
View File
@@ -0,0 +1,23 @@
title: $:/core/ui/Buttons/fold
tags: $:/tags/ViewToolbar
caption: {{$:/core/images/fold-button}} {{$:/language/Buttons/Fold/Caption}}
description: {{$:/language/Buttons/Fold/Hint}}
\define folded-state()
$:/state/folded/$(currentTiddler)$
\end
<$button tooltip={{$:/language/Buttons/Fold/Hint}} aria-label={{$:/language/Buttons/Fold/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-fold-tiddler" $param=<<currentTiddler>> foldedState=<<folded-state>>/>
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]" variable="listItem">
<$reveal type="nomatch" state=<<folded-state>> text="hide" default="show">
{{$:/core/images/fold-button}}
</$reveal>
<$reveal type="match" state=<<folded-state>> text="hide" default="show">
{{$:/core/images/unfold-button}}
</$reveal>
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Fold/Caption}}/></span>
</$list>
</$button>