2013-05-31 14:38:27 +00:00
|
|
|
title: $:/core/ui/EditTemplate
|
2012-04-30 11:23:03 +00:00
|
|
|
|
2020-11-16 16:54:29 +00:00
|
|
|
\define delete-edittemplate-state-tiddlers() <$action-deletetiddler $filter="[<newFieldNameTiddler>] [<newFieldValueTiddler>] [<newFieldNameInputTiddler>] [<newFieldNameSelectionTiddler>] [<newTagNameTiddler>] [<newTagNameInputTiddler>] [<newTagNameSelectionTiddler>] [<typeInputTiddler>] [<typeSelectionTiddler>]"/>
|
2019-10-14 13:31:57 +00:00
|
|
|
\define save-tiddler-actions()
|
|
|
|
<$action-sendmessage $message="tm-add-tag" $param={{{ [<newTagNameTiddler>get[text]] }}}/>
|
|
|
|
<$action-sendmessage $message="tm-add-field" $name={{{ [<newFieldNameTiddler>get[text]] }}} $value={{{ [<newFieldValueTiddler>get[text]] }}}/>
|
2020-11-16 16:54:29 +00:00
|
|
|
<<delete-edittemplate-state-tiddlers>>
|
2016-10-08 10:53:20 +00:00
|
|
|
<$action-sendmessage $message="tm-save-tiddler"/>
|
|
|
|
\end
|
2020-11-16 16:54:29 +00:00
|
|
|
\define cancel-delete-tiddler-actions(message)
|
|
|
|
<<delete-edittemplate-state-tiddlers>>
|
|
|
|
<$action-sendmessage $message="tm-$message$-tiddler"/>
|
|
|
|
\end
|
2019-12-17 12:01:59 +00:00
|
|
|
<div data-tiddler-title=<<currentTiddler>> data-tags={{!!tags}} class={{{ tc-tiddler-frame tc-tiddler-edit-frame [<currentTiddler>is[tiddler]then[tc-tiddler-exists]] [<currentTiddler>is[missing]!is[shadow]then[tc-tiddler-missing]] [<currentTiddler>is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [<currentTiddler>is[system]then[tc-tiddler-system]] [{!!class}] [<currentTiddler>tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}}>
|
2016-10-08 10:53:20 +00:00
|
|
|
<$fieldmangler>
|
2020-11-16 16:54:29 +00:00
|
|
|
<$vars storyTiddler=<<currentTiddler>> newTagNameTiddler=<<qualify "$:/temp/NewTagName">> newFieldNameTiddler=<<qualify "$:/temp/NewFieldName">> newFieldValueTiddler=<<qualify "$:/temp/NewFieldValue">> newFieldNameInputTiddler=<<qualify "$:/temp/NewFieldName/input">> newFieldNameSelectionTiddler=<<qualify "$:/temp/NewFieldName/selected-item">> newTagNameInputTiddler=<<qualify "$:/temp/NewTagName/input">> newTagNameSelectionTiddler=<<qualify "$:/temp/NewTagName/selected-item">> typeInputTiddler=<<qualify "$:/temp/Type/input">> typeSelectionTiddler=<<qualify "$:/temp/Type/selected-item">>>
|
|
|
|
<$keyboard key="((cancel-edit-tiddler))" actions=<<cancel-delete-tiddler-actions "cancel">>>
|
2019-10-14 13:31:57 +00:00
|
|
|
<$keyboard key="((save-tiddler))" actions=<<save-tiddler-actions>>>
|
2014-04-18 08:28:14 +00:00
|
|
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" variable="listItem">
|
2017-08-08 17:25:45 +00:00
|
|
|
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
|
2014-02-20 22:22:45 +00:00
|
|
|
<$transclude tiddler=<<listItem>>/>
|
2017-08-08 17:25:45 +00:00
|
|
|
</$set>
|
2014-02-20 22:22:45 +00:00
|
|
|
</$list>
|
|
|
|
</$keyboard>
|
2014-05-27 14:42:33 +00:00
|
|
|
</$keyboard>
|
2019-10-14 13:31:57 +00:00
|
|
|
</$vars>
|
2016-10-08 10:53:20 +00:00
|
|
|
</$fieldmangler>
|
2015-02-27 03:41:10 +00:00
|
|
|
</div>
|