spree_backend 3.1.14 → 3.2.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (309) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/admin/logo.png +0 -0
  3. data/app/assets/javascripts/spree/backend/admin.js +2 -25
  4. data/app/assets/javascripts/spree/backend/checkouts/edit.js +2 -1
  5. data/app/assets/javascripts/spree/backend/line_items.js.coffee +2 -2
  6. data/app/assets/javascripts/spree/backend/line_items_on_order_edit.js +5 -2
  7. data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +2 -2
  8. data/app/assets/javascripts/spree/backend/option_value_picker.js +2 -2
  9. data/app/assets/javascripts/spree/backend/payments/edit.js.coffee +10 -8
  10. data/app/assets/javascripts/spree/backend/product_picker.js +3 -2
  11. data/app/assets/javascripts/spree/backend/{shipments.js.erb → shipments.js} +1 -1
  12. data/app/assets/javascripts/spree/backend/states.js +9 -7
  13. data/app/assets/javascripts/spree/backend/stock_location.js +3 -0
  14. data/app/assets/javascripts/spree/backend/tag_picker.js +52 -0
  15. data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +2 -2
  16. data/app/assets/javascripts/spree/backend/taxon_permalink_preview.js +12 -0
  17. data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +2 -2
  18. data/app/assets/javascripts/spree/backend/taxons.js.coffee +1 -1
  19. data/app/assets/javascripts/spree/backend/user_picker.js +4 -3
  20. data/app/assets/javascripts/spree/backend.js +8 -7
  21. data/app/assets/stylesheets/spree/backend/components/_main.scss +5 -1
  22. data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +7 -0
  23. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +1 -1
  24. data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +0 -1
  25. data/app/controllers/spree/admin/base_controller.rb +0 -11
  26. data/app/controllers/spree/admin/option_types_controller.rb +2 -14
  27. data/app/controllers/spree/admin/option_values_controller.rb +1 -1
  28. data/app/controllers/spree/admin/orders_controller.rb +7 -7
  29. data/app/controllers/spree/admin/payment_methods_controller.rb +4 -0
  30. data/app/controllers/spree/admin/product_properties_controller.rb +1 -1
  31. data/app/controllers/spree/admin/products_controller.rb +1 -1
  32. data/app/controllers/spree/admin/promotion_actions_controller.rb +5 -5
  33. data/app/controllers/spree/admin/promotion_rules_controller.rb +6 -6
  34. data/app/controllers/spree/admin/promotions_controller.rb +2 -2
  35. data/app/controllers/spree/admin/properties_controller.rb +1 -1
  36. data/app/controllers/spree/admin/prototypes_controller.rb +2 -2
  37. data/app/controllers/spree/admin/refunds_controller.rb +1 -1
  38. data/app/controllers/spree/admin/reimbursement_types_controller.rb +26 -0
  39. data/app/controllers/spree/admin/reimbursements_controller.rb +1 -1
  40. data/app/controllers/spree/admin/reports_controller.rb +1 -1
  41. data/app/controllers/spree/admin/resource_controller.rb +8 -8
  42. data/app/controllers/spree/admin/return_authorizations_controller.rb +3 -3
  43. data/app/controllers/spree/admin/return_index_controller.rb +1 -1
  44. data/app/controllers/spree/admin/shipping_methods_controller.rb +2 -2
  45. data/app/controllers/spree/admin/states_controller.rb +1 -1
  46. data/app/controllers/spree/admin/stock_items_controller.rb +2 -2
  47. data/app/controllers/spree/admin/stock_movements_controller.rb +1 -5
  48. data/app/controllers/spree/admin/store_credits_controller.rb +1 -1
  49. data/app/controllers/spree/admin/taxons_controller.rb +1 -10
  50. data/app/controllers/spree/admin/users_controller.rb +5 -41
  51. data/app/controllers/spree/admin/variants_controller.rb +3 -1
  52. data/app/helpers/spree/admin/base_helper.rb +1 -6
  53. data/app/helpers/spree/admin/navigation_helper.rb +9 -31
  54. data/app/helpers/spree/admin/promotion_rules_helper.rb +12 -0
  55. data/app/views/kaminari/_first_page.html.erb +1 -1
  56. data/app/views/kaminari/_last_page.html.erb +1 -1
  57. data/app/views/kaminari/_next_page.html.erb +1 -1
  58. data/app/views/kaminari/_page.html.erb +1 -1
  59. data/app/views/kaminari/_paginator.html.erb +2 -4
  60. data/app/views/kaminari/_prev_page.html.erb +1 -1
  61. data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +1 -1
  62. data/app/views/spree/admin/adjustments/_form.html.erb +4 -4
  63. data/app/views/spree/admin/countries/_form.html.erb +2 -2
  64. data/app/views/spree/admin/countries/edit.html.erb +3 -3
  65. data/app/views/spree/admin/countries/index.html.erb +3 -3
  66. data/app/views/spree/admin/countries/new.html.erb +3 -3
  67. data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
  68. data/app/views/spree/admin/images/_form.html.erb +2 -2
  69. data/app/views/spree/admin/option_types/_form.html.erb +2 -2
  70. data/app/views/spree/admin/option_types/edit.html.erb +5 -5
  71. data/app/views/spree/admin/option_types/new.html.erb +3 -3
  72. data/app/views/spree/admin/orders/_adjustments.html.erb +6 -4
  73. data/app/views/spree/admin/orders/_form.html.erb +1 -1
  74. data/app/views/spree/admin/orders/_line_items.html.erb +8 -6
  75. data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +1 -1
  76. data/app/views/spree/admin/orders/_shipment.html.erb +9 -7
  77. data/app/views/spree/admin/orders/cart.html.erb +0 -4
  78. data/app/views/spree/admin/orders/edit.html.erb +0 -4
  79. data/app/views/spree/admin/orders/index.html.erb +20 -20
  80. data/app/views/spree/admin/payment_methods/_form.html.erb +5 -5
  81. data/app/views/spree/admin/payment_methods/index.html.erb +3 -3
  82. data/app/views/spree/admin/payments/_form.html.erb +6 -6
  83. data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +6 -6
  84. data/app/views/spree/admin/products/_form.html.erb +14 -8
  85. data/app/views/spree/admin/products/_properties_form.erb +1 -1
  86. data/app/views/spree/admin/products/index.html.erb +6 -6
  87. data/app/views/spree/admin/products/new.html.erb +16 -16
  88. data/app/views/spree/admin/promotion_categories/_form.html.erb +3 -3
  89. data/app/views/spree/admin/promotion_categories/edit.html.erb +3 -3
  90. data/app/views/spree/admin/promotion_categories/index.html.erb +3 -3
  91. data/app/views/spree/admin/promotion_categories/new.html.erb +3 -3
  92. data/app/views/spree/admin/promotions/_actions.html.erb +4 -4
  93. data/app/views/spree/admin/promotions/_form.html.erb +10 -10
  94. data/app/views/spree/admin/promotions/_promotion_rule.html.erb +1 -1
  95. data/app/views/spree/admin/promotions/_rules.html.erb +4 -4
  96. data/app/views/spree/admin/promotions/actions/_create_adjustment.html.erb +1 -1
  97. data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +2 -2
  98. data/app/views/spree/admin/promotions/actions/_create_line_items.html.erb +1 -1
  99. data/app/views/spree/admin/promotions/edit.html.erb +6 -6
  100. data/app/views/spree/admin/promotions/index.html.erb +5 -5
  101. data/app/views/spree/admin/promotions/new.html.erb +3 -3
  102. data/app/views/spree/admin/promotions/rules/_country.html.erb +6 -0
  103. data/app/views/spree/admin/promotions/rules/_landing_page.html.erb +1 -1
  104. data/app/views/spree/admin/promotions/rules/_product.html.erb +2 -2
  105. data/app/views/spree/admin/promotions/rules/_taxon.html.erb +2 -2
  106. data/app/views/spree/admin/properties/_form.html.erb +2 -2
  107. data/app/views/spree/admin/properties/edit.html.erb +3 -3
  108. data/app/views/spree/admin/properties/index.html.erb +6 -6
  109. data/app/views/spree/admin/prototypes/_prototypes.html.erb +1 -1
  110. data/app/views/spree/admin/prototypes/available.js.erb +1 -1
  111. data/app/views/spree/admin/prototypes/edit.html.erb +3 -3
  112. data/app/views/spree/admin/prototypes/index.html.erb +3 -3
  113. data/app/views/spree/admin/prototypes/new.html.erb +3 -3
  114. data/app/views/spree/admin/prototypes/show.html.erb +1 -1
  115. data/app/views/spree/admin/refunds/edit.html.erb +2 -0
  116. data/app/views/spree/admin/refunds/new.html.erb +2 -0
  117. data/app/views/spree/admin/reimbursement_types/_form.html.erb +32 -0
  118. data/app/views/spree/admin/reimbursement_types/edit.html.erb +11 -0
  119. data/app/views/spree/admin/reimbursement_types/index.html.erb +9 -0
  120. data/app/views/spree/admin/reimbursement_types/new.html.erb +11 -0
  121. data/app/views/spree/admin/reimbursements/edit.html.erb +1 -1
  122. data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
  123. data/app/views/spree/admin/return_authorizations/_form.html.erb +4 -4
  124. data/app/views/spree/admin/return_index/customer_returns.html.erb +1 -2
  125. data/app/views/spree/admin/return_index/return_authorizations.html.erb +4 -4
  126. data/app/views/spree/admin/roles/edit.html.erb +1 -1
  127. data/app/views/spree/admin/roles/new.html.erb +1 -1
  128. data/app/views/spree/admin/shared/_calculator_fields.html.erb +2 -2
  129. data/app/views/spree/admin/shared/_destroy.js.erb +1 -1
  130. data/app/views/spree/admin/shared/_edit_resource_links.html.erb +2 -2
  131. data/app/views/spree/admin/shared/_head.html.erb +2 -1
  132. data/app/views/spree/admin/shared/_header.html.erb +4 -11
  133. data/app/views/spree/admin/shared/_index_table_options.html.erb +1 -1
  134. data/app/views/spree/admin/shared/_main_menu.html.erb +6 -0
  135. data/app/views/spree/admin/shared/_new_resource_links.html.erb +2 -2
  136. data/app/views/spree/admin/shared/_order_summary.html.erb +3 -3
  137. data/app/views/spree/admin/shared/_refunds.html.erb +1 -1
  138. data/app/views/spree/admin/shared/_report_order_criteria.html.erb +3 -3
  139. data/app/views/spree/admin/shared/_translations.html.erb +38 -38
  140. data/app/views/spree/admin/shared/{_update_order_state.js → _update_order_state.js.erb} +3 -3
  141. data/app/views/spree/admin/shared/named_types/_index.html.erb +2 -2
  142. data/app/views/spree/admin/shipping_categories/edit.html.erb +3 -3
  143. data/app/views/spree/admin/shipping_categories/index.html.erb +3 -3
  144. data/app/views/spree/admin/shipping_categories/new.html.erb +3 -3
  145. data/app/views/spree/admin/shipping_methods/_form.html.erb +14 -14
  146. data/app/views/spree/admin/shipping_methods/edit.html.erb +3 -3
  147. data/app/views/spree/admin/shipping_methods/index.html.erb +3 -3
  148. data/app/views/spree/admin/shipping_methods/new.html.erb +3 -3
  149. data/app/views/spree/admin/states/_form.html.erb +2 -2
  150. data/app/views/spree/admin/states/_state_list.html.erb +2 -2
  151. data/app/views/spree/admin/states/edit.html.erb +3 -3
  152. data/app/views/spree/admin/states/index.html.erb +3 -3
  153. data/app/views/spree/admin/states/new.html.erb +3 -3
  154. data/app/views/spree/admin/stock_locations/_form.html.erb +0 -8
  155. data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +1 -1
  156. data/app/views/spree/admin/stock_locations/edit.html.erb +3 -3
  157. data/app/views/spree/admin/stock_locations/index.html.erb +4 -4
  158. data/app/views/spree/admin/stock_locations/new.html.erb +3 -3
  159. data/app/views/spree/admin/stock_transfers/index.html.erb +3 -3
  160. data/app/views/spree/admin/stock_transfers/new.html.erb +1 -1
  161. data/app/views/spree/admin/stock_transfers/show.html.erb +3 -3
  162. data/app/views/spree/admin/tax_categories/_form.html.erb +7 -7
  163. data/app/views/spree/admin/tax_categories/edit.html.erb +3 -3
  164. data/app/views/spree/admin/tax_categories/new.html.erb +3 -3
  165. data/app/views/spree/admin/tax_rates/_form.html.erb +5 -5
  166. data/app/views/spree/admin/tax_rates/edit.html.erb +3 -3
  167. data/app/views/spree/admin/tax_rates/new.html.erb +3 -3
  168. data/app/views/spree/admin/taxonomies/_form.html.erb +2 -2
  169. data/app/views/spree/admin/taxonomies/_js_head.html.erb +0 -5
  170. data/app/views/spree/admin/taxonomies/new.html.erb +1 -1
  171. data/app/views/spree/admin/taxons/_form.html.erb +7 -7
  172. data/app/views/spree/admin/taxons/_taxon_table.html.erb +1 -1
  173. data/app/views/spree/admin/taxons/edit.html.erb +0 -15
  174. data/app/views/spree/admin/taxons/index.html.erb +1 -1
  175. data/app/views/spree/admin/trackers/_form.html.erb +1 -1
  176. data/app/views/spree/admin/trackers/edit.html.erb +3 -3
  177. data/app/views/spree/admin/trackers/index.html.erb +3 -3
  178. data/app/views/spree/admin/trackers/new.html.erb +3 -3
  179. data/app/views/spree/admin/users/_addresses_form.html.erb +2 -2
  180. data/app/views/spree/admin/users/_form.html.erb +3 -3
  181. data/app/views/spree/admin/users/index.html.erb +7 -7
  182. data/app/views/spree/admin/users/items.html.erb +2 -2
  183. data/app/views/spree/admin/users/new.html.erb +3 -3
  184. data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +24 -7
  185. data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +1 -0
  186. data/app/views/spree/admin/variants/_form.html.erb +7 -7
  187. data/app/views/spree/admin/variants/new.html.erb +3 -3
  188. data/app/views/spree/admin/zones/_country_members.html.erb +1 -1
  189. data/app/views/spree/admin/zones/_form.html.erb +6 -6
  190. data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
  191. data/app/views/spree/admin/zones/edit.html.erb +3 -3
  192. data/app/views/spree/admin/zones/index.html.erb +5 -5
  193. data/app/views/spree/admin/zones/new.html.erb +3 -3
  194. data/config/routes.rb +4 -12
  195. data/lib/spree/backend/engine.rb +2 -6
  196. data/spec/controllers/spree/admin/base_controller_spec.rb +46 -0
  197. data/spec/controllers/spree/admin/customer_returns_controller_spec.rb +185 -0
  198. data/spec/controllers/spree/admin/general_settings_controller_spec.rb +41 -0
  199. data/spec/controllers/spree/admin/missing_products_controller_spec.rb +18 -0
  200. data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +197 -0
  201. data/spec/controllers/spree/admin/orders_controller_spec.rb +296 -0
  202. data/spec/controllers/spree/admin/payment_methods_controller_spec.rb +49 -0
  203. data/spec/controllers/spree/admin/payments_controller_spec.rb +97 -0
  204. data/spec/controllers/spree/admin/products_controller_spec.rb +99 -0
  205. data/spec/controllers/spree/admin/promotion_actions_controller_spec.rb +21 -0
  206. data/spec/controllers/spree/admin/promotion_rules_controller_spec.rb +21 -0
  207. data/spec/controllers/spree/admin/promotions_controller_spec.rb +44 -0
  208. data/spec/controllers/spree/admin/refunds_controller_spec.rb +32 -0
  209. data/spec/controllers/spree/admin/reimbursements_controller_spec.rb +74 -0
  210. data/spec/controllers/spree/admin/reports_controller_spec.rb +42 -0
  211. data/spec/controllers/spree/admin/resource_controller_spec.rb +252 -0
  212. data/spec/controllers/spree/admin/return_authorizations_controller_spec.rb +225 -0
  213. data/spec/controllers/spree/admin/return_index_controller_spec.rb +37 -0
  214. data/spec/controllers/spree/admin/return_items_controller_spec.rb +27 -0
  215. data/spec/controllers/spree/admin/shipping_methods_controller_spec.rb +14 -0
  216. data/spec/controllers/spree/admin/stock_items_controller_spec.rb +19 -0
  217. data/spec/controllers/spree/admin/stock_locations_controller_spec.rb +41 -0
  218. data/spec/controllers/spree/admin/stock_transfers_controller_spec.rb +41 -0
  219. data/spec/controllers/spree/admin/tax_categories_controller_spec.rb +34 -0
  220. data/spec/controllers/spree/admin/users_controller_spec.rb +161 -0
  221. data/spec/controllers/spree/admin/variants_controller_spec.rb +32 -0
  222. data/spec/features/admin/configuration/analytics_tracker_spec.rb +47 -0
  223. data/spec/features/admin/configuration/countries_spec.rb +24 -0
  224. data/spec/features/admin/configuration/general_settings_spec.rb +44 -0
  225. data/spec/features/admin/configuration/payment_methods_spec.rb +63 -0
  226. data/spec/features/admin/configuration/roles_spec.rb +47 -0
  227. data/spec/features/admin/configuration/shipping_methods_spec.rb +62 -0
  228. data/spec/features/admin/configuration/states_spec.rb +68 -0
  229. data/spec/features/admin/configuration/stock_locations_spec.rb +48 -0
  230. data/spec/features/admin/configuration/store_credit_categories_spec.rb +50 -0
  231. data/spec/features/admin/configuration/tax_categories_spec.rb +56 -0
  232. data/spec/features/admin/configuration/tax_rates_spec.rb +18 -0
  233. data/spec/features/admin/configuration/zones_spec.rb +39 -0
  234. data/spec/features/admin/homepage_spec.rb +89 -0
  235. data/spec/features/admin/locale_spec.rb +31 -0
  236. data/spec/features/admin/orders/adjustments_promotions_spec.rb +53 -0
  237. data/spec/features/admin/orders/adjustments_spec.rb +129 -0
  238. data/spec/features/admin/orders/cancelling_and_resuming_spec.rb +47 -0
  239. data/spec/features/admin/orders/customer_details_spec.rb +154 -0
  240. data/spec/features/admin/orders/line_items_spec.rb +51 -0
  241. data/spec/features/admin/orders/listing_spec.rb +224 -0
  242. data/spec/features/admin/orders/log_entries_spec.rb +55 -0
  243. data/spec/features/admin/orders/new_order_spec.rb +186 -0
  244. data/spec/features/admin/orders/order_details_spec.rb +662 -0
  245. data/spec/features/admin/orders/payments_spec.rb +231 -0
  246. data/spec/features/admin/orders/risk_analysis_spec.rb +48 -0
  247. data/spec/features/admin/orders/shipments_spec.rb +64 -0
  248. data/spec/features/admin/orders/state_changes_spec.rb +21 -0
  249. data/spec/features/admin/products/edit/images_spec.rb +86 -0
  250. data/spec/features/admin/products/edit/products_spec.rb +64 -0
  251. data/spec/features/admin/products/edit/taxons_spec.rb +41 -0
  252. data/spec/features/admin/products/edit/variants_spec.rb +56 -0
  253. data/spec/features/admin/products/option_types_spec.rb +114 -0
  254. data/spec/features/admin/products/products_spec.rb +445 -0
  255. data/spec/features/admin/products/properties_spec.rb +147 -0
  256. data/spec/features/admin/products/prototypes_spec.rb +112 -0
  257. data/spec/features/admin/products/stock_management_spec.rb +124 -0
  258. data/spec/features/admin/products/taxonomies_spec.rb +52 -0
  259. data/spec/features/admin/products/variant_spec.rb +50 -0
  260. data/spec/features/admin/promotions/adjustments_spec.rb +259 -0
  261. data/spec/features/admin/promotions/option_value_rule_spec.rb +70 -0
  262. data/spec/features/admin/promotions/tiered_calculator_spec.rb +70 -0
  263. data/spec/features/admin/refund_reasons/refund_reasons_spec.rb +57 -0
  264. data/spec/features/admin/reimbursement_type/edit_reimbursement_type_spec.rb +36 -0
  265. data/spec/features/admin/reimbursement_type/new_reimbursement_type_spec.rb +62 -0
  266. data/spec/features/admin/reports_spec.rb +61 -0
  267. data/spec/features/admin/return_authorization_reasons/return_authorization_reasons_spec.rb +63 -0
  268. data/spec/features/admin/returns/customer_returns_spec.rb +80 -0
  269. data/spec/features/admin/returns/return_authorizations_spec.rb +152 -0
  270. data/spec/features/admin/stock_transfer_spec.rb +75 -0
  271. data/spec/features/admin/store_credits_spec.rb +93 -0
  272. data/spec/features/admin/taxons_spec.rb +47 -0
  273. data/spec/features/admin/users_spec.rb +286 -0
  274. data/spec/helpers/admin/base_helper_spec.rb +30 -0
  275. data/spec/helpers/admin/navigation_helper_spec.rb +111 -0
  276. data/spec/helpers/admin/promotion_rules_helper_spec.rb +12 -0
  277. data/spec/helpers/admin/stock_movements_helper_spec.rb +30 -0
  278. data/spec/models/spree/resource_spec.rb +48 -0
  279. data/spec/routing/admin_path_spec.rb +22 -0
  280. data/spec/spec_helper.rb +144 -0
  281. data/spec/support/appear_before_matcher.rb +8 -0
  282. data/spec/support/ror_ringer.jpeg +0 -0
  283. data/spec/test_views/spree/admin/submodule/posts/edit.html.erb +1 -0
  284. data/spec/test_views/spree/admin/submodule/posts/new.html.erb +1 -0
  285. data/spec/test_views/spree/admin/widgets/edit.html.erb +1 -0
  286. data/spec/test_views/spree/admin/widgets/new.html.erb +1 -0
  287. data/spree_backend.gemspec +4 -3
  288. data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +130 -154
  289. metadata +114 -34
  290. data/app/assets/images/admin/payment_banner.png +0 -0
  291. data/app/assets/images/admin/progress.gif +0 -0
  292. data/app/assets/javascripts/spree/backend/nested-attribute.js +0 -27
  293. data/app/assets/javascripts/spree/backend/orders/edit_form.js +0 -21
  294. data/app/assets/stylesheets/spree/backend/components/_variables.scss +0 -12
  295. data/app/assets/stylesheets/spree/backend/plugins/_js_tree.scss +0 -0
  296. data/app/assets/stylesheets/spree/backend/shared/_typography.scss +0 -5
  297. data/app/controllers/spree/admin/root_controller.rb +0 -18
  298. data/app/controllers/spree/admin/search_controller.rb +0 -41
  299. data/app/helpers/spree/admin/inventory_settings_helper.rb +0 -9
  300. data/app/helpers/spree/admin/products_helper.rb +0 -29
  301. data/app/helpers/spree/admin/tables_helper.rb +0 -15
  302. data/app/helpers/spree/promotion_rules_helper.rb +0 -13
  303. data/app/views/spree/admin/inventory_units/adjust.html.erb +0 -29
  304. data/app/views/spree/admin/orders/_line_item.html.erb +0 -21
  305. data/app/views/spree/admin/refund_reasons/destroy.js.erb +0 -1
  306. data/app/views/spree/admin/return_authorization_reasons/destroy.js.erb +0 -1
  307. data/app/views/spree/admin/search/products.rabl +0 -9
  308. data/app/views/spree/admin/search/users.rabl +0 -30
  309. data/app/views/spree/admin/stock_movements/edit.html.erb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd2f693c44f7556e08514b351fc17fc2bdd7ac82
