Sha256: 7ed85d14dd9812aafe8518f2608589e651b63a8da1ff1db7728a3e10f820c76a

Contents?: true

Size: 1.97 KB

Versions: 2

Compression:

Stored size: 1.97 KB

Contents

{I"
class:ETI"ProcessedAsset;FI"logical_path;TI"$china_city/jquery.china_city.js;FI"
pathname;TI"f/Users/saberma/Documents/china_city/app/assets/javascripts/china_city/jquery.china_city.js.coffee;FI"content_type;TI"application/javascript;TI"
mtime;Tl+—^VI"length;TiˆI"digest;TI"%a18138a8d63ebc0bb960893ba66c97ea;FI"source;TI"ˆ(function() {
  (function($) {
    $.fn.china_city = function() {
      return this.each(function() {
        var selects;
        selects = $(this).find('.city-select');
        return selects.change(function() {
          var $this, next_selects;
          $this = $(this);
          next_selects = selects.slice(selects.index(this) + 1);
          $("option:gt(0)", next_selects).remove();
          if (next_selects.first()[0] && $this.val() && !$this.val().match(/--.*--/)) {
            return $.get("/china_city/" + ($(this).val()), function(data) {
              var option, _i, _len;
              if (data.data != null) {
                data = data.data;
              }
              for (_i = 0, _len = data.length; _i < _len; _i++) {
                option = data[_i];
                next_selects.first()[0].options.add(new Option(option[0], option[1]));
              }
              return next_selects.trigger('china_city:load_data_completed');
            });
          }
        });
      });
    };
    return $(document).on('ready page:load', function() {
      return $('.city-group').china_city();
    });
  })(jQuery);

}).call(this);
;TI"dependency_digest;TI"%af76c8cbf467451380ac430f80d93e1a;FI"required_paths;T[I"f/Users/saberma/Documents/china_city/app/assets/javascripts/china_city/jquery.china_city.js.coffee;FI"dependency_paths;T[{I"	path;TI"f/Users/saberma/Documents/china_city/app/assets/javascripts/china_city/jquery.china_city.js.coffee;FI"
mtime;TI"2015-12-02T15:00:39+08:00;TI"digest;TI"%b478386d4614a07dfd5e50cb5a322065;FI"
_version;TI"%f9a10b06158d64a75654a1ef72ec0ff4;F

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
china_city-0.0.5 spec/dummy/tmp/cache/assets/test/sprockets/35f568d6b4c5b9431aeca08ebe1b2dea
china_city-0.0.5 spec/dummy/tmp/cache/assets/test/sprockets/4de331a6a64d5ace50f9234a9a64c617