mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 09:50:27 +00:00
Fixed current tiddler overwrite in tabs macro
Fixed a side-effect of 03519c14b0
from
@matabele whereby the current tiddler is overwritten by the
`<$tiddler>` widget, which means that it is not accessible when
rendering the caption of the tab.
This causes a problem with eg the “Add Plugins” modal where it breaks
the count on the tabs.
This commit is contained in:
parent
822bd1f3cc
commit
0747635fba
@ -4,14 +4,16 @@ tags: $:/tags/Macro
|
||||
\define tabs(tabsList,default,state:"$:/state/tab",class,template)
|
||||
<div class="tc-tab-set $class$">
|
||||
<div class="tc-tab-buttons $class$">
|
||||
<$list filter="$tabsList$ +[nsort[order]]" variable="currentTab"><$tiddler tiddler=<<currentTab>> ><$button set=<<qualify "$state$">> setTo=<<currentTab>> default="$default$" selectedClass="tc-tab-selected" tooltip={{!!tooltip}}>
|
||||
<$list filter="$tabsList$ +[nsort[order]]" variable="currentTab"><$set name="save-currentTiddler" value=<<currentTiddler>>><$tiddler tiddler=<<currentTab>>><$button set=<<qualify "$state$">> setTo=<<currentTab>> default="$default$" selectedClass="tc-tab-selected" tooltip={{!!tooltip}}>
|
||||
<$tiddler tiddler=<<save-currentTiddler>>>
|
||||
<$set name="tv-wikilinks" value="no">
|
||||
<$transclude tiddler=<<currentTab>> field="caption">
|
||||
<$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/>
|
||||
</$transclude>
|
||||
</$set>
|
||||
</$button></$tiddler></$list>
|
||||
</div><div class="tc-tab-divider $class$"/><div class="tc-tab-content $class$">
|
||||
</$set></$tiddler></$button></$tiddler></$set></$list>
|
||||
</div>
|
||||
<div class="tc-tab-divider $class$"/>
|
||||
<div class="tc-tab-content $class$">
|
||||
<$list filter="$tabsList$" variable="currentTab">
|
||||
|
||||
<$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>> default="$default$">
|
||||
|
Loading…
Reference in New Issue
Block a user