spree_backend 4.1.15 → 4.2.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (270) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/backend-add.svg +5 -0
  3. data/app/assets/images/backend-adjust.svg +5 -0
  4. data/app/assets/images/backend-approve.svg +3 -0
  5. data/app/assets/images/backend-arrow-down.svg +1 -0
  6. data/app/assets/images/backend-arrow-left.svg +1 -0
  7. data/app/assets/images/backend-arrow-right.svg +1 -0
  8. data/app/assets/images/backend-arrow-up.svg +1 -0
  9. data/app/assets/images/backend-calendar.svg +9 -0
  10. data/app/assets/images/backend-cancel.svg +7 -0
  11. data/app/assets/images/backend-capture.svg +3 -0
  12. data/app/assets/images/backend-cart.svg +1 -0
  13. data/app/assets/images/backend-chevron-down.svg +1 -0
  14. data/app/assets/images/backend-chevron-left.svg +1 -0
  15. data/app/assets/images/backend-chevron-right.svg +1 -0
  16. data/app/assets/images/backend-chevron-up.svg +1 -0
  17. data/app/assets/images/backend-clone.svg +7 -0
  18. data/app/assets/images/backend-close.svg +7 -0
  19. data/app/assets/images/backend-delete.svg +6 -0
  20. data/app/assets/images/backend-double-chevron-left.svg +15 -0
  21. data/app/assets/images/backend-double-chevron-right.svg +17 -0
  22. data/app/assets/images/backend-edit.svg +14 -0
  23. data/app/assets/images/backend-enter.svg +6 -0
  24. data/app/assets/images/backend-envelope.svg +3 -0
  25. data/app/assets/images/backend-exit.svg +13 -0
  26. data/app/assets/images/backend-extensions.svg +4 -0
  27. data/app/assets/images/backend-eye-open.svg +8 -0
  28. data/app/assets/images/backend-file.svg +6 -0
  29. data/app/assets/images/backend-filter.svg +3 -0
  30. data/app/assets/images/backend-folder.svg +4 -0
  31. data/app/assets/images/backend-images.svg +7 -0
  32. data/app/assets/images/backend-info.svg +7 -0
  33. data/app/assets/images/backend-items.svg +5 -0
  34. data/app/assets/images/backend-leaf.svg +7 -0
  35. data/app/assets/images/backend-list.svg +5 -0
  36. data/app/assets/images/backend-location.svg +4 -0
  37. data/app/assets/images/backend-menu.svg +5 -0
  38. data/app/assets/images/backend-money.svg +1 -0
  39. data/app/assets/images/backend-move.svg +5 -0
  40. data/app/assets/images/backend-ok.svg +3 -0
  41. data/app/assets/images/backend-pagination-double-arrow-right.svg +8 -0
  42. data/app/assets/images/backend-payments.svg +8 -0
  43. data/app/assets/images/backend-pencil.svg +1 -0
  44. data/app/assets/images/backend-products.svg +5 -0
  45. data/app/assets/images/backend-promotion.svg +8 -0
  46. data/app/assets/images/backend-recycle.svg +5 -0
  47. data/app/assets/images/backend-remove.svg +6 -0
  48. data/app/assets/images/backend-report.svg +6 -0
  49. data/app/assets/images/backend-resume.svg +5 -0
  50. data/app/assets/images/backend-returns.svg +3 -0
  51. data/app/assets/images/backend-save.svg +3 -0
  52. data/app/assets/images/backend-search.svg +1 -0
  53. data/app/assets/images/backend-settings.svg +6 -0
  54. data/app/assets/images/backend-shipping.svg +3 -0
  55. data/app/assets/images/backend-slack.svg +3 -0
  56. data/app/assets/images/backend-sort.svg +5 -0
  57. data/app/assets/images/backend-split.svg +3 -0
  58. data/app/assets/images/backend-store.svg +14 -0
  59. data/app/assets/images/backend-tick.svg +3 -0
  60. data/app/assets/images/backend-update.svg +3 -0
  61. data/app/assets/images/backend-user.svg +3 -0
  62. data/app/assets/images/backend-users.svg +6 -0
  63. data/app/assets/images/backend-view.svg +8 -0
  64. data/app/assets/images/backend-void.svg +7 -0
  65. data/app/assets/javascripts/spree/backend/admin.js +156 -147
  66. data/app/assets/javascripts/spree/backend/checkouts/edit.js +1 -0
  67. data/app/assets/javascripts/spree/backend/flatpickr_locals.js +37 -0
  68. data/app/assets/javascripts/spree/backend/multi_currency.js +38 -0
  69. data/app/assets/javascripts/spree/backend/payments/edit.js +4 -3
  70. data/app/assets/javascripts/spree/backend/payments/new.js +18 -18
  71. data/app/assets/javascripts/spree/backend/promotions.js +1 -1
  72. data/app/assets/javascripts/spree/backend/spree-select2.js +18 -4
  73. data/app/assets/javascripts/spree/backend/stock_management.js +2 -1
  74. data/app/assets/javascripts/spree/backend/taxon_tree_menu.js +4 -4
  75. data/app/assets/javascripts/spree/backend/taxonomy.js +8 -1
  76. data/app/assets/javascripts/spree/backend/taxons.js +25 -16
  77. data/app/assets/javascripts/spree/backend/user_picker.js +1 -1
  78. data/app/assets/javascripts/spree/backend/variant_autocomplete.js +1 -1
  79. data/app/assets/javascripts/spree/backend/variant_management.js +2 -1
  80. data/app/assets/javascripts/spree/backend.js +5 -2
  81. data/app/assets/stylesheets/spree/backend/components/_buttons.scss +27 -11
  82. data/app/assets/stylesheets/spree/backend/components/_filters.scss +35 -5
  83. data/app/assets/stylesheets/spree/backend/components/_icons.scss +39 -4
  84. data/app/assets/stylesheets/spree/backend/components/_main.scss +32 -6
  85. data/app/assets/stylesheets/spree/backend/components/_navbar.scss +16 -8
  86. data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +119 -55
  87. data/app/assets/stylesheets/spree/backend/components/_tables.scss +62 -19
  88. data/app/assets/stylesheets/spree/backend/components/_taxon_products_view.scss +26 -63
  89. data/app/assets/stylesheets/spree/backend/global/_variables.scss +5 -1
  90. data/app/assets/stylesheets/spree/backend/plugins/_flatpickr.scss +95 -0
  91. data/app/assets/stylesheets/spree/backend/plugins/_jquery_ui.scss +0 -117
  92. data/app/assets/stylesheets/spree/backend/plugins/_select2.scss +73 -24
  93. data/app/assets/stylesheets/spree/backend/shared/_base.scss +40 -0
  94. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +38 -0
  95. data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +5 -0
  96. data/app/assets/stylesheets/spree/backend/views/_order_payments.scss +12 -0
  97. data/app/assets/stylesheets/spree/backend/views/_product_properties.scss +11 -0
  98. data/app/assets/stylesheets/spree/backend/views/prototypes.scss +42 -0
  99. data/app/assets/stylesheets/spree/backend.css +1 -1
  100. data/app/controllers/spree/admin/general_settings_controller.rb +27 -0
  101. data/app/controllers/spree/admin/prices_controller.rb +39 -0
  102. data/app/controllers/spree/admin/stock_transfers_controller.rb +8 -1
  103. data/app/controllers/spree/admin/stores_controller.rb +61 -1
  104. data/app/controllers/spree/admin/taxons_controller.rb +5 -1
  105. data/app/helpers/spree/admin/base_helper.rb +25 -8
  106. data/app/helpers/spree/admin/navigation_helper.rb +50 -19
  107. data/app/helpers/spree/admin/orders_helper.rb +3 -3
  108. data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_first_page.html.erb +1 -1
  109. data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_gap.html.erb +1 -1
  110. data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_last_page.html.erb +1 -1
  111. data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_next_page.html.erb +1 -1
  112. data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_page.html.erb +0 -0
  113. data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_paginator.html.erb +1 -1
  114. data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_prev_page.html.erb +1 -1
  115. data/app/views/spree/admin/adjustments/_adjustment.html.erb +2 -2
  116. data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +16 -16
  117. data/app/views/spree/admin/adjustments/edit.html.erb +2 -2
  118. data/app/views/spree/admin/adjustments/index.html.erb +3 -3
  119. data/app/views/spree/admin/adjustments/new.html.erb +1 -1
  120. data/app/views/spree/admin/countries/_form.html.erb +9 -4
  121. data/app/views/spree/admin/countries/index.html.erb +27 -24
  122. data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +37 -35
  123. data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +2 -0
  124. data/app/views/spree/admin/customer_returns/_return_item_selection.html.erb +45 -43
  125. data/app/views/spree/admin/customer_returns/index.html.erb +3 -1
  126. data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
  127. data/app/views/spree/admin/general_settings/_form.html.erb +27 -0
  128. data/app/views/spree/admin/general_settings/edit.html.erb +4 -3
  129. data/app/views/spree/admin/images/edit.html.erb +2 -2
  130. data/app/views/spree/admin/images/index.html.erb +7 -7
  131. data/app/views/spree/admin/images/new.html.erb +2 -2
  132. data/app/views/spree/admin/log_entries/index.html.erb +4 -3
  133. data/app/views/spree/admin/option_types/_option_value_fields.html.erb +1 -1
  134. data/app/views/spree/admin/option_types/edit.html.erb +22 -20
  135. data/app/views/spree/admin/option_types/index.html.erb +27 -25
  136. data/app/views/spree/admin/orders/_adjustments.html.erb +26 -26
  137. data/app/views/spree/admin/orders/_line_items.html.erb +7 -7
  138. data/app/views/spree/admin/orders/_order_actions.html.erb +1 -1
  139. data/app/views/spree/admin/orders/_risk_analysis.html.erb +44 -42
  140. data/app/views/spree/admin/orders/_shipment.html.erb +6 -6
  141. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +5 -5
  142. data/app/views/spree/admin/orders/_store_form.html.erb +3 -3
  143. data/app/views/spree/admin/orders/customer_details/_form.html.erb +1 -1
  144. data/app/views/spree/admin/orders/index.html.erb +135 -127
  145. data/app/views/spree/admin/payment_methods/index.html.erb +6 -4
  146. data/app/views/spree/admin/payments/_capture_events.html.erb +18 -16
  147. data/app/views/spree/admin/payments/_form.html.erb +1 -1
  148. data/app/views/spree/admin/payments/_list.html.erb +39 -37
  149. data/app/views/spree/admin/payments/index.html.erb +2 -3
  150. data/app/views/spree/admin/payments/new.html.erb +1 -1
  151. data/app/views/spree/admin/payments/show.html.erb +1 -1
  152. data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +30 -30
  153. data/app/views/spree/admin/payments/source_views/_gateway.html.erb +20 -18
  154. data/app/views/spree/admin/payments/source_views/_storecredit.html.erb +28 -26
  155. data/app/views/spree/admin/prices/_variant_prices.html.erb +43 -0
  156. data/app/views/spree/admin/prices/index.html.erb +21 -0
  157. data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +16 -4
  158. data/app/views/spree/admin/product_properties/index.html.erb +24 -19
  159. data/app/views/spree/admin/products/_add_stock_form.html.erb +1 -1
  160. data/app/views/spree/admin/products/_autocomplete.js.erb +27 -21
  161. data/app/views/spree/admin/products/_form.html.erb +40 -9
  162. data/app/views/spree/admin/products/edit.html.erb +1 -1
  163. data/app/views/spree/admin/products/index.html.erb +24 -19
  164. data/app/views/spree/admin/products/new.html.erb +11 -2
  165. data/app/views/spree/admin/products/stock.html.erb +3 -3
  166. data/app/views/spree/admin/promotion_categories/index.html.erb +4 -1
  167. data/app/views/spree/admin/promotions/_actions.html.erb +2 -2
  168. data/app/views/spree/admin/promotions/_form.html.erb +44 -17
  169. data/app/views/spree/admin/promotions/_promotion_action.html.erb +1 -1
  170. data/app/views/spree/admin/promotions/_promotion_rule.html.erb +1 -1
  171. data/app/views/spree/admin/promotions/_rules.html.erb +4 -4
  172. data/app/views/spree/admin/promotions/edit.html.erb +2 -2
  173. data/app/views/spree/admin/promotions/index.html.erb +5 -3
  174. data/app/views/spree/admin/promotions/new.html.erb +7 -6
  175. data/app/views/spree/admin/promotions/rules/_country.html.erb +1 -1
  176. data/app/views/spree/admin/promotions/rules/_item_total.html.erb +5 -5
  177. data/app/views/spree/admin/promotions/rules/_option_value.html.erb +6 -13
  178. data/app/views/spree/admin/promotions/rules/_product.html.erb +1 -1
  179. data/app/views/spree/admin/promotions/rules/_taxon.html.erb +1 -1
  180. data/app/views/spree/admin/properties/index.html.erb +5 -3
  181. data/app/views/spree/admin/prototypes/_prototypes.html.erb +30 -28
  182. data/app/views/spree/admin/prototypes/index.html.erb +21 -19
  183. data/app/views/spree/admin/prototypes/show.html.erb +21 -8
  184. data/app/views/spree/admin/refunds/edit.html.erb +2 -2
  185. data/app/views/spree/admin/refunds/new.html.erb +2 -2
  186. data/app/views/spree/admin/reimbursement_types/_form.html.erb +4 -4
  187. data/app/views/spree/admin/reimbursement_types/index.html.erb +4 -2
  188. data/app/views/spree/admin/reimbursements/edit.html.erb +66 -63
  189. data/app/views/spree/admin/reimbursements/index.html.erb +21 -20
  190. data/app/views/spree/admin/reimbursements/show.html.erb +66 -60
  191. data/app/views/spree/admin/reports/index.html.erb +18 -17
  192. data/app/views/spree/admin/reports/sales_total.html.erb +20 -19
  193. data/app/views/spree/admin/return_authorizations/_form.html.erb +3 -2
  194. data/app/views/spree/admin/return_authorizations/edit.html.erb +3 -3
  195. data/app/views/spree/admin/return_authorizations/index.html.erb +3 -1
  196. data/app/views/spree/admin/return_authorizations/new.html.erb +2 -2
  197. data/app/views/spree/admin/return_index/customer_returns.html.erb +4 -4
  198. data/app/views/spree/admin/return_index/return_authorizations.html.erb +4 -4
  199. data/app/views/spree/admin/roles/index.html.erb +21 -19
  200. data/app/views/spree/admin/shared/_account_nav.html.erb +51 -65
  201. data/app/views/spree/admin/shared/_address_form.html.erb +31 -73
  202. data/app/views/spree/admin/shared/_cal_close.html.erb +10 -0
  203. data/app/views/spree/admin/shared/_content_header.html.erb +40 -21
  204. data/app/views/spree/admin/shared/_edit_resource_links.html.erb +2 -2
  205. data/app/views/spree/admin/shared/_header.html.erb +14 -11
  206. data/app/views/spree/admin/shared/_index_table_options.html.erb +5 -7
  207. data/app/views/spree/admin/shared/_main_menu.html.erb +25 -14
  208. data/app/views/spree/admin/shared/_new_resource_links.html.erb +2 -2
  209. data/app/views/spree/admin/shared/_order_summary.html.erb +2 -0
  210. data/app/views/spree/admin/shared/_order_tabs.html.erb +9 -9
  211. data/app/views/spree/admin/shared/_product_tabs.html.erb +13 -5
  212. data/app/views/spree/admin/shared/_refunds.html.erb +31 -29
  213. data/app/views/spree/admin/shared/_report_order_criteria.html.erb +27 -6
  214. data/app/views/spree/admin/shared/_sidebar.html.erb +19 -1
  215. data/app/views/spree/admin/shared/_table_filter.html.erb +3 -3
  216. data/app/views/spree/admin/shared/_translations.html.erb +33 -1
  217. data/app/views/spree/admin/shared/_version.html.erb +1 -1
  218. data/app/views/spree/admin/shared/named_types/_index.html.erb +3 -1
  219. data/app/views/spree/admin/shipping_categories/index.html.erb +3 -1
  220. data/app/views/spree/admin/shipping_methods/index.html.erb +3 -1
  221. data/app/views/spree/admin/state_changes/index.html.erb +5 -2
  222. data/app/views/spree/admin/states/_state_list.html.erb +25 -24
  223. data/app/views/spree/admin/states/index.html.erb +1 -1
  224. data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +2 -2
  225. data/app/views/spree/admin/stock_locations/index.html.erb +3 -1
  226. data/app/views/spree/admin/stock_movements/index.html.erb +28 -26
  227. data/app/views/spree/admin/stock_transfers/_stock_movements.html.erb +20 -18
  228. data/app/views/spree/admin/stock_transfers/index.html.erb +6 -4
  229. data/app/views/spree/admin/stock_transfers/new.html.erb +3 -3
  230. data/app/views/spree/admin/stock_transfers/show.html.erb +3 -3
  231. data/app/views/spree/admin/store_credit_categories/index.html.erb +3 -1
  232. data/app/views/spree/admin/store_credits/index.html.erb +3 -1
  233. data/app/views/spree/admin/stores/_form.html.erb +128 -68
  234. data/app/views/spree/admin/stores/edit.html.erb +1 -1
  235. data/app/views/spree/admin/stores/index.html.erb +4 -2
  236. data/app/views/spree/admin/tax_categories/index.html.erb +29 -27
  237. data/app/views/spree/admin/tax_rates/index.html.erb +3 -1
  238. data/app/views/spree/admin/taxonomies/_list.html.erb +24 -22
  239. data/app/views/spree/admin/taxonomies/edit.html.erb +2 -2
  240. data/app/views/spree/admin/taxonomies/index.html.erb +1 -1
  241. data/app/views/spree/admin/taxons/_form.html.erb +3 -3
  242. data/app/views/spree/admin/taxons/_taxon_table.html.erb +24 -22
  243. data/app/views/spree/admin/taxons/edit.html.erb +6 -2
  244. data/app/views/spree/admin/taxons/index.html.erb +1 -1
  245. data/app/views/spree/admin/users/_lifetime_stats.html.erb +24 -23
  246. data/app/views/spree/admin/users/_sidebar.html.erb +5 -5
  247. data/app/views/spree/admin/users/_user_page_actions.html.erb +1 -1
  248. data/app/views/spree/admin/users/edit.html.erb +2 -2
  249. data/app/views/spree/admin/users/index.html.erb +25 -23
  250. data/app/views/spree/admin/users/items.html.erb +3 -2
  251. data/app/views/spree/admin/users/orders.html.erb +30 -29
  252. data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +3 -3
  253. data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +2 -2
  254. data/app/views/spree/admin/variants/_form.html.erb +14 -2
  255. data/app/views/spree/admin/variants/_split.js.erb +2 -2
  256. data/app/views/spree/admin/variants/index.html.erb +7 -5
  257. data/app/views/spree/admin/zones/index.html.erb +4 -4
  258. data/app/views/spree/layouts/admin.html.erb +33 -27
  259. data/config/initializers/ransack.rb +31 -0
  260. data/config/routes.rb +1 -0
  261. data/lib/spree/backend.rb +2 -0
  262. data/lib/spree_backend.rb +0 -1
  263. data/spec/fixtures/thinking-cat.jpg +0 -0
  264. data/spree_backend.gemspec +6 -4
  265. data/vendor/assets/javascripts/js.cookie.js +154 -156
  266. data/vendor/assets/javascripts/purify.js +1217 -0
  267. data/vendor/assets/javascripts/sortable.js +3709 -0
  268. data/vendor/assets/stylesheets/animate.css +7 -3156
  269. data/vendor/assets/stylesheets/jquery.jstree/themes/spree/style.scss +23 -9
  270. metadata +138 -25
