Sha256: 34866a3903001d77bcf392f7ab8def2e2ac92a4ca5649048cd096e094e79faa8
Contents?: true
Size: 786 Bytes
Versions: 3
Compression:
Stored size: 786 Bytes
Contents
#= require spree/backend (($) -> $('form').on 'click', '.add_fields', -> time = new Date().getTime() regexp = new RegExp($(this).data('id'), 'g') $(this).before($(this).data('fields').replace(regexp, time)) event.preventDefault() $('form').on 'click', '.remove', -> $(this).parent('.question').children(':hidden[id$=delete]').val(1) $(this).parent('.question').slideUp('slow') event.preventDefault() $('#new_question_link').on 'click', -> $('#questions').append(new_question_html.replace(/NEW_RECORD/g, $('#questions .question').size())) $('#questions .question:last .remove').on 'click', -> $(this).parent('.question').remove() $.scrollTo($('#questions .question:last'), 800) $('.question:last input:first').focus() ) jQuery
Version data entries
3 entries across 3 versions & 1 rubygems