1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-25 06:43:15 +00:00
TiddlyWiki5/core/ui/TagTemplate.tid
Jermolene 8f1114960a Refactor draggable stuff for easier reuse
And in the process, make the button widget draggable.

Unfortunately, Firefox has a bug that prevents buttons from being
dragged (see https://bugzilla.mozilla.org/show_bug.cgi?id=568313 and
https://bugzilla.mozilla.org/show_bug.cgi?id=646823). So we have to use
the “tag” attribute to make it use a different element.
2017-03-23 14:23:33 +00:00

16 lines
782 B
Plaintext

title: $:/core/ui/TagTemplate
<span class="tc-tag-list-item">
<$set name="transclusion" value=<<currentTiddler>>>
<$macrocall $name="tag-pill-body" tag=<<currentTiddler>> icon={{!!icon}} colour={{!!color}} palette={{$:/palette}} element-tag="""$button""" element-attributes="""popup=<<qualify "$:/state/popup/tag">> dragFilter='[all[current]tagging[]]' tag='span'"""/>
<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes" class="tc-drop-down">
<$transclude tiddler="$:/core/ui/ListItemTemplate"/>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TagDropdown]!has[draft.of]]" variable="listItem">
<$transclude tiddler=<<listItem>>/>
</$list>
<hr>
<$macrocall $name="list-tagged-draggable" tag=<<currentTiddler>>/>
</$reveal>
</$set>
</span>