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

View File

@ -388,7 +388,8 @@ a.tc-tiddlylink-external:hover {
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;
height: 2em;
}