From 2c4fc061bb0c350acecf33835910562be56205a1 Mon Sep 17 00:00:00 2001 From: pmario Date: Wed, 19 Jun 2024 17:16:53 +0200 Subject: [PATCH] fix problem tagMode new child also opens the tiddler --- core/wiki/macros/toc.tid | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid index 8fa9a5c77..fb01d57ec 100644 --- a/core/wiki/macros/toc.tid +++ b/core/wiki/macros/toc.tid @@ -42,24 +42,26 @@ The very first toc macro is _not_ reused. So it can be used as a simple referenc \procedure toc-newChildButton() \procedure _newChild(field:"parent") - <$button actions=<<__actions>> tooltip=`New Child -> "$(field)$: $(currentTiddler)$"` + <$button tooltip=`New Child -> "$(field)$: $(currentTiddler)$"` aria-label="new child here" class="tc-btn-invisible" > - <$action-sendmessage $message="tm-new-tiddler" $name=<> $value=<>/> - <% if [<_mode>match[tagLikeMode]] %> - {{$:/core/images/new-here-button}} - <% else %> + <% if [<_mode>match[tocpMode]] %> + <$action-sendmessage $message="tm-new-tiddler" $name=<> $value=<>/> {{$:/wikilabs/images/new-child-alone}} + <% else %> + <$action-sendmessage $message="tm-new-tiddler" $name=<> $value={{{[format:titlelist[]]}}}/> + {{$:/core/images/new-here-button}} <% endif %> \end _newChild <% if [match[yes]] %> <% if [<_mode>match[tagMode]] %> - {{||$:/core/ui/Buttons/new-here}} + <$macrocall $name="_newChild" field="tags"/> + <% elseif [<_mode>match[tocpMode]] %> <$macrocall $name="_newChild" field=<>/> - <% elseif [<_mode>match[tagLikeMode]] %> + <% elseif [<_mode>match[tagLikeModeXXX]] %> <$macrocall $name="_newChild" field=<>/> <% endif %> <% endif %>