mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-11 00:20:01 +00:00
Update prefixes for dev content
This commit is contained in:
parent
d65f80efbb
commit
2588f996f1
@ -6,10 +6,10 @@ tags: doc
|
||||
title: Messages
|
||||
|
||||
Messages are events that are triggered by the user. They are generated by widgets for example when the user clicks on a ~ButtonWidget.
|
||||
Each message has a type property like "tw-delete-tiddler" and a parameter.
|
||||
Each message has a type property like "tm-delete-tiddler" and a parameter.
|
||||
|
||||
```
|
||||
{type: "tw-delete-tiddler", param: "MyOldTiddler"}
|
||||
{type: "tm-delete-tiddler", param: "MyOldTiddler"}
|
||||
```
|
||||
|
||||
When such a message is created by a widget it sends the message to it's parent widget which sends it to it's own parent widget and so on.
|
||||
|
@ -7,11 +7,11 @@ title: NEW NEW TOC
|
||||
|
||||
\define toc-heading(caption,body)
|
||||
<$reveal type="nomatch" state=<<qualify "$:/state/toc/$caption$">> text="show">
|
||||
<$button set=<<qualify "$:/state/toc/$caption$">> setTo="show" class="btn-invisible">{{$:/core/images/right-arrow}} $caption$
|
||||
<$button set=<<qualify "$:/state/toc/$caption$">> setTo="show" class="tc-btn-invisible">{{$:/core/images/right-arrow}} $caption$
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/toc/$caption$">> text="show">
|
||||
<$button set=<<qualify "$:/state/toc/$caption$">> setTo="hide" class="btn-invisible">{{$:/core/images/down-arrow}} $caption$
|
||||
<$button set=<<qualify "$:/state/toc/$caption$">> setTo="hide" class="tc-btn-invisible">{{$:/core/images/down-arrow}} $caption$
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/toc/$caption$">> text="show" retain="yes" animate="yes">
|
||||
@ -20,7 +20,7 @@ $body$
|
||||
|
||||
</$reveal>
|
||||
\end
|
||||
<div class="tw-table-of-contents">
|
||||
<div class="tc-table-of-contents">
|
||||
|
||||
# [[Introduction]]
|
||||
|
||||
|
@ -17,10 +17,10 @@ The DOM node associated to this widget is the current browser window's DOM (``do
|
||||
|
||||
At first, the root widget has no children but provides some basic event handlers ([[Messages]]) like:
|
||||
|
||||
* ''tw-notify:'' Displays the message given in param as a notification.
|
||||
* ''tw-save-wiki'': Triggered by a save button, the user can click. This handler uses the syncer module described in [[Extended Persistence]] to save the current wiki.
|
||||
* ''tw-auto-save-wiki'': Similar to tw-save-wiki but not triggered directly by the user but automatically triggered when a wiki page is edited and saved. A [[Saver]] implementation which starts a download of the updated wiki file would not support the auto-save method and would only be used when the tw-save-wiki message is used.
|
||||
* ''tw-download-file'': This message also uses the syncer module described in [[Extended Persistence]] but explicitly demands to choose a saver with the download-method to start downloading a single tiddler.
|
||||
* ''tm-notify:'' Displays the message given in param as a notification.
|
||||
* ''tm-save-wiki'': Triggered by a save button, the user can click. This handler uses the syncer module described in [[Extended Persistence]] to save the current wiki.
|
||||
* ''tm-auto-save-wiki'': Similar to tm-save-wiki but not triggered directly by the user but automatically triggered when a wiki page is edited and saved. A [[Saver]] implementation which starts a download of the updated wiki file would not support the auto-save method and would only be used when the tm-save-wiki message is used.
|
||||
* ''tm-download-file'': This message also uses the syncer module described in [[Extended Persistence]] but explicitly demands to choose a saver with the download-method to start downloading a single tiddler.
|
||||
|
||||
After the root widget is loaded another startup module [[$:/core/modules/startup/render.js]] creates a transclude widget which contains the contents of [[$:/core/ui/PageTemplate]] which is now bound to the browsers DOM document.
|
||||
The render function of the transclude widget is initially executed
|
||||
@ -28,7 +28,7 @@ and a listener is registered at the store which executes the refresh function of
|
||||
|
||||
[[Techniques for including other tiddlers and Templates|Transclusion and TextReference]] are finally used in [[$:/core/ui/PageTemplate]] to build the TiddlyWiki UI only from tiddlers written in WikiText (with widgets implemented in javascript):
|
||||
|
||||
For example to implement the list of open wiki pages the [[$:/core/ui/PageTemplate]] contains a [[navigator widget|$:/core/modules/widgets/navigator.js]] which maintains a list of open tiddlers in a field of [[$:/StoryList]] and handles events like ``tw-navigate`` by adding a tiddler specified as parameter to the top of the list in [[$:/StoryList]].
|
||||
For example to implement the list of open wiki pages the [[$:/core/ui/PageTemplate]] contains a [[navigator widget|$:/core/modules/widgets/navigator.js]] which maintains a list of open tiddlers in a field of [[$:/StoryList]] and handles events like ``tm-navigate`` by adding a tiddler specified as parameter to the top of the list in [[$:/StoryList]].
|
||||
The [[story tiddler|$:/core/ui/PageTemplate/story]] transcluded in [[$:/core/ui/PageTemplate]] then uses a ~ListWidget to transclude all tiddlers in [[$:/StoryList]] through a special template [[$:/core/ui/ViewTemplate]].
|
||||
A event of the type ``tw-close-tiddler`` would remove a specified tiddler from [[$:/StoryList]].
|
||||
A event of the type ``tm-close-tiddler`` would remove a specified tiddler from [[$:/StoryList]].
|
||||
The [[Event Mechanism]] would trigger a changed event which triggers a call of the ~ListWidget's refresh function which would remove the tiddler from the list, closing the tiddler.
|
||||
|
@ -5,11 +5,11 @@ title: Table of Contents
|
||||
|
||||
\define toc-heading(caption,body)
|
||||
<$reveal type="nomatch" state=<<qualify "$:/state/toc/$caption$">> text="show">
|
||||
<$button set=<<qualify "$:/state/toc/$caption$">> setTo="show" class="btn-invisible">{{$:/core/images/right-arrow}} $caption$
|
||||
<$button set=<<qualify "$:/state/toc/$caption$">> setTo="show" class="tc-btn-invisible">{{$:/core/images/right-arrow}} $caption$
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/toc/$caption$">> text="show">
|
||||
<$button set=<<qualify "$:/state/toc/$caption$">> setTo="hide" class="btn-invisible">{{$:/core/images/down-arrow}} $caption$
|
||||
<$button set=<<qualify "$:/state/toc/$caption$">> setTo="hide" class="tc-btn-invisible">{{$:/core/images/down-arrow}} $caption$
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<qualify "$:/state/toc/$caption$">> text="show" retain="yes" animate="yes">
|
||||
@ -18,7 +18,7 @@ $body$
|
||||
|
||||
</$reveal>
|
||||
\end
|
||||
<div class="tw-table-of-contents">
|
||||
<div class="tc-table-of-contents">
|
||||
|
||||
# [[Introduction]]
|
||||
|
||||
|
@ -21,5 +21,5 @@ Furthermore the WikiText is used to access the widgets which are integrated in t
|
||||
|
||||
```
|
||||
WikiText:
|
||||
<$button message="tw-close-tiddler">Close Me!</$button>
|
||||
<$button message="tm-close-tiddler">Close Me!</$button>
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user