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.9.1 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.0 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.8.5 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.8.4 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.8.3 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.8.2 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.8.1 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.8.0 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.7.4 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.7.3 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.7.2 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.7.1 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.7.0 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.31 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.30 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.29 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.28 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.27 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.26 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.6.25 app/assets/javascripts/effective_file/initialize.js.coffee