I made the code and it works, but I think it's a bit too much for making 2
custom pills: I think that "list-tagging-draggable" macro could be used for
other listings too, not just tagging[], but I don't have time to improve it
(for now).
\define list-reference-draggable(tag,subFilter,emptyMessage,itemTemplate,
elementTag:"div")
<$set name="tag" value="""$tag$""">
<$list filter="[<tag>backlinks[]$subFilter$]" emptyMessage=<<
__emptyMessage__>>>
<$elementTag$ class="tc-menu-list-item">
<$droppable actions=<<list-tagged-draggable-drop-actions>>>
<$elementTag$ class="tc-droppable-placeholder">
</$elementTag$>
<$elementTag$>
<$transclude tiddler="""$itemTemplate$""">
<$link to={{!!title}}>
<$view field="title"/>
</$link>
</$transclude>
</$elementTag$>
</$droppable>
</$elementTag$>
</$list>
<$tiddler tiddler="">
<$droppable actions=<<list-tagged-draggable-drop-actions>>>
<$elementTag$ class="tc-droppable-placeholder">
</$elementTag$>
<$elementTag$ style="height:0.5em;">
</$elementTag$>
</$droppable>
</$tiddler>
</$set>
\end
\define tagging-pill()
<$list filter="[<storyTiddler>tagging[]first[]]">
<span class="tc-tag-list-item">
<$set name="transclusion" value=<<qualify "tagging-pill-dropdown">> >
<$macrocall $name="tag-pill-body" tag="Tagging" icon={{!!icon}}
colour={{!!color}} palette={{$:/palette}} element-tag="""$button""" element-
attributes="""popup=<<transclusion>> dragFilter='[<storyTiddler>tagging[]]'
tag='span'"""/>
<$reveal state=<<transclusion>> type="popup" position="below" animate="yes"
class="tc-drop-down">
<$macrocall $name="list-tagged-draggable" tag=<<storyTiddler>>/>
</$reveal>
</$set>
</span>
</$list>
\end
\define reference-pill()
<$list filter="[<storyTiddler>backlinks[]first[]]">
<span class="tc-tag-list-item">
<$set name="transclusion" value=<<qualify "reference-pill-dropdown">> >
<$macrocall $name="tag-pill-body" tag="Reference" icon={{!!icon}}
colour={{!!color}} palette={{$:/palette}} element-tag="""$button""" element-
attributes="""popup=<<transclusion>>
dragFilter='[<storyTiddler>backlinks[]]' tag='span'"""/>
<$reveal state=<<transclusion>> type="popup" position="below" animate="yes"
class="tc-drop-down">
<$macrocall $name="list-reference-draggable" tag=<<storyTiddler>>/>
</$reveal>
</$set>
</span>
</$list>
\end
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/557d8334-dda3-4553-9435-03244bed7ebd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.