More action-deletetiddler fixes

print-window-tiddler
Jermolene 2014-11-09 16:53:33 +00:00
rodzic 8c67e11365
commit d2ab7c5986
2 zmienionych plików z 11 dodań i 3 usunięć

Wyświetl plik

@ -55,7 +55,7 @@ DeleteTiddlerWidget.prototype.refresh = function(changedTiddlers) {
Invoke the action associated with this widget Invoke the action associated with this widget
*/ */
DeleteTiddlerWidget.prototype.invokeAction = function(triggeringWidget,event) { DeleteTiddlerWidget.prototype.invokeAction = function(triggeringWidget,event) {
var tiddlers; var tiddlers = [];
if(this.actionFilter) { if(this.actionFilter) {
tiddlers = this.wiki.filterTiddlers(this.actionFilter,this); tiddlers = this.wiki.filterTiddlers(this.actionFilter,this);
} }

Wyświetl plik

@ -25,10 +25,18 @@ The ''action-deletetiddler'' widget is invisible. Any content within it is ignor
! Examples ! 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' <$macrocall $name='wikitext-example-without-html'
src='<$button> src='<$button>
<$action-deletetiddler $tiddler="HelloThere"/> <$action-deletetiddler $tiddler="HelloThere"/>
Delete "HelloThere" Delete "~HelloThere"
</$button>'/>
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"
</$button>'/> </$button>'/>