app/views/calagator/versions/_chooser.html.erb in calagator-1.0.0.rc2 vs app/views/calagator/versions/_chooser.html.erb in calagator-1.0.0.rc3

- old
+ new

@@ -12,17 +12,15 @@ Version <%= select_tag("version", options_for_select(record.versions.reverse.map { |version| ["#{version.created_at.strftime('%B %d, %Y at %I:%M %p')}", version.id]})) %><%= image_tag "spinner.gif", :alt => "Spinner", :id => "version_loading", :style => "display: none; margin-left: 0.5em;" %> </div> </form> <% content_for :javascript_insert do %> <script type='text/javascript'> - $(function() { - $('#version').change(function(event) { - $('#version_loading').show(); - var version_id = event.target.value; - $('#<%= target %>').load('/versions/'+version_id+'/edit', function(response, status, xhr) { - $('#version_loading').hide(); + $(document).on('change', '#version', function(event){ + $('#version_loading').show(); + var version_id = event.target.value; + $('#<%= target %>').load('/versions/'+version_id+'/edit', function(response, status, xhr) { + $('#version_loading').hide(); }); - }) - }) + }); </script> <% end %> <% end %>