mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-24 00:50:28 +00:00
Update export button to use tiddler title as filename base
This commit is contained in:
parent
d6c5e51501
commit
e6043b07b9
@ -1,7 +1,7 @@
|
||||
title: $:/core/templates/exporters/CsvFile
|
||||
tags: $:/tags/Exporter
|
||||
description: {{$:/language/Exporters/CsvFile}}
|
||||
filename: tiddlers.csv
|
||||
extension: .csv
|
||||
|
||||
\define renderContent()
|
||||
<$text text=<<csvtiddlers filter:"""$(exportFilter)$""" format:"quoted-comma-sep">>/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
title: $:/core/templates/exporters/JsonFile
|
||||
tags: $:/tags/Exporter
|
||||
description: {{$:/language/Exporters/JsonFile}}
|
||||
filename: tiddlers.json
|
||||
extension: .json
|
||||
|
||||
\define renderContent()
|
||||
<$text text=<<jsontiddlers filter:"""$(exportFilter)$""">>/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
title: $:/core/templates/exporters/StaticRiver
|
||||
tags: $:/tags/Exporter
|
||||
description: {{$:/language/Exporters/StaticRiver}}
|
||||
filename: static.tiddlers.html
|
||||
extension: .html
|
||||
|
||||
\define tv-wikilink-template() #$uri_encoded$
|
||||
\define tv-config-toolbar-icons() no
|
||||
|
@ -1,7 +1,7 @@
|
||||
title: $:/core/templates/exporters/TidFile
|
||||
tags: $:/tags/Exporter
|
||||
description: {{$:/language/Exporters/TidFile}}
|
||||
filename: tiddler.tid
|
||||
extension: .tid
|
||||
|
||||
\define renderContent()
|
||||
{{{ $(exportFilter)$ +[limit[1]] ||$:/core/templates/tid-tiddler}}}
|
||||
|
@ -6,4 +6,4 @@ description: {{$:/language/Buttons/ExportTiddler/Hint}}
|
||||
\define makeExportFilter()
|
||||
[[$(currentTiddler)$]]
|
||||
\end
|
||||
<$macrocall $name="exportButton" exportFilter=<<makeExportFilter>> lingoBase="$:/language/Buttons/ExportTiddler/"/>
|
||||
<$macrocall $name="exportButton" exportFilter=<<makeExportFilter>> lingoBase="$:/language/Buttons/ExportTiddler/" baseFilename=<<currentTiddler>>/>
|
||||
|
@ -1,7 +1,11 @@
|
||||
title: $:/core/macros/export
|
||||
tags: $:/tags/Macro
|
||||
|
||||
\define exportButton(exportFilter:"[!is[system]sort[title]]",lingoBase)
|
||||
\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>prefix[yes]]">
|
||||
@ -15,9 +19,9 @@ tags: $:/tags/Macro
|
||||
<$reveal state=<<qualify "$:/state/popup/export">> type="popup" position="below" animate="yes">
|
||||
<div class="tc-drop-down">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]">
|
||||
<$set name="filename" value={{!!filename}}>
|
||||
<$set name="extension" value={{!!extension}}>
|
||||
<$button class="tc-btn-invisible">
|
||||
<$action-sendmessage $message="tm-download-file" $param=<<currentTiddler>> exportFilter="""$exportFilter$""" filename=<<filename>>/>
|
||||
<$action-sendmessage $message="tm-download-file" $param=<<currentTiddler>> exportFilter="""$exportFilter$""" filename=<<exportButtonFilename """$baseFilename$""">>/>
|
||||
<$action-deletetiddler $tiddler=<<qualify "$:/state/popup/export">>/>
|
||||
<$transclude field="description"/>
|
||||
</$button>
|
||||
|
Loading…
Reference in New Issue
Block a user