1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 17:10:29 +00:00

Enhance linkcatcher widget to use actions attribute

This commit is contained in:
Jermolene 2016-04-29 18:54:18 +01:00
parent 3c20f2396e
commit b1fb1070ef

View File

@ -45,6 +45,7 @@ LinkCatcherWidget.prototype.execute = function() {
this.catchMessage = this.getAttribute("message");
this.catchSet = this.getAttribute("set");
this.catchSetTo = this.getAttribute("setTo");
this.catchActions = this.getAttribute("actions");
// Construct the child widgets
this.makeChildWidgets();
};
@ -80,6 +81,9 @@ LinkCatcherWidget.prototype.handleNavigateEvent = function(event) {
var tiddler = this.wiki.getTiddler(this.catchSet);
this.wiki.addTiddler(new $tw.Tiddler(tiddler,{title: this.catchSet, text: this.catchSetTo}));
}
if(this.catchActions) {
this.invokeActionString(this.catchActions,this);
}
return false;
};