mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-02 12:19:11 +00:00
parent
42debd489d
commit
f3ed9bf7e4
@ -10,22 +10,30 @@ $:/config/EditTemplateFields/Visibility/$(currentField)$
|
||||
[[hide]] -[title{$(config-title)$}]
|
||||
\end
|
||||
|
||||
\define new-field(name,value)
|
||||
<$reveal type="nomatch" text="" default="""$name$""">
|
||||
\define new-field-inner()
|
||||
<$reveal type="nomatch" text="" default=<<name>>>
|
||||
<$button>
|
||||
<$action-sendmessage $message="tm-add-field" $name$="""$value$"""/>
|
||||
<$action-sendmessage $message="tm-add-field" $(name)$=<<value>>/>
|
||||
<$action-deletetiddler $tiddler="$:/temp/newfieldname"/>
|
||||
<$action-deletetiddler $tiddler="$:/temp/newfieldvalue"/>
|
||||
<<lingo Fields/Add/Button>>
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$reveal type="match" text="" default="""$name$""">
|
||||
<$reveal type="match" text="" default=<<name>>>
|
||||
<$button>
|
||||
<<lingo Fields/Add/Button>>
|
||||
</$button>
|
||||
</$reveal>
|
||||
\end
|
||||
|
||||
\define new-field()
|
||||
<$set name="name" value={{$:/temp/newfieldname}}>
|
||||
<$set name="value" value={{$:/temp/newfieldvalue}}>
|
||||
<<new-field-inner>>
|
||||
</$set>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
<div class="tc-edit-fields">
|
||||
<table class="tc-edit-fields">
|
||||
<tbody>
|
||||
@ -62,7 +70,7 @@ $:/config/EditTemplateFields/Visibility/$(currentField)$
|
||||
<$edit-text tiddler="$:/temp/newfieldvalue" tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} class="tc-edit-texteditor"/>
|
||||
</span>
|
||||
<span class="tc-edit-field-add-button">
|
||||
<$macrocall $name="new-field" name={{$:/temp/newfieldname}} value={{$:/temp/newfieldvalue}}/>
|
||||
<$macrocall $name="new-field"/>
|
||||
</span>
|
||||
</div>
|
||||
</$fieldmangler>
|
||||
|
Loading…
Reference in New Issue
Block a user