1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

First take of the ConfigInfo panel

It displays internal configuration information for debugging and
learning about TiddlyWiki. Also introduces a way of interleaving
documentation tiddlers (complete for tiddler fields, more module type
docs to come)
This commit is contained in:
Jeremy Ruston 2013-08-09 21:57:05 +01:00
parent 5894da2704
commit 0cf4c578d4
22 changed files with 92 additions and 6 deletions

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/color
The CSS color value associated with a tiddler

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/description
The descriptive text for a wizard

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/footer
The footer text for a wizard

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/icon
The title of the tiddler containing the icon associated with a tiddler

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/library
If set to "yes" indicates that a tiddler should be saved as a JavaScript library

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/list
An ordered list of tiddler titles associated with a tiddler

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/modified
The date and time at which a tiddler was last modified

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/modifier
The tiddler title associated with the person who last modified a tiddler

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/name
The human readable name associated with a plugin tiddler

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/plugin
Set to "yes" to indicate that a tiddler is a plugin

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/plugin-priority
A numerical value indicating the priority of a plugin tiddler

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/plugin-type
The type of plugin in a plugin tiddler

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/source
The source URL associated with a tiddler

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/subtitle
The subtitle text for a wizard

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/tags
A list of tags associated with a tiddler

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/text
The body text of a tiddler

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/title
The unique name of a tiddler

View File

@ -0,0 +1,3 @@
title: $:/docs/fields/type
The content type of a tiddler

View File

@ -0,0 +1,3 @@
title: $:/docs/moduletypes/animation
Animation modules contain animations that may be used with the RevealWidget.

View File

@ -27,10 +27,27 @@ InfoWidget.types.changecount = function(options) {
};
InfoWidget.types.currentfield = function(options) {
var text = options.widget.renderer.renderTree.getContextVariable(options.widget.renderer,"field","text");
return [{type: "text", text: text}];
var fieldName = options.widget.renderer.renderTree.getContextVariable(options.widget.renderer,"field","text");
return [{type: "text", text: fieldName}];
};
var FIELD_DESCRIPTION_PREFIX = "$:/docs/fields/";
InfoWidget.types.currentfielddescription = function(options) {
var fieldName = options.widget.renderer.renderTree.getContextVariable(options.widget.renderer,"field","text"),
descriptionTitle = FIELD_DESCRIPTION_PREFIX + fieldName;
return [{
type: "element",
tag: "$transclude",
isBlock: false,
attributes: {
target: {type: "string", value: descriptionTitle}
}
}];
};
var MODULE_TYPE_DESCRIPTION_PREFIX = "$:/docs/moduletypes/";
/*
Return a list of all the currently loaded modules grouped by type
*/
@ -45,9 +62,18 @@ InfoWidget.types.modules = function(options) {
// Output the module types
$tw.utils.each(types,function(moduleType) {
// Heading
output.push({type: "element", tag: "h3", children: [
output.push({type: "element", tag: "h2", children: [
{type: "text", text: moduleType}
]})
// Description
output.push({
type: "element",
tag: "$transclude",
isBlock: false,
attributes: {
target: {type: "string", value: MODULE_TYPE_DESCRIPTION_PREFIX + moduleType}
}
});
// List each module
var list = {type: "element", tag: "ul", children: []},
modules = [];

View File

@ -6,9 +6,7 @@ This tiddler displays the internal configuration of this wiki, which can be usef
This is the full set of TiddlerFields in use in this wiki (including system tiddlers but excluding shadow tiddlers).
<$fieldlist all>
<$info type="currentField"/>
</$fieldlist>
{{$:/snippets/allfields}}
! Loaded Modules

5
core/wiki/allfields.tid Normal file
View File

@ -0,0 +1,5 @@
title: $:/snippets/allfields
<$fieldlist all>
''<$info type="currentField"/>'': //<$info type="currentFieldDescription"/>//
</$fieldlist>