Sha256: 3b50190c4f419c5eb3a39af98d1ed6e7d9267cf5e98cdc300b64e61564c2c3a1

Contents?: true

Size: 433 Bytes

Versions: 5

Compression:

Stored size: 433 Bytes

Contents

var _ = require('../../util')

module.exports = {

  bind: function () {
    var self = this
    var el = this.el
    this.listener = function () {
      self.set(el.checked, true)
    }
    _.on(el, 'change', this.listener)
    if (el.checked) {
      this._initValue = el.checked
    }
  },

  update: function (value) {
    this.el.checked = !!value
  },

  unbind: function () {
    _.off(this.el, 'change', this.listener)
  }

}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fluentd-ui-0.3.13 vendor/assets/javascripts/bower/vue/src/directives/model/checkbox.js
fluentd-ui-0.3.12 vendor/assets/javascripts/bower/vue/src/directives/model/checkbox.js
fluentd-ui-0.3.11 vendor/assets/javascripts/bower/vue/src/directives/model/checkbox.js
fluentd-ui-0.3.10 vendor/assets/javascripts/bower/vue/src/directives/model/checkbox.js
fluentd-ui-0.3.9 vendor/assets/javascripts/bower/vue/src/directives/model/checkbox.js