4
- data.tar.gz: 8c31f9c6a91f3c52b01848b41c3af58510336bba
3
+ metadata.gz: 6a9f7de48919e990d609ddf3fb74255c00c6a4c2
4
+ data.tar.gz: dc522ba30d7641a682f0a6f33c028f224a06c3ba
5
5
  SHA512:
6
- metadata.gz: e1307d425f716646ac2a8f9b9d5cd52e7f625d8f84d4579fe9a75c30456904087148a4f406e5bd50a2391ff0f1b2fc20241e44e07bfb6b4968f8c5e658799a79
7
- data.tar.gz: 6580e31307e44568992214bd6e13518cf7eb58696e9f6021c512766fc6dfff1fee4445c4f3d92e276d8612562945891264eddf6c0c89f02a114a4dd1a18cc6e3
6
+ metadata.gz: f9ff1ad9d293d181c874f8e4378227b4cee241097d8f0e6d97c081d1b24064b5ecd9ff3c2d009f2a2ae2504f914a2d3f1ba287b677642d7a7c42e54f2725d5fe
7
+ data.tar.gz: e83dc490934970ee0f8711cd9dccd2adaffb6e29398045453ec7cfa7e305fcb5c8cc8e7d98bf1b1fe33386c6147327965cb620e03be49f64bbc4cd21c51da909
Binary file
@@ -15,13 +15,6 @@ jQuery(function($) {
15
15
  $("span.icon", $(this)).toggleClass("icon-chevron-down");
16
16
  });
