mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-10-31 23:26:18 +00:00
de6e0d1c1e
We add an attribute to tiddler frames in the DOM giving the title of the corresponding tiddler
29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
Plaintext
title: $:/core/ui/EditTemplate
|
|
|
|
\define actions()
|
|
<$action-sendmessage $message="tm-add-tag" $param={{$:/temp/NewTagName}}/>
|
|
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
|
|
<$action-sendmessage $message="tm-add-field" $name={{$:/temp/newfieldname}} $value={{$:/temp/newfieldvalue}}/>
|
|
<$action-deletetiddler $tiddler="$:/temp/newfieldname"/>
|
|
<$action-deletetiddler $tiddler="$:/temp/newfieldvalue"/>
|
|
<$action-sendmessage $message="tm-save-tiddler"/>
|
|
\end
|
|
\define frame-classes()
|
|
tc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
|
|
\end
|
|
<div class=<<frame-classes>> data-tiddler-title=<<currentTiddler>>>
|
|
<$fieldmangler>
|
|
<$set name="storyTiddler" value=<<currentTiddler>>>
|
|
<$keyboard key="((cancel-edit-tiddler))" message="tm-cancel-tiddler">
|
|
<$keyboard key="((save-tiddler))" actions=<<actions>>>
|
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" variable="listItem">
|
|
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
|
|
<$transclude tiddler=<<listItem>>/>
|
|
</$set>
|
|
</$list>
|
|
</$keyboard>
|
|
</$keyboard>
|
|
</$set>
|
|
</$fieldmangler>
|
|
</div>
|