From 29606c6d24af586ffb464b7fa492ea9513dc9974 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 6 Jun 2018 19:41:02 +0100 Subject: [PATCH] Refactor new journal actions Using contained actions, as we were, meant that the actions (and in this case the wikify widget) were being rendered at render time, but might have been out of date by the time the actions were triggered. Using the action attribute ensures the actions are rendered when they are executed. Fixes #3326 --- core/ui/PageControls/new-journal.tid | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/ui/PageControls/new-journal.tid b/core/ui/PageControls/new-journal.tid index ee27d996d..6b26b5ed2 100644 --- a/core/ui/PageControls/new-journal.tid +++ b/core/ui/PageControls/new-journal.tid @@ -3,8 +3,7 @@ tags: $:/tags/PageControls caption: {{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournal/Caption}} description: {{$:/language/Buttons/NewJournal/Hint}} -\define journalButton() -<$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<>> +\define journalActions() <$wikify name="journalTitle" text="""<$macrocall $name="now" format=<>/>"""> <$reveal type="nomatch" state=<> text=""> <$action-sendmessage $message="tm-new-tiddler" title=<> tags=<> text={{{ [get[]] }}}/> @@ -12,13 +11,17 @@ description: {{$:/language/Buttons/NewJournal/Hint}} <$reveal type="match" state=<> text=""> <$action-sendmessage $message="tm-new-tiddler" title=<> tags=<> text=<>/> + +\end + +\define journalButton() +<$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<> actions=<>> <$list filter="[prefix[yes]]"> {{$:/core/images/new-journal-button}} <$list filter="[prefix[yes]]"> <$text text={{$:/language/Buttons/NewJournal/Caption}}/> - \end <$set name="journalTitleTemplate" value={{$:/config/NewJournal/Title}}>