solidus_backend 1.1.4 → 1.2.0.beta1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_backend might be problematic. Click here for more details.

Files changed (205) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/solidus-style-guide-logo.png +0 -0
  3. data/app/assets/javascripts/spree/backend/admin.js.erb +1 -7
  4. data/app/assets/javascripts/spree/backend/checkouts/edit.js +2 -2
  5. data/app/assets/javascripts/spree/backend/navigation.coffee +10 -0
  6. data/app/assets/javascripts/spree/backend/option_type_autocomplete.js.erb +6 -6
  7. data/app/assets/javascripts/spree/backend/option_value_picker.js +6 -6
  8. data/app/assets/javascripts/spree/backend/product_picker.js +6 -6
  9. data/app/assets/javascripts/spree/backend/shipments.js.erb +17 -3
  10. data/app/assets/javascripts/spree/backend/stock_movement.js.coffee +2 -2
  11. data/app/assets/javascripts/spree/backend/style_guide.coffee +2 -0
  12. data/app/assets/javascripts/spree/backend/taxon_autocomplete.js.erb +6 -6
  13. data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +82 -109
  14. data/app/assets/javascripts/spree/backend/taxons.js.coffee +4 -5
  15. data/app/assets/javascripts/spree/backend/user_picker.js +8 -8
  16. data/app/assets/javascripts/spree/backend/variant_autocomplete.js.coffee.erb +3 -3
  17. data/app/assets/javascripts/spree/backend.js +3 -6
  18. data/app/assets/stylesheets/spree/backend/components/_messages.scss +1 -4
  19. data/app/assets/stylesheets/spree/backend/components/_navigation.scss +99 -115
  20. data/app/assets/stylesheets/spree/backend/components/_progress.scss +1 -1
  21. data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +6 -0
  22. data/app/assets/stylesheets/spree/backend/globals/_variables.scss +18 -0
  23. data/app/assets/stylesheets/spree/backend/globals/mixins/_caret.scss +35 -0
  24. data/app/assets/stylesheets/spree/backend/plugins/_powertip.scss +1 -0
  25. data/app/assets/stylesheets/spree/backend/sections/_style_guide.scss +132 -0
  26. data/app/assets/stylesheets/spree/backend/sections/_taxonomies.scss +60 -0
  27. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +2 -0
  28. data/app/assets/stylesheets/spree/backend/shared/_layout.scss +36 -4
  29. data/app/assets/stylesheets/spree/backend/shared/_typography.scss +3 -6
  30. data/app/assets/stylesheets/spree/backend/spree_admin.scss +4 -1
  31. data/app/assets/stylesheets/spree/backend.css +1 -1
  32. data/app/controllers/spree/admin/orders_controller.rb +6 -6
  33. data/app/controllers/spree/admin/payment_methods_controller.rb +1 -1
  34. data/app/controllers/spree/admin/payments_controller.rb +1 -1
  35. data/app/controllers/spree/admin/products_controller.rb +0 -1
  36. data/app/controllers/spree/admin/reports_controller.rb +2 -2
  37. data/app/controllers/spree/admin/search_controller.rb +9 -7
  38. data/app/controllers/spree/admin/stock_transfers_controller.rb +6 -14
  39. data/app/controllers/spree/admin/style_guide_controller.rb +33 -0
  40. data/app/helpers/spree/admin/adjustments_helper.rb +2 -6
  41. data/app/helpers/spree/admin/base_helper.rb +7 -6
  42. data/app/helpers/spree/admin/navigation_helper.rb +12 -5
  43. data/app/helpers/spree/admin/orders_helper.rb +1 -1
  44. data/app/helpers/spree/admin/products_helper.rb +2 -4
  45. data/app/helpers/spree/admin/stock_movements_helper.rb +3 -3
  46. data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
  47. data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +1 -1
  48. data/app/views/spree/admin/customer_returns/_return_item_selection.html.erb +1 -1
  49. data/app/views/spree/admin/customer_returns/edit.html.erb +1 -1
  50. data/app/views/spree/admin/images/edit.html.erb +1 -3
  51. data/app/views/spree/admin/images/index.html.erb +0 -2
  52. data/app/views/spree/admin/option_types/edit.html.erb +2 -4
  53. data/app/views/spree/admin/option_types/index.html.erb +0 -2
  54. data/app/views/spree/admin/option_types/new.html.erb +0 -2
  55. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +1 -1
  56. data/app/views/spree/admin/orders/index.html.erb +1 -1
  57. data/app/views/spree/admin/product_properties/index.html.erb +0 -1
  58. data/app/views/spree/admin/products/edit.html.erb +0 -2
  59. data/app/views/spree/admin/products/index.html.erb +2 -4
  60. data/app/views/spree/admin/products/new.html.erb +0 -2
  61. data/app/views/spree/admin/promotion_categories/edit.html.erb +0 -2
  62. data/app/views/spree/admin/promotion_categories/index.html.erb +0 -2
  63. data/app/views/spree/admin/promotion_categories/new.html.erb +0 -2
  64. data/app/views/spree/admin/promotions/actions/_create_adjustment.html.erb +2 -28
  65. data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +2 -26
  66. data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb +28 -0
  67. data/app/views/spree/admin/promotions/edit.html.erb +0 -2
  68. data/app/views/spree/admin/promotions/index.html.erb +0 -2
  69. data/app/views/spree/admin/promotions/new.html.erb +0 -2
  70. data/app/views/spree/admin/properties/edit.html.erb +0 -2
  71. data/app/views/spree/admin/properties/index.html.erb +2 -4
  72. data/app/views/spree/admin/properties/new.html.erb +0 -2
  73. data/app/views/spree/admin/properties/new.js.erb +1 -1
  74. data/app/views/spree/admin/prototypes/edit.html.erb +0 -2
  75. data/app/views/spree/admin/prototypes/index.html.erb +0 -2
  76. data/app/views/spree/admin/prototypes/new.html.erb +0 -2
  77. data/app/views/spree/admin/reimbursements/edit.html.erb +2 -2
  78. data/app/views/spree/admin/reimbursements/show.html.erb +9 -9
  79. data/app/views/spree/admin/return_authorizations/_form.html.erb +16 -16
  80. data/app/views/spree/admin/search/users.rabl +1 -1
  81. data/app/views/spree/admin/shared/_head.html.erb +11 -0
  82. data/app/views/spree/admin/shared/_header.html.erb +4 -8
  83. data/app/views/spree/admin/shared/_menu.html.erb +4 -8
  84. data/app/views/spree/admin/shared/_navigation.html.erb +9 -0
  85. data/app/views/spree/admin/shared/_navigation_footer.html.erb +3 -0
  86. data/app/views/spree/admin/shared/_product_sub_menu.html.erb +20 -22
  87. data/app/views/spree/admin/shared/_promotion_sub_menu.html.erb +8 -10
  88. data/app/views/spree/admin/shared/_stock_sub_menu.html.erb +8 -10
  89. data/app/views/spree/admin/shared/_tabs.html.erb +9 -3
  90. data/app/views/spree/admin/shipping_methods/_form.html.erb +2 -2
  91. data/app/views/spree/admin/stock_items/index.html.erb +1 -2
  92. data/app/views/spree/admin/stock_transfers/edit.html.erb +0 -1
  93. data/app/views/spree/admin/stock_transfers/index.html.erb +0 -3
  94. data/app/views/spree/admin/stock_transfers/new.html.erb +0 -2
  95. data/app/views/spree/admin/stock_transfers/receive.html.erb +0 -2
  96. data/app/views/spree/admin/stock_transfers/show.html.erb +0 -2
  97. data/app/views/spree/admin/stock_transfers/tracking_info.html.erb +0 -2
  98. data/app/views/spree/admin/style_guide/index.html.erb +5 -0
  99. data/app/views/spree/admin/style_guide/topics/forms/_building_forms.html.erb +79 -0
  100. data/app/views/spree/admin/style_guide/topics/forms/_validation.html.erb +14 -0
  101. data/app/views/spree/admin/style_guide/topics/messaging/_flashes.html.erb +13 -0
  102. data/app/views/spree/admin/style_guide/topics/messaging/_loading.html.erb +20 -0
  103. data/app/views/spree/admin/style_guide/topics/messaging/_tooltips.html.erb +16 -0
  104. data/app/views/spree/admin/style_guide/topics/tables/_building_tables.html.erb +44 -0
  105. data/app/views/spree/admin/style_guide/topics/tables/_pagination.html.erb +11 -0
  106. data/app/views/spree/admin/style_guide/topics/typography/_colors.html.erb +64 -0
  107. data/app/views/spree/admin/style_guide/topics/typography/_fonts.html.erb +19 -0
  108. data/app/views/spree/admin/style_guide/topics/typography/_icons.html.erb +13 -0
  109. data/app/views/spree/admin/style_guide/topics/typography/_lists.html.erb +25 -0
  110. data/app/views/spree/admin/style_guide/topics/typography/_tags.html.erb +25 -0
  111. data/app/views/spree/admin/taxonomies/_js_head.html.erb +0 -0
  112. data/app/views/spree/admin/taxonomies/edit.erb +5 -6
  113. data/app/views/spree/admin/taxonomies/index.html.erb +0 -2
  114. data/app/views/spree/admin/taxonomies/new.html.erb +0 -2
  115. data/app/views/spree/admin/taxons/_form.html.erb +1 -1
  116. data/app/views/spree/admin/taxons/_list_template.html.erb +17 -0
  117. data/app/views/spree/admin/taxons/index.html.erb +0 -3
  118. data/app/views/spree/admin/users/orders.html.erb +1 -1
  119. data/app/views/spree/admin/variants/edit.html.erb +0 -2
  120. data/app/views/spree/admin/variants/index.html.erb +0 -2
  121. data/app/views/spree/layouts/admin.html.erb +3 -4
  122. data/app/views/spree/layouts/admin_style_guide.html.erb +58 -0
  123. data/config/routes.rb +4 -2
  124. data/lib/spree/backend/engine.rb +0 -1
  125. data/lib/spree/backend.rb +0 -3
  126. data/solidus_backend.gemspec +5 -7
  127. data/spec/controllers/spree/admin/missing_products_controller_spec.rb +1 -1
  128. data/spec/controllers/spree/admin/orders_controller_spec.rb +14 -14
  129. data/spec/controllers/spree/admin/payment_methods_controller_spec.rb +2 -4
  130. data/spec/controllers/spree/admin/payments_controller_spec.rb +2 -2
  131. data/spec/controllers/spree/admin/products_controller_spec.rb +3 -3
  132. data/spec/controllers/spree/admin/reports_controller_spec.rb +4 -4
  133. data/spec/controllers/spree/admin/return_authorizations_controller_spec.rb +1 -1
  134. data/spec/controllers/spree/admin/shipping_methods_controller_spec.rb +1 -1
  135. data/spec/controllers/spree/admin/stock_locations_controller_spec.rb +1 -1
  136. data/spec/controllers/spree/admin/stock_transfers_controller_spec.rb +13 -11
  137. data/spec/features/admin/configuration/general_settings_spec.rb +10 -7
  138. data/spec/features/admin/configuration/payment_methods_spec.rb +1 -1
  139. data/spec/features/admin/configuration/shipping_methods_spec.rb +1 -1
  140. data/spec/features/admin/configuration/states_spec.rb +1 -1
  141. data/spec/features/admin/configuration/tax_rates_spec.rb +6 -7
  142. data/spec/features/admin/configuration/taxonomies_spec.rb +3 -3
  143. data/spec/features/admin/homepage_spec.rb +6 -6
  144. data/spec/features/admin/orders/cancelling_and_resuming_spec.rb +4 -8
  145. data/spec/features/admin/orders/customer_details_spec.rb +9 -8
  146. data/spec/features/admin/orders/line_items_spec.rb +1 -1
  147. data/spec/features/admin/orders/listing_spec.rb +2 -2
  148. data/spec/features/admin/orders/log_entries_spec.rb +3 -3
  149. data/spec/features/admin/orders/new_order_spec.rb +3 -15
  150. data/spec/features/admin/orders/order_details_spec.rb +17 -20
  151. data/spec/features/admin/orders/payments_spec.rb +10 -10
  152. data/spec/features/admin/orders/shipments_spec.rb +2 -2
  153. data/spec/features/admin/products/edit/images_spec.rb +5 -3
  154. data/spec/features/admin/products/edit/products_spec.rb +11 -11
  155. data/spec/features/admin/products/edit/taxons_spec.rb +14 -38
  156. data/spec/features/admin/products/edit/variants_spec.rb +3 -3
  157. data/spec/features/admin/products/option_types_spec.rb +22 -21
  158. data/spec/features/admin/products/products_spec.rb +15 -12
  159. data/spec/features/admin/products/properties_spec.rb +3 -3
  160. data/spec/features/admin/products/prototypes_spec.rb +4 -4
  161. data/spec/features/admin/products/stock_management_spec.rb +5 -5
  162. data/spec/features/admin/products/variant_spec.rb +8 -8
  163. data/spec/features/admin/promotion_adjustments_spec.rb +6 -13
  164. data/spec/features/admin/promotions/option_value_rule_spec.rb +0 -20
  165. data/spec/features/admin/reports_spec.rb +2 -2
  166. data/spec/features/admin/stock_transfer_spec.rb +3 -3
  167. data/spec/features/admin/store_credits_spec.rb +2 -2
  168. data/spec/features/admin/users_spec.rb +6 -6
  169. data/spec/helpers/admin/navigation_helper_spec.rb +5 -0
  170. data/spec/helpers/admin/reimbursements_helper_spec.rb +1 -1
  171. data/spec/helpers/admin/store_credit_events_helper_spec.rb +1 -1
  172. data/spec/spec_helper.rb +3 -1
  173. data/spec/support/feature/base_feature_helper.rb +10 -0
  174. data/vendor/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  175. data/vendor/assets/images/jquery-ui/ui-bg_flat_0_eeeeee_40x100.png +0 -0
  176. data/vendor/assets/images/jquery-ui/ui-bg_flat_55_ffffff_40x100.png +0 -0
  177. data/vendor/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  178. data/vendor/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  179. data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_100_f6f6f6_1x100.png +0 -0
  180. data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
  181. data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_50_dddddd_1x100.png +0 -0
  182. data/vendor/assets/images/jquery-ui/ui-icons_0073ea_256x240.png +0 -0
  183. data/vendor/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  184. data/vendor/assets/images/jquery-ui/ui-icons_666666_256x240.png +0 -0
  185. data/vendor/assets/images/jquery-ui/ui-icons_ff0084_256x240.png +0 -0
  186. data/vendor/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
  187. data/vendor/assets/javascripts/jquery.powertip.js +792 -423
  188. data/vendor/assets/javascripts/jquery.sticky-kit.min.js +10 -0
  189. data/vendor/assets/javascripts/prism.js +7 -0
  190. data/vendor/assets/stylesheets/prism.css +139 -0
  191. metadata +44 -51
  192. data/app/assets/stylesheets/spree/backend/plugins/_jstree.scss +0 -135
  193. data/app/views/spree/admin/shared/_sub_menu.html.erb +0 -9
  194. data/spec/features/admin/promotions/user_rule_spec.rb +0 -25
  195. data/vendor/assets/javascripts/equalize.js +0 -41
  196. data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +0 -4540
  197. data/vendor/assets/javascripts/jquery.jstree/themes/apple/bg.jpg +0 -0
  198. data/vendor/assets/javascripts/jquery.jstree/themes/apple/d.png +0 -0
  199. data/vendor/assets/javascripts/jquery.jstree/themes/apple/dot_for_ie.gif +0 -0
  200. data/vendor/assets/javascripts/jquery.jstree/themes/apple/style.scss +0 -61
  201. data/vendor/assets/javascripts/jquery.jstree/themes/apple/throbber.gif +0 -0
  202. data/vendor/assets/javascripts/jquery.vAlign.js +0 -11
  203. data/vendor/assets/javascripts/modernizr.js +0 -4
  204. data/vendor/assets/javascripts/responsive-tables.js +0 -42
  205. data/vendor/assets/stylesheets/responsive-tables.css +0 -21
