-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathWiki Listing.tid
executable file
·105 lines (97 loc) · 2.28 KB
/
Wiki Listing.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
title: $:/plugins/OokTech/Bob/Wiki Listing
caption: Wiki Listing
\define thisWikiListingMakeURL() /$(PROXYPREFIX)$$(WikiName)$
\define thisWikiListingMakeWikiListingTab()
<$action-setfield
$tiddler='$:/plugins/OokTech/Bob/SideBarTab'
tags='$:/tags/SideBar'
text="""{{$:/plugins/OokTech/Bob/Wiki Listing}}"""
caption='Wikis'
/>
\end
\define thisWikiListingRemoveWikiListingTab()
<$action-setfield
$tiddler='$:/plugins/OokTech/Bob/SideBarTab'
text=''
/>
<$action-deletetiddler
$tiddler='$:/plugins/OokTech/Bob/SideBarTab'
/>
\end
\define makeWikiListing()
<h2 style='margin:0px;padding:0px;'>Available Wikis</h2>
<div
style='font-size:12px;display:inline-block;'
>
<$checkbox
actions=<<thisWikiListingMakeWikiListingTab>>
uncheckactions=<<thisWikiListingRemoveWikiListingTab>>
tiddler='$:/settings/Bob/ListInSidebar'
field='text'
checked='yes'
unchecked='no'
>
List in sidebar
</$checkbox>
<$checkbox
tiddler='$:/settings/Bob/ListInSidebar'
field='folding'
checked='true'
unchecked='false'
>
Use folding list
</$checkbox>
<$button>
Update List
<$action-websocketmessage
$type='findAvailableWikis'
remove={{$:/settings/Bob/removemissingwikis!!text}}
update='true'
saveSettings='true'
/>
</$button>
</div>
---
<$vars
PROXYPREFIX={{{ [[$:/ServerIP]get[proxyprefix]addsuffix[/]minlength[2]] }}}
>
<$list
filter='[[$:/settings/Bob/ListInSidebar]has[folding]get[folding]!prefix[true]limit[1]]'
prefix='true'
emptyMessage="""<<foldingTree>>"""
>
Wiki Search: <$edit-text tiddler='$:/temp/wikisearch' tag=input placeholder='type to search wikis'/>
<li>
[ext[Root Wiki|/]]
</li>
<$list
filter='[list[$:/state/ViewableWikis]search:title{$:/temp/wikisearch}]'
variable=WikiName
emptyMessage='No child wikis listed.'
>
<li>
<a
href=<<thisWikiListingMakeURL>>
target='_blank'
>
<$text
text=<<WikiName>>
/>
</a>
^^<span style='font-size:8pt;'>
(<$button
class='tc-btn-invisible'
>
Unload
<$action-websocketmessage
$type='unloadWiki'
wikiName=<<WikiName>>
/>
</$button>)
</span>^^
</li>
</$list>
</$list>
</$vars>
\end
<<makeWikiListing>>