1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-08 06:43:49 +00:00

Change qualify widget parameter name to match qualify macro

This commit is contained in:
Jermolene 2018-11-06 16:41:18 +00:00
parent 4d1127ed5b
commit 4f8e32a647
2 changed files with 7 additions and 7 deletions

View File

@ -39,10 +39,10 @@ Compute the internal state of the widget
QualifyWidget.prototype.execute = function() { QualifyWidget.prototype.execute = function() {
// Get our parameters // Get our parameters
this.qualifyName = this.getAttribute("name"); this.qualifyName = this.getAttribute("name");
this.qualifyText = this.getAttribute("text"); this.qualifyTitle = this.getAttribute("title");
// Set context variable // Set context variable
if(this.qualifyName) { if(this.qualifyName) {
this.setVariable(this.qualifyName,this.qualifyText + "-" + this.getStateQualifier()); this.setVariable(this.qualifyName,this.qualifyTitle + "-" + this.getStateQualifier());
} }
// Construct the child widgets // Construct the child widgets
this.makeChildWidgets(); this.makeChildWidgets();
@ -53,7 +53,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
*/ */
QualifyWidget.prototype.refresh = function(changedTiddlers) { QualifyWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes(); var changedAttributes = this.computeAttributes();
if(changedAttributes.name || changedAttributes.text) { if(changedAttributes.name || changedAttributes.title) {
this.refreshSelf(); this.refreshSelf();
return true; return true;
} else { } else {

View File

@ -32,7 +32,7 @@ tags: $:/tags/Macro
\define toc-linked-expandable-body(tag,sort:"",itemClassFilter,exclude,path) \define toc-linked-expandable-body(tag,sort:"",itemClassFilter,exclude,path)
<!-- helper function --> <!-- helper function -->
<$qualify name="toc-state" text={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}> <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected"> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
<li class=<<toc-item-class>>> <li class=<<toc-item-class>>>
<$link> <$link>
@ -58,7 +58,7 @@ tags: $:/tags/Macro
\define toc-unlinked-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path) \define toc-unlinked-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path)
<!-- helper function --> <!-- helper function -->
<$qualify name="toc-state" text={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}> <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected"> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
<li class=<<toc-item-class>>> <li class=<<toc-item-class>>>
<$reveal type="nomatch" state=<<toc-state>> text="open"> <$reveal type="nomatch" state=<<toc-state>> text="open">
@ -98,7 +98,7 @@ tags: $:/tags/Macro
\end \end
\define toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path) \define toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path)
<$qualify name="toc-state" text={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}> <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected" > <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected" >
<li class=<<toc-item-class>>> <li class=<<toc-item-class>>>
<$link> <$link>
@ -125,7 +125,7 @@ tags: $:/tags/Macro
\end \end
\define toc-unlinked-selective-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path) \define toc-unlinked-selective-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path)
<$qualify name="toc-state" text={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}> <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected"> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
<li class=<<toc-item-class>>> <li class=<<toc-item-class>>>
<$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button> <$view field='caption'><$view field='title'/></$view>"> <$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button> <$view field='caption'><$view field='title'/></$view>">