@@ -0,0 +1,28 @@
1
+ <div class="calculator-fields row">
2
+
3
+ <div class="field alpha four columns">
4
+ <% field_name = "#{param_prefix}[calculator_type]" %>
5
+ <%= label_tag field_name, Spree.t(:calculator) %>
6
+ <%= select_tag field_name,
7
+ options_from_collection_for_select(calculators, :to_s, :description, promotion_action.calculator.type),
8
+ :class => 'type-select select2 fullwidth' %>
9
+ <% if promotion_action.calculator.respond_to?(:preferences) %>
10
+ <span class="warning info"><%= Spree.t(:calculator_settings_warning) %></span>
11
+ <% end %>
12
+ </div>
13
+
14
+ <% unless promotion_action.new_record? %>
15
+ <div class="settings field omega four columns">
16
+ <% type_name = promotion_action.calculator.type.demodulize.underscore %>
17
+ <% if lookup_context.exists?("fields",
18
+ ["spree/admin/promotions/calculators/#{type_name}"], true) %>
19
+ <%= render "spree/admin/promotions/calculators/#{type_name}/fields",
20
+ calculator: promotion_action.calculator, prefix: param_prefix %>
21
+ <% else %>
22
+ <%= render "spree/admin/promotions/calculators/default_fields",
23
+ calculator: promotion_action.calculator, prefix: param_prefix %>
24
+ <% end %>
25
+ <%= hidden_field_tag "#{param_prefix}[calculator_attributes][id]", promotion_action.calculator.id %>
26
+ </div>
27
+ <% end %>
28
+ </div>
@@ -2,8 +2,6 @@
2
2
  <%= Spree.t(:editing_promotion) %>
