mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-22 23:16:53 +00:00
Delete all state tiddlers after adding a new field (#5045)
This commit is contained in:
parent
d9b8a800c6
commit
a2b2e117e3
@ -16,8 +16,7 @@ $:/config/EditTemplateFields/Visibility/$(currentField)$
|
|||||||
|
|
||||||
\define new-field-actions()
|
\define new-field-actions()
|
||||||
<$action-sendmessage $message="tm-add-field" $name={{{ [<newFieldNameTiddler>get[text]] }}} $value={{{ [<newFieldValueTiddler>get[text]] }}}/>
|
<$action-sendmessage $message="tm-add-field" $name={{{ [<newFieldNameTiddler>get[text]] }}} $value={{{ [<newFieldValueTiddler>get[text]] }}}/>
|
||||||
<$action-deletetiddler $tiddler=<<newFieldNameTiddler>>/>
|
<$action-deletetiddler $filter="[<newFieldNameTiddler>] [<newFieldValueTiddler>] [<storeTitle>] [<searchListState>]"/>
|
||||||
<$action-deletetiddler $tiddler=<<newFieldValueTiddler>>/>
|
|
||||||
<$action-sendmessage $message="tm-focus-selector" $param=<<current-tiddler-new-field-selector>>/>
|
<$action-sendmessage $message="tm-focus-selector" $param=<<current-tiddler-new-field-selector>>/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
@ -44,8 +43,7 @@ $:/config/EditTemplateFields/Visibility/$(currentField)$
|
|||||||
<$action-sendmessage $message="tm-add-field"
|
<$action-sendmessage $message="tm-add-field"
|
||||||
$name=<<name>>
|
$name=<<name>>
|
||||||
$value={{{ [<newFieldValueTiddler>get[text]] }}}/>
|
$value={{{ [<newFieldValueTiddler>get[text]] }}}/>
|
||||||
<$action-deletetiddler $tiddler=<<newFieldNameTiddler>>/>
|
<$action-deletetiddler $filter="[<newFieldNameTiddler>] [<newFieldValueTiddler>] [<storeTitle>] [<searchListState>]"/>
|
||||||
<$action-deletetiddler $tiddler=<<newFieldValueTiddler>>/>
|
|
||||||
<<lingo Fields/Add/Button>>
|
<<lingo Fields/Add/Button>>
|
||||||
</$button>
|
</$button>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
@ -89,8 +87,8 @@ $value={{{ [<newFieldValueTiddler>get[text]] }}}/>
|
|||||||
<em class="tc-edit tc-big-gap-right">
|
<em class="tc-edit tc-big-gap-right">
|
||||||
<<lingo Fields/Add/Prompt>>
|
<<lingo Fields/Add/Prompt>>
|
||||||
</em>
|
</em>
|
||||||
<div class="tc-edit-field-add-name-wrapper">
|
|
||||||
<$vars refreshTitle=<<qualify "$:/temp/fieldname/refresh">> storeTitle=<<qualify "$:/temp/fieldname/input">> searchListState=<<qualify "$:/temp/fieldname/selected-item">>>
|
<$vars refreshTitle=<<qualify "$:/temp/fieldname/refresh">> storeTitle=<<qualify "$:/temp/fieldname/input">> searchListState=<<qualify "$:/temp/fieldname/selected-item">>>
|
||||||
|
<div class="tc-edit-field-add-name-wrapper">
|
||||||
<$macrocall $name="keyboard-driven-input" tiddler=<<newFieldNameTiddler>> storeTitle=<<storeTitle>> refreshTitle=<<refreshTitle>>
|
<$macrocall $name="keyboard-driven-input" tiddler=<<newFieldNameTiddler>> storeTitle=<<storeTitle>> refreshTitle=<<refreshTitle>>
|
||||||
selectionStateTitle=<<searchListState>> tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}}
|
selectionStateTitle=<<searchListState>> tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}}
|
||||||
focusPopup=<<qualify "$:/state/popup/field-dropdown">> class="tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}}
|
focusPopup=<<qualify "$:/state/popup/field-dropdown">> class="tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}}
|
||||||
@ -127,7 +125,6 @@ $value={{{ [<newFieldValueTiddler>get[text]] }}}/>
|
|||||||
</$set>
|
</$set>
|
||||||
</div>
|
</div>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
</$vars>
|
|
||||||
</div>
|
</div>
|
||||||
<span class="tc-edit-field-add-value tc-small-gap-right">
|
<span class="tc-edit-field-add-value tc-small-gap-right">
|
||||||
<$set name="currentTiddlerCSSescaped" value={{{ [<currentTiddler>escapecss[]] }}}>
|
<$set name="currentTiddlerCSSescaped" value={{{ [<currentTiddler>escapecss[]] }}}>
|
||||||
@ -139,5 +136,6 @@ $value={{{ [<newFieldValueTiddler>get[text]] }}}/>
|
|||||||
<span class="tc-edit-field-add-button">
|
<span class="tc-edit-field-add-button">
|
||||||
<$macrocall $name="new-field"/>
|
<$macrocall $name="new-field"/>
|
||||||
</span>
|
</span>
|
||||||
|
</$vars>
|
||||||
</div>
|
</div>
|
||||||
</$fieldmangler>
|
</$fieldmangler>
|
||||||
|
Loading…
Reference in New Issue
Block a user