diff options
| author | Alban Peignier | 2012-06-06 19:11:25 +0200 |
|---|---|---|
| committer | Alban Peignier | 2012-06-06 19:11:25 +0200 |
| commit | ecc2c32f1c42ca5b22d96924c6371c23b12723ac (patch) | |
| tree | defb322c7075b9bbf114afed1bdd44f3b4f3fa25 /app/assets/javascripts | |
| parent | 3a2bc072996a61047ba1d829101b4dd8bfda336c (diff) | |
| download | chouette-core-ecc2c32f1c42ca5b22d96924c6371c23b12723ac.tar.bz2 | |
Add view to manage several Import implementations
Diffstat (limited to 'app/assets/javascripts')
| -rw-r--r-- | app/assets/javascripts/imports.js.coffee | 9 |
1 files changed, 9 insertions, 0 deletions
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) |