3
3
  <% end %>
4
4
 
5
- <%= render 'spree/admin/shared/promotion_sub_menu' %>
6
-
7
5
  <% content_for :page_actions do %>
8
6
  <li>
9
7
  <%= button_link_to Spree.t(:back_to_promotions_list), admin_promotions_path, :icon => 'arrow-left' %>
@@ -10,8 +10,6 @@
10
10
  <% end %>
11
11
  <% end %>
12
12
 
13
- <%= render 'spree/admin/shared/promotion_sub_menu' %>
14
-
15
13
  <% content_for :table_filter_title do %>
16
14
  <%= Spree.t(:search) %>
17
15
  <% end %>
@@ -2,8 +2,6 @@
2
2
  <%= Spree.t(:new_promotion) %>
3
3
  <% end %>
4
4
 
5
- <%= render 'spree/admin/shared/promotion_sub_menu' %>
6
-
7
5
  <%= form_for :promotion, :url => collection_url do |f| %>
8
6
  <fieldset class="no-border-top">
9
7
  <%= render :partial => 'form', :locals => { :f => f } %>
@@ -1,5 +1,3 @@
1
- <%= render :partial => 'spree/admin/shared/product_sub_menu' %>
2
-
3
1
  <% content_for :page_title do %>
4
2
  <%= Spree.t(:editing_property) %>
