Sha256: 6bea84c396bee008f2666d5a40bba119f845d8349319426bec6a2b76fae8f25b

Contents?: true

Size: 469 Bytes

Versions: 4

Compression:

Stored size: 469 Bytes

Contents

window.enjoy_cms.faq.create_ajax_form = (form_selector = "#new_enjoy_faq_question", wrapper_selector = "#enjoy_faq_form" )->

  $(document).delegate form_selector, "ajax:complete", (event, xhr, status)->
    $(event.currentTarget).closest(wrapper_selector).html(xhr.responseText)

  $(document).delegate form_selector + " .input", 'click', (e) ->
    e.preventDefault()
    $(e.currentTarget).removeClass("field_with_errors").find('span.error').hide()
    return false

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
enjoy_cms_faq-0.4.1 app/assets/javascripts/enjoy/faq/form.coffee
enjoy_cms_faq-0.4.0.1 app/assets/javascripts/enjoy/faq/form.coffee
enjoy_cms_faq-0.4.0 app/assets/javascripts/enjoy/faq/form.coffee
enjoy_cms_faq-0.4.0.beta3 app/assets/javascripts/enjoy/faq/form.coffee