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:
parent
3c20f2396e
commit
b1fb1070ef
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user