mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
refactor: format
This commit is contained in:
parent
4fb841b6cf
commit
9298e2d70b
@ -2,50 +2,63 @@ title: $:/core/ui/EditTemplate/type
|
|||||||
tags: $:/tags/EditTemplate
|
tags: $:/tags/EditTemplate
|
||||||
first-search-filter: [all[shadows+tiddlers]prefix[$:/language/Docs/Types/]sort[description]sort[group-sort]removeprefix[$:/language/Docs/Types/]search<userInput>]
|
first-search-filter: [all[shadows+tiddlers]prefix[$:/language/Docs/Types/]sort[description]sort[group-sort]removeprefix[$:/language/Docs/Types/]search<userInput>]
|
||||||
|
|
||||||
\define lingo-base() $:/language/EditTemplate/
|
|
||||||
\define input-cancel-actions() <$list filter="[<storeTitle>get[text]] [<currentTiddler>get[type]] +[limit[1]]" emptyMessage="""<<cancel-delete-tiddler-actions "cancel">>"""><$action-sendmessage $message="tm-remove-field" $param="type"/><$action-deletetiddler $filter="[<typeInputTiddler>] [<refreshTitle>] [<typeSelectionTiddler>]"/></$list>
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
\procedure lingo-base() $:/language/EditTemplate/
|
||||||
|
\procedure input-cancel-actions()
|
||||||
|
<$list
|
||||||
|
filter="[<storeTitle>get[text]] [<currentTiddler>get[type]] +[limit[1]]"
|
||||||
|
emptyMessage="""<<cancel-delete-tiddler-actions "cancel">>"""
|
||||||
|
>
|
||||||
|
<$action-sendmessage
|
||||||
|
$message="tm-remove-field"
|
||||||
|
$param="type"
|
||||||
|
/>
|
||||||
|
<$action-deletetiddler
|
||||||
|
$filter="[<typeInputTiddler>] [<refreshTitle>] [<typeSelectionTiddler>]"
|
||||||
|
/>
|
||||||
|
</$list>
|
||||||
|
\end
|
||||||
<$set name="refreshTitle" value=<<qualify "$:/temp/type-search/refresh">>>
|
<$set name="refreshTitle" value=<<qualify "$:/temp/type-search/refresh">>>
|
||||||
<div class="tc-edit-type-selector-wrapper">
|
<div class="tc-edit-type-selector-wrapper">
|
||||||
<em class="tc-edit tc-small-gap-right"><<lingo Type/Prompt>></em>
|
<em class="tc-edit tc-small-gap-right"><<lingo Type/Prompt>></em>
|
||||||
<div class="tc-type-selector-dropdown-wrapper">
|
<div class="tc-type-selector-dropdown-wrapper">
|
||||||
<div class="tc-type-selector">
|
<div class="tc-type-selector">
|
||||||
<$fieldmangler>
|
<$fieldmangler>
|
||||||
<$macrocall
|
<$macrocall
|
||||||
$name="keyboard-driven-input"
|
$name="keyboard-driven-input"
|
||||||
tiddler=<<currentTiddler>>
|
tiddler=<<currentTiddler>>
|
||||||
storeTitle=<<typeInputTiddler>>
|
storeTitle=<<typeInputTiddler>>
|
||||||
refreshTitle=<<refreshTitle>>
|
refreshTitle=<<refreshTitle>>
|
||||||
selectionStateTitle=<<typeSelectionTiddler>>
|
selectionStateTitle=<<typeSelectionTiddler>>
|
||||||
field="type"
|
field="type"
|
||||||
tag="input"
|
tag="input"
|
||||||
default=""
|
default=""
|
||||||
placeholder={{$:/language/EditTemplate/Type/Placeholder}}
|
placeholder={{$:/language/EditTemplate/Type/Placeholder}}
|
||||||
focusPopup=<<qualify "$:/state/popup/type-dropdown">>
|
focusPopup=<<qualify "$:/state/popup/type-dropdown">>
|
||||||
class="tc-edit-typeeditor tc-edit-texteditor tc-popup-handle"
|
class="tc-edit-typeeditor tc-edit-texteditor tc-popup-handle"
|
||||||
tabindex={{$:/config/EditTabIndex}}
|
tabindex={{$:/config/EditTabIndex}}
|
||||||
focus={{{ [{$:/config/AutoFocus}match[type]then[true]] ~[[false]] }}}
|
focus={{{ [{$:/config/AutoFocus}match[type]then[true]] ~[[false]] }}}
|
||||||
cancelPopups="yes"
|
cancelPopups="yes"
|
||||||
configTiddlerFilter="[[$:/core/ui/EditTemplate/type]]"
|
configTiddlerFilter="[[$:/core/ui/EditTemplate/type]]"
|
||||||
inputCancelActions=<<input-cancel-actions>>
|
inputCancelActions=<<input-cancel-actions>>
|
||||||
/>
|
/>
|
||||||
<$button
|
<$button
|
||||||
popup=<<qualify "$:/state/popup/type-dropdown">>
|
popup=<<qualify "$:/state/popup/type-dropdown">>
|
||||||
class="tc-btn-invisible tc-btn-dropdown tc-small-gap"
|
class="tc-btn-invisible tc-btn-dropdown tc-small-gap"
|
||||||
tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}}
|
tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}}
|
||||||
aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}
|
aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}
|
||||||
>
|
>
|
||||||
{{$:/core/images/down-arrow}}
|
{{$:/core/images/down-arrow}}
|
||||||
</$button>
|
</$button>
|
||||||
<$button
|
<$button
|
||||||
message="tm-remove-field"
|
message="tm-remove-field"
|
||||||
param="type"
|
param="type"
|
||||||
class="tc-btn-invisible tc-btn-icon"
|
class="tc-btn-invisible tc-btn-icon"
|
||||||
tooltip={{$:/language/EditTemplate/Type/Delete/Hint}}
|
tooltip={{$:/language/EditTemplate/Type/Delete/Hint}}
|
||||||
aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}
|
aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}
|
||||||
>
|
>
|
||||||
{{$:/core/images/delete-button}}
|
{{$:/core/images/delete-button}}
|
||||||
<$action-deletetiddler
|
<$action-deletetiddler
|
||||||
$filter="[<typeInputTiddler>] [<storeTitle>] [<refreshTitle>] [<selectionStateTitle>]"
|
$filter="[<typeInputTiddler>] [<storeTitle>] [<refreshTitle>] [<selectionStateTitle>]"
|
||||||
/>
|
/>
|
||||||
</$button>
|
</$button>
|
||||||
@ -53,37 +66,37 @@ first-search-filter: [all[shadows+tiddlers]prefix[$:/language/Docs/Types/]sort[d
|
|||||||
</div>
|
</div>
|
||||||
<div class="tc-block-dropdown-wrapper">
|
<div class="tc-block-dropdown-wrapper">
|
||||||
<$set name="tv-show-missing-links" value="yes">
|
<$set name="tv-show-missing-links" value="yes">
|
||||||
<$reveal
|
<$reveal
|
||||||
state=<<qualify "$:/state/popup/type-dropdown">>
|
state=<<qualify "$:/state/popup/type-dropdown">>
|
||||||
type="nomatch"
|
type="nomatch"
|
||||||
text=""
|
text=""
|
||||||
default=""
|
default=""
|
||||||
>
|
>
|
||||||
<div class="tc-block-dropdown tc-edit-type-dropdown">
|
<div class="tc-block-dropdown tc-edit-type-dropdown">
|
||||||
<$linkcatcher to="!!type">
|
<$linkcatcher to="!!type">
|
||||||
<$list
|
<$list
|
||||||
filter='[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]each[group]sort[group-sort]]'
|
filter='[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]each[group]sort[group-sort]]'
|
||||||
>
|
>
|
||||||
<div class="tc-dropdown-item">
|
<div class="tc-dropdown-item">
|
||||||
<$text text={{!!group}}/>
|
<$text text={{!!group}}/>
|
||||||
</div>
|
</div>
|
||||||
<$set name="userInput" value={{{ [<typeInputTiddler>get[text]] }}}>
|
<$set name="userInput" value={{{ [<typeInputTiddler>get[text]] }}}>
|
||||||
<$list
|
<$list
|
||||||
filter="[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]group{!!group}] +[sort[description]] +[removeprefix[$:/language/Docs/Types/]] +[search<userInput>]"
|
filter="[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]group{!!group}] +[sort[description]] +[removeprefix[$:/language/Docs/Types/]] +[search<userInput>]"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class={{{ [<currentTiddler>addsuffix[-primaryList]] -[<typeSelectionTiddler>get[text]] +[then[]else[tc-list-item-selected]] }}}
|
class={{{ [<currentTiddler>addsuffix[-primaryList]] -[<typeSelectionTiddler>get[text]] +[then[]else[tc-list-item-selected]] }}}
|
||||||
>
|
>
|
||||||
<$link
|
<$link
|
||||||
to={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]get[name]] }}}
|
to={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]get[name]] }}}
|
||||||
>
|
>
|
||||||
<$view
|
<$view
|
||||||
tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}}
|
tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}}
|
||||||
field="description"
|
field="description"
|
||||||
/>
|
/>
|
||||||
<$text text=" "/>
|
<$text text=" "/>
|
||||||
(<$view
|
(<$view
|
||||||
tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}}
|
tiddler={{{ [<currentTiddler>addprefix[$:/language/Docs/Types/]] }}}
|
||||||
field="name"
|
field="name"
|
||||||
/>)
|
/>)
|
||||||
</$link>
|
</$link>
|
||||||
|
Loading…
Reference in New Issue
Block a user