mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-10 20:09:57 +00:00
Add drag and drop handling for export macro & rewrite using v5.3.2 syntax (#8594)
This commit is contained in:
parent
18e1ee44d8
commit
c7ca8359ab
@ -1,14 +1,14 @@
|
|||||||
title: $:/core/macros/export
|
title: $:/core/macros/export
|
||||||
tags: $:/tags/Macro
|
tags: $:/tags/Macro $:/tags/Global
|
||||||
|
|
||||||
\define exportButtonFilename(baseFilename)
|
\function exportButtonFilename(baseFilename)
|
||||||
$baseFilename$$(extension)$
|
[<baseFilename>] [<extension>] +[join[]]
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define exportButton(exportFilter:"[!is[system]sort[title]]",lingoBase,baseFilename:"tiddlers")
|
\procedure exportButton(exportFilter:"[!is[system]sort[title]]",lingoBase,baseFilename:"tiddlers")
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$vars hint={{{ [<__lingoBase__>addsuffix[Hint]get[text]] }}}
|
<$let hint={{{ [<lingoBase>addsuffix[Hint]get[text]] }}}
|
||||||
caption={{{ [<__lingoBase__>addsuffix[Caption]get[text]] }}}
|
caption={{{ [<lingoBase>addsuffix[Caption]get[text]] }}}
|
||||||
>
|
>
|
||||||
<span class="tc-popup-keep">
|
<span class="tc-popup-keep">
|
||||||
<$button popup=<<qualify "$:/state/popup/export">>
|
<$button popup=<<qualify "$:/state/popup/export">>
|
||||||
@ -16,19 +16,20 @@ $baseFilename$$(extension)$
|
|||||||
aria-label=<<caption>>
|
aria-label=<<caption>>
|
||||||
class=<<tv-config-toolbar-class>>
|
class=<<tv-config-toolbar-class>>
|
||||||
selectedClass="tc-selected"
|
selectedClass="tc-selected"
|
||||||
|
dragFilter=<<exportFilter>>
|
||||||
>
|
>
|
||||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
<%if [<tv-config-toolbar-icons>match[yes]] %>
|
||||||
{{$:/core/images/export-button}}
|
{{$:/core/images/export-button}}
|
||||||
</$list>
|
<%endif%>
|
||||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
<%if [<tv-config-toolbar-text>match[yes]] %>
|
||||||
<span class="tc-btn-text"><$text text=<<caption>>/></span>
|
<span class="tc-btn-text"><$text text=<<caption>>/></span>
|
||||||
</$list>
|
<%endif%>
|
||||||
</$button>
|
</$button>
|
||||||
</span>
|
</span>
|
||||||
</$vars>
|
</$let>
|
||||||
<$reveal state=<<qualify "$:/state/popup/export">> type="popup" position="below" animate="yes">
|
<$reveal state=<<qualify "$:/state/popup/export">> type="popup" position="below" animate="yes">
|
||||||
<div class="tc-drop-down">
|
<div class="tc-drop-down">
|
||||||
<$set name="count" value={{{ [subfilter<__exportFilter__>count[]] }}}>
|
<$set name="count" value={{{ [subfilter<exportFilter>count[]] }}}>
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]">
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]">
|
||||||
<$list filter="[<currentTiddler>has[condition]subfilter{!!condition}limit[1]] ~[<currentTiddler>!has[condition]then[true]]"
|
<$list filter="[<currentTiddler>has[condition]subfilter{!!condition}limit[1]] ~[<currentTiddler>!has[condition]then[true]]"
|
||||||
variable="ignore"
|
variable="ignore"
|
||||||
@ -36,8 +37,8 @@ $baseFilename$$(extension)$
|
|||||||
<$button class="tc-btn-invisible">
|
<$button class="tc-btn-invisible">
|
||||||
<$action-sendmessage $message="tm-download-file"
|
<$action-sendmessage $message="tm-download-file"
|
||||||
$param=<<currentTiddler>>
|
$param=<<currentTiddler>>
|
||||||
exportFilter=<<__exportFilter__>>
|
exportFilter=<<exportFilter>>
|
||||||
filename={{{ [<__baseFilename__>addsuffix{!!extension}] }}}
|
filename={{{ [<baseFilename>addsuffix{!!extension}] }}}
|
||||||
/>
|
/>
|
||||||
<$action-deletetiddler $tiddler=<<qualify "$:/state/popup/export">>/>
|
<$action-deletetiddler $tiddler=<<qualify "$:/state/popup/export">>/>
|
||||||
<$transclude field="description"/>
|
<$transclude field="description"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user