Commit a583159cffbe3bcb2f53b8b5a2106182a0a90371
1 parent
18fd3449
Exists in
master
and in
1 other branch
Fixed regression with watchers section [ci skip]
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
public/javascripts/form.js
| ... | ... | @@ -78,7 +78,8 @@ function activateTypeSelector(field_class, section_class) { |
| 78 | 78 | .attr('disabled','disabled').val(''); |
| 79 | 79 | |
| 80 | 80 | $('div.'+field_class+' input[name*=type]').live('click', function(){ |
| 81 | - var chosen = $(this).data("section"); | |
| 81 | + // Look for section in 'data-section', and fall back to 'value' | |
| 82 | + var chosen = $(this).data("section") || $(this).val(); | |
| 82 | 83 | var wrapper = $(this).closest('.nested'); |
| 83 | 84 | wrapper.find('div.chosen.'+section_class).removeClass('chosen').find('input').attr('disabled','disabled'); |
| 84 | 85 | wrapper.find('div.'+section_class+'.'+chosen).addClass('chosen').find('input').removeAttr('disabled'); | ... | ... |