aboutsummaryrefslogtreecommitdiffstats
path: root/app/assets/javascripts/imports.js.coffee
blob: 7fb49e44dfedaefac1a842041be2abb68dc00e63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

jQuery ->
  $('#import_type_submit').hide()

  import_type_change = (event) -> 
    import_type = $("select option:selected").attr("value")
    $(form).toggle($(form).is("#" + import_type + "_new")) for form in $('form.import')

  $('#import_type').change(import_type_change)