dependent_select 0.7.0 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dependent_select/form_helpers.rb +2 -2
- metadata +1 -1
@@ -404,7 +404,7 @@ module DependentSelect::FormHelpers
|
|
404
404
|
"'#{initial_value}', #{include_blank}, #{collapse_spaces}, false); }"
|
405
405
|
|
406
406
|
if(DependentSelect.use_jquery?)
|
407
|
-
observers = "$('##{observed_field_id}').
|
407
|
+
observers = "$('##{observed_field_id}').change(#{js_callback});\n"
|
408
408
|
else
|
409
409
|
observers = "$('#{observed_field_id}').observe('change', #{js_callback});\n" +
|
410
410
|
"$('#{observed_field_id}').observe('DependentSelectFormBuilder:change', #{js_callback}); \n"
|
@@ -414,7 +414,7 @@ module DependentSelect::FormHelpers
|
|
414
414
|
"#{js_function}( '#{dependent_field_id}', '#{observed_field_id}', #{js_array_name}, " +
|
415
415
|
"'#{initial_value}', #{include_blank}, #{collapse_spaces}, true);\n"
|
416
416
|
|
417
|
-
javascript_tag(js_array_code + observers + initial_call)
|
417
|
+
return javascript_tag(js_array_code + observers + initial_call)
|
418
418
|
end
|
419
419
|
|
420
420
|
# generates the js script for a dependent_collection_select. See +dependent_select_js+
|