mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 18:00:26 +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.catchMessage = this.getAttribute("message");
|
||||||
this.catchSet = this.getAttribute("set");
|
this.catchSet = this.getAttribute("set");
|
||||||
this.catchSetTo = this.getAttribute("setTo");
|
this.catchSetTo = this.getAttribute("setTo");
|
||||||
|
this.catchActions = this.getAttribute("actions");
|
||||||
// Construct the child widgets
|
// Construct the child widgets
|
||||||
this.makeChildWidgets();
|
this.makeChildWidgets();
|
||||||
};
|
};
|
||||||
@ -80,6 +81,9 @@ LinkCatcherWidget.prototype.handleNavigateEvent = function(event) {
|
|||||||
var tiddler = this.wiki.getTiddler(this.catchSet);
|
var tiddler = this.wiki.getTiddler(this.catchSet);
|
||||||
this.wiki.addTiddler(new $tw.Tiddler(tiddler,{title: this.catchSet, text: this.catchSetTo}));
|
this.wiki.addTiddler(new $tw.Tiddler(tiddler,{title: this.catchSet, text: this.catchSetTo}));
|
||||||
}
|
}
|
||||||
|
if(this.catchActions) {
|
||||||
|
this.invokeActionString(this.catchActions,this);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user