5
3
  <% end %>
@@ -5,13 +5,11 @@
5
5
  <% content_for :page_actions do %>
6
6
  <% if can?(:create, Spree::Property) %>
7
7
  <li id="new_property_link">
8
- <%= button_link_to Spree.t(:new_property), new_admin_property_url, { :remote => true, :icon => 'plus', 'data-update' => 'new_property', :id => 'new_property_link' } %>
8
+ <%= button_link_to Spree.t(:new_property), new_admin_property_url, { :remote => true, :icon => 'plus', 'data-update' => 'new_property_container', :id => 'new_property_link' } %>
9
9
  </li>
10
10
  <% end %>
11
11
  <% end %>
12
12
 
13
- <%= render 'spree/admin/shared/product_sub_menu' %>
14
-
15
13
  <% content_for :table_filter_title do %>
16
14
  <%= Spree.t(:search) %>
17
15
  <% end %>
@@ -41,7 +39,7 @@
41
39
  </div>
42
40
  <% end %>
43
41
 
44
- <div id="new_property"></div>
42
+ <div id="new_property_container"></div>
45
43
 
46
44
  <% if @properties.any? %>
47
45
  <table class="index" id='listing_properties' data-hook>
@@ -1,5 +1,3 @@
1
- <%= render :partial => 'spree/admin/shared/product_sub_menu' %>
2
-
3
1
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @property } %>
4
2
 
5
3
  <%= form_for [:admin, @property] do |f| %>
@@ -1,2 +1,2 @@
1
- $("#new_property").html('<%= escape_javascript(render :template => "spree/admin/properties/new", :formats => [:html], :handlers => [:erb]) %>');
1
+ $("#new_property_container").html('<%= escape_javascript(render :template => "spree/admin/properties/new", :formats => [:html], :handlers => [:erb]) %>');
2
2
  $("#new_property_link").parent().hide();
@@ -1,5 +1,3 @@
1
- <%= render :partial => 'spree/admin/shared/product_sub_menu' %>
2
-
3
1
  <% content_for :page_title do %>
4
2
  <%= Spree.t(:editing_prototype) %>
5
3
  <% end %>
@@ -10,8 +10,6 @@
10
10
  <% end %>
11
11
  <% end %>
12
12
 
13
- <%= render 'spree/admin/shared/product_sub_menu' %>
14
-
15
13
  <%= image_tag 'select2-spinner.gif', :plugin => 'spree', :style => 'display: none', :id => 'busy_indicator' %>
16
14
 
17
15
  <%# Placeholder for new prototype form %>
@@ -1,5 +1,3 @@
1
- <%= render :partial => 'spree/admin/shared/product_sub_menu' %>
2
-
3
1
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @prototype } %>
4
2
 
5
3
  <%= form_for [:admin, @prototype] do |f| %>
@@ -13,7 +13,7 @@
13
13
  <%= form_for [:admin, @order, @reimbursement] do |f| %>
14
14
  <fieldset class='no-border-bottom'>
15
15
  <legend align='center'><%= Spree.t(:items_to_be_reimbursed) %></legend>
16
- <table class="index reimbursement-return-items-table">
16
+ <table class="index reimbursement-return-items">
17
17
  <thead>
18
18
  <tr>
19
19
  <th><%= Spree.t(:product) %></th>
@@ -73,7 +73,7 @@
73
73
 
74
74
  <fieldset>
75
75
  <legend align='center'><%= Spree.t(:calculated_reimbursements) %></legend>
