~hokiegeek/tw5-checklist

ref: 1.4.0 tw5-checklist/Checklist.tid -rw-r--r-- 1.1 KiB
39a69fa6HokieGeek Added ability to link to an image when a "source" field is also provided 1 year, 1 month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
modified: 20181029024422000
creator: hokiegeek
created: 20181028230933000
tags: $:/tags/Macro
title: $:/plugins/hokiegeek/checklist/Checklist
type: text/vnd.tiddlywiki

\whitespace trim
\define create-list(list-tag, item-tag, item-template, empty-message)
<$set name="listTags" filter="[list[!!tags]]-[[$list-tag$]]">
<$macrocall
    $name="list-tagged-draggable"
    subFilter="enlist<listTags>tagging[]tag[$item-tag$]!has[draft.of]!tag[done]"
    itemTemplate="$item-template$"
    emptyMessage="$empty-message$"/>

<$list filter="[enlist<listTags>tagging[]!has[draft.of]tag[$item-tag$]tag[done]sort[created]]">
<div>
<$checkbox tag="done"> ~~<$link to={{!!title}} class="item-done"><$view field="title"/></$link>~~</$checkbox>
</div>
</$list>
</$set>
\end
\define checklist()
<$macrocall $name="create-list"
    list-tag={{$:/plugins/hokiegeek/checklist/config/List/tag}}
    item-tag={{$:/plugins/hokiegeek/checklist/config/Item/tag}}
    item-template="$:/plugins/hokiegeek/checklist/ItemTemplate"
    empty-message={{$:/plugins/hokiegeek/checklist/config/List/EmptyMessage}}
    />
\end