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.41 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.40 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.39 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.38 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.37 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.36 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.35 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.34 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.33 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.32 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.31 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.30 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.29 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.28 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.27 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.26 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.25 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.24 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.23 app/assets/javascripts/effective_file/initialize.js.coffee
effective_bootstrap-0.9.22 app/assets/javascripts/effective_file/initialize.js.coffee