kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Change qualify widget parameter name to match qualify macro
rodzic
4d1127ed5b
commit
4f8e32a647
|
@ -39,10 +39,10 @@ Compute the internal state of the widget
|
|||
QualifyWidget.prototype.execute = function() {
|
||||
// Get our parameters
|
||||
this.qualifyName = this.getAttribute("name");
|
||||
this.qualifyText = this.getAttribute("text");
|
||||
this.qualifyTitle = this.getAttribute("title");
|
||||
// Set context variable
|
||||
if(this.qualifyName) {
|
||||
this.setVariable(this.qualifyName,this.qualifyText + "-" + this.getStateQualifier());
|
||||
this.setVariable(this.qualifyName,this.qualifyTitle + "-" + this.getStateQualifier());
|
||||
}
|
||||
// Construct the child widgets
|
||||
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) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
if(changedAttributes.name || changedAttributes.text) {
|
||||
if(changedAttributes.name || changedAttributes.title) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else {
|
||||
|
|
|
@ -32,7 +32,7 @@ tags: $:/tags/Macro
|
|||
|
||||
\define toc-linked-expandable-body(tag,sort:"",itemClassFilter,exclude,path)
|
||||
<!-- 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">
|
||||
<li class=<<toc-item-class>>>
|
||||
<$link>
|
||||
|
@ -58,7 +58,7 @@ tags: $:/tags/Macro
|
|||
|
||||
\define toc-unlinked-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path)
|
||||
<!-- 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">
|
||||
<li class=<<toc-item-class>>>
|
||||
<$reveal type="nomatch" state=<<toc-state>> text="open">
|
||||
|
@ -98,7 +98,7 @@ tags: $:/tags/Macro
|
|||
\end
|
||||
|
||||
\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" >
|
||||
<li class=<<toc-item-class>>>
|
||||
<$link>
|
||||
|
@ -125,7 +125,7 @@ tags: $:/tags/Macro
|
|||
\end
|
||||
|
||||
\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">
|
||||
<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>">
|
||||
|
|
Ładowanie…
Reference in New Issue