Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix two problems #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/assets/javascripts/china_city/jquery.china_city.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
$("option:gt(0)", next_selects).remove()
if next_selects.first()[0] and $this.val() # init next child
$.get "/china_city/#{$(@).val()}", (data) ->
next_selects.first()[0].options.add(new Option(option[0], option[1])) for option in data
next_selects.first()[0].options.add(new Option(option[0], option[1])) for option in data.data
# init value after data completed.
next_selects.trigger('china_city:load_data_completed');

$this.blur()
$(document).on 'ready page:load', ->
$('.city-group').china_city()
)(jQuery)
)(jQuery)
Binary file added china_city-0.0.4.gem
Binary file not shown.
Binary file added china_city-0.0.5.gem
Binary file not shown.
1 change: 0 additions & 1 deletion china_city.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Gem::Specification.new do |s|

# s.add_dependency "rails", "~> 3.1.0"
s.add_dependency "rails", ">= 3.1.0"
s.add_dependency "jquery-rails"

s.add_development_dependency "sqlite3"
s.add_development_dependency "rspec-rails"
Expand Down
2 changes: 1 addition & 1 deletion lib/china_city/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ChinaCity
VERSION = "0.0.4"
VERSION = "0.0.5"
end