The advantage would be that using list-links-draggable, with the same or less amount of code we could add a $:/core/ui/ListItemTemplate_with_CloseButton that could be reused in other draglist szenarios . Because in most case if I drag around items in lists I want to be able to remove them.
no
What is wrong with this $:/plugins/JJ/drag-and-close
<$link tooltip={{!!title}} >
<div style="width:100%;text-align:left;padding-top:4px"><<targetTiddler>>
<$button class="tc-btn-invisible">{{$:/core/images/cancel-button}}
<$action-listops $tiddler=<<targetTiddler>> $subfilter="-[<currentTiddler>]"/>
</$button><<!--the title which allows to sho an optional alias
<$list filter="[all[current]has[alias]]" emptyMessage={{!!title}}>{{!!alias}}</$list>
</div>
</$link>
Hi @tw-FRed thank you. This works for the $:/StoryList - I would like it to work for any given list-links-draggable-macro using the targetTiddler Variable
I don’t know if that would work on any use of list-link-draggable macro without changing it’s macro call, but below code (modified in order to use <<targetTiddler>>) works on tiddlywiki.com:
Note: in the macro call I used the modern <$transclude> widget, but it should be easy to adapt to an older TW version by using the <$macrocall> widget instead.
Thank you. It even works without the charging the targetTidler form outside, just with: <$transclude $variable="list-links-draggable" tiddler="$:/StoryList" itemTemplate="$:/plugins/JJ/drag-and-close" type="div" subtype="span"/>