1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 12:07:19 +00:00

Add emptyMessage to list-links-draggable and correct docs (#6776)

This commit is contained in:
Mohammad Rahmani 2022-07-13 19:28:27 +04:30 committed by GitHub
parent 45895bd560
commit 4cd3c065e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -22,12 +22,12 @@ tags: $:/tags/Macro
<$action-listops $tiddler=<<targetTiddler>> $field=<<targetField>> $subfilter="+[insertbefore<actionTiddler>,<currentTiddler>]"/>
\end
\define list-links-draggable(tiddler,field:"list",type:"ul",subtype:"li",class:"",itemTemplate)
\define list-links-draggable(tiddler,field:"list",emptyMessage,type:"ul",subtype:"li",class:"",itemTemplate)
\whitespace trim
<span class="tc-links-draggable-list">
<$vars targetTiddler="""$tiddler$""" targetField="""$field$""">
<$type$ class="$class$">
<$list filter="[list[$tiddler$!!$field$]]">
<$list filter="[list[$tiddler$!!$field$]]" emptyMessage=<<__emptyMessage__>>>
<$droppable actions=<<list-links-draggable-drop-actions>> tag="""$subtype$""" enable=<<tv-enable-drag-and-drop>>>
<div class="tc-droppable-placeholder"/>
<div>

View File

@ -13,6 +13,8 @@ The <<.def list-links-draggable>> [[macro|Macros]] renders the ListField of a ti
: The title of the tiddler containing the list
;field
: The name of the field containing the list (defaults to `list`)
;emptyMessage
: Optional wikitext to display if there is no output (tiddler is not existed, field is not existed or empty)
;type
: The element tag to use for the list wrapper (defaults to `ul`)
;subtype