1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-26 00:46:52 +00:00

Use the select widget tiddler content types

This commit is contained in:
Jermolene 2014-05-31 22:39:32 +01:00
parent 13463a47c5
commit c8e98c1567

View File

@ -2,15 +2,12 @@ title: $:/core/ui/EditTemplate/type
tags: $:/tags/EditTemplate tags: $:/tags/EditTemplate
\define lingo-base() $:/language/EditTemplate/ \define lingo-base() $:/language/EditTemplate/
<p><$fieldmangler><em class="tw-edit"><<lingo Type/Prompt>></em> <$edit-text field="type" tag="input" default="" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<<qualify "$:/state/typeDropdown">> class="tw-edit-typeeditor"/> <$button popup=<<qualify "$:/state/typeDropdown">> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}}</$button> <$button message="tw-remove-field" param="type" class="btn-invisible btn-icon">{{$:/core/images/delete-button}}</$button></$fieldmangler></p> <<lingo Type/Prompt>> <$select field="type" default="text/vnd.tiddlywiki">
<$list filter="[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]each[group]]">
<div class="tw-block-dropdown-wrapper"> <optgroup label={{!!group}}>
<$reveal state=<<qualify "$:/state/typeDropdown">> type="nomatch" text="" default=""> <$list filter="[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]group{!!group}] +[sort[description]]">
<div class="tw-block-dropdown tw-edit-type-dropdown"> <option value={{!!name}}><$view field="description"><$view field="title"/></$view> (<$view field="name"/>)</option>
<$linkcatcher to="!!type">
<$list filter="[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]] +[sort[description]]"><$link to={{!!name}}><$view field="description"/> (<$view field="name"/>)</$link>
</$list> </$list>
</$linkcatcher> </optgroup>
</div> </$list>
</$reveal> </$select>
</div>