Sha256: 73c11056dae22daecc91b8b00134643ebaf166dfe426b3db23e4f488900dec7e

Contents?: true

Size: 1.47 KB

Versions: 4

Compression:

Stored size: 1.47 KB

Contents

{I"
class:ETI"BundledAsset;FI"logical_path;TI"$spree/backend/address_states.js;FI"
pathname;TI"s/usr/local/rvm/gems/ruby-2.1.2/gems/spree_backend-2.2.4/app/assets/javascripts/spree/backend/address_states.js;FI"content_type;TI"application/javascript;TI"
mtime;Tl+TI"length;TiI"digest;TI"%bb888458ff38864b5369ecde939de9f6;FI"source;TI"var update_state = function (region) {
  'use strict';

  var country = $('span#' + region + 'country .select2').select2('val');
  var state_select = $('span#' + region + 'state select.select2');
  var state_input = $('span#' + region + 'state input.state_name');

  $.get(Spree.routes.states_search + '?country_id=' + country, function (data) {
    var states = data.states;
    if (states.length > 0) {
      state_select.html('');
      var states_with_blank = [{
        name: '',
        id: ''
      }].concat(states);
      $.each(states_with_blank, function (pos, state) {
        var opt = $(document.createElement('option'))
          .prop('value', state.id)
          .html(state.name);
        state_select.append(opt);
      });
      state_select.prop('disabled', false).show();
      state_select.select2();
      state_input.hide().prop('disabled', true);

    } else {
      state_input.prop('disabled', false).show();
      state_select.select2('destroy').hide();
    }
  });
};
;TI"required_assets_digest;TI"%b87784f1a794e28bdb57f181e6625011;FI"
_version;TI"%5ef14a844324cba3e114bd0123f88a5e;F

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
bcms_spree-0.0.2 test/dummy/tmp/cache/assets/development/sprockets/4e965dc9b5972aebe8573cee9a8f3909
bcms_spree-0.0.2 test/dummy/tmp/cache/assets/development/sprockets/81872590950d17db473869651bcd2625
bcms_spree-0.0.1 test/dummy/tmp/cache/assets/development/sprockets/4e965dc9b5972aebe8573cee9a8f3909
bcms_spree-0.0.1 test/dummy/tmp/cache/assets/development/sprockets/81872590950d17db473869651bcd2625