@@ -6,26 +6,26 @@ root.taxon_tree_menu = function (obj, context) {
6
6
  editUrl.setPath(editUrl.path() + '/' + obj.attr('id') + '/edit')
7
7
  return {
8
8
  create: {
9
- label: '<span class="icon icon-plus"></span> ' + Spree.translations.add,
9
+ label: '<i class="icon icon-add"></i>' + Spree.translations.add,
10
10
  action: function (obj) {
11
11
  return context.create(obj)
12
12
  }
13
13
  },
14
14
  rename: {
15
- label: '<span class="icon icon-pencil"></span> ' + Spree.translations.rename,
15
+ label: '<i class="icon icon-edit"></i> ' + Spree.translations.rename,
16
16
  action: function (obj) {
17
17
  return context.rename(obj)
18
18
  }
19
19
  },
20
20
  remove: {
21
- label: '<span class="icon icon-trash"></span> ' + Spree.translations.remove,
21
+ label: '<i class="icon icon-delete"></i> ' + Spree.translations.remove,
22
22
  action: function (obj) {
23
23
  return context.remove(obj)
24
24
  }
25
25
  },
26
26
  edit: {
27
27
  separator_before: true,
28
- label: '<span class="icon icon-cog"></span> ' + Spree.translations.edit,
28
+ label: '<i class="icon icon-settings"></i> ' + Spree.translations.edit,
29
29
  action: function () {
30
30
  window.location = editUrl.toString()
31
31
  return window.location
@@ -158,9 +158,16 @@ root.setup_taxonomy_tree = function (taxonomyId) {
158
158
  return $(this).jstree('core').toggle_node($('.jstree-icon').first())
159
159
  })
160
160
  })
161
+
161
162
  $taxonomyTree.on('dblclick', 'a', function () {
162
- $taxonomyTree.jstree('rename', this)
163
+ var iOS = /iPad|iPhone|iPod/.test(navigator.platform || '')
164
+ if (iOS) {
165
+ $taxonomyTree.jstree('show_contextmenu', this)
166
+ } else {
167
+ $taxonomyTree.jstree('rename', this)
168
+ }
163
169
  })
170
+
164
171
  // suppress form submit on enter/return
165
172
  $(document).keypress(function (event) {
166
173
  if (event.keyCode === 13) {
@@ -1,26 +1,35 @@
1
- /* global productTemplate */
1
+ /* global productTemplate, Sortable */
2
2
  $(function () {
3
3
  window.productTemplate = Handlebars.compile($('#product_template').text())
4
4
  var taxonProducts = $('#taxon_products')
5
5
  var taxonId = $('#taxon_id')
6
6
 
7
- taxonProducts.sortable({
8
- handle: '.js-sort-handle'
9
- })
10
-
11
- taxonProducts.on('sortstop', function (event, ui) {
12
- return $.ajax({
13
- url: Spree.routes.classifications_api,
14
- method: 'PUT',
15
- dataType: 'json',
16
- data: {
17
- token: Spree.api_key,
18
- product_id: ui.item.data('product-id'),
19
- taxon_id: $('#taxon_id').val(),
20
- position: ui.item.index()
7
+ var el = document.getElementById('taxon_products')
8
+ if (el) {
9
+ Sortable.create(el, {
10
+ handle: '.sort-handle',
11
+ ghostClass: 'moving-this',
12
+ animation: 550,
13
+ easing: 'cubic-bezier(1, 0, 0, 1)',
14
+ swapThreshold: 0.9,
15
+ forceFallback: true,
16
+ onEnd: function (evt) {
17
+ var itemEl = evt.item.getAttribute('data-product-id')
18
+ var newin = evt.newIndex
19
+ return $.ajax({
20
+ url: Spree.routes.classifications_api,
21
+ method: 'PUT',
22
+ dataType: 'json',
23
+ data: {
24
+ token: Spree.api_key,
25
+ product_id: itemEl,
26
+ taxon_id: $('#taxon_id').val(),
27
+ position: newin
28
+ }
29
+ })
21
30
  }
22
31
  })
23
- })
32
+ }
24
33
 
25
34
  if (taxonId.length > 0) {
26
35
  taxonId.select2({
@@ -22,7 +22,7 @@ $.fn.userAutocomplete = function () {
22
22
  data: function (term) {
23
23
  return {
24
24
  q: {
25
- email_cont: term
25
+ email_start: term
26
26
  },
27
27
  token: Spree.api_key
28
28
  }
@@ -36,7 +36,7 @@ $.fn.variantAutocomplete = function () {
36
36
  data: function (term) {
37
37
  return {
38
38
  q: {
39
- product_name_or_sku_cont: term
39
+ search_by_product_name_or_sku: term
40
40
  },
41
41
  token: Spree.api_key
42
42
  }
@@ -7,7 +7,8 @@ $(function () {
7
7
  $.ajax({
8
8
  type: this.method,
9
9
  url: this.action,
10
- data: $(this).serialize()
10
+ data: $(this).serialize(),
11
+ dataType: 'json'
11
12
  })
12
13
  return false
13
14
  })
@@ -1,13 +1,15 @@
1
1
  //= require modernizr
2
+ //= require purify
3
+ //= require sortable
4
+ //= require flatpickr
2
5
  //= require jquery3
3
6
  //= require popper
4
7
  //= require bootstrap-sprockets
5
8
  //= require handlebars
9
+ //= require cleave
6
10
  //= require js.cookie
7
11
  //= require jquery.jstree/jquery.jstree
8
12
  //= require jquery_ujs
9
- //= require jquery-ui/widgets/datepicker
10
- //= require jquery-ui/widgets/sortable
11
13
  //= require jquery-ui/widgets/autocomplete
12
14
  //= require select2
13
15
  //= require underscore-min.js
@@ -24,6 +26,7 @@
24
26
  //= require spree/backend/handlebar_extensions
25
27
  //= require spree/backend/line_items
26
28
  //= require spree/backend/line_items_on_order_edit
29
+ //= require spree/backend/multi_currency
27
30
  //= require spree/backend/option_type_autocomplete
28
31
  //= require spree/backend/option_value_picker
29
32
  //= require spree/backend/orders/edit
@@ -1,3 +1,7 @@
1
+ .payment-action-save {
2
+ @include button-variant($success, $success, $success );
3
+ }
4
+
1
5
  .btn,
2
6
  .nav-pills > li > a {
3
7
  vertical-align: middle;
@@ -7,19 +11,31 @@
7
11
  .btn {
8
12
  text-align: center;
9
13
 
10
- .glyphicon {
11
- padding-right: 3px;
14
+ .ship {
15
+ color: #fff;
16
+ }
17
+ svg,
18
+ i.icon {
19
+ margin-bottom: 3px;
12
20
  }
13
-
14
- .ship { color: #fff; }
15
21
  }
16
22
 
17
- .btn-sm .glyphicon { padding: 0; }
18
-
19
- .btn.action-void { @extend .btn-danger; }
20
- .btn.action-capture { @extend .btn-success; }
21
- .btn.payment-action-edit {
22
- @extend .btn-primary;
23
+ input#image_attachment >
24
+ input[type="button"],
25
+ input[type="file"]::-webkit-file-upload-button {
26
+ @include border-radius();
27
+ border: 1px solid;
28
+ background-color: white;
29
+ color: $secondary;
30
+ border-color: $secondary;
31
+ padding: 0.375rem 0.75rem;
32
+ &:hover {
33
+ color: white;
34
+ background-color: $secondary;
35
+ }
36
+ }
23
37
 
24
- color: $white !important;
38
+ .actions .btn,
39
+ .page-actions .btn {
40
+ margin: 2px;
25
41
  }
@@ -1,15 +1,31 @@
1
1
  #table-filter {
2
2
  display: none;
3
- border-top-left-radius: 0;
4
- border-top-right-radius: 0;
5
3
  margin-top: 20px;
6
4
  }
7
5
 
6
+ .index-filter-button .icon-chevron-right {
7
+ transform: rotate(0);
8
+ transition: .3s ease-in-out;
9
+ margin-bottom: 0;
10
+ }
11
+
12
+ .collapsed .icon-chevron-right {
13
+ transform: rotate(90deg);
14
+ transition: .3s ease-in-out;
15
+ }
16
+
17
+ .default-filter-icon {
18
+ opacity: 0.1;
19
+ }
20
+
21
+ i.js-delete-filter {
22
+ width: $select2-icon-size;
23
+ height: $select2-icon-size;
24
+ margin-bottom: 0;
25
+ }
26
+
8
27
  .index-filter-button {
9
28
  font-size: $font-size-sm;
10
- .glyphicon {
11
- color: $gray-800;
12
- }
13
29
 
14
30
  button {
15
31
  height: 100%;
@@ -34,3 +50,17 @@
34
50
  border-bottom-left-radius: 0;
35
51
  }
36
52
  }
53
+
54
+ .sort_link {
55
+ .icon, svg {
56
+ margin-left: 5px;
57
+ margin-bottom: 2px;
58
+ width: 0.8rem;
59
+ height: 0.8rem;
60
+
61
+ }
62
+
63
+ svg.default-filter-arrow {
64
+ opacity: 0.1;
65
+ }
66
+ }
@@ -1,5 +1,4 @@
1
- // TODO: Switch everything to use glyphicons
2
- .icon, .glyphicon {
1
+ span.icon, span.glyphicon {
3
2
  vertical-align: text-top;
4
3
  }
5
4
 
@@ -240,8 +239,9 @@ $alias_icons: (plus add)
240
239
  (globe translate)
241
240
  (ok approve);
242
241
 
243
- .icon {
242
+ span.icon {
244
243
  @extend .glyphicon;
244
+ top:2px;
245
245
 
246
246
  // Map defaults.
247
247
  @each $icon in $default_icons {
@@ -254,4 +254,39 @@ $alias_icons: (plus add)
254
254
  $alias: nth($map, 2);
255
255
  &.icon-#{$alias} { @extend .glyphicon-#{$icon}; }
256
256
  }
257
- }
257
+ }
258
+
259
+ // Spree SVG Icon Defaults
260
+ i.icon {
261
+ display: inline-block;
262
+ width: 1rem;
263
+ height: 1rem;
264
+ overflow: hidden;
265
+ vertical-align: middle;
266
+ background-repeat: no-repeat;
267
+ background-size: 100%;
268
+ background-position: center;
269
+ }
270
+
271
+
272
+ // Spree SVG Icons in JS
273
+
274
+ // The icons listed below are used by javascript generated content
275
+ // If you wish to use an existing SVG icon in javascript generated content
276
+ // use <i> tags like this -> <i class="icon icon-close"></i>
277
+ // Using <span> tags will fall back to legacy glyphicon font based icons
278
+
279
+ i.icon-close,
280
+ i.icon-cancel,
281
+ i.icon-delete,
282
+ i.icon-void { background-image: url(asset-path("backend-cancel.svg")); }
283
+ i.icon-save { background-image: url(asset-path("backend-save.svg")); }
284
+ i.icon-add { background-image: url(asset-path("backend-add.svg")); }
285
+ i.icon-search { background-image: url(asset-path("backend-search.svg")); }
286
+ i.icon-settings { background-image: url(asset-path("backend-settings.svg")); }
287
+ i.icon-delete { background-image: url(asset-path("backend-delete.svg")); }
288
+ i.icon-edit { background-image: url(asset-path("backend-edit.svg")); }
289
+ i.icon-chevron-down { background-image: url(asset-path("backend-chevron-down.svg")); }
290
+ i.icon-chevron-left { background-image: url(asset-path("backend-chevron-left.svg")); }
291
+ i.icon-chevron-right { background-image: url(asset-path("backend-chevron-right.svg")); }
292
+ i.icon-chevron-up { background-image: url(asset-path("backend-chevron-up.svg")); }
@@ -1,13 +1,39 @@
1
1
  #main-part {
2
- padding: $spacer ($spacer * 2) 0 ($spacer * 2);
2
+ padding: $spacer ($spacer * 0.5) 0 ($spacer * 0.5);
3
3
  margin-top: 50px;
4
4
  }
5
5
 
6
- .sidebar-minimized #main-part {
7
- padding: $spacer ($spacer * 2) 0 ($spacer * 5);
8
- }
9
-
10
6
  #logo {
11
7
  width: auto;
12
- height: 40px;
8
+ height: 36px;
9
+ }
10
+
11
+ #multi-backdrop {
12
+ z-index: 0;
13
+ height: 0;
14
+ width: 0;
15
+ }
16
+
17
+ body.modal-open #multi-backdrop {
18
+ z-index: 1040;
19
+ width: 100vw;
20
+ height: 100vh;
21
+ }
22
+
23
+ .sort-handle {
24
+ cursor: grab;
25
+ }
26
+
27
+ .no-wrap {
28
+ white-space: nowrap;
29
+ }
30
+
31
+ .card-body {
32
+ padding: 0.75rem;
33
+ }
34
+
35
+ @include media-breakpoint-up(sm) {
36
+ .card-body {
37
+ padding: 1.25rem;
38
+ }
13
39
  }
@@ -2,20 +2,28 @@
2
2
  .navbar {
3
3
  background-color: $navbar-inverse-bg;
4
4
  padding: 0;
5
+ height: 50px;
5
6
 
6
7
  a:hover {
7
8
  text-decoration: none;
8
9
  }
9
- }
10
-
11
- .dropdown-toggle {
12
- &[aria-expanded="true"] {
13
- background-color: $gray-900;
10
+ .btn {
11
+ &:hover,
12
+ &:focus {
13
+ text-decoration: none;
14
+ outline: 0;
15
+ outline: none;
16
+ -webkit-box-shadow: none;
17
+ box-shadow: none;
18
+ }
14
19
  }
15
20
 
16
- &:hover,
17
- &:focus {
18
- text-decoration: none;
21
+ #accountNav {
22
+ i {
23
+ font-size: 1.3em;
24
+ line-height: 1rem;
25
+ }
19
26
  }
27
+
20
28
  }
21
29
  }
@@ -1,85 +1,149 @@
1
- .sidebar {
1
+
2
+ aside#main-sidebar {
2
3
  overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
3
4
  background-color: $gray-100;
4
5
  border-right: 1px solid $gray-200;
5
- margin-top: 50px;
6
- height: calc(100% - 50px);
7
- z-index: 999;
6
+ width: 100%;
7
+ left: -100%;
8
+ margin-top: 0;
9
+ height: 100%;
10
+ transition: 0.3s ease;
11
+ z-index: 1041;
12
+ }
13
+
14
+ body.sidebar-open {
15
+ overflow-x: hidden;
16
+ aside#main-sidebar {
17
+ left:0;
18
+ transition: 0.3s ease;
19
+ }
20
+ .disable-when-main-menu-is-open {
21
+ z-index: 1040 !important;
22
+ }
23
+ }
8
24
 
9
- a.sidebar-submenu-item:hover {
25
+ a.sidebar-submenu-item:hover {
10
26
  text-decoration: none;
11
27
  background-color: $gray-200;
12
28
  cursor: pointer
29
+ }
30
+
31
+ ul.active-option {
32
+ background-color: $gray-200;
33
+ .drop-menu-indicator {
34
+ transform: rotate(-90deg);
13
35
  }
36
+ }
14
37
 
15
- ul.nav-sidebar {
16
- > li {
17
- > a {
18
- color: $gray-700;
38
+ ul.nav-sidebar {
39
+ > li {
40
+ > a {
41
+ color: $gray-700;
19
42
 
20
- &:hover,
21
- &[aria-expanded="true"] {
22
- text-decoration: none;
23
- background-color: $gray-200;
43
+ &:hover,
44
+ &[aria-expanded="true"] {
45
+ text-decoration: none;
46
+ }
47
+
48
+ .drop-menu-indicator {
49
+ right: 1rem;
50
+ }
51
+
52
+ &[aria-expanded="true"] {
53
+ .drop-menu-indicator {
54
+ transform: rotate(-90deg);
55
+ transition: .3s ease-in-out;
24
56
  }
57
+ }
25
58
 
26
- .icon-chevron-left,
27
- .icon-chevron-down {
28
- font-size: .5rem;
29
- line-height: 2;
30
- right: 1rem;
31
- top: 50%;
32
- margin-top: -.5rem;
59
+ &[aria-expanded="false"] {
60
+ .drop-menu-indicator {
61
+ transform: rotate(0deg);
62
+ transition: .3s ease-in-out;
33
63
  }
34
64
  }
35
65
  }
36
66
  }
37
67
  }
38
68
 
39
- #wrapper.sidebar-minimized #main-sidebar {
40
- width: 50px;
41
- overflow: visible;
69
+ #contextualSideMenu {
70
+ max-height: 85vh;
71
+ overflow-x: auto;
72
+ background-color: white;
73
+ position: fixed;
74
+ left:0;
75
+ top: -100%;
76
+ z-index: 1041;
77
+ transition: .3s ease-in-out;
78
+ .page-actions__close {
79
+ margin: -1.5rem -1.5rem 1.5rem;
80
+ }
81
+ }
42
82
 
43
- li {
44
- &:hover, &.menu-active {
45
- background-color: $gray-100;
46
- }
83
+ #contextual-menu-toggle {
84
+ & svg {
85
+ transform:rotate(0deg);
86
+ transition: transform .3s ease-in-out;
47
87
  }
88
+ }
48
89
 
49
- .icon-link, [data-toggle="collapse"] {
50
- text-align: center;
90
+ #sidebar a svg {
91
+ margin-bottom: 3px;
92
+ }
51
93
 
52
- .icon {
53
- padding: 0;
54
- }
94
+ body.contextualSideMenu-open #contextualSideMenu {
95
+ top: 0;
96
+ transition: .3s ease-in-out;
97
+ }
55
98
 
56
- .text, .icon-chevron-left, .icon-chevron-down {
57
- display: none;
58
- }
99
+ body.contextualSideMenu-open #contextual-menu-toggle {
100
+ svg {
101
+ transform:rotate(180deg);
102
+ transition: transform .3s ease-in-out;
59
103
  }
104
+ }
60
105
 
61
- ul.collapse.in {
62
- display: none;
106
+ .contextual-title {
107
+ font-size:1.25rem;
108
+ }
109
+
110
+ @include media-breakpoint-up(sm) {
111
+ aside#main-sidebar {
112
+ width: 50%;
63
113
  }
114
+ }
64
115
 
65
- .submenu-active {
66
- display: block !important;
67
- height: auto !important;
68
- position: fixed;
69
- top: 50px;
70
- bottom: 0;
71
- left: 0;
72
- padding: 0;
116
+ @include media-breakpoint-up(md) {
117
+ aside#main-sidebar {
118
+ width: 30%;
119
+ }
120
+ }
121
+
122
+ @include media-breakpoint-up(lg) {
123
+
124
+ #contextualSideMenu {
125
+ border: none;
126
+ height: max-content;
73
127
  z-index: 1000;
74
- display: block;
75
- overflow-x: hidden;
76
- overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
77
- left: 50px;
78
- min-width: 180px;
79
- visibility: visible;
80
- background-color: $gray-100;
81
- border-top: none;
82
- border-right: 1px solid $gray-200;
83
- padding-top: 5px;
128
+ position: sticky;
129
+ top: 75px;
130
+ transition: none;
131
+ }
132
+ aside#main-sidebar {
133
+ left: 0;
134
+ z-index: 999;
135
+ margin-top: 50px;
136
+ height: calc(100% - 50px);
137
+ transition: none;
138
+ body.sidebar-open {
139
+ aside#main-sidebar {
140
+ left:0;
141
+ transition: none;
142
+ }
143
+ }
144
+ }
145
+
146
+ .contextual-title {
147
+ font-size:1.5rem;
84
148
  }
85
149
  }