Sha256: 780ba2f3541fcbe69dd4d9998dca0a72f546ea83f3cb2ae6c5deadbc7689d0ef

Contents?: true

Size: 539 Bytes

Versions: 3

Compression:

Stored size: 539 Bytes

Contents

Locomotive.Views.Pages ||= {}

class Locomotive.Views.Pages.EditView extends Locomotive.Views.Pages.FormView

  save: (event) ->
    event.stopPropagation() & event.preventDefault()

    @clear_errors()

    @model.save {},
      success: (model, response, xhr) =>
        model._normalize()

        if model.get('template_changed') == true
          @reset_editable_elements()
        else
          @refresh_editable_elements()

      error: (model, xhr) =>
        errors = JSON.parse(xhr.responseText)

        @show_errors errors



Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
locomotive_cms-2.0.0.rc4 app/assets/javascripts/locomotive/views/pages/edit_view.js.coffee
locomotive_cms-2.0.0.rc2 app/assets/javascripts/locomotive/views/pages/edit_view.js.coffee
locomotive_cms-2.0.0.rc1 app/assets/javascripts/locomotive/views/pages/edit_view.js.coffee