creator: hokiegeek
modified: 20181029004217000
created: 20181029004217000
tags: $:/tags/Macro
title: $:/plugins/hokiegeek/checklist/NewItem
type: text/vnd.tiddlywiki
\whitespace trim
\define newListItem(parent-list-tags, item-tag)
<$button tooltip={{$:/plugins/hokiegeek/checklist/config/buttons/NewItem/hint}} aria-label={{$:/plugins/hokiegeek/checklist/config/buttons/NewItem/caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-new-tiddler" title="Item Name" tags="$parent-list-tags$" />
<$action-sendmessage $message="tm-add-tag" $param="$item-tag$" />
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
<span class="new-item-btn">
{{$:/core/images/new-button}}
</span>
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text">
<$text text={{$:/plugins/hokiegeek/checklist/config/buttons/NewItem/caption}}/>
</span>
</$list>
</$button>
\end
\define newChecklistItem()
<$set name="item-tags" filter="[{$:/plugins/hokiegeek/checklist/config/Item/tag}][list[!!tags]]-[{$:/plugins/hokiegeek/checklist/config/List/tag}]">
<$macrocall $name="newListItem"
parent-list-tags=<<item-tags>>
item-tag={{$:/plugins/hokiegeek/checklist/config/Item/tag}}
/>
</$set>
\end