1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-02 14:29:55 +00:00

fix problem tagMode new child also opens the tiddler

This commit is contained in:
pmario 2024-06-19 17:16:53 +02:00
parent 9f07477b50
commit 2c4fc061bb

View File

@ -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"
>
<% if [<_mode>match[tocpMode]] %>
<$action-sendmessage $message="tm-new-tiddler" $name=<<field>> $value=<<currentTiddler>>/>
<% if [<_mode>match[tagLikeMode]] %>
{{$:/core/images/new-here-button}}
<% else %>
{{$:/wikilabs/images/new-child-alone}}
<% else %>
<$action-sendmessage $message="tm-new-tiddler" $name=<<field>> $value={{{[<currentTiddler>format:titlelist[]]}}}/>
{{$:/core/images/new-here-button}}
<% endif %>
</$button>
\end _newChild
<% if [<tv-toc-show-new-child>match[yes]] %>
<% if [<_mode>match[tagMode]] %>
<span class="tc-small-gap-left">{{||$:/core/ui/Buttons/new-here}}</span>
<span class="tc-small-gap-left"><$macrocall $name="_newChild" field="tags"/></span>
<!-- <span class="tc-small-gap-left">{{||$:/core/ui/Buttons/new-here}}</span> -->
<% elseif [<_mode>match[tocpMode]] %>
<span class="tc-small-gap-left"><$macrocall $name="_newChild" field=<<parentField>>/></span>
<% elseif [<_mode>match[tagLikeMode]] %>
<% elseif [<_mode>match[tagLikeModeXXX]] %>
<span class="tc-small-gap-left"><$macrocall $name="_newChild" field=<<tagField>>/></span>
<% endif %>
<% endif %>