1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00
This commit is contained in:
Bram Chen 2016-10-26 08:47:45 +08:00
commit 52f02717a8
2 changed files with 6 additions and 2 deletions

View File

@ -305,6 +305,8 @@ Compute the internal state of the widget
ListItemWidget.prototype.execute = function() {
// Set the current list item title
this.setVariable(this.parseTreeNode.variableName,this.parseTreeNode.itemTitle);
// Make sure the item title is used by widget.getStateQualifier()
this.setVariable("transclusion","{" + this.parseTreeNode.itemTitle + "}");
// Construct the child widgets
this.makeChildWidgets();
};

View File

@ -3,8 +3,9 @@ tags: $:/tags/Macro
\define tabs(tabsList,default,state:"$:/state/tab",class,template)
<div class="tc-tab-set $class$">
<$set name="state" value=<<qualify "$state$">>>
<div class="tc-tab-buttons $class$">
<$list filter="$tabsList$" 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}}>
<$list filter="$tabsList$" variable="currentTab"><$set name="save-currentTiddler" value=<<currentTiddler>>><$tiddler tiddler=<<currentTab>>><$button set=<<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">
@ -16,7 +17,7 @@ tags: $:/tags/Macro
<div class="tc-tab-content $class$">
<$list filter="$tabsList$" variable="currentTab">
<$reveal type="match" state=<<qualify "$state$">> text=<<currentTab>> default="$default$">
<$reveal type="match" state=<<state>> text=<<currentTab>> default="$default$">
<$transclude tiddler="$template$" mode="block">
@ -28,5 +29,6 @@ tags: $:/tags/Macro
</$list>
</div>
</$set>
</div>
\end