-
Notifications
You must be signed in to change notification settings - Fork 2
/
CategoryLists.tid
141 lines (126 loc) · 5.29 KB
/
CategoryLists.tid
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
tags: $:/tags/Macro
title: $:/plugins/inmysocks/CategoryLists/CategoryLists
true: True
task: Task
event: Event
\define inmysocksCategoryListsMakeSubCategorySelect()
Subcategory: <$select tiddler='$:/state/$(ListType)$List/SelectedSubCategory'>
<option value=''>Show All</option>
<$list filter='[[$:/data/$(ListType)$ListCategories/$(CurrentCategory)$/SubCategories]indexes[]]'>
<$set name=CurrentSubCategory value=<<currentTiddler>>>
<option><$view field='title'/></option>
</$set>
</$list>
</$select>
\end
\define inmysocksCategoryListsMakeSubSubCategorySelect()
<$list filter='[[$:/data/$(ListType)$ListCategories/$(CurrentCategory)$/SubCategories]indexes[]]'>
<$list filter='[[$:/state/$(ListType)$List/SelectedSubCategory]text<currentTiddler>limit[1]]'>
Subsubcategory:
<$select tiddler='$:/state/$(ListType)$List/SelectedSubSubCategory'>
<option value=''>Show All</option>
<$list filter='[[$:/data/$(ListType)$ListCategories/$(CurrentCategory)$/$(CurrentSubCategory)$/subsubcategories]indexes[]]'>
<$set name=CurrentSubSubCategory value=<<currentTiddler>>>
<option><$view field='title'/></option>
</$set>
</$list>
</$select>
</$list>
</$list>
\end
\define inmysocksCategoryListsSelectCategorySearch()
Tag:
<$select tiddler='$:/state/$(ListType)$List/search/SelectedTag'>
<option value=''>Show All</option>
<$list filter="""[tag[$(Tag)$]!has[draft.of]tags[]sort[title]]-[[$(Tag)$]]-[[$(FinishedTag)$]]""">
<option><$view field='title'/></option>
</$list>
</$select>
\end
\define inmysocksCategoryListsSearchTag()
tag{$:/state/$(ListType)$List/search/SelectedTag}
\end
\define thisExpandAllButton()
<$button>Expand All
<$list filter='[prefix[$:/state/$(ListType)$List/ShowCategory/]!text[show]]'>
<$action-setfield $tiddler=<<currentTiddler>> text=show/>
</$list>
</$button>
\end
\define thisCollapseAllButton()
<$button>Collapse All
<$list filter='[prefix[$:/state/$(ListType)$List/ShowCategory/]text[show]]'>
<$action-setfield $tiddler=<<currentTiddler>> text=hide/>
</$list>
</$button>
\end
\define inmysocksCategoryListsMainBody()
<$reveal type='match' state='$:/plugins/inmysocks/CategoryLists/CategoryLists!!true' text=$(ShowSearch)$>
Search: <$edit-text tiddler='$:/temp/$(ListType)$List/Search' field='search_text' placeholder='Title Search' class='tc-edit-texteditor'/>
Category:
<$select tiddler='$:/state/$(ListType)$List/SelectedCategory'>
<option value=''>Show All</option>
<$list filter='[[$:/data/$(ListType)$ListCategories]indexes[]]'>
<$set name=CurrentCategory value=<<currentTiddler>>>
<option><$view field='title'/></option>
</$set>
</$list>
</$select>
<br>
<$set name=CurrentCategory value={{$:/state/$(ListType)$List/SelectedCategory}}>
<$reveal type='nomatch' state='$:/state/$(ListType)$List/SelectedCategory' text=''>
<<inmysocksCategoryListsMakeSubCategorySelect>>
</$reveal>
<br>
<$set name=CurrentSubCategory value={{$:/state/$(ListType)$List/SelectedSubCategory}}>
<<inmysocksCategoryListsMakeSubSubCategorySelect>>
</$set>
</$set>
<br>
<<inmysocksCategoryListsSelectCategorySearch>>
</$reveal>
<<thisExpandAllButton>> <<thisCollapseAllButton>>
<$reveal type='match' state='$:/state/$(ListType)$List/search/SelectedTag' text=''>
<$reveal type='match' state='$:/plugins/inmysocks/CategoryLists/CategoryLists!!true' text=$(ShowFinished)$>
<<tabs "[[$:/plugins/inmysocks/CategoryLists/Unfinished Items]][[$:/plugins/inmysocks/CategoryLists/Finished Items]]">>
</$reveal>
<$reveal type='nomatch' state='$:/plugins/inmysocks/CategoryLists/CategoryLists!!true' text=$(ShowFinished)$>
<$transclude tiddler='$:/plugins/inmysocks/CategoryLists/Unfinished Items' mode=block/>
</$reveal>
</$reveal>
<$reveal type='nomatch' state='$:/state/$(ListType)$List/search/SelectedTag' text=''>
<$set name=SearchTag value=<<inmysocksCategoryListsSearchTag>>>
<$reveal type='match' state='$:/plugins/inmysocks/CategoryLists/CategoryLists!!true' text=$(ShowFinished)$>
<<tabs "[[$:/plugins/inmysocks/CategoryLists/Unfinished Items]][[$:/plugins/inmysocks/CategoryLists/Finished Items]]">>
</$reveal>
<$reveal type='nomatch' state='$:/plugins/inmysocks/CategoryLists/CategoryLists!!true' text=$(ShowFinished)$>
<$transclude tiddler='$:/plugins/inmysocks/CategoryLists/Unfinished Items' mode=block/>
</$reveal>
</$set>
</$reveal>
\end
\define CategoryList(Tag:"Task" FinishedTag:"Done" ListType:"Task" ShowAddItem:"True" ShowSearch:"True" ShowFinished:"True")
<$set name=ListType value=$ListType$>
<$set name=Tag value="""$Tag$""">
<$set name=FinishedTag value="""$FinishedTag$""">
<$set name=ShowSearch value=$ShowSearch$>
<$set name=ShowFinished value=$ShowFinished$>
<$reveal type='match' state='$:/plugins/inmysocks/CategoryLists/CategoryLists!!true' text=$ShowAddItem$>
<$set name=Tag value="""$Tag$""">
<$button popup='$:/state/Items/MakeItemPopup'>
New $ListType$
</$button>
<$reveal type='popup' state='$:/state/Items/MakeItemPopup'>
<div class='tc-popup-keep' style='border:solid;border-color:grey;border-width:1px;background-color:white;width:80vw;padding:1em'>
<$transclude tiddler='$:/plugins/inmysocks/CategoryLists/Make Entry' mode=block/>
</div>
</$reveal>
</$set>
</$reveal>
<<inmysocksCategoryListsMainBody>>
</$set>
</$set>
</$set>
</$set>
</$set>
\end