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)
print-window-tiddler
Jeremy Ruston 2013-08-09 21:57:05 +01:00
rodzic 5894da2704
commit 0cf4c578d4
22 zmienionych plików z 92 dodań i 6 usunięć

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

@ -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 = [];

Wyświetl plik

@ -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

Wyświetl plik

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