Sha256: 11c070af31211ff513b3837d417c71829ac69d569aeda7faeffb951b6c978a04

Contents?: true

Size: 397 Bytes

Versions: 11

Compression:

Stored size: 397 Bytes

Contents

$ ->
  # Enable `data-reload=true` for automatic reload when an editor is done.
  #
  # For example:
  #   scrivito_tag(:div, @obj, :my_attribute, data: { reload: true })

  selector = '[data-scrivito-field-type][data-reload=true]'

  scrivito.on 'content', ->
    if scrivito.in_editable_view()
      $(':root').on 'scrivito_editors:blur', selector, (event) ->
        $(this).scrivito("reload")

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
scrivito_editors-0.70.2 app/assets/javascripts/scrivito_editors/reload.js.coffee
scrivito_editors-0.71.2 app/assets/javascripts/scrivito_editors/reload.js.coffee
scrivito_editors-0.71.1 app/assets/javascripts/scrivito_editors/reload.js.coffee
scrivito_editors-0.70.1 app/assets/javascripts/scrivito_editors/reload.js.coffee
scrivito_editors-0.71.0 app/assets/javascripts/scrivito_editors/reload.js.coffee
scrivito_editors-0.71.0.rc2 app/assets/javascripts/scrivito_editors/reload.js.coffee
scrivito_editors-0.71.0.rc1 app/assets/javascripts/scrivito_editors/reload.js.coffee
scrivito_editors-0.70.0 app/assets/javascripts/scrivito_editors/reload.js.coffee
scrivito_editors-0.70.0.rc3 app/assets/javascripts/scrivito_editors/reload.js.coffee
scrivito_editors-0.70.0.rc2 app/assets/javascripts/scrivito_editors/reload.js.coffee
scrivito_editors-0.70.0.rc1 app/assets/javascripts/scrivito_editors/reload.js.coffee