events: missing widget "change" event migrations

This commit is contained in:
jean-emmanuel 2018-01-10 21:00:16 +01:00
parent 93d8391b5b
commit bc9cef5e9d
2 changed files with 2 additions and 3 deletions

View file

@ -115,13 +115,13 @@ module.exports = class Push extends _widgets_base {
this.state = 1
if (options.send) this.sendValue(v)
this.lastChanged = 'state'
if (options.sync) this.widget.trigger({type:'change',id:this.getProp('id'),widget:this, linkId:this.getProp('linkId'),options:options})
if (options.sync) this.changed(options)
} else if (v===this.getProp('off') || (this.getProp('off') != null && v === this.getProp('off').value && v !== undefined)) {
this.classHolders.removeClass('on')
this.state = 0
if (options.send) this.sendValue(v)
this.lastChanged = 'state'
if (options.sync) this.widget.trigger({type:'change',id:this.getProp('id'),widget:this, linkId:this.getProp('linkId'),options:options})
if (options.sync) this.changed(options)
}
}

View file

@ -164,7 +164,6 @@ module.exports = class Formula extends _widgets_base {
this.showValue()
if (e.options.sync && this.conditionState) this.widget.trigger({type: 'change',id: this.getProp('id'),widget: this, linkId: this.getProp('linkId'), options: e.options})
if (e.options.sync && this.conditionState) this.changed(e.options)
if (e.options.send && this.conditionState) this.sendValue()