From eaf855859556e7a206380a32c86e6f9a9167799d Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Tue, 10 Sep 2024 19:00:13 +0800 Subject: [PATCH] Update PageControls buttons to use v5.3.2 syntax (#8579) * Let PageControls buttons use v5.3.2 syntax * Rewrite buttons and actions * Omit whitespace & use function to avoid duplicating * Omit whitespace in conditional syntax * Define tf.get-tags function to avoid duplicated text substitution * Rewrite advanced search button * Add space in join operator * Rewrite buttons in plugins * Remove tf prefix in new-journal.tid * Remove tf prefix in new-tiddler.tid --- core/ui/Actions/new-journal.tid | 8 ++-- core/ui/Actions/new-tiddler.tid | 6 +-- core/ui/PageControls/advanced-search.tid | 13 +++---- core/ui/PageControls/closeall.tid | 10 ++--- core/ui/PageControls/controlpanel.tid | 13 +++---- core/ui/PageControls/encryption.tid | 16 ++++---- core/ui/PageControls/export-page.tid | 2 +- core/ui/PageControls/fold-all.tid | 10 ++--- core/ui/PageControls/full-screen.tid | 10 ++--- core/ui/PageControls/home.tid | 10 ++--- core/ui/PageControls/import.tid | 10 ++--- core/ui/PageControls/language.tid | 21 +++++----- core/ui/PageControls/layout.tid | 8 ++-- core/ui/PageControls/manager.tid | 13 +++---- core/ui/PageControls/more-page-actions.tid | 38 +++++++++---------- core/ui/PageControls/network-activity.tid | 10 ++--- core/ui/PageControls/new-image.tid | 8 ++-- core/ui/PageControls/new-journal.tid | 11 +++--- core/ui/PageControls/newtiddler.tid | 8 ++-- core/ui/PageControls/palette.tid | 8 ++-- core/ui/PageControls/print.tid | 10 ++--- core/ui/PageControls/refresh.tid | 10 ++--- core/ui/PageControls/savewiki.tid | 10 ++--- core/ui/PageControls/storyview.tid | 13 +++---- core/ui/PageControls/tag-button.tid | 13 +++---- core/ui/PageControls/theme.tid | 8 ++-- core/ui/PageControls/timestamp.tid | 16 ++++---- core/ui/PageControls/unfold-all.tid | 10 ++--- plugins/tiddlywiki/help/help.tid | 16 ++++---- .../markdown-legacy/new-markdown.tid | 8 ++-- plugins/tiddlywiki/markdown/new-markdown.tid | 8 ++-- .../tiddlywiki/tiddlyweb/save-wiki-button.tid | 8 ++-- 32 files changed, 174 insertions(+), 189 deletions(-) diff --git a/core/ui/Actions/new-journal.tid b/core/ui/Actions/new-journal.tid index 9df31cb97..9d663e537 100644 --- a/core/ui/Actions/new-journal.tid +++ b/core/ui/Actions/new-journal.tid @@ -2,10 +2,10 @@ title: $:/core/ui/Actions/new-journal tags: $:/tags/Actions description: create a new journal tiddler -\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$ \whitespace trim -<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}> -<$wikify name="journalTitle" text="<$macrocall $name='now' format=<>/>"> +\function get-tags() [] [] +[join[ ]] +<$let journalTitleTemplate={{$:/config/NewJournal/Title}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}> +<$wikify name="journalTitle" text="<$transclude $variable='now' format=<>/>"> <$reveal type="nomatch" state=<> text=""> <$action-sendmessage $message="tm-new-tiddler" title=<> tags=<> text={{{ [get[]] }}}/> @@ -13,4 +13,4 @@ description: create a new journal tiddler <$action-sendmessage $message="tm-new-tiddler" title=<> tags=<> text=<>/> - + diff --git a/core/ui/Actions/new-tiddler.tid b/core/ui/Actions/new-tiddler.tid index f71331327..847130800 100644 --- a/core/ui/Actions/new-tiddler.tid +++ b/core/ui/Actions/new-tiddler.tid @@ -2,8 +2,8 @@ title: $:/core/ui/Actions/new-tiddler tags: $:/tags/Actions description: create a new empty tiddler -\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$ \whitespace trim -<$vars textFieldTags={{$:/config/NewTiddler/Tags}} tagsFieldTags={{$:/config/NewTiddler/Tags!!tags}}> +\function get-tags() [] [] +[join[ ]] +<$let textFieldTags={{$:/config/NewTiddler/Tags}} tagsFieldTags={{$:/config/NewTiddler/Tags!!tags}}> <$action-sendmessage $message="tm-new-tiddler" tags=<>/> - + diff --git a/core/ui/PageControls/advanced-search.tid b/core/ui/PageControls/advanced-search.tid index 1549b07f4..4aa49e6e5 100644 --- a/core/ui/PageControls/advanced-search.tid +++ b/core/ui/PageControls/advanced-search.tid @@ -4,15 +4,14 @@ caption: {{$:/core/images/advanced-search-button}} {{$:/language/Buttons/Advance description: {{$:/language/Buttons/AdvancedSearch/Hint}} \whitespace trim -\define advanced-search-button(class) -\whitespace trim -<$button to="$:/AdvancedSearch" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class="""$(tv-config-toolbar-class)$ $class$"""> -<$list filter="[match[yes]]"> +\procedure advanced-search-button(class) +<$button to="$:/AdvancedSearch" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`> +<%if [match[yes]] %> {{$:/core/images/advanced-search-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/AdvancedSearch/Caption}}/> - +<%endif%> \end diff --git a/core/ui/PageControls/closeall.tid b/core/ui/PageControls/closeall.tid index 2665fff0d..23aefa8be 100644 --- a/core/ui/PageControls/closeall.tid +++ b/core/ui/PageControls/closeall.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/CloseAll/Hint}} \whitespace trim <$button message="tm-close-all-tiddlers" tooltip={{$:/language/Buttons/CloseAll/Hint}} aria-label={{$:/language/Buttons/CloseAll/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/close-all-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/CloseAll/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/PageControls/controlpanel.tid b/core/ui/PageControls/controlpanel.tid index 872d640ac..8b9db8d9a 100644 --- a/core/ui/PageControls/controlpanel.tid +++ b/core/ui/PageControls/controlpanel.tid @@ -4,15 +4,14 @@ caption: {{$:/core/images/options-button}} {{$:/language/Buttons/ControlPanel/Ca description: {{$:/language/Buttons/ControlPanel/Hint}} \whitespace trim -\define control-panel-button(class) -\whitespace trim -<$button to="$:/ControlPanel" tooltip={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class="""$(tv-config-toolbar-class)$ $class$"""> -<$list filter="[match[yes]]"> +\procedure control-panel-button(class) +<$button to="$:/ControlPanel" tooltip={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`> +<%if [match[yes]] %> {{$:/core/images/options-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/ControlPanel/Caption}}/> - +<%endif%> \end diff --git a/core/ui/PageControls/encryption.tid b/core/ui/PageControls/encryption.tid index 9f8ae0bd6..572d162de 100644 --- a/core/ui/PageControls/encryption.tid +++ b/core/ui/PageControls/encryption.tid @@ -6,25 +6,25 @@ description: {{$:/language/Buttons/Encryption/Hint}} \whitespace trim <$reveal type="match" state="$:/isEncrypted" text="yes"> <$button message="tm-clear-password" tooltip={{$:/language/Buttons/Encryption/ClearPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/ClearPassword/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/locked-padlock}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/> - +<%endif%> <$reveal type="nomatch" state="$:/isEncrypted" text="yes"> <$button message="tm-set-password" tooltip={{$:/language/Buttons/Encryption/SetPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/SetPassword/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/unlocked-padlock}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/> - +<%endif%> diff --git a/core/ui/PageControls/export-page.tid b/core/ui/PageControls/export-page.tid index fe036abf7..902f643e9 100644 --- a/core/ui/PageControls/export-page.tid +++ b/core/ui/PageControls/export-page.tid @@ -3,4 +3,4 @@ tags: $:/tags/PageControls caption: {{$:/core/images/export-button}} {{$:/language/Buttons/ExportPage/Caption}} description: {{$:/language/Buttons/ExportPage/Hint}} -<$macrocall $name="exportButton" exportFilter="[!is[system]sort[title]]" lingoBase="$:/language/Buttons/ExportPage/"/> \ No newline at end of file +<$transclude $variable="exportButton" exportFilter="[!is[system]sort[title]]" lingoBase="$:/language/Buttons/ExportPage/"/> \ No newline at end of file diff --git a/core/ui/PageControls/fold-all.tid b/core/ui/PageControls/fold-all.tid index 46c3165b8..dba6bb1b6 100644 --- a/core/ui/PageControls/fold-all.tid +++ b/core/ui/PageControls/fold-all.tid @@ -6,12 +6,12 @@ description: {{$:/language/Buttons/FoldAll/Hint}} \whitespace trim <$button tooltip={{$:/language/Buttons/FoldAll/Hint}} aria-label={{$:/language/Buttons/FoldAll/Caption}} class=<>> <$action-sendmessage $message="tm-fold-all-tiddlers" $param=<> foldedStatePrefix="$:/state/folded/"/> -<$list filter="[match[yes]]" variable="listItem"> +<%if [match[yes]] %> {{$:/core/images/fold-all-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/FoldAll/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/PageControls/full-screen.tid b/core/ui/PageControls/full-screen.tid index ada7d5a65..864ee5c26 100644 --- a/core/ui/PageControls/full-screen.tid +++ b/core/ui/PageControls/full-screen.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/FullScreen/Hint}} \whitespace trim <$button message="tm-full-screen" tooltip={{$:/language/Buttons/FullScreen/Hint}} aria-label={{$:/language/Buttons/FullScreen/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/full-screen-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/FullScreen/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/PageControls/home.tid b/core/ui/PageControls/home.tid index f3a0b1787..6c1d5a789 100644 --- a/core/ui/PageControls/home.tid +++ b/core/ui/PageControls/home.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/Home/Hint}} \whitespace trim <$button message="tm-home" tooltip={{$:/language/Buttons/Home/Hint}} aria-label={{$:/language/Buttons/Home/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/home-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Home/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/PageControls/import.tid b/core/ui/PageControls/import.tid index 39ca51eb6..11474db22 100644 --- a/core/ui/PageControls/import.tid +++ b/core/ui/PageControls/import.tid @@ -6,14 +6,14 @@ description: {{$:/language/Buttons/Import/Hint}} \whitespace trim
<$button tooltip={{$:/language/Buttons/Import/Hint}} aria-label={{$:/language/Buttons/Import/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/import-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Import/Caption}}/> - +<%endif%> <$browse tooltip={{$:/language/Buttons/Import/Hint}}/> -
\ No newline at end of file + diff --git a/core/ui/PageControls/language.tid b/core/ui/PageControls/language.tid index 623c71004..3315b5a23 100644 --- a/core/ui/PageControls/language.tid +++ b/core/ui/PageControls/language.tid @@ -4,21 +4,18 @@ caption: {{$:/core/images/globe}} {{$:/language/Buttons/Language/Caption}} description: {{$:/language/Buttons/Language/Hint}} \whitespace trim -\define flag-title() -$(languagePluginTitle)$/icon -\end <$button popup=<> tooltip={{$:/language/Buttons/Language/Hint}} aria-label={{$:/language/Buttons/Language/Caption}} class=<> selectedClass="tc-selected"> -<$list filter="[match[yes]]"> - -<$set name="languagePluginTitle" value={{$:/language}}> -<$image source=<>/> - - - -<$list filter="[match[yes]]"> +<%if [match[yes]] %> + + <$set name="languagePluginTitle" value={{$:/language}}> + <$image source=`$(languagePluginTitle)$/icon`/> + + +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Language/Caption}}/> - +<%endif%> <$reveal state=<> type="popup" position="below" animate="yes"> diff --git a/core/ui/PageControls/layout.tid b/core/ui/PageControls/layout.tid index 703bbcb1b..c9a0f596b 100644 --- a/core/ui/PageControls/layout.tid +++ b/core/ui/PageControls/layout.tid @@ -6,10 +6,10 @@ description: {{$:/language/LayoutSwitcher/Description}} \whitespace trim <$button tooltip={{$:/language/Buttons/LayoutSwitcher/Hint}} aria-label={{$:/language/Buttons/LayoutSwitcher/Caption}} class=<>> <$action-sendmessage $message="tm-show-switcher" switch="layout"/> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/layout-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/LayoutSwitcher/Caption}}/> - +<%endif%> diff --git a/core/ui/PageControls/manager.tid b/core/ui/PageControls/manager.tid index d2144c574..3cc364f80 100644 --- a/core/ui/PageControls/manager.tid +++ b/core/ui/PageControls/manager.tid @@ -4,17 +4,16 @@ caption: {{$:/core/images/list}} {{$:/language/Buttons/Manager/Caption}} description: {{$:/language/Buttons/Manager/Hint}} \whitespace trim -\define manager-button(class) -\whitespace trim -<$button to="$:/Manager" tooltip={{$:/language/Buttons/Manager/Hint}} aria-label={{$:/language/Buttons/Manager/Caption}} class="""$(tv-config-toolbar-class)$ $class$"""> -<$list filter="[match[yes]]"> +\procedure manager-button(class) +<$button to="$:/Manager" tooltip={{$:/language/Buttons/Manager/Hint}} aria-label={{$:/language/Buttons/Manager/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`> +<%if [match[yes]] %> {{$:/core/images/list}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Manager/Caption}}/> - +<%endif%> \end diff --git a/core/ui/PageControls/more-page-actions.tid b/core/ui/PageControls/more-page-actions.tid index 3acaef2b6..7453b9df7 100644 --- a/core/ui/PageControls/more-page-actions.tid +++ b/core/ui/PageControls/more-page-actions.tid @@ -12,33 +12,29 @@ description: {{$:/language/Buttons/More/Hint}} class=<> selectedClass="tc-selected" > - <$list filter="[match[yes]]"> + <%if [match[yes]] %> {{$:/core/images/down-arrow}} - - <$list filter="[match[yes]]"> + <%endif%> + <%if [match[yes]] %> <$text text={{$:/language/Buttons/More/Caption}}/> - + <%endif%> <$reveal state=<> type="popup" position="below" animate="yes">
- <$set name="tv-config-toolbar-icons" value="yes"> - <$set name="tv-config-toolbar-text" value="yes"> - <$set name="tv-config-toolbar-class" value="tc-btn-invisible"> - <$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]" - variable="listItem" + <$let tv-config-toolbar-icons="yes" tv-config-toolbar-text="yes" tv-config-toolbar-class="tc-btn-invisible"> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]" + variable="listItem" + > + <$reveal type="match" state=<> text="hide"> + <$set name="tv-config-toolbar-class" + filter="[] [encodeuricomponent[]addprefix[tc-btn-]]" > - <$reveal type="match" state=<> text="hide"> - <$set name="tv-config-toolbar-class" - filter="[] [encodeuricomponent[]addprefix[tc-btn-]]" - > - <$transclude tiddler=<> mode="inline"/> - - - - - - + <$transclude tiddler=<> mode="inline"/> + + + +
- \ No newline at end of file + diff --git a/core/ui/PageControls/network-activity.tid b/core/ui/PageControls/network-activity.tid index 763365f37..7be25b261 100644 --- a/core/ui/PageControls/network-activity.tid +++ b/core/ui/PageControls/network-activity.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/NetworkActivity/Hint}} \whitespace trim <$button message="tm-http-cancel-all-requests" tooltip={{$:/language/Buttons/NetworkActivity/Hint}} aria-label={{$:/language/Buttons/NetworkActivity/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/network-activity}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/NetworkActivity/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/PageControls/new-image.tid b/core/ui/PageControls/new-image.tid index b37fba7c5..0cf954966 100644 --- a/core/ui/PageControls/new-image.tid +++ b/core/ui/PageControls/new-image.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/NewImage/Hint}} \whitespace trim <$button tooltip={{$:/language/Buttons/NewImage/Hint}} aria-label={{$:/language/Buttons/NewImage/Caption}} class=<> actions={{$:/core/ui/Actions/new-image}}> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/new-image-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/NewImage/Caption}}/> - +<%endif%> diff --git a/core/ui/PageControls/new-journal.tid b/core/ui/PageControls/new-journal.tid index 8ae8ee78a..8330b8cb7 100644 --- a/core/ui/PageControls/new-journal.tid +++ b/core/ui/PageControls/new-journal.tid @@ -4,17 +4,16 @@ caption: {{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournal/ description: {{$:/language/Buttons/NewJournal/Hint}} \whitespace trim -\define journalButton() -\whitespace trim +\procedure journalButton() <$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<> actions={{$:/core/ui/Actions/new-journal}}> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/new-journal-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/NewJournal/Caption}}/> - +<%endif%> \end <> diff --git a/core/ui/PageControls/newtiddler.tid b/core/ui/PageControls/newtiddler.tid index cd2f56913..f6a6e6891 100644 --- a/core/ui/PageControls/newtiddler.tid +++ b/core/ui/PageControls/newtiddler.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/NewTiddler/Hint}} \whitespace trim <$button actions={{$:/core/ui/Actions/new-tiddler}} tooltip={{$:/language/Buttons/NewTiddler/Hint}} aria-label={{$:/language/Buttons/NewTiddler/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/new-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/NewTiddler/Caption}}/> - +<%endif%> diff --git a/core/ui/PageControls/palette.tid b/core/ui/PageControls/palette.tid index 6fdbdb439..efa016d49 100644 --- a/core/ui/PageControls/palette.tid +++ b/core/ui/PageControls/palette.tid @@ -6,12 +6,12 @@ description: {{$:/language/Buttons/Palette/Hint}} \whitespace trim <$button popup=<> tooltip={{$:/language/Buttons/Palette/Hint}} aria-label={{$:/language/Buttons/Palette/Caption}} class=<> selectedClass="tc-selected"> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/palette}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Palette/Caption}}/> - +<%endif%> <$reveal state=<> type="popup" position="below" animate="yes"> diff --git a/core/ui/PageControls/print.tid b/core/ui/PageControls/print.tid index ef664b6e3..994303d25 100644 --- a/core/ui/PageControls/print.tid +++ b/core/ui/PageControls/print.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/Print/Hint}} \whitespace trim <$button message="tm-print" tooltip={{$:/language/Buttons/Print/Hint}} aria-label={{$:/language/Buttons/Print/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/print-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Print/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/PageControls/refresh.tid b/core/ui/PageControls/refresh.tid index 38692f817..5a8773b77 100644 --- a/core/ui/PageControls/refresh.tid +++ b/core/ui/PageControls/refresh.tid @@ -5,12 +5,12 @@ description: {{$:/language/Buttons/Refresh/Hint}} \whitespace trim <$button message="tm-browser-refresh" tooltip={{$:/language/Buttons/Refresh/Hint}} aria-label={{$:/language/Buttons/Refresh/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/refresh-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Refresh/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/core/ui/PageControls/savewiki.tid b/core/ui/PageControls/savewiki.tid index 60f8dc99f..7e6a18ccc 100644 --- a/core/ui/PageControls/savewiki.tid +++ b/core/ui/PageControls/savewiki.tid @@ -9,13 +9,13 @@ description: {{$:/language/Buttons/SaveWiki/Hint}} <$action-sendmessage $message="tm-save-wiki" $param={{$:/config/SaveWikiButton/Template}} filename=<>/> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/save-button-dynamic}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/SaveWiki/Caption}}/> - +<%endif%> - \ No newline at end of file + diff --git a/core/ui/PageControls/storyview.tid b/core/ui/PageControls/storyview.tid index c4d0b7365..7738cfa97 100644 --- a/core/ui/PageControls/storyview.tid +++ b/core/ui/PageControls/storyview.tid @@ -4,19 +4,16 @@ caption: {{$:/core/images/storyview-classic}} {{$:/language/Buttons/StoryView/Ca description: {{$:/language/Buttons/StoryView/Hint}} \whitespace trim -\define icon() -$:/core/images/storyview-$(storyview)$ -\end <$button popup=<> tooltip={{$:/language/Buttons/StoryView/Hint}} aria-label={{$:/language/Buttons/StoryView/Caption}} class=<> selectedClass="tc-selected"> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> <$set name="storyview" value={{$:/view}}> -<$transclude tiddler=<>/> +<$transclude tiddler=`$:/core/images/storyview-$(storyview)$`/> - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/StoryView/Caption}}/> - +<%endif%> <$reveal state=<> type="popup" position="below" animate="yes"> diff --git a/core/ui/PageControls/tag-button.tid b/core/ui/PageControls/tag-button.tid index e2b5c9277..6c04804ce 100644 --- a/core/ui/PageControls/tag-button.tid +++ b/core/ui/PageControls/tag-button.tid @@ -4,17 +4,16 @@ caption: {{$:/core/images/tag-button}} {{$:/language/Buttons/TagManager/Caption} description: {{$:/language/Buttons/TagManager/Hint}} \whitespace trim -\define control-panel-button(class) -\whitespace trim -<$button to="$:/TagManager" tooltip={{$:/language/Buttons/TagManager/Hint}} aria-label={{$:/language/Buttons/TagManager/Caption}} class="""$(tv-config-toolbar-class)$ $class$"""> -<$list filter="[match[yes]]"> +\procedure control-panel-button(class) +<$button to="$:/TagManager" tooltip={{$:/language/Buttons/TagManager/Hint}} aria-label={{$:/language/Buttons/TagManager/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`> +<%if [match[yes]] %> {{$:/core/images/tag-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/TagManager/Caption}}/> - +<%endif%> \end diff --git a/core/ui/PageControls/theme.tid b/core/ui/PageControls/theme.tid index 2d8eadc7b..60e37a95e 100644 --- a/core/ui/PageControls/theme.tid +++ b/core/ui/PageControls/theme.tid @@ -6,12 +6,12 @@ description: {{$:/language/Buttons/Theme/Hint}} \whitespace trim <$button popup=<> tooltip={{$:/language/Buttons/Theme/Hint}} aria-label={{$:/language/Buttons/Theme/Caption}} class=<> selectedClass="tc-selected"> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/theme-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Theme/Caption}}/> - +<%endif%> <$reveal state=<> type="popup" position="below" animate="yes"> diff --git a/core/ui/PageControls/timestamp.tid b/core/ui/PageControls/timestamp.tid index a54b3f2ca..0186d7c12 100644 --- a/core/ui/PageControls/timestamp.tid +++ b/core/ui/PageControls/timestamp.tid @@ -7,26 +7,26 @@ description: {{$:/language/Buttons/Timestamp/Hint}} <$reveal type="nomatch" state="$:/config/TimestampDisable" text="yes"> <$button tooltip={{$:/language/Buttons/Timestamp/On/Hint}} aria-label={{$:/language/Buttons/Timestamp/On/Caption}} class=<>> <$action-setfield $tiddler="$:/config/TimestampDisable" $value="yes"/> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/timestamp-on}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Timestamp/On/Caption}}/> - +<%endif%> <$reveal type="match" state="$:/config/TimestampDisable" text="yes"> <$button tooltip={{$:/language/Buttons/Timestamp/Off/Hint}} aria-label={{$:/language/Buttons/Timestamp/Off/Caption}} class=<>> <$action-setfield $tiddler="$:/config/TimestampDisable" $value="no"/> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/timestamp-off}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Timestamp/Off/Caption}}/> - +<%endif%> diff --git a/core/ui/PageControls/unfold-all.tid b/core/ui/PageControls/unfold-all.tid index 6e8357a3b..e0d26bc49 100644 --- a/core/ui/PageControls/unfold-all.tid +++ b/core/ui/PageControls/unfold-all.tid @@ -6,12 +6,12 @@ description: {{$:/language/Buttons/UnfoldAll/Hint}} \whitespace trim <$button tooltip={{$:/language/Buttons/UnfoldAll/Hint}} aria-label={{$:/language/Buttons/UnfoldAll/Caption}} class=<>> <$action-sendmessage $message="tm-unfold-all-tiddlers" $param=<> foldedStatePrefix="$:/state/folded/"/> -<$list filter="[match[yes]]" variable="listItem"> +<%if [match[yes]] %> {{$:/core/images/unfold-all-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/UnfoldAll/Caption}}/> - - \ No newline at end of file +<%endif%> + diff --git a/plugins/tiddlywiki/help/help.tid b/plugins/tiddlywiki/help/help.tid index eca5ffaa7..f29d9dbdf 100644 --- a/plugins/tiddlywiki/help/help.tid +++ b/plugins/tiddlywiki/help/help.tid @@ -8,22 +8,22 @@ description: {{$:/language/Buttons/Help/Hint}} \whitespace trim <$list filter="[[$:/config/ShowHelp]get[text]] +[else[no]match[yes]]" variable="ignore"> <$button set="$:/config/ShowHelp" setTo="no" tooltip={{$:/language/Buttons/Help/Hint}} aria-label={{$:/language/Buttons/Help/Caption}} class="""$(tv-config-toolbar-class)$ tc-selected"""> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/help}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Help/Caption}}/> - +<%endif%> <$list filter="[[$:/config/ShowHelp]get[text]] +[else[no]!match[yes]]" variable="ignore"> <$button set="$:/config/ShowHelp" setTo="yes" tooltip={{$:/language/Buttons/Help/Hint}} aria-label={{$:/language/Buttons/Help/Caption}} class=<>> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/core/images/help}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/Help/Caption}}/> - +<%endif%> \end diff --git a/plugins/tiddlywiki/markdown-legacy/new-markdown.tid b/plugins/tiddlywiki/markdown-legacy/new-markdown.tid index 507c265a5..8d8f587d8 100755 --- a/plugins/tiddlywiki/markdown-legacy/new-markdown.tid +++ b/plugins/tiddlywiki/markdown-legacy/new-markdown.tid @@ -7,10 +7,10 @@ list-after: $:/core/ui/Buttons/new-tiddler \whitespace trim <$button tooltip={{$:/language/Buttons/NewMarkdown/Hint}} aria-label={{$:/language/Buttons/NewMarkdown/Caption}} class=<>> <$action-sendmessage $message="tm-new-tiddler" type="text/markdown"/> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/plugins/tiddlywiki/markdown-legacy/images/new-markdown-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/NewMarkdown/Caption}}/> - +<%endif%> diff --git a/plugins/tiddlywiki/markdown/new-markdown.tid b/plugins/tiddlywiki/markdown/new-markdown.tid index 192543d77..404046360 100755 --- a/plugins/tiddlywiki/markdown/new-markdown.tid +++ b/plugins/tiddlywiki/markdown/new-markdown.tid @@ -7,10 +7,10 @@ list-after: $:/core/ui/Buttons/new-tiddler \whitespace trim <$button tooltip={{$:/language/Buttons/NewMarkdown/Hint}} aria-label={{$:/language/Buttons/NewMarkdown/Caption}} class=<>> <$action-sendmessage $message="tm-new-tiddler" type="text/markdown"/> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/plugins/tiddlywiki/markdown/images/new-markdown-button}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text={{$:/language/Buttons/NewMarkdown/Caption}}/> - +<%endif%> diff --git a/plugins/tiddlywiki/tiddlyweb/save-wiki-button.tid b/plugins/tiddlywiki/tiddlyweb/save-wiki-button.tid index ed4c042c7..63ddfc19e 100644 --- a/plugins/tiddlywiki/tiddlyweb/save-wiki-button.tid +++ b/plugins/tiddlywiki/tiddlyweb/save-wiki-button.tid @@ -9,12 +9,12 @@ $:/config/PageControlButtons/Visibility/$(listItem)$ \end <$button popup=<> tooltip="Status of synchronisation with server" aria-label="Server status" class=<> selectedClass="tc-selected"> -<$list filter="[match[yes]]"> +<%if [match[yes]] %> {{$:/plugins/tiddlywiki/tiddlyweb/icon/cloud}} - -<$list filter="[match[yes]]"> +<%endif%> +<%if [match[yes]] %> <$text text="Server status"/> - +<%endif%> <$reveal state=<> type="popup" position="belowleft" animate="yes">