mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-24 02:27:19 +00:00
1d7091e637
Fixes #5237
34 lines
1.5 KiB
Plaintext
34 lines
1.5 KiB
Plaintext
title: $:/core/macros/export
|
|
tags: $:/tags/Macro
|
|
|
|
\define exportButtonFilename(baseFilename)
|
|
$baseFilename$$(extension)$
|
|
\end
|
|
|
|
\define exportButton(exportFilter:"[!is[system]sort[title]]",lingoBase,baseFilename:"tiddlers")
|
|
<span class="tc-popup-keep"><$button popup=<<qualify "$:/state/popup/export">> tooltip={{$lingoBase$Hint}} aria-label={{$lingoBase$Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
|
|
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
|
{{$:/core/images/export-button}}
|
|
</$list>
|
|
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
|
<span class="tc-btn-text"><$text text={{$lingoBase$Caption}}/></span>
|
|
</$list>
|
|
</$button></span><$reveal state=<<qualify "$:/state/popup/export">> type="popup" position="below" animate="yes">
|
|
<div class="tc-drop-down">
|
|
<$set name="count" value={{{ [subfilter<__exportFilter__>count[]] }}}>
|
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]">
|
|
<$list filter="[<currentTiddler>has[condition]subfilter{!!condition}limit[1]] ~[<currentTiddler>!has[condition]then[true]]" variable="ignore">
|
|
<$set name="extension" value={{!!extension}}>
|
|
<$button class="tc-btn-invisible">
|
|
<$action-sendmessage $message="tm-download-file" $param=<<currentTiddler>> exportFilter=<<__exportFilter__>> filename=<<exportButtonFilename """$baseFilename$""">>/>
|
|
<$action-deletetiddler $tiddler=<<qualify "$:/state/popup/export">>/>
|
|
<$transclude field="description"/>
|
|
</$button>
|
|
</$set>
|
|
</$list>
|
|
</$list>
|
|
</$set>
|
|
</div>
|
|
</$reveal>
|
|
\end
|