2014-11-10 20:59:15 +00:00
|
|
|
title: $:/core/macros/export
|
2024-10-22 12:15:34 +00:00
|
|
|
tags: $:/tags/Macro
|
2014-11-10 20:59:15 +00:00
|
|
|
|
2024-09-12 18:33:57 +00:00
|
|
|
\function exportButtonFilename(baseFilename)
|
|
|
|
[<baseFilename>] [<extension>] +[join[]]
|
2014-11-22 14:19:10 +00:00
|
|
|
\end
|
|
|
|
|
2024-09-12 18:33:57 +00:00
|
|
|
\procedure exportButton(exportFilter:"[!is[system]sort[title]]",lingoBase,baseFilename:"tiddlers")
|
2021-05-24 18:24:37 +00:00
|
|
|
\whitespace trim
|
2024-09-12 18:33:57 +00:00
|
|
|
<$let hint={{{ [<lingoBase>addsuffix[Hint]get[text]] }}}
|
|
|
|
caption={{{ [<lingoBase>addsuffix[Caption]get[text]] }}}
|
2024-09-08 14:57:55 +00:00
|
|
|
>
|
|
|
|
<span class="tc-popup-keep">
|
|
|
|
<$button popup=<<qualify "$:/state/popup/export">>
|
|
|
|
tooltip=<<hint>>
|
|
|
|
aria-label=<<caption>>
|
|
|
|
class=<<tv-config-toolbar-class>>
|
|
|
|
selectedClass="tc-selected"
|
2024-09-12 18:33:57 +00:00
|
|
|
dragFilter=<<exportFilter>>
|
2024-09-08 14:57:55 +00:00
|
|
|
>
|
2024-09-12 18:33:57 +00:00
|
|
|
<%if [<tv-config-toolbar-icons>match[yes]] %>
|
2024-09-08 14:57:55 +00:00
|
|
|
{{$:/core/images/export-button}}
|
2024-09-12 18:33:57 +00:00
|
|
|
<%endif%>
|
|
|
|
<%if [<tv-config-toolbar-text>match[yes]] %>
|
2024-09-08 14:57:55 +00:00
|
|
|
<span class="tc-btn-text"><$text text=<<caption>>/></span>
|
2024-09-12 18:33:57 +00:00
|
|
|
<%endif%>
|
2024-09-08 14:57:55 +00:00
|
|
|
</$button>
|
|
|
|
</span>
|
2024-09-12 18:33:57 +00:00
|
|
|
</$let>
|
2024-09-08 14:57:55 +00:00
|
|
|
<$reveal state=<<qualify "$:/state/popup/export">> type="popup" position="below" animate="yes">
|
|
|
|
<div class="tc-drop-down">
|
2024-09-12 18:33:57 +00:00
|
|
|
<$set name="count" value={{{ [subfilter<exportFilter>count[]] }}}>
|
2024-09-08 14:57:55 +00:00
|
|
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]">
|
|
|
|
<$list filter="[<currentTiddler>has[condition]subfilter{!!condition}limit[1]] ~[<currentTiddler>!has[condition]then[true]]"
|
|
|
|
variable="ignore"
|
|
|
|
>
|
|
|
|
<$button class="tc-btn-invisible">
|
|
|
|
<$action-sendmessage $message="tm-download-file"
|
|
|
|
$param=<<currentTiddler>>
|
2024-09-12 18:33:57 +00:00
|
|
|
exportFilter=<<exportFilter>>
|
|
|
|
filename={{{ [<baseFilename>addsuffix{!!extension}] }}}
|
2024-09-08 14:57:55 +00:00
|
|
|
/>
|
|
|
|
<$action-deletetiddler $tiddler=<<qualify "$:/state/popup/export">>/>
|
|
|
|
<$transclude field="description"/>
|
|
|
|
</$button>
|
|
|
|
</$list>
|
|
|
|
</$list>
|
|
|
|
</$set>
|
|
|
|
</div>
|
2014-11-10 20:59:15 +00:00
|
|
|
</$reveal>
|
|
|
|
\end
|