mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 13:29:56 +00:00
Guts of the field editor
Styling is a bit squiffy
This commit is contained in:
parent
8ee2695c81
commit
40c6b6cb8f
@ -1,12 +1,14 @@
|
|||||||
title: $:/core/ui/FieldEditor
|
title: $:/core/ui/FieldEditor
|
||||||
|
|
||||||
\define renderfield(title)
|
<$fieldmangler><$setvariable name="targetTiddler" value=<<tiddlerTitle>>><div class="tw-edit-fields">
|
||||||
<div class="tw-edit-field"><span class="tw-edit-field-name">$title$:</span> <span class="tw-edit-field-value"><$edit field="$title$" placeholder="field value"/></span> <span class="tw-edit-field-remove"><$button message="tw-remove-field" param="$title$" class="btn-invisible">{{$:/core/images/delete-button}}</$button></span></div>
|
<table><tbody><$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -[[draft.title]] -[[draft.of]]"><tr><td><<listItem>></td><td><$edit-text title=<<targetTiddler>> field=<<listItem>> placeholder="field value"/></td><td><$button message="tw-remove-field" param=<<listItem>> class="btn-invisible">{{$:/core/images/delete-button}}</$button></td>
|
||||||
\end
|
</tr>
|
||||||
<$fieldmangler><div class="tw-edit-fields">
|
</$list>
|
||||||
<$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -[[draft.title]] -[[draft.of]]" macro="renderfield" itemClass="tw-fieldlist"/>
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</$setvariable>
|
||||||
|
|
||||||
<div class="tw-edit-field-add">Add a new field: <span class="tw-edit-field-add-name"><$edit tiddler="$:/NewFieldName" type="input" default="" placeholder="field name"/></span> <span class="tw-edit-field-add-button"><$button message="tw-add-field" param={{$:/NewFieldName}} set="$:/NewFieldName" setTo="" class="">add</$button></span></div>
|
<div class="tw-edit-field-add">Add a new field: <span class="tw-edit-field-add-name"><$edit-text title="$:/NewFieldName" tag="input" default="" placeholder="field name" class="tw-edit-texteditor"/></span> <span class="tw-edit-field-add-button"><$button message="tw-add-field" param={{$:/NewFieldName}} set="$:/NewFieldName" setTo="" class="">add</$button></span></div>
|
||||||
|
|
||||||
</$fieldmangler>
|
</$fieldmangler>
|
||||||
|
Loading…
Reference in New Issue
Block a user