76
- <table class="index">
76
+ <table class="index calculated-reimbursements">
77
77
  <thead data-hook="customer_return_header">
78
78
  <tr>
79
79
  <th><%= Spree.t(:reimbursement_type) %></th>
@@ -12,7 +12,7 @@
12
12
 
13
13
  <fieldset class='no-border-bottom'>
14
14
  <legend align='center'><%= Spree.t(:items_reimbursed) %></legend>
15
- <table class="index reimbursement-reimbursement-items-table">
15
+ <table class="index reimbursement-reimbursement-items">
16
16
  <thead>
17
17
  <tr>
18
18
  <th><%= Spree.t(:product) %></th>
@@ -55,7 +55,7 @@
55
55
 
56
56
  <fieldset class="no-border-bottom">
57
57
  <legend align='center'><%= Spree.t(:refunds) %></legend>
58
- <table class="index">
58
+ <table class="index reimbursement-refunds">
59
59
  <thead data-hook="customer_return_header">
60
60
  <tr>
61
61
  <th><%= Spree.t(:description) %></th>
@@ -64,9 +64,9 @@
64
64
  </thead>
65
65
  <tbody>
66
66
  <% @reimbursement.refunds.each do |refund| %>
67
- <tr id="<%= spree_dom_id(refund) %>" data-hook="reimbursement_refund_row" class="<%= cycle('odd', 'even')%>">
68
- <td><%= refund.description %></td>
69
- <td><%= refund.display_amount %></td>
67
+ <tr id="<%= spree_dom_id(refund) %>" data-hook="reimbursement_refund_row" class="reimbursement-refund <%= cycle('odd', 'even')%>">
68
+ <td class="reimbursement-refund-description"><%= refund.description %></td>
69
+ <td class="reimbursement-refund-amount"><%= refund.display_amount %></td>
70
70
  </tr>
71
71
  <% end %>
72
72
  </tbody>
@@ -75,7 +75,7 @@
75
75
 
76
76
  <fieldset class="no-border-bottom">
77
77
  <legend align='center'><%= Spree.t(:credits) %></legend>
78
- <table class="index">
78
+ <table class="index reimbursement-credits">
79
79
  <thead data-hook="customer_return_header">
80
80
  <tr>
81
81
  <th><%= Spree.t(:description) %></th>
@@ -84,9 +84,9 @@
84
84
  </thead>
85
85
  <tbody>
86
86
  <% @reimbursement.credits.each do |credit| %>
87
- <tr id="<%= spree_dom_id(credit) %>" data-hook="reimbursement_refund_row" class="<%= cycle('odd', 'even')%>">
88
- <td><%= credit.description %></td>
89
- <td><%= credit.display_amount %></td>
87
+ <tr id="<%= spree_dom_id(credit) %>" data-hook="reimbursement_refund_row" class="reimbursement-credit <%= cycle('odd', 'even')%>">
88
+ <td class="reimbursement-credit-description"><%= credit.description %></td>
89
+ <td class="reimbursement-credit-amount"><%= credit.display_amount %></td>
90
90
  </tr>
91
91
  <% end %>
92
92
  </tbody>
@@ -4,18 +4,18 @@
4
4
  <table class="index return-items-table">
5
5
  <thead>
6
6
  <tr data-hook="rma_header">
7
- <th>
7
+ <th class="return-item-checkbox">
8
8
  <% if allow_return_item_changes %>
9
9
  <%= check_box_tag 'select-all' %>
10
10
  <% end %>
11
11
  </th>
12
- <th><%= Spree.t(:product) %></th>
13
- <th><%= Spree.t(:state) %></th>
14
- <th><%= Spree.t(:charged) %></th>
15
- <th><%= Spree.t(:pre_tax_refund_amount) %></th>
16
- <th><%= Spree.t(:reimbursement_type) %></th>
17
- <th><%= Spree.t(:exchange_for) %></th>
18
- <th><%= Spree.t(:reason) %></th>
12
+ <th class="return-item-product"><%= Spree.t(:product) %></th>
13
+ <th class="return-item-state"><%= Spree.t(:state) %></th>
14
+ <th class="return-item-charged"><%= Spree.t(:charged) %></th>
15
+ <th class="return-item-pre-tax-refund-amount"><%= Spree.t(:pre_tax_refund_amount) %></th>
16
+ <th class="return-item-reimbursement-type"><%= Spree.t(:reimbursement_type) %></th>
17
+ <th class="return-item-exchange-for"><%= Spree.t(:exchange_for) %></th>
18
+ <th class="return-item-reason"><%= Spree.t(:reason) %></th>
19
19
  </tr>
20
20
  </thead>
21
21
  <tbody>
@@ -24,42 +24,42 @@
24
24
  <% inventory_unit = return_item.inventory_unit %>
25
25
  <% editable = inventory_unit.shipped? && !inventory_unit.exchange_requested? && allow_return_item_changes && return_item.reimbursement.nil? %>
26
26
  <tr>
27
- <td class="align-center" class="inventory-unit-checkbox">
27
+ <td class="return-item-checkbox align-center inventory-unit-checkbox">
28
28
  <% if editable %>
29
29
  <%= item_fields.hidden_field :inventory_unit_id %>
30
30
  <%= item_fields.check_box :_destroy, {checked: return_item.persisted?, class: 'add-item', "data-price" => return_item.pre_tax_amount}, '0', '1' %>
31
31
  <% end %>
32
32
  </td>
33
- <td>
33
+ <td class="return-item-product">
34
34
  <div class="variant-name"><%= inventory_unit.variant.name %></div>
35
35
  <div class="variant-options"><%= inventory_unit.variant.options_text %></div>
36
36
  </td>
