From ade5f23c30f62bac5e4fd3e850f2b63483d9e16d Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Tue, 21 Nov 2017 15:42:04 -0800 Subject: [PATCH] Remove state.coffee We previously removed the ability to edit states from the admin, so this is no longer used. --- .../app/assets/javascripts/spree/backend.js | 1 - .../javascripts/spree/backend/states.coffee | 22 ------------------- 2 files changed, 23 deletions(-) delete mode 100755 backend/app/assets/javascripts/spree/backend/states.coffee diff --git a/backend/app/assets/javascripts/spree/backend.js b/backend/app/assets/javascripts/spree/backend.js index 0847d535536..175b3fa2bb1 100644 --- a/backend/app/assets/javascripts/spree/backend.js +++ b/backend/app/assets/javascripts/spree/backend.js @@ -53,7 +53,6 @@ //= require spree/backend/routes //= require spree/backend/shipments //= require spree/backend/spree-select2 -//= require spree/backend/states //= require spree/backend/stock_management/index_add_forms //= require spree/backend/stock_management/index_update_forms //= require spree/backend/stock_management/stock_item diff --git a/backend/app/assets/javascripts/spree/backend/states.coffee b/backend/app/assets/javascripts/spree/backend/states.coffee deleted file mode 100755 index 9bc30463a91..00000000000 --- a/backend/app/assets/javascripts/spree/backend/states.coffee +++ /dev/null @@ -1,22 +0,0 @@ -Spree.ready -> - $new_state = $("#new_state") - if $new_state.length - $new_state_link = $("#new_state_link") - $country_select = $("#country") - $cancel_button = $new_state.find(".fa-remove") - $form = $new_state.find("form") - $new_state.hide() - - $new_state_link.click (e) -> - e.preventDefault() - $new_state.show() - $new_state_link.hide() - - $cancel_button.click (e) -> - e.preventDefault() - $new_state.hide() - $new_state_link.show() - - $country_select.on 'change', (e) -> - $form.attr 'action', $form.attr('action').replace(/countries\/(\d+)/, "countries/#{$country_select.val()}") -