From d2ab7c5986e0700232322e96add9b75c045e74b6 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 9 Nov 2014 16:53:33 +0000 Subject: [PATCH] More action-deletetiddler fixes --- core/modules/widgets/action-deletetiddler.js | 2 +- .../tiddlers/ActionDeleteTiddlerWidget.tid | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/core/modules/widgets/action-deletetiddler.js b/core/modules/widgets/action-deletetiddler.js index e6fc14e5e..816f9f55e 100644 --- a/core/modules/widgets/action-deletetiddler.js +++ b/core/modules/widgets/action-deletetiddler.js @@ -55,7 +55,7 @@ DeleteTiddlerWidget.prototype.refresh = function(changedTiddlers) { Invoke the action associated with this widget */ DeleteTiddlerWidget.prototype.invokeAction = function(triggeringWidget,event) { - var tiddlers; + var tiddlers = []; if(this.actionFilter) { tiddlers = this.wiki.filterTiddlers(this.actionFilter,this); } diff --git a/editions/prerelease/tiddlers/ActionDeleteTiddlerWidget.tid b/editions/prerelease/tiddlers/ActionDeleteTiddlerWidget.tid index e40535c66..b7691206e 100644 --- a/editions/prerelease/tiddlers/ActionDeleteTiddlerWidget.tid +++ b/editions/prerelease/tiddlers/ActionDeleteTiddlerWidget.tid @@ -25,10 +25,18 @@ The ''action-deletetiddler'' widget is invisible. Any content within it is ignor ! Examples -Here is an example of a button that deletes the tiddler HelloThere. Note: +Here is an example of a button that deletes the tiddler HelloThere: <$macrocall $name='wikitext-example-without-html' src='<$button> <$action-deletetiddler $tiddler="HelloThere"/> -Delete "HelloThere" +Delete "~HelloThere" +'/> + +Here is an example of a button that deletes all tiddlers tagged [[TableOfContents]]: + +<$macrocall $name='wikitext-example-without-html' +src='<$button> +<$action-deletetiddler $filter="[tag[TableOfContents]]"/> +Delete tiddlers tagged "~TableOfContents" '/>