37
- <td class="align-center"><%= inventory_unit.state.humanize %></td>
38
- <td class="align-center">
37
+ <td class="return-item-state align-center"><%= inventory_unit.state.humanize %></td>
38
+ <td class="return-item-charged align-center">
39
39
  <%= return_item.display_pre_tax_amount %>
40
40
  </td>
41
- <td class="align-center">
41
+ <td class="return-item-pre-tax-refund-amount align-center">
42
42
  <% if editable %>
43
43
  <%= item_fields.text_field :pre_tax_amount, { class: 'refund-amount-input' } %>
44
44
  <% else %>
45
45
  <%= return_item.display_pre_tax_amount %>
46
46
  <% end %>
47
47
  </td>
48
- <td>
48
+ <td class="return-item-reimbursement-type">
49
49
  <% if editable %>
50
50
  <%= item_fields.select :preferred_reimbursement_type_id, @reimbursement_types.collect{|r|[r.name.humanize, r.id]}, {include_blank: true}, {class: 'select2 fullwidth'} %>
51
51
  <% else %>
52
52
  <%= return_item.preferred_reimbursement_type.try(:name) %>
53
53
  <% end %>
54
54
  </td>
55
- <td class="align-center">
55
+ <td class="return-item-exchange-for align-center">
56
56
  <% if editable %>
57
57
  <%= item_fields.collection_select :exchange_variant_id, return_item.eligible_exchange_variants(@stock_locations), :id, :options_text, { include_blank: true }, { class: "select2 fullwidth return-item-exchange-selection" } %>
58
58
  <% elsif return_item.exchange_processed? %>
59
59
  <%= return_item.exchange_variant.options_text %>
60
60
  <% end %>
61
61
  </td>
62
- <td>
62
+ <td class="return-item-reason">
63
63
  <% if editable %>
64
64
  <%= item_fields.select :return_reason_id, @reasons.collect{|r|[r.name, r.id]}, {include_blank: true}, {class: 'select2 fullwidth'} %>
65
65
  <% else %>
@@ -1,4 +1,4 @@
1
- collection(@users => :users)
1
+ collection(@users)
2
2
  attributes :email, :id
