mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-24 00:50:28 +00:00
Rename the 'title' attributes of various widgets to 'tiddler'
The change is to avoid confusion with the HTML 'title' attribute. The name 'tiddler' better emphasises the purpose of the attribute, too.
This commit is contained in:
parent
849d64cf9d
commit
9e3618bdcf
@ -79,7 +79,7 @@ Compute the internal state of the widget
|
||||
*/
|
||||
CheckboxWidget.prototype.execute = function() {
|
||||
// Get the parameters from the attributes
|
||||
this.checkboxTitle = this.getAttribute("title",this.getVariable("currentTiddler"));
|
||||
this.checkboxTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
|
||||
this.checkboxTag = this.getAttribute("tag");
|
||||
this.checkboxClass = this.getAttribute("class");
|
||||
// Make the child widgets
|
||||
@ -91,7 +91,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
CheckboxWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.title || changedAttributes.tag || changedAttributes["class"]) {
|
||||
if(changedAttributes.tiddler || changedAttributes.tag || changedAttributes["class"]) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
|
@ -84,7 +84,7 @@ Compute the internal state of the widget
|
||||
*/
|
||||
EditBitmapWidget.prototype.execute = function() {
|
||||
// Get our parameters
|
||||
this.editTitle = this.getAttribute("title",this.getVariable("currentTiddler"));
|
||||
this.editTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
|
||||
this.editClass = this.getAttribute("class");
|
||||
};
|
||||
|
||||
|
@ -106,7 +106,7 @@ Compute the internal state of the widget
|
||||
*/
|
||||
EditTextWidget.prototype.execute = function() {
|
||||
// Get our parameters
|
||||
this.editTitle = this.getAttribute("title",this.getVariable("currentTiddler"));
|
||||
this.editTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
|
||||
this.editField = this.getAttribute("field","text");
|
||||
this.editIndex = this.getAttribute("index");
|
||||
this.editDefault = this.getAttribute("default","");
|
||||
@ -144,7 +144,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
EditTextWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
// Completely rerender if any of our attributes have changed
|
||||
if(changedAttributes.title || changedAttributes.field || changedAttributes.index) {
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else if(changedTiddlers[this.editTitle]) {
|
||||
|
@ -49,7 +49,7 @@ Compute the internal state of the widget
|
||||
*/
|
||||
EditWidget.prototype.execute = function() {
|
||||
// Get our parameters
|
||||
this.editTitle = this.getAttribute("title",this.getVariable("currentTiddler"));
|
||||
this.editTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
|
||||
this.editField = this.getAttribute("field","text");
|
||||
this.editIndex = this.getAttribute("index");
|
||||
this.editClass = this.getAttribute("class");
|
||||
@ -81,7 +81,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
EditWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.title || changedAttributes.field || changedAttributes.index) {
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
|
@ -44,7 +44,7 @@ Compute the internal state of the widget
|
||||
*/
|
||||
FieldManglerWidget.prototype.execute = function() {
|
||||
// Get our parameters
|
||||
this.mangleTitle = this.getAttribute("title",this.getVariable("currentTiddler"));
|
||||
this.mangleTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
|
||||
// Construct the child widgets
|
||||
this.makeChildWidgets();
|
||||
};
|
||||
|
@ -90,10 +90,10 @@ ListWidget.prototype.makeItemTemplate = function(title) {
|
||||
}
|
||||
// Compose the transclusion of the template
|
||||
if(this.hasAttribute("hackTemplate")) {
|
||||
templateTree = [{type: "transclude", attributes: {title: {type: "string", value: title}}}];
|
||||
templateTree = [{type: "transclude", attributes: {tiddler: {type: "string", value: title}}}];
|
||||
} else {
|
||||
if(template) {
|
||||
templateTree = [{type: "transclude", attributes: {title: {type: "string", value: template}}}];
|
||||
templateTree = [{type: "transclude", attributes: {tiddler: {type: "string", value: template}}}];
|
||||
} else {
|
||||
if(this.parseTreeNode.children && this.parseTreeNode.children.length > 0) {
|
||||
templateTree = this.parseTreeNode.children;
|
||||
@ -105,7 +105,7 @@ ListWidget.prototype.makeItemTemplate = function(title) {
|
||||
}
|
||||
}
|
||||
if(!this.hasAttribute("hackCurrentTiddler")) {
|
||||
templateTree = [{type: "tiddler", attributes: {title: {type: "string", value: title}}, children: templateTree}]
|
||||
templateTree = [{type: "tiddler", attributes: {tiddler: {type: "string", value: title}}, children: templateTree}]
|
||||
}
|
||||
}
|
||||
// Return the list item
|
||||
|
@ -41,7 +41,7 @@ Compute the internal state of the widget
|
||||
*/
|
||||
TiddlerWidget.prototype.execute = function() {
|
||||
// Get our parameters
|
||||
this.tiddlerTitle = this.getAttribute("title","");
|
||||
this.tiddlerTitle = this.getAttribute("tiddler","");
|
||||
// Set context variables
|
||||
this.setVariable("currentTiddler",this.tiddlerTitle);
|
||||
this.setVariable("missingTiddlerClass",(this.wiki.tiddlerExists(this.tiddlerTitle) || this.wiki.isShadowTiddler(this.tiddlerTitle)) ? "tw-tiddler-exists" : "tw-tiddler-missing");
|
||||
@ -56,7 +56,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
TiddlerWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.title) {
|
||||
if(changedAttributes.tiddler) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
|
@ -38,7 +38,7 @@ Compute the internal state of the widget
|
||||
*/
|
||||
TranscludeWidget.prototype.execute = function() {
|
||||
// Get our parameters
|
||||
this.transcludeTitle = this.getAttribute("title",this.getVariable("currentTiddler"));
|
||||
this.transcludeTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
|
||||
this.transcludeField = this.getAttribute("field");
|
||||
this.transcludeIndex = this.getAttribute("index");
|
||||
// Check for recursion
|
||||
@ -82,7 +82,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
TranscludeWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.title || changedAttributes.field || changedAttributes.index || changedTiddlers[this.transcludeTitle]) {
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedTiddlers[this.transcludeTitle]) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
|
@ -40,7 +40,7 @@ Compute the internal state of the widget
|
||||
*/
|
||||
ViewWidget.prototype.execute = function() {
|
||||
// Get parameters from our attributes
|
||||
this.viewTitle = this.getAttribute("title",this.getVariable("currentTiddler"));
|
||||
this.viewTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
|
||||
this.viewField = this.getAttribute("field","text");
|
||||
this.viewIndex = this.getAttribute("index");
|
||||
this.viewFormat = this.getAttribute("format","text");
|
||||
@ -165,7 +165,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
||||
*/
|
||||
ViewWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.title || changedAttributes.field || changedAttributes.index || changedAttributes.template || changedAttributes.format || changedTiddlers[this.viewTitle]) {
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.template || changedAttributes.format || changedTiddlers[this.viewTitle]) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
|
@ -47,7 +47,7 @@ exports.parse = function() {
|
||||
type: "element",
|
||||
tag: "$transclude",
|
||||
attributes: {
|
||||
title: {type: "string", value: template || targetTitle}
|
||||
tiddler: {type: "string", value: template || targetTitle}
|
||||
},
|
||||
isBlock: true
|
||||
};
|
||||
@ -55,7 +55,7 @@ exports.parse = function() {
|
||||
type: "element",
|
||||
tag: "$tiddler",
|
||||
attributes: {
|
||||
title: {type: "string", value: targetTitle}
|
||||
tiddler: {type: "string", value: targetTitle}
|
||||
},
|
||||
isBlock: true,
|
||||
children: [transcludeNode]
|
||||
|
@ -47,14 +47,14 @@ exports.parse = function() {
|
||||
type: "element",
|
||||
tag: "$transclude",
|
||||
attributes: {
|
||||
title: {type: "string", value: template || targetTitle}
|
||||
tiddler: {type: "string", value: template || targetTitle}
|
||||
}
|
||||
};
|
||||
var tiddlerNode = {
|
||||
type: "element",
|
||||
tag: "$tiddler",
|
||||
attributes: {
|
||||
title: {type: "string", value: targetTitle}
|
||||
tiddler: {type: "string", value: targetTitle}
|
||||
},
|
||||
children: [transcludeNode]
|
||||
};
|
||||
|
@ -14,7 +14,7 @@ title: $:/core/templates/static.tiddler.html
|
||||
<body class="tw-body">
|
||||
`{{$:/StaticBanner||$:/core/templates/html-tiddler}}`
|
||||
<section class="story-river">
|
||||
`<$view title="$:/core/ui/ViewTemplate" format="htmlwikified"/>`
|
||||
`<$view tiddler="$:/core/ui/ViewTemplate" format="htmlwikified"/>`
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -10,10 +10,10 @@ tw-tiddler-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerC
|
||||
|
||||
<$edit-text field="draft.title" class="title tw-edit-texteditor"/>
|
||||
|
||||
<$transclude title="$:/core/ui/TagsEditor"/>
|
||||
<$transclude tiddler="$:/core/ui/TagsEditor"/>
|
||||
|
||||
<$reveal state="$:/ShowEditPreview" type="match" text="yes">
|
||||
<$transclude title="$:/core/ui/EditorHint"/> <$button type="set" set="$:/ShowEditPreview" setTo="no">hide preview</$button>
|
||||
<$transclude tiddler="$:/core/ui/EditorHint"/> <$button type="set" set="$:/ShowEditPreview" setTo="no">hide preview</$button>
|
||||
<div class="tw-tiddler-preview">
|
||||
<div class="tw-tiddler-preview-preview">
|
||||
<$transclude />
|
||||
@ -24,8 +24,8 @@ tw-tiddler-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerC
|
||||
</div>
|
||||
</$reveal>
|
||||
<$reveal state="$:/ShowEditPreview" type="nomatch" text="yes">
|
||||
<$transclude title="$:/core/ui/EditorHint"/> <$button type="set" set="$:/ShowEditPreview" setTo="yes">show preview</$button>
|
||||
<$transclude tiddler="$:/core/ui/EditorHint"/> <$button type="set" set="$:/ShowEditPreview" setTo="yes">show preview</$button>
|
||||
<$edit field="text" class="tw-edit-texteditor"/>
|
||||
</$reveal>
|
||||
|
||||
<$transclude title="$:/core/ui/FieldEditor"/></div>
|
||||
<$transclude tiddler="$:/core/ui/FieldEditor"/></div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
title: $:/core/ui/FieldEditor
|
||||
|
||||
<$fieldmangler><$setvariable name="targetTiddler" value=<<currentTiddler>>><div class="tw-edit-fields">
|
||||
<table class="tw-edit-fields"><tbody><$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -[[draft.title]] -[[draft.of]]"><tr class="tw-edit-field"><td class="tw-edit-field-name"><<listItem>>:</td><td class="tw-edit-field-value"><$edit-text title=<<targetTiddler>> field=<<listItem>> placeholder="field value"/></td><td class="tw-edit-field-remove"><$button message="tw-remove-field" param=<<listItem>> class="btn-invisible">{{$:/core/images/delete-button}}</$button></td>
|
||||
<table class="tw-edit-fields"><tbody><$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -[[draft.title]] -[[draft.of]]"><tr class="tw-edit-field"><td class="tw-edit-field-name"><<listItem>>:</td><td class="tw-edit-field-value"><$edit-text tiddler=<<targetTiddler>> field=<<listItem>> placeholder="field value"/></td><td class="tw-edit-field-remove"><$button message="tw-remove-field" param=<<listItem>> class="btn-invisible">{{$:/core/images/delete-button}}</$button></td>
|
||||
</tr>
|
||||
</$list>
|
||||
</tbody>
|
||||
@ -9,6 +9,6 @@ title: $:/core/ui/FieldEditor
|
||||
</div>
|
||||
</$setvariable>
|
||||
|
||||
<div class="tw-edit-field-add">Add a new field: <span class="tw-edit-field-add-name"><$edit-text title="$:/NewFieldName" tag="input" default="" placeholder="field name" class="tw-edit-texteditor"/></span> <span class="tw-edit-field-add-button"><$button message="tw-add-field" param={{$:/NewFieldName}} set="$:/NewFieldName" setTo="" class="">add</$button></span></div>
|
||||
<div class="tw-edit-field-add">Add a new field: <span class="tw-edit-field-add-name"><$edit-text tiddler="$:/NewFieldName" tag="input" default="" placeholder="field name" class="tw-edit-texteditor"/></span> <span class="tw-edit-field-add-button"><$button message="tw-add-field" param={{$:/NewFieldName}} set="$:/NewFieldName" setTo="" class="">add</$button></span></div>
|
||||
|
||||
</$fieldmangler>
|
||||
|
@ -2,7 +2,7 @@ title: $:/core/ui/MissingTemplate
|
||||
|
||||
<div class="tw-tiddler-missing"><$button popup="$:/state/missingpopup" qualifyTiddlerTitles="yes" class="btn-invisible tw-missing-tiddler-label"><$view field="title" format="text" /></$button>
|
||||
<$reveal state="$:/state/missingpopup" type="popup" position="below" qualifyTiddlerTitles="yes"><div class="tw-drop-down">
|
||||
<$transclude title="$:/core/ui/ListItemTemplate"/>
|
||||
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||
<hr>
|
||||
<$list filter="[is[current]backlinks[]sort[title]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
</div></$reveal></div>
|
||||
|
@ -29,7 +29,7 @@ title: $:/core/ui/MoreSideBar
|
||||
</$reveal>
|
||||
<$reveal type="match" state="$:/state/moreSideBarTabSet" text="tagsTab" qualifyTiddlerTitles="yes">
|
||||
<$list filter="[tags[]sort[title]]" itemClass="tw-menu-list-item">
|
||||
<$transclude title="$:/core/ui/TagTemplate"/> <small class="tw-menu-list-count"><$count filter="[is[current]tagging[]]"/></small>
|
||||
<$transclude tiddler="$:/core/ui/TagTemplate"/> <small class="tw-menu-list-count"><$count filter="[is[current]tagging[]]"/></small>
|
||||
</$list>
|
||||
----
|
||||
{{$:/core/ui/UntaggedTemplate}} <small class="tw-menu-list-count"><$count filter="[untagged[]!is[system]] -[tags[]]"/></small>
|
||||
|
@ -6,7 +6,7 @@ title: $:/core/ui/SideBar
|
||||
|
||||
<$linkcatcher to="$:/temp/search">
|
||||
|
||||
<div class="tw-search"><$edit-text title="$:/temp/search" type="search" tag="input"/><$reveal state="$:/temp/search" type="nomatch" text=""> <$link to="" class="btn-invisible">{{$:/core/images/close-button}}</$link></$reveal></div>
|
||||
<div class="tw-search"><$edit-text tiddler="$:/temp/search" type="search" tag="input"/><$reveal state="$:/temp/search" type="nomatch" text=""> <$link to="" class="btn-invisible">{{$:/core/images/close-button}}</$link></$reveal></div>
|
||||
|
||||
</$linkcatcher>
|
||||
|
||||
|
@ -3,8 +3,8 @@ title: $:/core/ui/TagTemplate
|
||||
\define tag-styles()
|
||||
background-color:$(backgroundColor)$;
|
||||
\end
|
||||
<span class="tw-tag-list-item"><$setvariable name="backgroundColor" value={{!!color}}><$button popup="$:/state/tagpopup" qualifyTiddlerTitles="yes" class="btn-invisible tw-tag-label" style=<<tag-styles>>><$transclude title={{!!icon}}/> <$view field="title" format="text" /></$button></$setvariable>
|
||||
<$reveal state="$:/state/tagpopup" type="popup" position="below" qualifyTiddlerTitles="yes"><div class="tw-drop-down"><$transclude title="$:/core/ui/ListItemTemplate"/>
|
||||
<span class="tw-tag-list-item"><$setvariable name="backgroundColor" value={{!!color}}><$button popup="$:/state/tagpopup" qualifyTiddlerTitles="yes" class="btn-invisible tw-tag-label" style=<<tag-styles>>><$transclude tiddler={{!!icon}}/> <$view field="title" format="text" /></$button></$setvariable>
|
||||
<$reveal state="$:/state/tagpopup" type="popup" position="below" qualifyTiddlerTitles="yes"><div class="tw-drop-down"><$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||
<hr>
|
||||
<$list filter="[is[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/>
|
||||
</div></$reveal></span>
|
||||
|
@ -6,7 +6,7 @@ background-color:$(backgroundColor)$;
|
||||
<$fieldmangler><div class="tw-edit-tags-list"><$list filter="[is[current]tags[]sort[title]]" listview="pop" itemClass="tw-tag-editor-label"><$setvariable name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text" /><$button message="tw-remove-tag" param={{!!title}} class="btn-invisible tw-remove-tag-button">×</$button></span></$setvariable>
|
||||
</$list></div>
|
||||
|
||||
<div class="tw-add-tag">Add a new tag: <span class="tw-add-tag-name"><$edit-text title="$:/NewTagName" tag="input" default="" placeholder="tag name" focusSet="$:/state/tagsAutoComplete" qualifyTiddlerTitles="yes" class="tw-edit-texteditor"/></span> <$button popup="$:/state/tagsAutoComplete" qualifyTiddlerTitles="yes" class="btn-invisible">{{$:/core/images/down-arrow}}</$button> <span class="tw-add-tag-button"><$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add</$button></span></div>
|
||||
<div class="tw-add-tag">Add a new tag: <span class="tw-add-tag-name"><$edit-text tiddler="$:/NewTagName" tag="input" default="" placeholder="tag name" focusSet="$:/state/tagsAutoComplete" qualifyTiddlerTitles="yes" class="tw-edit-texteditor"/></span> <$button popup="$:/state/tagsAutoComplete" qualifyTiddlerTitles="yes" class="btn-invisible">{{$:/core/images/down-arrow}}</$button> <span class="tw-add-tag-button"><$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add</$button></span></div>
|
||||
|
||||
<div class="tw-tags-autocomplete-wrapper">
|
||||
<$reveal state="$:/state/tagsAutoComplete" qualifyTiddlerTitles="yes" type="nomatch" text="" default="">
|
||||
|
@ -18,7 +18,7 @@ title: $:/core/ui/TiddlerInfo
|
||||
<$list filter="[is[current]listed[]!is[system]]" itemClass="tw-menu-list-item" emptyMessage="This tiddler is not listed by any others" template="$:/core/ui/ListItemTemplate"/>
|
||||
</$reveal>
|
||||
<$reveal type="match" state="$:/state/tiddlerDropDownTabSet" text="fieldsTab" qualifyTiddlerTitles="yes">
|
||||
<$transclude title="$:/core/ui/TiddlerFields"/>
|
||||
<$transclude tiddler="$:/core/ui/TiddlerFields"/>
|
||||
</$reveal>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,10 +6,10 @@ fill:$(foregroundColor)$;
|
||||
\end
|
||||
<div class="tw-tiddler-title"><div class="title"><span class="tw-tiddler-controls"><$button popup="$:/state/tiddlerInfo" qualifyTiddlerTitles="yes" class="btn-invisible" selectedClass="tw-selected">{{$:/core/images/info-button}}</$button><$button message="tw-edit-tiddler" class="btn-invisible">{{$:/core/images/edit-button}}</$button><$button message="tw-close-tiddler" class="btn-invisible">{{$:/core/images/close-button}}</$button>
|
||||
|
||||
</span><$setvariable name="foregroundColor" value={{!!color}}><span style=<<title-styles>>><$transclude title={{!!icon}}/></span></$setvariable> <$view field="title"/></div>
|
||||
</span><$setvariable name="foregroundColor" value={{!!color}}><span style=<<title-styles>>><$transclude tiddler={{!!icon}}/></span></$setvariable> <$view field="title"/></div>
|
||||
|
||||
<$reveal type="nomatch" text="" default="" state="$:/state/tiddlerInfo" qualifyTiddlerTitles="yes" class="tw-tiddler-info" animate="yes">
|
||||
|
||||
<$transclude title="$:/core/ui/TiddlerInfo"/>
|
||||
<$transclude tiddler="$:/core/ui/TiddlerInfo"/>
|
||||
|
||||
</$reveal></div>
|
@ -2,10 +2,10 @@ title: $:/ControlPanel
|
||||
|
||||
''Initial setup''
|
||||
|
||||
| ![[Title of this TiddlyWiki|SiteTitle]]|<$edit-text title="SiteTitle" default="" tag="input"/> |
|
||||
| ![[Subtitle|SiteSubtitle]]|<$edit-text title="SiteSubtitle" default="" tag="input"/> |
|
||||
| ![[Username for signing edits|$:/status/UserName]]|<$edit-text title="$:/status/UserName" default="" tag="input"/> |
|
||||
| ![[Animation duration|$:/config/AnimationDuration]]|<$edit-text title="$:/config/AnimationDuration" default="" tag="input"/> |
|
||||
| ![[Title of this TiddlyWiki|SiteTitle]]|<$edit-text tiddler="SiteTitle" default="" tag="input"/> |
|
||||
| ![[Subtitle|SiteSubtitle]]|<$edit-text tiddler="SiteSubtitle" default="" tag="input"/> |
|
||||
| ![[Username for signing edits|$:/status/UserName]]|<$edit-text tiddler="$:/status/UserName" default="" tag="input"/> |
|
||||
| ![[Animation duration|$:/config/AnimationDuration]]|<$edit-text tiddler="$:/config/AnimationDuration" default="" tag="input"/> |
|
||||
|
||||
Edit [[DefaultTiddlers|$:/DefaultTiddlers]] to choose which tiddlers are displayed at startup
|
||||
|
||||
|
@ -3,5 +3,5 @@ title: $:/snippets/allfields
|
||||
\define renderfield(title)
|
||||
<tr class="tw-view-field"><td class="tw-view-field-name">''$title$'':</td><td class="tw-view-field-value">//{{$:/docs/fields/$title$}}//</td></tr>
|
||||
\end
|
||||
<table class="tw-view-field-table"><tbody><$list filter="[fields[]sort[title]]"><$macrocall $name="renderfield" title=<<listItem>>/></$list>
|
||||
<table class="tw-view-field-table"><tbody><$list filter="[fields[]sort[title]]"><$macrocall $name="renderfield" tiddler=<<listItem>>/></$list>
|
||||
</tbody></table>
|
||||
|
@ -101,11 +101,11 @@ describe("Widget module", function() {
|
||||
]},
|
||||
{type: "text", text: " and back in the outer DIV"},
|
||||
{type: "transclude", attributes: {
|
||||
"title": {type: "string", value: "TiddlerOne"}
|
||||
"tiddler": {type: "string", value: "TiddlerOne"}
|
||||
}}
|
||||
]},
|
||||
{type: "transclude", attributes: {
|
||||
"title": {type: "string", value: "TiddlerOne"}
|
||||
"tiddler": {type: "string", value: "TiddlerOne"}
|
||||
}}
|
||||
]};
|
||||
// Construct the widget node
|
||||
@ -150,12 +150,12 @@ describe("Widget module", function() {
|
||||
var wiki = new $tw.Wiki();
|
||||
// Add a tiddler
|
||||
wiki.addTiddlers([
|
||||
{title: "TiddlerOne", text: "<$transclude title='TiddlerOne'/>\n"}
|
||||
{title: "TiddlerOne", text: "<$transclude tiddler='TiddlerOne'/>\n"}
|
||||
]);
|
||||
// Test parse tree
|
||||
var parseTreeNode = {type: "widget", children: [
|
||||
{type: "transclude", attributes: {
|
||||
"title": {type: "string", value: "TiddlerOne"}
|
||||
"tiddler": {type: "string", value: "TiddlerOne"}
|
||||
}}
|
||||
]};
|
||||
// Construct the widget node
|
||||
@ -186,11 +186,11 @@ describe("Widget module", function() {
|
||||
// Add a tiddler
|
||||
wiki.addTiddlers([
|
||||
{title: "TiddlerOne", text: "Jolly Old World"},
|
||||
{title: "TiddlerTwo", text: "<$transclude title={{TiddlerThree}}/>"},
|
||||
{title: "TiddlerTwo", text: "<$transclude tiddler={{TiddlerThree}}/>"},
|
||||
{title: "TiddlerThree", text: "TiddlerOne"}
|
||||
]);
|
||||
// Construct the widget node
|
||||
var text = "My <$transclude title='TiddlerTwo'/> is Jolly"
|
||||
var text = "My <$transclude tiddler='TiddlerTwo'/> is Jolly"
|
||||
var widgetNode = createWidgetNode(parseText(text,wiki),wiki);
|
||||
// Render the widget node to the DOM
|
||||
var wrapper = renderWidgetNode(widgetNode);
|
||||
@ -205,7 +205,7 @@ describe("Widget module", function() {
|
||||
{title: "TiddlerOne", text: "Jolly Old World"}
|
||||
]);
|
||||
// Construct the widget node
|
||||
var text = "<$view title='TiddlerOne'/>";
|
||||
var text = "<$view tiddler='TiddlerOne'/>";
|
||||
var widgetNode = createWidgetNode(parseText(text,wiki),wiki);
|
||||
// Render the widget node to the DOM
|
||||
var wrapper = renderWidgetNode(widgetNode);
|
||||
@ -234,12 +234,12 @@ describe("Widget module", function() {
|
||||
// Add some tiddlers
|
||||
wiki.addTiddlers([
|
||||
{title: "TiddlerOne", text: "Jolly Old World"},
|
||||
{title: "TiddlerTwo", text: "<$transclude title={{TiddlerThree}}/>"},
|
||||
{title: "TiddlerTwo", text: "<$transclude tiddler={{TiddlerThree}}/>"},
|
||||
{title: "TiddlerThree", text: "TiddlerOne"},
|
||||
{title: "TiddlerFour", text: "TiddlerTwo"}
|
||||
]);
|
||||
// Construct the widget node
|
||||
var text = "My <$setvariable name='currentTiddler' value={{TiddlerFour}}><$transclude title={{!!title}}/></$setvariable> is Jolly"
|
||||
var text = "My <$setvariable name='currentTiddler' value={{TiddlerFour}}><$transclude tiddler={{!!title}}/></$setvariable> is Jolly"
|
||||
var widgetNode = createWidgetNode(parseText(text,wiki),wiki);
|
||||
// Render the widget node to the DOM
|
||||
var wrapper = renderWidgetNode(widgetNode);
|
||||
@ -449,7 +449,7 @@ describe("Widget module", function() {
|
||||
var wiki = new $tw.Wiki();
|
||||
// Add some tiddlers
|
||||
wiki.addTiddlers([
|
||||
{title: "$:/myTemplate", text: "<$tiddler title=<<listItem>>><$view field='title'/></$tiddler>"},
|
||||
{title: "$:/myTemplate", text: "<$tiddler tiddler=<<listItem>>><$view field='title'/></$tiddler>"},
|
||||
{title: "TiddlerOne", text: "Jolly Old World"},
|
||||
{title: "TiddlerTwo", text: "Worldly Old Jelly"},
|
||||
{title: "TiddlerThree", text: "Golly Gosh"},
|
||||
@ -460,6 +460,7 @@ describe("Widget module", function() {
|
||||
var widgetNode = createWidgetNode(parseText(text,wiki),wiki);
|
||||
// Render the widget node to the DOM
|
||||
var wrapper = renderWidgetNode(widgetNode);
|
||||
console.log(require("util").inspect(widgetNode,{depth:8,colors:true}));
|
||||
// Test the rendering
|
||||
expect(wrapper.innerHTML).toBe("<p>TiddlerFourTiddlerOneTiddlerThreeTiddlerTwo</p>");
|
||||
});
|
||||
|
@ -18,7 +18,7 @@ TiddlyWiki5 isn't yet built in to TiddlySpot but you can use it by following the
|
||||
|
||||
! TiddlySpot details
|
||||
|
||||
Wiki name: <$edit-text title="$:/UploadName" default="" tag="input"/>
|
||||
Wiki name: <$edit-text tiddler="$:/UploadName" default="" tag="input"/>
|
||||
|
||||
Password: <$password name="upload"/>
|
||||
|
||||
@ -26,6 +26,6 @@ Password: <$password name="upload"/>
|
||||
|
||||
If you're using a server other than TiddlySpot, you can set the server URL here:
|
||||
|
||||
Service URL: <$edit-text title="$:/UploadURL" default="" tag="input"/>
|
||||
Service URL: <$edit-text tiddler="$:/UploadURL" default="" tag="input"/>
|
||||
|
||||
//(by default, the server URL is `http://<wikiname>.tiddlyspot.com/store.cgi`)//
|
||||
|
@ -46,4 +46,4 @@ When embedding SVG elements you can also use WikiText features like transclusion
|
||||
|
||||
<svg width="150" height="150"><circle cx="75" cy="75" r={{$:/SVGExampleRadius}} stroke="black" stroke-width="2" fill="green"/></svg>
|
||||
|
||||
You can edit the value of the radius here: <$edit-text title="$:/SVGExampleRadius" tag="input"/>
|
||||
You can edit the value of the radius here: <$edit-text tiddler="$:/SVGExampleRadius" tag="input"/>
|
||||
|
@ -6,32 +6,32 @@ You can tweak certain aspects of the ''Snow White'' theme.
|
||||
|
||||
! Colours
|
||||
|
||||
* Primary colour: <$edit-text title="$:/themes/tiddlywiki/snowwhite/colours" index="primary" default="" tag="input" type="color"/>
|
||||
* Background colour: <$edit-text title="$:/themes/tiddlywiki/snowwhite/colours" index="background" default="" tag="input" type="color"/>
|
||||
* Foreground colour: <$edit-text title="$:/themes/tiddlywiki/snowwhite/colours" index="foreground" default="" tag="input" type="color"/>
|
||||
* Page background colour: <$edit-text title="$:/themes/tiddlywiki/snowwhite/colours" index="pagebackground" default="" tag="input" type="color"/>
|
||||
* Medium contrast color: <$edit-text title="$:/themes/tiddlywiki/snowwhite/colours" index="medium" default="" tag="input" type="color"/>
|
||||
* Primary colour: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/colours" index="primary" default="" tag="input" type="color"/>
|
||||
* Background colour: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/colours" index="background" default="" tag="input" type="color"/>
|
||||
* Foreground colour: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/colours" index="foreground" default="" tag="input" type="color"/>
|
||||
* Page background colour: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/colours" index="pagebackground" default="" tag="input" type="color"/>
|
||||
* Medium contrast color: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/colours" index="medium" default="" tag="input" type="color"/>
|
||||
|
||||
! Colour mappings
|
||||
|
||||
* Tiddler background colour mapping: <$edit-text title="$:/themes/tiddlywiki/snowwhite/colourmappings" index="tiddlerbackground" default="" tag="input"/>
|
||||
* Tiddler foreground colour mapping: <$edit-text title="$:/themes/tiddlywiki/snowwhite/colourmappings" index="foreground" default="" tag="input"/>
|
||||
* Page background colour mapping: <$edit-text title="$:/themes/tiddlywiki/snowwhite/colourmappings" index="pagebackground" default="" tag="input"/>
|
||||
* Link background colour mapping: <$edit-text title="$:/themes/tiddlywiki/snowwhite/colourmappings" index="linkbackground" default="" tag="input"/>
|
||||
* Link foreground colour mapping: <$edit-text title="$:/themes/tiddlywiki/snowwhite/colourmappings" index="linkforeground" default="" tag="input"/>
|
||||
* Dropdown background colour mapping: <$edit-text title="$:/themes/tiddlywiki/snowwhite/colourmappings" index="dropdownbackground" default="" tag="input"/>
|
||||
* Dropdown border colour mapping: <$edit-text title="$:/themes/tiddlywiki/snowwhite/colourmappings" index="dropdownborder" default="" tag="input"/>
|
||||
* Tiddler background colour mapping: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/colourmappings" index="tiddlerbackground" default="" tag="input"/>
|
||||
* Tiddler foreground colour mapping: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/colourmappings" index="foreground" default="" tag="input"/>
|
||||
* Page background colour mapping: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/colourmappings" index="pagebackground" default="" tag="input"/>
|
||||
* Link background colour mapping: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/colourmappings" index="linkbackground" default="" tag="input"/>
|
||||
* Link foreground colour mapping: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/colourmappings" index="linkforeground" default="" tag="input"/>
|
||||
* Dropdown background colour mapping: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/colourmappings" index="dropdownbackground" default="" tag="input"/>
|
||||
* Dropdown border colour mapping: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/colourmappings" index="dropdownborder" default="" tag="input"/>
|
||||
|
||||
! Settings
|
||||
|
||||
* Font family: <$edit-text title="$:/themes/tiddlywiki/snowwhite/settings" index="fontfamily" default="" tag="input"/>
|
||||
* Font family: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/settings" index="fontfamily" default="" tag="input"/>
|
||||
|
||||
! Sizes
|
||||
|
||||
* Font size: <$edit-text title="$:/themes/tiddlywiki/snowwhite/metrics" index="fontsize" default="" tag="input"/>
|
||||
* Line height: <$edit-text title="$:/themes/tiddlywiki/snowwhite/metrics" index="lineheight" default="" tag="input"/>
|
||||
* Story left position //(the distance between the left of the screen and the left margin of the story river or tiddler area)//: <$edit-text title="$:/themes/tiddlywiki/snowwhite/metrics" index="storyleft" default="" tag="input"/>
|
||||
* Story top position //(the distance between the top of the screen ad the top margin of the story river or tiddler area)//: <$edit-text title="$:/themes/tiddlywiki/snowwhite/metrics" index="storytop" default="" tag="input"/>
|
||||
* Story right //(the distance between the left side of the screen and the left margin of the sidebar area)//: <$edit-text title="$:/themes/tiddlywiki/snowwhite/metrics" index="storyright" default="" tag="input"/>
|
||||
* Story width //(the width of the story river or tiddler area)//: <$edit-text title="$:/themes/tiddlywiki/snowwhite/metrics" index="storywidth" default="" tag="input"/>
|
||||
* Font size: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/metrics" index="fontsize" default="" tag="input"/>
|
||||
* Line height: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/metrics" index="lineheight" default="" tag="input"/>
|
||||
* Story left position //(the distance between the left of the screen and the left margin of the story river or tiddler area)//: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/metrics" index="storyleft" default="" tag="input"/>
|
||||
* Story top position //(the distance between the top of the screen ad the top margin of the story river or tiddler area)//: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/metrics" index="storytop" default="" tag="input"/>
|
||||
* Story right //(the distance between the left side of the screen and the left margin of the sidebar area)//: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/metrics" index="storyright" default="" tag="input"/>
|
||||
* Story width //(the width of the story river or tiddler area)//: <$edit-text tiddler="$:/themes/tiddlywiki/snowwhite/metrics" index="storywidth" default="" tag="input"/>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user