mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-27 14:48:19 +00:00
Add emptyMessage to list-links-draggable and correct docs (#6776)
This commit is contained in:
parent
45895bd560
commit
4cd3c065e7
@ -22,12 +22,12 @@ tags: $:/tags/Macro
|
|||||||
<$action-listops $tiddler=<<targetTiddler>> $field=<<targetField>> $subfilter="+[insertbefore<actionTiddler>,<currentTiddler>]"/>
|
<$action-listops $tiddler=<<targetTiddler>> $field=<<targetField>> $subfilter="+[insertbefore<actionTiddler>,<currentTiddler>]"/>
|
||||||
\end
|
\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
|
\whitespace trim
|
||||||
<span class="tc-links-draggable-list">
|
<span class="tc-links-draggable-list">
|
||||||
<$vars targetTiddler="""$tiddler$""" targetField="""$field$""">
|
<$vars targetTiddler="""$tiddler$""" targetField="""$field$""">
|
||||||
<$type$ class="$class$">
|
<$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>>>
|
<$droppable actions=<<list-links-draggable-drop-actions>> tag="""$subtype$""" enable=<<tv-enable-drag-and-drop>>>
|
||||||
<div class="tc-droppable-placeholder"/>
|
<div class="tc-droppable-placeholder"/>
|
||||||
<div>
|
<div>
|
||||||
|
@ -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
|
: The title of the tiddler containing the list
|
||||||
;field
|
;field
|
||||||
: The name of the field containing the list (defaults to `list`)
|
: 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
|
;type
|
||||||
: The element tag to use for the list wrapper (defaults to `ul`)
|
: The element tag to use for the list wrapper (defaults to `ul`)
|
||||||
;subtype
|
;subtype
|
||||||
|
Loading…
Reference in New Issue
Block a user