mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Add default prefix for tm-fold-all-tiddlers message
This commit is contained in:
parent
6f5f9ca2fb
commit
44c66b98a9
@ -590,7 +590,7 @@ NavigatorWidget.prototype.handleFoldOtherTiddlersEvent = function(event) {
|
||||
NavigatorWidget.prototype.handleFoldAllTiddlersEvent = function(event) {
|
||||
var self = this,
|
||||
paramObject = event.paramObject || {},
|
||||
prefix = paramObject.foldedStatePrefix;
|
||||
prefix = paramObject.foldedStatePrefix || "$:/state/folded/";
|
||||
$tw.utils.each(this.getStoryList(),function(title) {
|
||||
self.wiki.setText(prefix + title,"text",null,"hide");
|
||||
});
|
||||
|
@ -1,17 +1,15 @@
|
||||
caption: tm-fold-all-tiddlers
|
||||
created: 20160424230908388
|
||||
modified: 20160424232733820
|
||||
modified: 20190205154007291
|
||||
tags: Messages
|
||||
title: WidgetMessage: tm-fold-all-tiddlers
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The `tm-fold-all-tiddlers` message folds 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-fold-all-tiddlers` message folds all tiddlers in the current story list.
|
||||
|
||||
Internally, it sets the text of all of the state tiddlers corresponding to tiddlers in the story river to "<<.value "hide">>". The state tiddler titles are formed by prefixing the tiddler title with a prefix that defaults to `$:/state/folded/`.
|
||||
|
||||
|!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. ">>
|
||||
|
||||
|foldedStatePrefix |Prefix for the state tiddler in which the fold state is stored. Defaults to `$:/state/folded` |
|
||||
|
||||
The `tm-fold-all-tiddlers` message is usually generated with the ButtonWidget and is handled by the surrounding NavigatorWidget.
|
||||
|
Loading…
Reference in New Issue
Block a user