3
3
  address_fields = [:firstname, :lastname,
4
4
  :address1, :address2,
@@ -16,6 +16,17 @@
16
16
 
17
17
  <%= stylesheet_link_tag 'spree/backend/all' %>
18
18
 
19
+ <%- if Rails.env.test? %>
20
+ <style>
21
+ /* A fixed position notification can intermittently be in the way of click targets.
22
+ Capybara uses `Element.scrollIntoView()` internally, but this only scrolls as far
23
+ as it must, which means a bottom of page notification will obstruct interactions.
24
+ */
25
+ .flash-wrapper { position: static; }
26
+ </style>
27
+ <%- end %>
28
+
29
+
19
30
  <%= javascript_include_tag 'spree/backend/all' %>
20
31
 
21
32
  <%= render "spree/admin/shared/translations" %>
@@ -1,9 +1,5 @@
1
- <header id="header" data-hook>
2
- <div class="container">
3
- <figure data-hook="logo-wrapper" class="columns five">
4
- <%= link_to image_tag(Spree::Config[:admin_interface_logo], :id => 'logo'), spree.admin_path %>
5
- </figure>
6
-
7
- <nav data-hook="admin_login_navigation_bar" class="columns eleven"></nav>
8
- </div>
1
+ <header class="admin-nav-header">
2
+ <%= link_to spree.admin_path, class: 'brand-link' do %>
3
+ <%= image_tag(Spree::Config[:admin_interface_logo]) %>
4
+ <%- end %>
9
5
  </header>
@@ -1,9 +1,5 @@
1
- <nav id="admin-menu" data-hook>
2
- <div class="container">
3
- <div class="sixteen columns main-menu-wrapper">
4
- <ul data-hook="admin_tabs" class="fullwidth-menu">
5
- <%= render :partial => 'spree/admin/shared/tabs' %>
6
- </ul>
7
- </div>
8
- </div>
1
+ <nav class="admin-nav-menu">
2
+ <ul data-hook="admin_tabs">
3
+ <%= render partial: 'spree/admin/shared/tabs' %>
4
+ </ul>
9
5
  </nav>
@@ -0,0 +1,9 @@
1
+ <div class="admin-nav">
2
+ <%= render partial: 'spree/admin/shared/header' %>
3
+ <div class="admin-nav-sticky">
4
+ <%= render partial: 'spree/admin/shared/menu' %>
5
+ <div class="admin-nav-footer">
6
+ <%= render partial: 'spree/admin/shared/navigation_footer' %>
7
+ </div>
8
+ </div>
9
+ </div>
@@ -0,0 +1,3 @@
1
+ <!-- solidus_auth_devise inserts a login_nav here.
2
+ <ul id="login-nav" class="admin-login-nav"></ul>
3
+ -->
@@ -1,22 +1,20 @@
1
- <% content_for :sub_menu do %>
2
- <ul id="sub_nav" data-hook="admin_product_sub_tabs" class="inline-menu">
3
- <% if can? :admin, Spree::Product %>
4
- <%= tab :products, :match_path => '/products' %>
5
- <% end %>
6
- <% if can? :admin, Spree::OptionType %>
7
- <%= tab :option_types, :match_path => '/option_types' %>
8
- <% end %>
9
- <% if can? :admin, Spree::Property %>
10
- <%= tab :properties %>
11
- <% end %>
12
- <% if can? :admin, Spree::Prototype %>
13
- <%= tab :prototypes %>
14
- <% end %>
15
- <% if can? :admin, Spree::Taxonomy %>
16
- <%= tab :taxonomies %>
17
- <% end %>
18
- <% if can? :admin, Spree::Taxon %>
19
- <%= tab :taxons %>
20
- <% end %>
21
- </ul>
22
- <% end %>
1
+ <ul id="sub_nav" class="admin-subnav" data-hook="admin_product_sub_tabs">
2
+ <% if can? :admin, Spree::Product %>
3
+ <%= tab :products, match_path: '/products' %>
4
+ <% end %>
5
+ <% if can? :admin, Spree::OptionType %>
6
+ <%= tab :option_types, match_path: '/option_types' %>
7
+ <% end %>
8
+ <% if can? :admin, Spree::Property %>
9
+ <%= tab :properties %>
10
+ <% end %>
11
+ <% if can? :admin, Spree::Prototype %>
12
+ <%= tab :prototypes %>
13
+ <% end %>
14
+ <% if can? :admin, Spree::Taxonomy %>
15
+ <%= tab :taxonomies %>
16
+ <% end %>
17
+ <% if can? :admin, Spree::Taxon %>
18
+ <%= tab :taxons %>
19
+ <% end %>
20
+ </ul>
@@ -1,10 +1,8 @@
1
- <% content_for :sub_menu do %>
2
- <ul id="sub_nav" data-hook="admin_promotion_sub_tabs" class="inline-menu">
3
- <% if can? :admin, Spree::Promotion %>
4
- <%= tab :promotions %>
5
- <% end %>
6
- <% if can? :admin, Spree::PromotionCategory %>
7
- <%= tab :promotion_categories %>
8
- <% end %>
9
- </ul>
10
- <% end %>
1
+ <ul id="sub_nav" class="admin-subnav" data-hook="admin_promotion_sub_tabs">
2
+ <% if can? :admin, Spree::Promotion %>
3
+ <%= tab :promotions %>
4
+ <% end %>
5
+ <% if can? :admin, Spree::PromotionCategory %>
6
+ <%= tab :promotion_categories %>
7
+ <% end %>
8
+ </ul>
@@ -1,10 +1,8 @@
1
- <% content_for :sub_menu do %>
2
- <ul id="sub_nav" data-hook="admin_stock_transfer_sub_tabs" class="inline-menu">
3
- <% if can? :admin, Spree::StockItem %>
4
- <%= tab :stock_items, :label => 'management', :match_path => '/stock_items' %>
5
- <% end %>
6
- <% if can? :admin, Spree::StockTransfer %>
7
- <%= tab :stock_transfers, :label => 'transfers', :match_path => '/stock_transfers' %>
8
- <% end %>
9
- </ul>
10
- <% end %>
1
+ <ul id="sub_nav" class="admin-subnav" data-hook="admin_stock_transfer_sub_tabs">
2
+ <% if can? :admin, Spree::StockItem %>
3
+ <%= tab :stock_items, label: 'management', match_path: '/stock_items' %>
4
+ <% end %>
5
+ <% if can? :admin, Spree::StockTransfer %>
6
+ <%= tab :stock_transfers, label: 'transfers', match_path: '/stock_transfers' %>
7
+ <% end %>
8
+ </ul>
@@ -3,7 +3,9 @@
3
3
  <% end %>
4
4
 
5
5
  <% if can? :admin, Spree::Product %>
6
- <%= tab *Spree::BackendConfiguration::PRODUCT_TABS, icon: 'th-large' %>
6
+ <%= tab *Spree::BackendConfiguration::PRODUCT_TABS, icon: 'th-large' do %>
7
+ <%- render partial: 'spree/admin/shared/product_sub_menu' %>
8
+ <%- end %>
7
9
  <% end %>
8
10
 
9
11
  <% if can? :admin, :reports %>
@@ -15,11 +17,15 @@
15
17
  <% end %>
16
18
 
17
19
  <% if can? :admin, Spree::Promotion %>
18
- <%= tab *Spree::BackendConfiguration::PROMOTION_TABS, url: spree.admin_promotions_path, icon: 'bullhorn' %>
20
+ <%= tab *Spree::BackendConfiguration::PROMOTION_TABS, url: spree.admin_promotions_path, icon: 'bullhorn' do %>
21
+ <%- render partial: 'spree/admin/shared/promotion_sub_menu' %>
22
+ <%- end %>
19
23
  <% end %>
20
24
 
21
25
  <% if can? :admin, Spree::StockItem %>
22
- <%= tab(:stock_items, :stock_transfers, :url => spree.admin_stock_items_path, :label => Spree.t(:stock), :icon => 'cubes', match_path: %r(^/admin/stock)) %>
26
+ <%= tab(:stock_items, :stock_transfers, url: spree.admin_stock_items_path, label: Spree.t(:stock), icon: 'cubes', match_path: %r(^/admin/stock)) do %>
27
+ <%- render partial: 'spree/admin/shared/stock_sub_menu' %>
28
+ <%- end %>
23
29
  <% end %>
24
30
 
25
31
  <% if Spree.user_class && can?(:admin, Spree.user_class) %>
@@ -46,7 +46,7 @@
46
46
  <div data-hook="admin_shipping_method_form_availability_fields" class="alpha six columns">
47
47
  <fieldset class="categories no-border-bottom">
48
48
  <legend align="center"><%= Spree.t(:shipping_categories) %></legend>
49
- <%= f.field_container :categories do %>
49
+ <%= f.field_container :categories do %>
50
50
  <% Spree::ShippingCategory.all.each do |category| %>
51
51
  <%= label_tag do %>
52
52
  <%= check_box_tag('shipping_method[shipping_categories][]', category.id, @shipping_method.shipping_categories.include?(category)) %>
@@ -84,7 +84,7 @@
84
84
  <div class="alpha six columns">
85
85
  <fieldset class="tax_categories no-border-bottom">
86
86
  <legend align="center"><%= Spree.t(:tax_category) %></legend>
87
- <%= f.field_container :categories do %>
87
+ <%= f.field_container :tax_categories do %>
88
88
  <%= f.select :tax_category_id, @tax_categories.map { |tc| [tc.name, tc.id] }, {include_blank: true}, class: "select2 fullwidth" %>
89
89
  <%= error_message_on :shipping_method, :tax_category_id %>
90
90
  <% end %>
@@ -3,11 +3,10 @@
3
3
  <li><%= button_link_to Spree.t(:back_to_products_list), session[:return_to] || admin_products_url, :icon => 'arrow-left' %></li>
4
4
  <% end %>
5
5
 
6
- <%= render :partial => 'spree/admin/shared/product_sub_menu' %>
7
6
  <%= render :partial => 'spree/admin/shared/product_tabs', :locals => { :current => 'Stock Management' } %>
8
7
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @product } %>
9
8
  <% else %>
