1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-10-20 02:07:38 +00:00

Add support for actions attribute to CheckboxWidget

This commit is contained in:
Jermolene
2016-11-26 08:21:58 +00:00
parent d1121787c0
commit 3bceb98119
2 changed files with 7 additions and 1 deletions

View File

@@ -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");