~hokiegeek/tw5-checklist

ba38a3e9371e30f2b40f89e90ce9d199d00cb76a — HokieGeek 1 year, 11 months ago
Ok, that was more work than I expected, but I have replicated the same functionality
A  => ShoppingList.tid +25 -0
@@ 1,25 @@
created: 20181022112952159
creator: hokiegeek
modified: 20181024095522082
tag: shopping-list
tags: $:/tags/Macro
title: $:/plugins/hokiegeek/checklist/ShoppingList
type: text/vnd.tiddlywiki

\define shopping-list()
<$set name="list-tags" filter="[list[!!tags]]-[{$:/plugins/hokiegeek/checklist/ShoppingList/config/List/tag}]">
<$set name="item-tag" value="shopping-list-item">
</$set>
<$macrocall
    $name="list-tagged-draggable"
    subFilter="enlist<list-tags>tagging[]tag[shopping-list-item]!has[draft.of]!tag[done]"
    itemTemplate="$:/plugins/hokiegeek/checklist/ShoppingList/ItemTemplate"
    emptyMessage="You bought all the things!"/>

<$list filter="[enlist<list-tags>tagging[]!has[draft.of]tag[shopping-list-item]tag[done]sort[created]]">
<div>
<$checkbox tag="done"> ~~<$link to={{!!title}} class="item-done"><$view field="title"/></$link>~~</$checkbox>
</div>
</$list>
</$set>
\end

A  => ShoppingList_ItemTemplate.tid +12 -0
@@ 1,12 @@
creator: hokiegeek
created: 20181022112932067
modified: 20181022150918080
title: $:/plugins/hokiegeek/checklist/ShoppingList/ItemTemplate
type: text/vnd.tiddlywiki

<$checkbox tag="done">
<$link to={{!!title}}><$view field="title"/></$link>
<$reveal type='nomatch' state='!!price' text=''>
$<$view field="price"/>
</$reveal>
</$checkbox>

A  => ShoppingList_View.tid +10 -0
@@ 1,10 @@
creator: hokiegeek
created: 20181023003033203
modified: 20181023193856558
tags: $:/tags/ViewTemplate
title: $:/plugins/hokiegeek/checklist/ShoppingList/View
type: text/vnd.tiddlywiki

<$list filter="[all[current]is[tiddler]!is[system]tag{$:/plugins/hokiegeek/checklist/ShoppingList/config/List/tag}]">
<<shopping-list>>
</$list>

A  => ShoppingList_buttons_NewItem.tid +31 -0
@@ 1,31 @@
creator: hokiegeek
created: 20181022145158481
list-before: 
modified: 20181024014100060
tags: $:/tags/ViewToolbar
title: $:/plugins/hokiegeek/checklist/ShoppingList/buttons/NewItem
type: text/vnd.tiddlywiki

\whitespace trim
\define newShoppingListItem()
<$button tooltip={{$:/plugins/hokiegeek/checklist/ShoppingList/config/buttons/NewItem/hint}} aria-label={{$:/plugins/hokiegeek/checklist/ShoppingList/config/buttons/NewItem/caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-new-tiddler" title="Item Name" tags="shopping-list-item $(item-tags)$" />
<$action-sendmessage $message="tm-add-tag" $param={{$:/plugins/hokiegeek/checklist/ShoppingList/config/Item/tag}} title="Item Name" />
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/new-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text">
<$text text={{$:/plugins/hokiegeek/checklist/ShoppingList/config/buttons/NewItem/caption}}/>
</span>
</$list>
</$button>
\end

<$set name="list-tag" value={{$:/plugins/hokiegeek/checklist/ShoppingList/config/List/tag}}>
<$list filter="[all[current]is[tiddler]!is[system]tag<list-tag>]">
<$set name="item-tags" filter="[list[!!tags]]-[{$:/plugins/hokiegeek/checklist/ShoppingList/config/List/tag}]">
<<newShoppingListItem>>
</$set>
</$list>
</$set>

A  => ShoppingList_config_Item_tag.tid +7 -0
@@ 1,7 @@
creator: hokiegeek
created: 20181022134150506
modified: 20181022145953537
title: $:/plugins/hokiegeek/checklist/ShoppingList/config/Item/tag
type: text/vnd.tiddlywiki

shopping-list-item

A  => ShoppingList_config_List_tag.tid +7 -0
@@ 1,7 @@
creator: hokiegeek
created: 20181022134150506
modified: 20181022145953537
title: $:/plugins/hokiegeek/checklist/ShoppingList/config/List/tag
type: text/vnd.tiddlywiki

shopping-list
\ No newline at end of file

A  => ShoppingList_config_buttons_NewItem_caption.tid +7 -0
@@ 1,7 @@
creator: hokiegeek
created: 20181022134532341
modified: 20181022150020889
title: $:/plugins/hokiegeek/checklist/ShoppingList/config/buttons/NewItem/caption
type: text/vnd.tiddlywiki

new shopping list item here

A  => ShoppingList_config_buttons_NewItem_hint.tid +7 -0
@@ 1,7 @@
creator: hokiegeek
created: 20181022134400295
modified: 20181022150013919
title: $:/plugins/hokiegeek/checklist/ShoppingList/config/buttons/NewItem/hint
type: text/vnd.tiddlywiki

Create a new shopping list item

A  => license.tid +23 -0
@@ 1,23 @@
title: $:/plugins/hokiegeek/checklist/license

MIT License

Copyright (c) 2018 HokieGeek

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

A  => plugin.info +10 -0
@@ 1,10 @@
{
    "title": "$:/plugins/hokiegeek/checklist",
    "description": "A bit of a template for creating various checklists",
    "author": "hokiegeek",
    "version": "1.0.0",
    "core-version": ">=5.1.17",
    "source": "https://gitlab.com/HokieGeek/tw5-checklist",
    "plugin-type": "plugin",
    "list": "readme"
}

A  => readme.tid +7 -0
@@ 1,7 @@
title: $:/plugins/hokiegeek/checklist/readme

The plugin $:/plugins/hokiegeek/checklist provides:

```
<<shopping-list>>
```

A  => styles.tid +10 -0
@@ 1,10 @@
creator: hokiegeek
created: 20181024015332086
modified: 20181024024037360
tags: $:/tags/Stylesheet
title: $:/plugins/hokiegeek/checklist/styles
type: text/vnd.tiddlywiki

.item-done {
    color: #9aaee7 !important;
}