Sha256: ac2fda91bb68ce3085a2e55229b7442b8ff6a2b9557b0c467fa742c694175246

Contents?: true

Size: 382 Bytes

Versions: 8

Compression:

Stored size: 382 Bytes

Contents

class Storytime.Dashboard.Contenteditable
  init: () ->
    inst = @
    $(".contenteditable").each ->
      contenteditable = $(this)
      inst.bindToInput(contenteditable)

    $(".contenteditable")[0].focus()

  bindToInput: (contenteditable) ->
    input = $(contenteditable.data("input"))

    contenteditable.keyup ->
      text = contenteditable.text()
      input.val(text)

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
storytime-2.1.6 app/assets/javascripts/storytime/contenteditable.js.coffee
storytime-2.1.5 app/assets/javascripts/storytime/contenteditable.js.coffee
storytime-2.1.4 app/assets/javascripts/storytime/contenteditable.js.coffee
storytime-2.1.3 app/assets/javascripts/storytime/contenteditable.js.coffee
storytime-2.1.2 app/assets/javascripts/storytime/contenteditable.js.coffee
storytime-2.1.1 app/assets/javascripts/storytime/contenteditable.js.coffee
storytime-2.1.0 app/assets/javascripts/storytime/contenteditable.js.coffee
storytime-2.0.0 app/assets/javascripts/storytime/contenteditable.js.coffee