1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-10-28 06:07:40 +00:00

Refactor wiki.filterTiddlers()

Now we pass a widget instead of the current tiddler title. We can use
widget.getVariable(“currentTiddler”) to get the current tiddler.
This commit is contained in:
Jermolene
2014-04-27 20:03:33 +01:00
parent 61c204366f
commit 385c7e207c
7 changed files with 30 additions and 32 deletions

View File

@@ -43,7 +43,7 @@ CountWidget.prototype.execute = function() {
this.filter = this.getAttribute("filter");
// Execute the filter
if(this.filter) {
this.currentCount = this.wiki.filterTiddlers(this.filter,this.getVariable("currentTiddler")).length;
this.currentCount = this.wiki.filterTiddlers(this.filter,this).length;
} else {
this.currentCount = undefined;
}