china_citys 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 837e251d7e5cb333bf9092adb83a4d39cd9b4b9f
4
- data.tar.gz: 958f1122f30d57cb22758e73bbd5df9f1323d077
3
+ metadata.gz: 44a7810f461e4701d559c923594c159e3e4040b8
4
+ data.tar.gz: 4015603631cabce5c5016712e32ab50a8775b51d
5
5
  SHA512:
6
- metadata.gz: ba980ed38d7b7b9106fe711709f6894f653e02775361ccf7abd6861ea0dd182b3d0389a7c75452ca51c42908a586d04391dc2b1faeef502add5f83d6d623d33a
7
- data.tar.gz: 64758aeaf655a28a09572c47d50f3c3be0b88842ae2915c4952d684f7b3b2bf801edcbd47a52cc9e35d5cdcac15ce563839eb365f500ab5cad9e82cf742f029c
6
+ metadata.gz: 564f42a8f42d5b13d28bb9f00087ad8f9750a04dc0ac3685ab11bfe37cef38691bb65b610567a5b9587eaeb1c88ec6ab48287a283cd210a45bcd09efdd1d351d
7
+ data.tar.gz: 5981ef8a934e72dbbc2a671d984e0e88e081ede4a7d2a1f44ca13743f304ffea55532d1669017be3fef84e8214811de9c870e46ca5785776c0bd3677cd823262
@@ -1,5 +1,5 @@
1
1
  (($) ->
2
- $.fn.china_city = () ->
2
+ $.fn.china_citys = () ->
3
3
  @each ->
4
4
  selects = $(@).find('.city-select')
5
5
  selects.change ->
@@ -7,11 +7,11 @@
7
7
  next_selects = selects.slice(selects.index(@) + 1) # empty all children city
8
8
  $("option:gt(0)", next_selects).remove()
9
9
  if next_selects.first()[0] and $this.val() # init next child
10
- $.get "/china_city/#{$(@).val()}", (data) ->
10
+ $.get "/china_citys/#{$(@).val()}", (data) ->
11
11
  next_selects.first()[0].options.add(new Option(option[0], option[1])) for option in data.data
12
12
  # init value after data completed.
13
- next_selects.trigger('china_city:load_data_completed');
13
+ next_selects.trigger('china_citys:load_data_completed');
14
14
  $this.blur()
15
15
  $(document).on 'ready page:load', ->
16
- $('.city-group').china_city()
16
+ $('.city-group').china_citys()
17
17
  )(jQuery)
@@ -1,3 +1,3 @@
1
1
  module ChinaCitys
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: china_citys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - greatbody