10
- <%= render :partial => 'spree/admin/shared/stock_sub_menu' %>
9
+
11
10
  <% content_for :page_title do %>
12
11
  <%= Spree.t(:manage_stock) %>
13
12
  <% end %>
@@ -1,4 +1,3 @@
1
- <%= render :partial => 'spree/admin/shared/stock_sub_menu' %>
2
1
  <%content_for :page_title do %>
3
2
  <%= "#{Spree.t(:editing_stock_transfer)} #{@stock_transfer.number}" %>
4
3
  <% end %>
@@ -1,5 +1,3 @@
1
- <%= render :partial => 'spree/admin/shared/stock_sub_menu' %>
2
-
3
1
  <% content_for :page_title do %>
4
2
  <%= Spree.t(:stock_transfers) %>
5
3
  <% end %>
@@ -115,4 +113,3 @@
115
113
  <% end %>
116
114
 
117
115
  <%= paginate @stock_transfers %>
118
-
@@ -1,5 +1,3 @@
1
- <%= render :partial => 'spree/admin/shared/stock_sub_menu' %>
2
-
3
1
  <% content_for :page_title do %>
4
2
  <%= Spree.t(:new_stock_transfer) %>
5
3
  <% end %>
@@ -1,5 +1,3 @@
1
- <%= render :partial => 'spree/admin/shared/stock_sub_menu' %>
2
-
3
1
  <% content_for :page_title do %>
4
2
  <%= "#{Spree.t(:receiving)} #{@stock_transfer.number}" %>
5
3
  <% end %>
@@ -1,5 +1,3 @@
1
- <%= render :partial => 'spree/admin/shared/stock_sub_menu' %>
2
-
3
1
  <% content_for :page_title do %>
4
2
  <%= Spree.t('stock_transfer') %> <%= @stock_transfer.number %>
5
3
  <% end %>
@@ -1,5 +1,3 @@
1
- <%= render :partial => 'spree/admin/shared/stock_sub_menu' %>
2
-
3
1
  <% content_for :page_title do %>
4
2
  <%= "#{Spree.t(:ship)} #{Spree.t(:stock_transfer)} \##{@stock_transfer.number}" %>
5
3
  <% end %>
@@ -0,0 +1,5 @@
1
+ <p>
2
+ This style guide exists to encourage developers to tackle style
3
+ and interaction design in more bite sized ways
4
+ and give the community a place to review changes.
5
+ </p>
@@ -0,0 +1,79 @@
1
+ <%- snippet = capture do %>
2
+ <form id="table-filter" class="sixteen columns">
3
+ <fieldset>
4
+ <legend align="center">Search</legend>
5
+ <div class="field-block alpha four columns">
6
+ <div class="field">
7
+ <label for="q_number_cont">Text Field</label>
8
+ <input type="text">
9
+ </div>
10
+ </div>
11
+
12
+ <div class="field-block four columns">
13
+ <div class="date-range-filter field">
14
+ <label for="q_created_at_gt">Date Range</label>
15
+ <div class="date-range-fields">
16
+ <input class="datepicker" placeholder="Date">
17
+ <span class="range-divider"><i class="fa fa-arrow-right"></i></span>
18
+ <input class="datepicker" placeholder="Picker">
19
+ </div>
20
+ </div>
21
+ </div>
22
+
23
+ <div class="four columns">
24
+ <div class="field checkbox">
25
+ <label>Select Box
26
+ <select>
27
+ <option>Option</option>
28
+ </select>
29
+ </label>
30
+ </div>
31
+
32
+ <div class="field">
33
+ <select class="select2">
34
+ <option>Select 2</option>
35
+ </select>
36
+ </div>
37
+ </div>
38
+
39
+ <div class="omega four columns">
40
+ <div class="field checkbox">
41
+ <label>
42
+ <input type="checkbox" checked="checked">
43
+ Checkbox
44
+ </label>
45
+ </div>
46
+
47
+ <div class='field'>
48
+ <label>
49
+ <input name='radio' type='radio'>
50
+ Option 1
51
+ </label>
52
+ <label>
53
+ <input name='radio' type='radio'>
54
+ Option 2
55
+ </label>
56
+ <label>
57
+ <input name='radio' type='radio'>
58
+ Option 3
59
+ </label>
60
+ </div>
61
+ </div>
62
+ </fieldset>
63
+ </form>
64
+ <%- end %>
65
+
66
+
67
+ <div class="style-guide-result">
68
+ <%= snippet %>
69
+ </div>
70
+
71
+ <div class="style-guide-code">
72
+ <pre><code class="language-html"><%= escape_once snippet %></code></pre>
73
+ </div>
74
+
75
+ <script>
76
+ $(function(){
77
+ $('.select2').select2();
78
+ });
79
+ </script>