diff --git a/core/modules/widgets/checkbox.js b/core/modules/widgets/checkbox.js index 6ed7a7a5c..9fa1c4889 100644 --- a/core/modules/widgets/checkbox.js +++ b/core/modules/widgets/checkbox.js @@ -156,6 +156,9 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) { if(this.checkboxActions) { this.invokeActionString(this.checkboxActions,this,event); } + if(this.checkboxUncheckActions && !checked) { + this.invokeActionString(this.checkboxUncheckActions,this,event); + } }; /* @@ -164,6 +167,7 @@ Compute the internal state of the widget CheckboxWidget.prototype.execute = function() { // Get the parameters from the attributes this.checkboxActions = this.getAttribute("actions"); + this.checkboxUncheckActions = this.getAttribute("uncheckactions"); this.checkboxTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler")); this.checkboxTag = this.getAttribute("tag"); this.checkboxField = this.getAttribute("field"); @@ -197,4 +201,4 @@ CheckboxWidget.prototype.refresh = function(changedTiddlers) { exports.checkbox = CheckboxWidget; -})(); \ No newline at end of file +})(); diff --git a/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid b/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid index 5165bde90..60f1b389b 100644 --- a/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid @@ -26,7 +26,8 @@ The content of the `<$checkbox>` widget is displayed within an HTML `