diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index 2bf0ac594..e792341d9 100755 --- a/core/modules/widgets/navigator.js +++ b/core/modules/widgets/navigator.js @@ -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"); }); diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-fold-all-tiddlers.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-fold-all-tiddlers.tid index 480048f48..bb2d4a576 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-fold-all-tiddlers.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-fold-all-tiddlers.tid @@ -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.