17
17
 
18
- $(".js-collapse-sidebar").click(function(){
19
- $(".main-right-sidebar").toggleClass("collapsed");
20
- $("section.content").toggleClass("sidebar-collapsed");
21
- $("span.icon", $(this)).toggleClass("icon-chevron-right");
22
- $("span.icon", $(this)).toggleClass("icon-chevron-left");
23
- });
24
-
25
18
  $('#main-sidebar').find('[data-toggle="collapse"]').on('click', function()
26
19
  {
27
20
  if($(this).find('.icon-chevron-left').length == 1){
@@ -165,23 +158,6 @@ jQuery(function($) {
165
158
  }
166
159
  });
167
160
 
168
- // Enable sidebar toggle
169
- $("[data-toggle='offcanvas']").click(function(e) {
170
- e.preventDefault();
171
-
172
- // If window is small enough, enable sidebar push menu
173
- if ($(window).width() <= 992) {
174
- $('.row-offcanvas').toggleClass('active');
175
- $('.left-side').removeClass("collapse-left");
176
- $(".right-side").removeClass("strech");
177
- $('.row-offcanvas').toggleClass("relative");
178
- } else {
179
- // Else, enable content streching
180
- $('.left-side').toggleClass("collapse-left");
181
- $(".right-side").toggleClass("strech");
182
- }
183
- });
184
-
185
161
  // Make flash messages disappear
186
162
  setTimeout('$(".alert-auto-disappear").slideUp()', 5000);
187
163
 
@@ -351,9 +327,10 @@ $(document).ready(function(){
351
327
  helper: fixHelper,
352
328
  placeholder: 'ui-sortable-placeholder',
353
329
  update: function(event, ui) {
330
+ var tbody = this;
354
331
  $("#progress").show();
355
332
  positions = {};
356
- $.each($('table.sortable tbody tr'), function(position, obj){
333
+ $.each($('tr', tbody), function(position, obj){
357
334
  reg = /spree_(\w+_?)+_(\d+)/;
358
335
  parts = reg.exec($(obj).prop('id'));
359
336
  if (parts) {
@@ -16,8 +16,9 @@ $(document).ready(function() {
16
16
  $("#customer_search").select2({
17
17
  placeholder: Spree.translations.choose_a_customer,
18
18
  ajax: {
19
- url: Spree.routes.user_search,
19
+ url: Spree.routes.users_api,
20
20
  datatype: 'json',
21
+ cache: true,
21
22
  data: function(term, page) {
22
23
  return {
23
24
  q: term,
@@ -55,8 +55,8 @@ deleteLineItem = (line_item_id) ->
55
55
  $.ajax(
56
56
  type: "DELETE"
57
57
  url: Spree.url(url)
58
- data:
59
- token: Spree.api_key
58
+ headers:
59
+ 'X-Spree-Token': Spree.api_key
60
60
  ).done (msg) ->
61
61
  $('#line-item-' + line_item_id).remove()
62
62
  if $('.line-items tr.line-item').length == 0
@@ -43,7 +43,10 @@ adjustLineItems = function(order_number, variant_id, quantity){
43
43
  window.Spree.advanceOrder();
44
44
  window.location.reload();
45
45
  }).fail(function(msg) {
46
- alert(msg.responseJSON.message)
46
+ if (typeof msg.responseJSON.message != 'undefined') {
47
+ alert(msg.responseJSON.message);
48
+ } else {
49
+ alert(msg.responseJSON.exception);
50
+ }
47
51
  });
48
-
49
52
  }
@@ -10,7 +10,7 @@ $(document).ready(function () {
10
10
  placeholder: Spree.translations.option_type_placeholder,
11
11
  multiple: true,
12
12
  initSelection: function (element, callback) {
13
- var url = Spree.url(Spree.routes.option_type_search, {
13
+ var url = Spree.url(Spree.routes.option_types_api, {
14
14
  ids: element.val(),
15
15
  token: Spree.api_key
16
16
  });
@@ -19,7 +19,7 @@ $(document).ready(function () {
19
19
  });
20
20
  },
21
21
  ajax: {
22
- url: Spree.routes.option_type_search,
22
+ url: Spree.routes.option_types_api,
23
23
  quietMillis: 200,
24
24
  datatype: 'json',
25
25
  data: function (term) {
@@ -11,7 +11,7 @@ $.fn.optionValueAutocomplete = function (options) {
11
11
  minimumInputLength: 3,
12
12
  multiple: multiple,
13
13
  initSelection: function (element, callback) {
14
- $.get(Spree.routes.option_value_search, {
14
+ $.get(Spree.routes.option_values_api, {
15
15
  ids: element.val().split(','),
16
16
  token: Spree.api_key
17
17
  }, function (data) {
@@ -19,7 +19,7 @@ $.fn.optionValueAutocomplete = function (options) {
19
19
  });
20
20
  },
21
21
  ajax: {
22
- url: Spree.routes.option_value_search,
22
+ url: Spree.routes.option_values_api,
23
23
  datatype: 'json',
24
24
  data: function (term) {
25
25
  var productId = typeof(productSelect) !== 'undefined' ? $(productSelect).select2('val') : null;
@@ -12,15 +12,19 @@ jQuery ($) ->
12
12
  callback() if data.state in ['checkout', 'pending']
13
13
 
14
14
  update: (attributes, success) ->
15
+ @updating = true
16
+
15
17
  jqXHR = $.ajax
16
18
  type: 'PUT'
17
19
  url: @url.toString()
18
20
  data: { payment: attributes }
21
+ jqXHR.always =>
22
+ @updating = false
19
23
  jqXHR.done (data) =>
20
24
  @data = data
21
25
  jqXHR.fail ->
22
- response = $.parseJSON(jqXHR.responseText)
23
- show_flash('error', response.error)
26
+ response = jqXHR.responseJSON and jqXHR.responseJSON.error or jqXHR.statusText
27
+ show_flash('error', response)
24
28
 
25
29
  amount: -> @data.amount
26
30
  display_amount: -> @data.display_amount
@@ -57,8 +61,6 @@ jQuery ($) ->
57
61
  .one
58
62
  click: (event) ->
59
63
  event.preventDefault()
60
- mousedown: ->
61
- $(@).data('clicked', true)
62
64
  mouseup: =>
63
65
  @[action]()
64
66
 
@@ -115,8 +117,9 @@ jQuery ($) ->
115
117
  amount.html(@$new_input(amount.find('span').width()))
116
118
 
117
119
  save: (event) ->
118
- @payment.update(amount: @$input().val())
119
- .done(=> @show())
120
+ unless @payment.updating
121
+ @payment.update(amount: @$input().val())
122
+ .done(=> @show())
120
123
 
121
124
  cancel: @::show
122
125
 
@@ -127,8 +130,7 @@ jQuery ($) ->
127
130
  .width(width)
128
131
  .one
129
132
  blur: =>
130
- clicked = (@$buttons().filter -> $(@).data('clicked')).length
131
- @save() unless clicked
133
+ @save()
132
134
  .css('text-align': 'right')
133
135
 
134
136
  $input: ->
@@ -13,7 +13,7 @@ $.fn.productAutocomplete = function (options) {
13
13
  minimumInputLength: 3,
14
14
  multiple: multiple,
15
15
  initSelection: function (element, callback) {
16
- $.get(Spree.routes.product_search, {
16
+ $.get(Spree.routes.products_api, {
17
17
  ids: element.val().split(','),
18
18
  token: Spree.api_key
19
19
  }, function (data) {
@@ -21,8 +21,9 @@ $.fn.productAutocomplete = function (options) {
21
21
  });
22
22
  },
23
23
  ajax: {
24
- url: Spree.routes.product_search,
24
+ url: Spree.routes.products_api,
25
25
  datatype: 'json',
26
+ cache: true,
26
27
  data: function (term, page) {
27
28
  return {
28
29
  q: {
@@ -134,7 +134,7 @@ $(document).ready(function () {
134
134
 
135
135
  var show = link.parents('tbody').find('tr.show-tracking');
136
136
  show.toggle();
137
- show.find('.tracking-value').html($("<strong>").html("<%= Spree.t(:tracking) %>: ")).append(data.tracking);
137
+ show.find('.tracking-value').html($("<strong>").html(Spree.translations.tracking + ": ")).append(data.tracking);
138
138
  });
139
139
  });
140
140
  });
@@ -1,11 +1,13 @@
1
1
  $(document).ready(function () {
2
2
  'use strict';
3
3
 
4
- $('#country').on('change', function () {
5
- var new_state_link_href = $('#new_state_link').prop('href');
6
- var selected_country_id = $('#country option:selected').prop('value');
7
- var new_link = new_state_link_href.replace(/countries\/(\d+)/,
8
- 'countries/' + selected_country_id);
9
- $('#new_state_link').attr('href', new_link);
10
- });
4
+ if ($('#new_state_link').length) {
5
+ $('#country').on('change', function () {
6
+ var new_state_link_href = $('#new_state_link').prop('href');
7
+ var selected_country_id = $('#country option:selected').prop('value');
8
+ var new_link = new_state_link_href.replace(/countries\/(\d+)/,
9
+ 'countries/' + selected_country_id);
10
+ $('#new_state_link').attr('href', new_link);
11
+ });
12
+ };
11
13
  });
@@ -0,0 +1,3 @@
1
+ $(document).ready(function(){
2
+ $('[data-hook=stock_location_country] span#country .select2').on('change', function() { update_state(''); });
3
+ });
@@ -0,0 +1,52 @@
1
+ $.fn.tagAutocomplete = function () {
2
+ 'use strict';
3
+
4
+ function formatTag(tag) {
5
+ return Select2.util.escapeMarkup(tag.name);
6
+ }
7
+
8
+ this.select2({
9
+ placeholder: Spree.translations.tags_placeholder,
10
+ minimumInputLength: 1,
11
+ tokenSeparators: [','],
12
+ multiple: true,
13
+ tags: true,
14
+ initSelection: function (element, callback) {
15
+ var data = $(element.val().split(',')).map(function() {
16
+ return { name: this, id: this };
17
+ });
18
+ callback(data);
19
+ },
20
+ ajax: {
21
+ url: Spree.routes.tags_api,
22
+ datatype: 'json',
23
+ cache: true,
24
+ data: function (term) {
25
+ return {
26
+ q: term,
27
+ token: Spree.api_key
28
+ };
29
+ },
30
+ results: function (data) {
31
+ return {
32
+ results: data.tags.map(function(tag) {
33
+ return { name: tag.name, id: tag.name };
34
+ })
35
+ };
36
+ }
37
+ },
38
+ createSearchChoice: function(term, data) {
39
+ if ($(data).filter(function() {
40
+ return this.name.localeCompare(term)===0;
41
+ }).length===0) {
42
+ return { id: term, name: term };
43
+ }
44
+ },
45
+ formatResult: formatTag,
46
+ formatSelection: formatTag
47
+ });
48
+ };
49
+
50
+ $(document).ready(function () {
51
+ $('.tag_picker').tagAutocomplete();
52
+ });
@@ -10,7 +10,7 @@ var set_taxon_select = function(selector){
10
10
  placeholder: Spree.translations.taxon_placeholder,
11
11
  multiple: true,
12
12
  initSelection: function (element, callback) {
13
- var url = Spree.url(Spree.routes.taxons_search, {
13
+ var url = Spree.url(Spree.routes.taxons_api, {
14
14
  ids: element.val(),
15
15
  without_children: true,
16
16
  token: Spree.api_key
@@ -20,7 +20,7 @@ var set_taxon_select = function(selector){
20
20
  });
21
21
  },
22
22
  ajax: {
23
- url: Spree.routes.taxons_search,
23
+ url: Spree.routes.taxons_api,
24
24
  datatype: 'json',
25
25
  data: function (term, page) {
26
26
  return {
@@ -0,0 +1,12 @@
1
+ $(document).ready(function() {
2
+ if ($('#permalink_part_display').length) {
3
+ var field = $('#permalink_part'),
4
+ target = $('#permalink_part_display'),
5
+ permalink_part_default = target.text().trim();
6
+
7
+ target.text(permalink_part_default + field.val());
8
+ field.on('keyup blur', function () {
9
+ target.text(permalink_part_default + $(this).val());
10
+ });
11
+ };
12
+ });
@@ -1,6 +1,6 @@
1
1
  handle_ajax_error = (XMLHttpRequest, textStatus, errorThrown) ->
2
2
  $.jstree.rollback(last_rollback)
3
- $("#ajax_error").show().html("<strong>" + server_error + "</strong><br />" + taxonomy_tree_error)
3
+ $("#ajax_error").show().html("<strong>" + Spree.translations.server_error + "</strong><br />" + Spree.translations.taxonomy_tree_error)
4
4
 
5
5
  handle_move = (e, data) ->
6
6
  last_rollback = data.rlbk
@@ -109,7 +109,7 @@ root.setup_taxonomy_tree = (taxonomy_id) ->
109
109
  theme: "spree",
110
110
  url: Spree.url(Spree.routes.jstree_theme_path)
111
111
  strings:
112
- new_node: new_taxon,
112
+ new_node: Spree.translations.new_taxon,
113
113
  loading: Spree.translations.loading + "..."
114
114
  crrm:
115
115
  move:
@@ -21,7 +21,7 @@ $(document).ready ->
21
21
  dropdownCssClass: "taxon_select_box",
22
22
  placeholder: Spree.translations.find_a_taxon,
23
23
  ajax:
24
- url: Spree.routes.taxons_search,
24
+ url: Spree.routes.taxons_api,
25
25
  datatype: 'json',
26
26
  data: (term, page) ->
27
27
  per_page: 50,
@@ -9,14 +9,15 @@ $.fn.userAutocomplete = function () {
9
9
  minimumInputLength: 1,
10
10
  multiple: true,
11
11
  initSelection: function (element, callback) {
12
- $.get(Spree.routes.user_search, {
13
- ids: element.val()
12
+ $.get(Spree.routes.users_api, {
13
+ ids: element.val(),
14
+ token: Spree.api_key
14
15
  }, function (data) {
15
16
  callback(data.users);
16
17
  });
17
18
  },
18
19
  ajax: {
19
- url: Spree.routes.user_search,
20
+ url: Spree.routes.users_api,
20
21
  datatype: 'json',
21
22
  data: function (term) {
22
23
  return {
@@ -24,11 +24,9 @@
24
24
  //= require spree/backend/handlebar_extensions
25
25
  //= require spree/backend/line_items
26
26
  //= require spree/backend/line_items_on_order_edit
27
- //= require spree/backend/nested-attribute
28
27
  //= require spree/backend/option_type_autocomplete
29
28
  //= require spree/backend/option_value_picker
30
29
  //= require spree/backend/orders/edit
31
- //= require spree/backend/orders/edit_form
32
30
  //= require spree/backend/payments/edit
33
31
  //= require spree/backend/payments/new
34
32
  //= require spree/backend/product_picker
@@ -38,14 +36,17 @@
38
36
  //= require spree/backend/returns/return_item_selection
39
37
  //= require spree/backend/shipments
40
38
  //= require spree/backend/states
39
+ //= require spree/backend/stock_location
41
40
  //= require spree/backend/stock_management
42
41
  //= require spree/backend/stock_movement
43
42
  //= require spree/backend/stock_transfer
44
43
  //= require spree/backend/taxon_autocomplete
44
+ //= require spree/backend/taxon_permalink_preview
45
45
  //= require spree/backend/taxon_tree_menu
46
46
  //= require spree/backend/taxonomy
47
47
  //= require spree/backend/taxons
48
48
  //= require spree/backend/user_picker
49
+ //= require spree/backend/tag_picker
49
50
  //= require spree/backend/variant_autocomplete
50
51
  //= require spree/backend/variant_management
51
52
  //= require spree/backend/zone
@@ -53,17 +54,17 @@
53
54
  Spree.routes.clear_cache = Spree.adminPathFor('general_settings/clear_cache')
54
55
  Spree.routes.checkouts_api = Spree.pathFor('api/v1/checkouts')
55
56
  Spree.routes.classifications_api = Spree.pathFor('api/v1/classifications')
56
- Spree.routes.option_type_search = Spree.pathFor('api/v1/option_types')
57
- Spree.routes.option_value_search = Spree.pathFor('api/v1/option_values')
57
+ Spree.routes.option_types_api = Spree.pathFor('api/v1/option_types')
58
+ Spree.routes.option_values_api = Spree.pathFor('api/v1/option_values')
58
59
  Spree.routes.orders_api = Spree.pathFor('api/v1/orders')
59
60
  Spree.routes.products_api = Spree.pathFor('api/v1/products')
60
- Spree.routes.product_search = Spree.adminPathFor('search/products')
61
61
  Spree.routes.shipments_api = Spree.pathFor('api/v1/shipments')
62
62
  Spree.routes.checkouts_api = Spree.pathFor('api/v1/checkouts')
63
63
  Spree.routes.stock_locations_api = Spree.pathFor('api/v1/stock_locations')
64
64
  Spree.routes.taxon_products_api = Spree.pathFor('api/v1/taxons/products')
65
- Spree.routes.taxons_search = Spree.pathFor('api/v1/taxons')
66
- Spree.routes.user_search = Spree.adminPathFor('search/users')
65
+ Spree.routes.taxons_api = Spree.pathFor('api/v1/taxons')
66
+ Spree.routes.users_api = Spree.pathFor('api/v1/users')
67
+ Spree.routes.tags_api = Spree.pathFor('api/v1/tags')
67
68
  Spree.routes.variants_api = Spree.pathFor('api/v1/variants')
68
69
 
69
70
  Spree.routes.edit_product = function(product_id) {
@@ -5,7 +5,11 @@
5
5
  }
6
6
  }
7
7
 
8
+ .logo.navbar-brand {
9
+ padding: 5px 15px;
10
+ }
11
+
8
12
  #logo {
9
13
  width: auto;
10
- height: 20px;
14
+ height: 40px;
11
15
  }
@@ -71,6 +71,13 @@
71
71
  }
72
72
  }
73
73
  }
74
+
75
+ .spree-version {
76
+ position: absolute;
77
+ z-index: -1;
78
+ left: 15px;
79
+ bottom: 15px;
80
+ }
74
81
  }
75
82
 
76
83
  #wrapper.sidebar-minimized #main-sidebar {
@@ -30,7 +30,7 @@ input.form-control {
30
30
  .form-group {
31
31
  &.withError {
32
32
  label, .formError, .required {
33
- color: $brand-danger
33
+ color: $brand-danger;
34
34
  }
35
35
 
36
36
  input,
@@ -22,7 +22,6 @@
22
22
 
23
23
  @import 'plugins/select2';
24
24
  @import 'plugins/jquery_ui';
25
- @import 'plugins/js_tree';
26
25
 
27
26
  @import 'shared/base';
28
27
  @import 'shared/forms';
@@ -2,7 +2,6 @@ module Spree
2
2
  module Admin
3
3
  class BaseController < Spree::BaseController
4
4
  helper 'spree/admin/navigation'
5
- helper 'spree/admin/tables'
6
5
  layout '/spree/layouts/admin'
7
6
 
8
7
  before_action :authorize_admin
@@ -42,16 +41,6 @@ module Spree
42
41
  render partial: '/spree/admin/shared/destroy'
43
42
  end
44
43
 
45
- # Index request for JSON needs to pass a CSRF token in order to prevent JSON Hijacking
46
- def check_json_authenticity
47
- return unless request.format.js? || request.format.json?
48
- return unless protect_against_forgery?
49
- auth_token = params[request_forgery_protection_token]
50
- unless auth_token && form_authenticity_token == URI.unescape(auth_token)
51
- raise(ActionController::InvalidAuthenticityToken)
52
- end
53
- end
54
-
55
44
  def config_locale
56
45
  Spree::Backend::Config[:locale]
57
46
  end
@@ -4,7 +4,7 @@ module Spree
4
4
  before_action :setup_new_option_value, only: :edit
5
5
 
6
6
  def update_values_positions
7
- ActiveRecord::Base.transaction do
7
+ ApplicationRecord.transaction do
8
8
  params[:positions].each do |id, index|
9
9
  Spree::OptionValue.where(id: id).update_all(position: index)
10
10
  end
@@ -12,7 +12,7 @@ module Spree
12
12
 
13
13
  respond_to do |format|
14
14
  format.html { redirect_to admin_product_variants_url(params[:product_id]) }
15
- format.js { render text: 'Ok' }
15
+ format.js { render plain: 'Ok' }
16
16
  end
17
17
  end
18
18
 
@@ -28,21 +28,9 @@ module Spree
28
28
 
29
29
 
30
30
  private
31
- def load_product
32
- @product = Product.friendly.find(params[:product_id])
33
- end
34
-
35
31
  def setup_new_option_value
36
32
  @option_type.option_values.build if @option_type.option_values.empty?
37
33
  end
38
-
39
- def set_available_option_types
40
- @available_option_types = if @product.option_type_ids.any?
41
- OptionType.where.not(id: @product.option_type_ids)
42
- else
43
- OptionType.all
44
- end
45
- end
46
34
  end
47
35
  end
48
36
  end
@@ -4,7 +4,7 @@ module Spree
4
4
  def destroy
5
5
  option_value = Spree::OptionValue.find(params[:id])
6
6
  option_value.destroy
7
- render text: nil
7
+ render plain: nil
8
8
  end
9
9
  end
10
10
  end
@@ -41,7 +41,7 @@ module Spree
41
41
  # see https://github.com/spree/spree/pull/3919
42
42
  @orders = @search.result(distinct: true).
43
43
  page(params[:page]).
44
- per(params[:per_page] || Spree::Config[:orders_per_page])
44
+ per(params[:per_page] || Spree::Config[:admin_orders_per_page])
45
45
 
46
46
  # Restore dates
47
47
  params[:q][:created_at_gt] = created_at_gt
@@ -85,26 +85,26 @@ module Spree
85
85
  def cancel
86
86
  @order.canceled_by(try_spree_current_user)
87
87
  flash[:success] = Spree.t(:order_canceled)
88
- redirect_to :back
88
+ redirect_back fallback_location: spree.edit_admin_order_url(@order)
89
89
  end
90
90
 
91
91
  def resume
92
92
  @order.resume!
93
93
  flash[:success] = Spree.t(:order_resumed)
94
- redirect_to :back
94
+ redirect_back fallback_location: spree.edit_admin_order_url(@order)
95
95
  end
96
96
 
97
97
  def approve
98
98
  @order.approved_by(try_spree_current_user)
99
99
  flash[:success] = Spree.t(:order_approved)
100
- redirect_to :back
100
+ redirect_back fallback_location: spree.edit_admin_order_url(@order)
101
101
  end
102
102
 
103
103
  def resend
104
104
  OrderMailer.confirm_email(@order.id, true).deliver_later
105
105
  flash[:success] = Spree.t(:order_email_resent)
106
106
 
107
- redirect_to :back
107
+ redirect_back fallback_location: spree.edit_admin_order_url(@order)
108
108
  end
109
109
 
110
110
  def open_adjustments
@@ -112,7 +112,7 @@ module Spree
112
112
  adjustments.update_all(state: 'open')
113
113
  flash[:success] = Spree.t(:all_adjustments_opened)
114
114
 
115
- respond_with(@order) { |format| format.html { redirect_to :back } }
115
+ respond_with(@order) { |format| format.html { redirect_back fallback_location: spree.admin_order_adjustments_url(@order) } }
116
116
  end
117
117
 
118
118
  def close_adjustments
@@ -120,7 +120,7 @@ module Spree
120
120
  adjustments.update_all(state: 'closed')
121
121
  flash[:success] = Spree.t(:all_adjustments_closed)
122
122
 
123
- respond_with(@order) { |format| format.html { redirect_to :back } }
123
+ respond_with(@order) { |format| format.html { redirect_back fallback_location: spree.admin_order_adjustments_url(@order) } }
124
124
  end
125
125
 
126
126
  private
@@ -52,6 +52,10 @@ module Spree
52
52
 
53
53
  private
54
54
 
55
+ def collection
56
+ @collection = super.order(position: :asc)
57
+ end
58
+
55
59
  def load_data
56
60
  @providers = Gateway.providers.sort{|p1, p2| p1.name <=> p2.name }
57
61
  end
@@ -1,7 +1,7 @@
1
1
  module Spree
2
2
  module Admin
3
3
  class ProductPropertiesController < ResourceController
4
- belongs_to 'spree/product', :find_by => :slug
4
+ belongs_to 'spree/product', find_by: :slug
5
5
  before_action :find_properties
6
6
  before_action :setup_property, only: :index
7
7
 
@@ -105,7 +105,7 @@ module Spree
105
105
  return @collection if @collection.present?
106
106
  params[:q] ||= {}
107
107
  params[:q][:deleted_at_null] ||= "1"
108
- params[:q][:not_discontinued] ||= "1"
108
+ params[:q][:discontinue_on_null] ||= "1"
109
109
 
110
110
  params[:q][:s] ||= "name asc"
111
111
  @collection = super