From b1fb1070ef59f31c86d3400e53fe5dc1b694beaf Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 29 Apr 2016 18:54:18 +0100 Subject: [PATCH] Enhance linkcatcher widget to use actions attribute --- core/modules/widgets/linkcatcher.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/modules/widgets/linkcatcher.js b/core/modules/widgets/linkcatcher.js index 51738d6d8..d279140c0 100644 --- a/core/modules/widgets/linkcatcher.js +++ b/core/modules/widgets/linkcatcher.js @@ -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; };