Sha256: b95afb56ce353e95ea2f4ba38ca51a3b10ec492e8c8914590574761365c50a4c
Contents?: true
Size: 610 Bytes
Versions: 11
Compression:
Stored size: 610 Bytes
Contents
initialize = -> $('div.asset-box-uploader:not(.initialized)').each (i, element) -> element = $(element) options = element.data('input-js-options') || {} options['progress_bar_target'] = $(element).siblings('.uploads').first() options['progress_bar_template'] = $(element).children("script[type='text/x-tmpl']").first() options['dropZone'] = $(element).parent() element.addClass('initialized').S3Uploader(options) $ -> initialize() $(document).on 'page:change', -> initialize() $(document).on 'turbolinks:load', -> initialize() $(document).on 'cocoon:after-insert', -> initialize()
Version data entries
11 entries across 11 versions & 1 rubygems