diff --git a/core/modules/widgets/checkbox.js b/core/modules/widgets/checkbox.js index 6ec2b0372..2480ff319 100644 --- a/core/modules/widgets/checkbox.js +++ b/core/modules/widgets/checkbox.js @@ -127,6 +127,10 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) { if(hasChanged) { this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),fallbackFields,tiddler,newFields,this.wiki.getModificationFields())); } + // Trigger actions + if(this.checkboxActions) { + this.invokeActionString(this.checkboxActions,this,event); + } }; /* @@ -134,6 +138,7 @@ Compute the internal state of the widget */ CheckboxWidget.prototype.execute = function() { // Get the parameters from the attributes + this.checkboxActions = this.getAttribute("actions"); this.checkboxTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler")); this.checkboxTag = this.getAttribute("tag"); this.checkboxField = this.getAttribute("field"); diff --git a/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid b/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid index edde1467d..f9cb77d53 100644 --- a/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid @@ -1,6 +1,6 @@ caption: checkbox created: 20131024141900000 -modified: 20150626091305445 +modified: 20161126081845399 tags: Widgets title: CheckboxWidget type: text/vnd.tiddlywiki @@ -25,6 +25,7 @@ The content of the `<$checkbox>` widget is displayed within an HTML `