Sha256: 7eee44b859bdfe642e77ed60779afd6ce7d2d22fb6967a04513c9d82b0907384

Contents?: true

Size: 1.03 KB

Versions: 115

Compression:

Stored size: 1.03 KB

Contents

$(document).on 'direct-upload:initialize', (event) ->
  $target = $(event.target)
  template = $target.data('progress-template').replace('$ID$', event.detail.id).replace('$FILENAME$', event.detail.file.name)
  $target.siblings('.uploads').append(template)

$(document).on 'direct-upload:start', (event) ->
  $("[data-direct-upload-id=#{event.detail.id}]").removeClass('direct-upload--pending')

$(document).on 'direct-upload:progress', (event) ->
  $("[data-direct-upload-id=#{event.detail.id}]").children('.direct-upload__progress').css('width', "#{event.detail.progress}%")

$(document).on 'direct-upload:error', (event) ->
  $("[data-direct-upload-id=#{event.detail.id}]").addClass('direct-upload--error').attr('title', event.detail.error)

$(document).on 'direct-upload:end', (event) ->
  $("[data-direct-upload-id=#{event.detail.id}]").addClass('direct-upload--complete')

$(document).on 'change', "input[type='file'][data-click-submit]", (event) ->
  $(event.currentTarget).closest('form').find('button[type=submit],input[type=submit]').first().click()

Version data entries

115 entries across 115 versions & 1 rubygems

Version Path
effective_bootstrap-0.6.24 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.23 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.22 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.21 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.20 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.19 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.18 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.17 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.16 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.15 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.14 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.13 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.12 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.11 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.10 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.9 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.8 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.7 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.6 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.5 app/assets/javascripts/effective_file/initialize.js.coffee