Sha256: 888def113c37fa9f19361c91f6237c19ec85c4d6aed344e199cbfefc371ce87e

Contents?: true

Size: 303 Bytes

Versions: 6

Compression:

Stored size: 303 Bytes

Contents

ObserveJS.bind 'Post.Delete', class
  loaded: =>
    @on 'change', @element().querySelector('input[type=checkbox]'), @toggle

  toggle: (e) =>
    button = e.target.parentElement
    if e.target.checked
      button.removeAttribute('disabled')
    else
      button.setAttribute('disabled', 'disabled')

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ecrire-0.25.2 lib/ecrire/app/assets/javascripts/admin/navigation/delete.js.coffee
ecrire-0.25.1 lib/ecrire/app/assets/javascripts/admin/navigation/delete.js.coffee
ecrire-0.25.0 lib/ecrire/app/assets/javascripts/admin/navigation/delete.js.coffee
ecrire-0.24.1 lib/ecrire/app/assets/javascripts/admin/navigation/delete.js.coffee
ecrire-0.24.0 lib/ecrire/app/assets/javascripts/admin/navigation/delete.js.coffee
ecrire-0.23.0 lib/ecrire/app/assets/javascripts/admin/navigation/delete.js.coffee