From ecc2c32f1c42ca5b22d96924c6371c23b12723ac Mon Sep 17 00:00:00 2001 From: Alban Peignier Date: Wed, 6 Jun 2012 19:11:25 +0200 Subject: Add view to manage several Import implementations --- app/assets/javascripts/imports.js.coffee | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/assets/javascripts') diff --git a/app/assets/javascripts/imports.js.coffee b/app/assets/javascripts/imports.js.coffee index 761567942..7fb49e44d 100644 --- a/app/assets/javascripts/imports.js.coffee +++ b/app/assets/javascripts/imports.js.coffee @@ -1,3 +1,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) -- cgit v1.2.3