Sha256: 7d11a1d524012293aca9235ec6ec2293df60f98859be0e9e13dd8e81860ef5fe
Contents?: true
Size: 1.16 KB
Versions: 1
Compression:
Stored size: 1.16 KB
Contents
if ($('.ui.modals').length === 0) { $('body').append('<%= j(render 'new') %>'); } else { $('.ui.modals').html('<%= j(render 'new') %>'); } $('.ui.modal').modal('setting', { autofocus: false }).modal('show'); $('#nation').dropdown({ onChange: function(value, text, $selectedItem){ var search_path = '/areas/search' var search_url = new URL(window.location.origin + search_path) search_url.searchParams.set('nation', value) fetch(search_url).then(function(response){ return response.json(); }).then(function(response){ $('#province').dropdown('clear').dropdown('setup menu', response); }) } }); $('#province').dropdown({ onChange: function(value, text, $selectedItem){ var search_path = '/areas/search' var search_url = new URL(window.location.origin + search_path) search_url.searchParams.set('province', value) fetch(search_url).then(function(response){ return response.json(); }).then(function(response){ $('#city').dropdown('clear').dropdown('setup menu', response); }) } }); $('#city').dropdown({ onChange: function(value, text, $selectedItem){ $('#address_area_id').val(value); } });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails_trade-0.0.1 | app/views/rails_trade_my/addresses/new.js.erb |