-
Notifications
You must be signed in to change notification settings - Fork 1
/
omnitagaddtemplate.tid
46 lines (42 loc) · 1.77 KB
/
omnitagaddtemplate.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
created: 20200630202624857
creator: chris
modified: 20200705021705324
modifier: chris
omni-tagaddtoggle: show
tags:
title: $:/plugins/can/omni/ui/tagaddtemplate
type: text/vnd.tiddlywiki
THis tiddler isn't used yet. It's for adding tags through the TW widget, but that's too ugly still.
\define can-omni-tagaddbutton()
<$set name="newTagNameTiddler" value=<<qualify "$:/temp/NewTagName">>>
<$set name="tag" value={{{ [<newTagNameTiddler>get[text]] }}}>
<$button set="$:/temp/NewTagName" setTo="" class="can-omnibus-meta-controls omni-button">
<$macrocall $name="add-tag-actions" actions=<<__actions__>>/>
<$action-deletetiddler $tiddler=<<newTagNameTiddler>>/>
{{$:/plugins/can/omni/new-tag.svg}}
</$button>
</$set></$set>
\end
\define can-omni-tagadd()
<$importvariables filter="[[$:/core/ui/EditTemplate/tags]]">
<$fieldmangler>
<div class="can-omni-tagadd">
<$set name="tabIndex" value={{$:/config/EditTabIndex}}>
<$reveal type="match" state="!!omni-tagaddtoggle" text="show" tag=div class="omni-button-container">
<$button class="can-omnibus-meta-controls omni-button" actions="<$action-setfield omni-tagaddtoggle='hide'/>">{{$:/core/images/cancel-button}}</$button>
</$reveal>
<$reveal type="match" state="!!omni-tagaddtoggle" text="show" tag=div>
<$macrocall $name="tag-picker"/>
</$reveal>
<$reveal type="nomatch" state="!!omni-tagaddtoggle" text="show" tag=div class="omni-button-container">
<$button class="can-omnibus-meta-controls omni-button" actions="<$action-setfield omni-tagaddtoggle='show'/>">{{$:/plugins/can/omni/new-tag.svg}}</$button>
</$reveal>
<$reveal type="match" state="!!omni-tagaddtoggle" text="show" tag=div class="omni-button-container">
<<can-omni-tagaddbutton>>
</$reveal>
</$set>
</div>
</$fieldmangler>
</$importvariables>
\end
<<can-omni-tagadd>>