import.coffee 403 B

123456789101112
  1. # Place all the behaviors and hooks related to the matching controller here.
  2. # All this logic will automatically be available in application.js.
  3. # You can use CoffeeScript in this file: http://coffeescript.org/
  4. $(document).ready ->
  5. $realInputField = $('#real_file')
  6. $realInputField.change ->
  7. $('#file-display').val $(@).val().replace(/^.*[\\\/]/, '')
  8. $('#upload-btn').click ->
  9. $realInputField.click()