1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

Docs: bring tm-fold-xxx message docs on par with the code, that is executed. (#4353)

This commit is contained in:
Mario Pietsch 2020-01-30 13:50:19 +01:00 committed by GitHub
parent cead051c73
commit ba10b4fb00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 13 deletions

View File

@ -1,6 +1,6 @@
caption: tm-fold-all-tiddlers
created: 20160424230908388
modified: 20190205154007291
modified: 20191028113838596
tags: Messages
title: WidgetMessage: tm-fold-all-tiddlers
type: text/vnd.tiddlywiki

View File

@ -1,6 +1,6 @@
caption: tm-fold-other-tiddlers
created: 20160424232355215
modified: 20160424233338710
modified: 20191028113932268
tags: Messages
title: WidgetMessage: tm-fold-other-tiddlers
type: text/vnd.tiddlywiki
@ -11,8 +11,8 @@ The `tm-fold-other-tiddlers` message folds all tiddlers in the current story lis
|param|Title of the tiddler that should be ignored by the fold operation. |
|foldedStatePrefix |Prefix for the state tiddler in which the fold state is stored. |
<<.tip "The core uses a foldStatePrefix of '$:/state/folded/' to store the fold states for the default story view.">>
<<.warning "The state tiddlers title is computed as 'foldStatePrefix + TiddlerTitle'. If the foldStatePrefix is not set, it will overwrite the text of the tiddler(s) itself, resulting in data loss. ">>
<<.tip "The core uses a foldStatePrefix of `$:/state/folded/` to store the fold states for the default story view.">>
<<.warning "The state tiddlers title is computed as `foldStatePrefix + TiddlerTitle`. If the foldStatePrefix is not set, it will overwrite the text of the tiddler(s) itself, resulting in data loss. ">>
The `tm-fold-other-tiddlers` message is usually generated with the ButtonWidget and is handled by the surrounding NavigatorWidget.

View File

@ -1,16 +1,24 @@
caption: tm-fold-tiddler
created: 20160424232749223
modified: 20160424233102003
modified: 20191028113537119
tags: Messages
title: WidgetMessage: tm-fold-tiddler
type: text/vnd.tiddlywiki
The `tm-fold-tiddler` message folds the tiddler specified in the `param` parameter. It does so by setting the text of a state tiddler to either "<<.value "show">>" or "<<.value "hide">>", according to the fold state.
The `tm-fold-tiddler` message toggles the value of a state tiddler. It does so by setting the text of a state tiddler to either "<<.value "show">>" or "<<.value "hide">>", according to the fold state.
|!Name |!Description |
|param|Title of the tiddler that should be folded. If the tiddler is already folded, it will be unfolded instead. |
|foldedStatePrefix |Prefix for the state tiddler in which the fold state is stored. If no state prefix is provided, `tm-fold-tiddler` will do nothing. |
|param |ignored ... foldedState must be used |
|foldedState |State tiddler in which the fold state is stored |
<<.tip "The core uses a foldStatePrefix of '$:/state/folded/' to store the fold states for the default story view.">>
<<.tip "The core uses a foldState prefix of `$:/state/folded/` + `tiddler title` to store the fold states for the default story view.">>
The `tm-fold-tiddler` message is usually generated with the ButtonWidget and is handled by the surrounding NavigatorWidget.
The core $:/core/ui/ViewTemplate defines a global variable `folded-state`, that is used with every tiddler. It's created like this:
```
\define folded-state()
$:/state/folded/$(currentTiddler)$
\end
```

View File

@ -1,16 +1,16 @@
caption: tm-unfold-all-tiddlers
created: 20160424233133261
modified: 20160424233427308
modified: 20191028113810219
tags: Messages
title: WidgetMessage: tm-unfold-all-tiddlers
type: text/vnd.tiddlywiki
The `tm-unfold-all-tiddlers` message unfolds all tiddlers in the current story list. It does so by setting the text of a state tiddler to either "<<.value "show">>" or "<<.value "hide">>", according to the fold state.
The `tm-unfold-all-tiddlers` message unfolds all tiddlers in the current story list. It does so by setting the text of all state tiddlers to: "<<.value "show">>".
|!Name |!Description |
|foldedStatePrefix |Prefix for the state tiddler in which the fold state is stored. |
<<.tip "The core uses a foldStatePrefix of '$:/state/folded/' to store the fold states for the default story view.">>
<<.warning "The state tiddlers title is computed as 'foldStatePrefix + TiddlerTitle'. If the foldStatePrefix is not set, it will overwrite the text of the tiddler(s) itself, resulting in data loss. ">>
<<.tip "The core uses a foldStatePrefix of `$:/state/folded/` to store the fold states for the default story view.">>
<<.warning "The state tiddlers title is computed as `foldStatePrefix + TiddlerTitle`. If the foldStatePrefix is not set, it will overwrite the text of the tiddler(s) itself, resulting in data loss. ">>
The `tm-unfold-all-tiddlers` message is usually generated with the ButtonWidget and is handled by the surrounding NavigatorWidget.