~hokiegeek/tw5-checklist

758a7967ee1ea57710736f72cb00d6ecbb0fcbfc — HokieGeek 2 years ago 8498328 1.2.0
Added buttons to the items themselves so that I can manage their position in a list
14 files changed, 113 insertions(+), 1 deletions(-)

A ShoppingList/ShoppingList_buttons_MarkDone.tid
R config_Item_tag.tid => config/Item_tag.tid
R config_List_EmptyMessage.tid => config/List_EmptyMessage.tid
R config_List_tag.tid => config/List_tag.tid
A config/buttons_MarkDone_caption.tid
A config/buttons_MarkDone_hint.tid
R ShoppingList/{ShoppingList_config_buttons_NewItem_caption.tid => s_NewItem_caption.tid}
R ShoppingList/{ShoppingList_config_buttons_NewItem_hint.tid => s_NewItem_hint.tid}
A config/buttons_ReAdd_caption.tid
A config/buttons_ReAdd_hint.tid
A macro_MarkDone.tid
M plugin.info
M readme.tid
A view_MarkDone.tid
A ShoppingList/ShoppingList_buttons_MarkDone.tid => ShoppingList/ShoppingList_buttons_MarkDone.tid +16 -0
@@ 0,0 1,16 @@
modified: 20181029031526000
creator: hokiegeek
created: 20181022145158481
list-before: 
tags: $:/tags/ViewToolbar
title: $:/plugins/hokiegeek/checklist/ShoppingList/buttons/MarkDone
type: text/vnd.tiddlywiki

<$set name="item-tag" value={{$:/plugins/hokiegeek/checklist/ShoppingList/config/Item/tag}}>
<$list filter="[all[current]is[tiddler]!is[system]!tag[done]tag<item-tag>]">
<$macrocall $name="markDoneButton" item-tag=<<item-tag>> />
</$list>
<$list filter="[all[current]is[tiddler]!is[system]tag[done]tag<item-tag>]">
<$macrocall $name="reAddButton" item-tag=<<item-tag>> />
</$list>
</$set>

R config_Item_tag.tid => config/Item_tag.tid +0 -0

R config_List_EmptyMessage.tid => config/List_EmptyMessage.tid +0 -0

R config_List_tag.tid => config/List_tag.tid +0 -0

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

mark as done

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

Mark list item as done

R ShoppingList/ShoppingList_config_buttons_NewItem_caption.tid => config/buttons_NewItem_caption.tid +0 -0

R ShoppingList/ShoppingList_config_buttons_NewItem_hint.tid => config/buttons_NewItem_hint.tid +0 -0

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

add item back

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

Add item back to not done

A macro_MarkDone.tid => macro_MarkDone.tid +48 -0
@@ 0,0 1,48 @@
creator: hokiegeek
modified: 20181029004217000
created: 20181029004217000
tags: $:/tags/Macro
title: $:/plugins/hokiegeek/checklist/MarkDone
type: text/vnd.tiddlywiki

\whitespace trim
\define markDoneButton(item-tag)
<$fieldmangler>
<$button
    tooltip={{$:/plugins/hokiegeek/checklist/config/buttons/MarkDone/hint}}
    aria-label={{$:/plugins/hokiegeek/checklist/config/buttons/MarkDone/caption}}
    class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-add-tag" $param="done" />
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
<span class="done-item-btn">
{{$:/core/images/done-button}}
</span>
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text">
<$text text={{$:/plugins/hokiegeek/checklist/config/buttons/MarkDone/caption}}/>
</span>
</$list>
</$button>
</$fieldmangler>
\end
\define reAddButton(item-tag)
<$fieldmangler>
<$button
    tooltip={{$:/plugins/hokiegeek/checklist/config/buttons/ReAdd/hint}}
    aria-label={{$:/plugins/hokiegeek/checklist/config/buttons/ReAdd/caption}}
    class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-remove-tag" $param="done" />
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
<span class="readd-item-btn">
{{$:/core/images/refresh-button}}
</span>
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text">
<$text text={{$:/plugins/hokiegeek/checklist/config/buttons/ReAdd/caption}}/>
</span>
</$list>
</$button>
</$fieldmangler>
\end

M plugin.info => plugin.info +1 -1
@@ 2,7 2,7 @@
    "title": "$:/plugins/hokiegeek/checklist",
    "description": "A bit of a template for creating various checklists",
    "author": "hokiegeek",
    "version": "1.1.0",
    "version": "1.2.0",
    "core-version": ">=5.1.17",
    "source": "https://gitlab.com/HokieGeek/tw5-checklist",
    "plugin-type": "plugin",

M readme.tid => readme.tid +4 -0
@@ 6,6 6,10 @@ The plugin $:/plugins/hokiegeek/checklist provides:
<<checklist>>
```

Provides a few slight enhancements to the task functionality to make it a bit more natural to use

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

Overload of `checklist` which focuses on shopping lists and will display a `price` field if the item has one.

A view_MarkDone.tid => view_MarkDone.tid +16 -0
@@ 0,0 1,16 @@
modified: 20181029004536000
created: 20181029004434000
creator: hokiegeek
list-before: 
tags: $:/tags/ViewToolbar
title: $:/plugins/hokiegeek/checklist/buttons/MarkDone
type: text/vnd.tiddlywiki

<$set name="item-tag" value={{$:/plugins/hokiegeek/checklist/config/Item/tag}}>
<$list filter="[all[current]is[tiddler]!is[system]!tag[done]tag<item-tag>]">
<$macrocall $name="markDoneButton" item-tag=<<item-tag>> />
</$list>
<$list filter="[all[current]is[tiddler]!is[system]tag[done]tag<item-tag>]">
<$macrocall $name="reAddButton" item-tag=<<item-tag>> />
</$list>
</$set>