From a7dfa57747f5bb89e37379bd7da1077b7f33d519 Mon Sep 17 00:00:00 2001 From: Stephen Crosby Date: Sat, 8 Feb 2014 13:16:40 -0800 Subject: [PATCH] scope the type selector to the choose section --- app/assets/javascripts/form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/form.js b/app/assets/javascripts/form.js index 09b7c42..b79ceca 100644 --- a/app/assets/javascripts/form.js +++ b/app/assets/javascripts/form.js @@ -81,7 +81,7 @@ function activateTypeSelector(field_class, section_class) { $('div.'+field_class+' > div.'+section_class).not('.chosen').find('input') .attr('disabled','disabled').val(''); - $('div.'+field_class+' input[name*=type]').on('click', function(){ + $('div.'+field_class).find('.choose input[name*=type]').on('click', function(){ // Look for section in 'data-section', and fall back to 'value' var chosen = $(this).data("section") || $(this).val(); var wrapper = $(this).closest('.nested'); -- libgit2 0.21.2