1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-25 01:20:30 +00:00

Fix sticky draggable-placeholders in list macros (firefox) (#3823)

* fix draggable lists for firefox (sticky placeholders)

ff doesn't like whitespace and also those   entities make problems

placeholder is styled in vanilla base

* tc-droppable-placeholder styles for tagged-draggable ...

and links-draggable lists

* make it beautiful
This commit is contained in:
Simon Huber 2019-03-10 21:05:18 +01:00 committed by Jeremy Ruston
parent 0ab29e2c09
commit 71aed78e2e
2 changed files with 11 additions and 10 deletions

View File

@ -20,13 +20,13 @@ tags: $:/tags/Macro
\end \end
\define list-links-draggable(tiddler,field:"list",type:"ul",subtype:"li",class:"",itemTemplate) \define list-links-draggable(tiddler,field:"list",type:"ul",subtype:"li",class:"",itemTemplate)
\whitespace trim
<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$]]">
<$droppable actions=<<list-links-draggable-drop-actions>> tag="""$subtype$"""> <$droppable actions=<<list-links-draggable-drop-actions>> tag="""$subtype$""">
<div class="tc-droppable-placeholder"> <div class="tc-droppable-placeholder"/>
&nbsp;
</div>
<div> <div>
<$transclude tiddler="""$itemTemplate$"""> <$transclude tiddler="""$itemTemplate$""">
<$link to={{!!title}}> <$link to={{!!title}}>
@ -48,6 +48,7 @@ tags: $:/tags/Macro
</$droppable> </$droppable>
</$tiddler> </$tiddler>
</$vars> </$vars>
</span>
\end \end
\define list-tagged-draggable-drop-actions(tag) \define list-tagged-draggable-drop-actions(tag)
@ -73,13 +74,13 @@ tags: $:/tags/Macro
\end \end
\define list-tagged-draggable(tag,subFilter,emptyMessage,itemTemplate,elementTag:"div") \define list-tagged-draggable(tag,subFilter,emptyMessage,itemTemplate,elementTag:"div")
\whitespace trim
<span class="tc-tagged-draggable-list">
<$set name="tag" value=<<__tag__>>> <$set name="tag" value=<<__tag__>>>
<$list filter="[<__tag__>tagging[]$subFilter$]" emptyMessage=<<__emptyMessage__>>> <$list filter="[<__tag__>tagging[]$subFilter$]" emptyMessage=<<__emptyMessage__>>>
<$elementTag$ class="tc-menu-list-item"> <$elementTag$ class="tc-menu-list-item">
<$droppable actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<__tag__>>/>"""> <$droppable actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<__tag__>>/>""">
<$elementTag$ class="tc-droppable-placeholder"> <$elementTag$ class="tc-droppable-placeholder"/>
&nbsp;
</$elementTag$>
<$elementTag$> <$elementTag$>
<$transclude tiddler="""$itemTemplate$"""> <$transclude tiddler="""$itemTemplate$""">
<$link to={{!!title}}> <$link to={{!!title}}>
@ -92,12 +93,11 @@ tags: $:/tags/Macro
</$list> </$list>
<$tiddler tiddler=""> <$tiddler tiddler="">
<$droppable actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<__tag__>>/>"""> <$droppable actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<__tag__>>/>""">
<$elementTag$ class="tc-droppable-placeholder"> <$elementTag$ class="tc-droppable-placeholder"/>
&nbsp;
</$elementTag$>
<$elementTag$ style="height:0.5em;"> <$elementTag$ style="height:0.5em;">
</$elementTag$> </$elementTag$>
</$droppable> </$droppable>
</$tiddler> </$tiddler>
</$set> </$set>
</span>
\end \end

View File

@ -388,7 +388,8 @@ a.tc-tiddlylink-external:hover {
cursor: move; cursor: move;
} }
.tc-sidebar-tab-open .tc-droppable-placeholder { .tc-sidebar-tab-open .tc-droppable-placeholder, .tc-tagged-draggable-list .tc-droppable-placeholder,
.tc-links-draggable-list .tc-droppable-placeholder {
line-height: 2em; line-height: 2em;
height: 2em; height: 2em;
} }