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,14 @@
1
+ <div class="errorExplanation">
2
+ <h2>2 errors prohibited this record from being saved:</h2>
3
+ <p>There were problems with the following fields:</p>
4
+ <ul>
5
+ <li>Email can't be blank</li>
6
+ <li>Password can't be blank</li>
7
+ </ul>
8
+ </div>
9
+
10
+ <div class="field withError">
11
+ <span class="field_with_errors"><label for="user_name">Name</label></span>
12
+ <span class="field_with_errors"><input class="fullwidth" type="text" name="user[name]" id="user_name"></span>
13
+ <span class="formError">can't be blank</span>
14
+ </div>
@@ -0,0 +1,13 @@
1
+ <button class="trigger-flash" data-flash-type="success">Success</button>
2
+ <button class="trigger-flash" data-flash-type="notice">Warning</button>
3
+ <button class="trigger-flash" data-flash-type="error">Error</button>
4
+
5
+ <script>
6
+ $('.trigger-flash').on('click', function(){
7
+ type = $(this).data('flashType');
8
+ flash = $("<div class='flash'>")
9
+ .text(type)
10
+ .addClass(type)
11
+ .appendTo('.js-flash-wrapper');
12
+ });
13
+ </script>
@@ -0,0 +1,20 @@
1
+ <%- snippet = capture do %>
2
+ <div id="progress">
3
+ <div class="wrapper">
4
+ <div id="spinner" class="spinner"></div>
5
+ <div class="progress-message"><%= Spree.t(:loading) %>...</div>
6
+ </div>
7
+ </div>
8
+ <%- end %>
9
+
10
+ <div class="style-guide-result">
11
+ <%= snippet %>
12
+ </div>
13
+
14
+ <button id="loading-test-button">Toggle Loading</button>
15
+
16
+ <script>
17
+ $('#loading-test-button').on('click', function(){
18
+ $("#progress").toggle()
19
+ });
20
+ </script>
@@ -0,0 +1,16 @@
1
+ <%- snippet = capture do %>
2
+ <a class="with-tip" title="This will be the tooltip text." href="#">Some Link With Tip</a>
3
+ <%- end %>
4
+
5
+ <p>
6
+ We are using <a href="http://stevenbenner.github.io/jquery-powertip/">jQuery PowerTip</a>
7
+ with the class <code>.with-tip</code> as a trigger.
8
+ </p>
9
+
10
+ <p class="style-guide-result">
11
+ <%= snippet %>
12
+ </p>
13
+
14
+ <div class="style-guide-code">
15
+ <pre><code class="language-html"><%= escape_once snippet %></code></pre>
16
+ </div>
@@ -0,0 +1,44 @@
1
+ <%- snippet = capture do %>
2
+ <table>
3
+ <thead>
4
+ <tr>
5
+ <th colspan="2">Item Description</th>
6
+ <th>Price</th>
7
+ <th>Quantity</th>
8
+ <th>Total</th>
9
+ </tr>
10
+ </thead>
11
+
12
+ <tbody>
13
+ <tr>
14
+ <td class="item-image">
15
+ <img src="http://placehold.it/50x50">
16
+ </td>
17
+ <td>
18
+ Ruby on Rails Bag<br>
19
+ SKU: ROR-00012
20
+ </td>
21
+ <td class="align-center">$22.99</td>
22
+ <td class="align-center">1 x on hand</td>
23
+ <td class="align-center">$22.99</td>
24
+ </tr>
25
+ <tr>
26
+ <td colspan="4">UPS Ground (USD)</td>
27
+ <td class="align-center">
28
+ <span>$5.00</span>
29
+ </td>
30
+ </tr>
31
+ <tr>
32
+ <td colspan="5">No tracking details provided.</td>
33
+ </tr>
34
+ </tbody>
35
+ </table>
36
+ <%- end %>
37
+
38
+ <div class="style-guide-result">
39
+ <%= snippet %>
40
+ </div>
41
+
42
+ <div class="style-guide-code">
43
+ <pre><code class="language-html"><%= escape_once snippet %></code></pre>
44
+ </div>
@@ -0,0 +1,11 @@
1
+ <nav class="pagination">
2
+ <span class="first"><a href="#">« First</a></span>
3
+ <span class="prev"><a href="#">‹ Prev</a></span>
4
+ <span class="page"><a href="#">1</a></span>
5
+ <span class="page"><a href="#">2</a></span>
6
+ <span class="page current">3</span>
7
+ <span class="page"><a href="#">4</a></span>
8
+ <span class="page"><a href="#">5</a></span>
9
+ <span class="next"><a href="#">Next ›</a></span>
10
+ <span class="last"><a href="#">Last »</a></span>
11
+ </nav>
@@ -0,0 +1,64 @@
1
+ <%- snippet = capture do %>
2
+ <p>where the html example goes</p>
3
+ <%- end %>
4
+
5
+ <p>
6
+ The Solidus UI is made up mostly of a grey color palette with blue being used for interactive elements and red, green and yellow being used to give visual context to messaging.
7
+ </p>
8
+
9
+ <%-
10
+ colors = [
11
+ {
12
+ name: '$color-1',
13
+ value: '#FFFFFF',
14
+ used_for: 'Backgrounds.'
15
+ },
16
+ {
17
+ name: '$color-2',
18
+ value: '#9FC820',
19
+ used_for: 'Active states.'
20
+ },
21
+ {
22
+ name: '$color-3',
23
+ value: '#5498DA',
24
+ used_for: 'Buttons, links, form text.'
25
+ },
26
+ {
27
+ name: '$color-4',
28
+ value: '#6788A2',
29
+ used_for: 'Non-interactive text outside of form fields.'
30
+ },
31
+ {
32
+ name: '$color-5',
33
+ value: '#C60F13',
34
+ used_for: 'Errors, destructive action warnings.'
35
+ },
36
+ {
37
+ name: '$color-6',
38
+ value: '#FF9300',
39
+ used_for: 'Warnings'
40
+ },
41
+ {
42
+ name: '$color-7',
43
+ value: '#F4F4F4',
44
+ used_for: 'Disabled states'
45
+ }
46
+ ]
47
+
48
+ %>
49
+
50
+ <div class="color-variables">
51
+ <%- colors.each do |color| %>
52
+ <div class="color-variable">
53
+ <div class="color-swatch" style="background-color: <%= color[:value] %>"></div>
54
+ <dl class="color-variable-details">
55
+ <dt>Color:</dt>
56
+ <dd><%= color[:value] %></dd>
57
+ <dt>Sass:</dt>
58
+ <dd><code><%= color[:name] %></code></dd>
59
+ <dt>For:</dt>
60
+ <dd><%= color[:used_for] %></dd>
61
+ </dl>
62
+ </div>
63
+ <%- end %>
64
+ </div>
@@ -0,0 +1,19 @@
1
+ <div class="half">
2
+ <p>
3
+ The typography base is "Open Sans" and Helvetica which we leave to the browser to provide.
4
+ Set at 13px with no specified line-height.
5
+ </p>
6
+
7
+ <p>
8
+ Headings use the same font stack of the body text. They are bold with a line-height of 1.1.
9
+ </p>
10
+ </div>
11
+
12
+ <div class="half">
13
+ <h1>h1. This is a very large header.</h1>
14
+ <h2>h2. This is a large header.</h2>
15
+ <h3>h3. This is a medium header.</h3>
16
+ <h4>h4. This is a moderate header.</h4>
17
+ <h5>h5. This is a small header.</h5>
18
+ <h6>h6. This is a tiny header.</h6>
19
+ </div>
@@ -0,0 +1,13 @@
1
+ <div class="half">
2
+ <p>Icons are provided by <a href="https://fortawesome.github.io/Font-Awesome/cheatsheet/">
3
+ Font Awesome</a>. There are also a number of helpers for inserting icons, links, and buttons. </p>
4
+ </div>
5
+
6
+ <div class="style-guide-code half">
7
+ <pre><code class="language-ruby">
8
+ icon('fa fa-user')
9
+ link_to_with_icon('send', 'link text', '#')
10
+ button('button text', 'trash')
11
+ button_link_to('button link text', '#', icon: 'globe')
12
+ </code></pre>
13
+ </div>
@@ -0,0 +1,25 @@
1
+ <p>
2
+ Unordered lists have been stripped of all padding and margin.
3
+ </p>
4
+
5
+ <ul>
6
+ <li>Unordered list of things</li>
7
+ <li>List item
8
+ <ul>
9
+ <li>Nested list item</li>
10
+ <li>Nested list item</li>
11
+ </ul>
12
+ </li>
13
+ <li>List item</li>
14
+ </ul>
15
+
16
+ <p>
17
+ Definition lists have a fluid 40%/60% layout with some font changes.
18
+ </p>
19
+
20
+ <dl>
21
+ <dt>Description</dt>
22
+ <dd>List</dd>
23
+ <dt>Term</dt>
24
+ <dd>Description</dd>
25
+ </ul>
@@ -0,0 +1,25 @@
1
+ <%- snippet = capture do %>
2
+ <span class="state ready">ready</span>
3
+ <span class="state paid">paid</span>
4
+ <span class="state complete">complete</span>
5
+ <span class="state completed">completed</span>
6
+ <span class="state balance_due">balance due</span>
7
+ <span class="state pending">pending</span>
8
+ <span class="state checkout">checkout</span>
9
+ <span class="state credit_owed">credit owed</span>
10
+ <span class="state void">void</span>
11
+ <span class="state address">address</span>
12
+ <%- end %>
13
+
14
+ <div class="half">
15
+ <p>
16
+ 3 different visual states to describe ok/success, warnings and errors.
17
+ </p>
18
+ <p class="tags">
19
+ <%= snippet %>
20
+ </p>
21
+ </div>
22
+
23
+ <div class="style-guide-code half">
24
+ <pre><code class="language-html"><%= escape_once snippet %></code></pre>
25
+ </div>
File without changes
@@ -1,5 +1,6 @@
1
1
  <%= render :partial => 'spree/admin/shared/configuration_menu' %>
2
2
 
3
+ <%= render :partial => 'spree/admin/taxons/list_template' %>
3
4
  <%= render :partial => 'js_head' %>
4
5
 
5
6
  <% content_for :page_title do %>
@@ -10,10 +11,11 @@
10
11
  <li>
11
12
  <%= button_link_to Spree.t(:back_to_taxonomies_list), spree.admin_taxonomies_path, :icon => 'arrow-left' %>
12
13
  </li>
14
+ <li>
15
+ <%= button_link_to Spree.t(:add_taxon), spree.admin_taxonomies_path, { icon: 'plus', class: 'add-taxon-button' } %>
16
+ </li>
13
17
  <% end %>
14
18
 
15
- <div id="ajax_error" class="errorExplanation" style="display:none;"></div>
16
-
17
19
  <%= form_for [:admin, @taxonomy] do |f| %>
18
20
  <fieldset class="no-border-top">
19
21
  <%= render :partial => 'form', :locals => { :f => f } %>
@@ -26,14 +28,11 @@
26
28
 
27
29
 
28
30
  <div>
29
- <%= label_tag nil, Spree.t(:tree) %><br />
30
31
  <script>
32
+ Spree.routes.taxonomy_path = "<%= spree.api_taxonomy_path(@taxonomy) %>";
31
33
  Spree.routes.taxonomy_taxons_path = "<%= spree.api_taxonomy_taxons_path(@taxonomy) %>";
32
34
  Spree.routes.admin_taxonomy_taxons_path = "<%= spree.admin_taxonomy_taxons_path(@taxonomy) %>";
33
- Spree.routes.jstree_theme_path = "<%= stylesheet_path("jquery.jstree/themes/apple/style.css") %>";
34
35
  </script>
35
36
  <div id="taxonomy_tree" class="tree"></div>
36
-
37
- <div class="info"><%= Spree.t(:taxonomy_tree_instruction) %></div>
38
37
  </div>
39
38
  <% end %>
@@ -12,8 +12,6 @@
12
12
  <% end %>
13
13
  <% end %>
14
14
 
15
- <%= render 'spree/admin/shared/product_sub_menu' %>
16
-
17
15
  <% if @taxonomies.any? %>
18
16
  <div id="list-taxonomies" data-hook>
19
17
  <%= render 'list' %>
@@ -10,8 +10,6 @@
10
10
  </li>
11
11
  <% end %>
12
12
 
13
- <%= render 'spree/admin/shared/product_sub_menu' %>
14
-
15
13
  <%= form_for [:admin, @taxonomy] do |f| %>
16
14
 
17
15
  <%= render :partial => 'form', :locals => { :f => f } %>
@@ -38,7 +38,7 @@
38
38
  <%= f.text_field :meta_description, :class => 'fullwidth', :rows => 6 %>
39
39
  <% end %>
40
40
 
41
- <%= f.field_container :meta_description do %>
41
+ <%= f.field_container :meta_keywords do %>
42
42
  <%= f.label :meta_keywords, Spree.t(:meta_keywords) %><br />
43
43
  <%= f.text_field :meta_keywords, :class => 'fullwidth', :rows => 6 %>
44
44
  <% end %>
@@ -0,0 +1,17 @@
1
+ <script type="text/template" id="taxons-list-template">
2
+ {{#each taxons}}
3
+ <li data-taxon-id="{{id}}" data-taxon-taxonomy-id="{{taxonomy_id}}">
4
+ <div class="sortable-handle">
5
+ {{#if (isRootTaxon) }}{{else}}<i class="fa fa-arrows"></i>{{/if}}
6
+ {{name}}
7
+ <div class="actions right">
8
+ <a href="/admin/taxonomies/{{taxonomy_id}}/taxons/{{id}}/edit" class="fa fa-edit icon_link with-tip no-text"></a>
9
+ <a href="#" class="delete-taxon-button fa fa-trash icon_link with-tip no-text"></a>
10
+ </div>
11
+ </div>
12
+ <ul>
13
+ {{> taxons}}
14
+ </ul>
15
+ </li>
16
+ {{/each}}
17
+ </script>
@@ -12,9 +12,6 @@
12
12
  </div>
13
13
  <% end %>
14
14
 
15
- <%= render :partial => 'spree/admin/shared/product_sub_menu' %>
16
-
17
15
  <div class='sixteen columns'>
18
16
  <div id='taxon_products' class='list-group'></div>
19
17
  </div>
20
-
@@ -12,7 +12,7 @@
12
12
 
13
13
  <% if @orders.any? %>
14
14
  <%# TODO add search interface %>
15
- <table class="index responsive" id="listing_orders" data-hook>
15
+ <table class="index" id="listing_orders" data-hook>
16
16
  <colgroup>
17
17
  <col style="width: 25%;">
18
18
  <col style="width: 25%;">
@@ -1,5 +1,3 @@
1
- <%= render :partial => 'spree/admin/shared/product_sub_menu' %>
2
-
3
1
  <%= render :partial => 'spree/admin/shared/product_tabs', :locals => { :current => 'Variants' } %>
4
2
 
5
3
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @variant } %>
@@ -1,5 +1,3 @@
1
- <%= render :partial => 'spree/admin/shared/product_sub_menu' %>
2
-
3
1
  <%= render :partial => 'spree/admin/shared/product_tabs', :locals => {:current => 'Variants'} %>
4
2
 
5
3
  <%# Place for new variant form %>
@@ -9,7 +9,9 @@
9
9
  </head>
10
10
 
11
11
  <body class='admin'>
12
- <div id='wrapper' data-hook>
12
+ <%= render partial: 'spree/admin/shared/navigation' %>
13
+
14
+ <div class='main-content' id='wrapper' data-hook>
13
15
 
14
16
  <div class="flash-wrapper js-flash-wrapper">
15
17
  <% if flash[:error] %>
@@ -30,9 +32,6 @@
30
32
  </div>
31
33
  </div>
32
34
 
33
- <%= render :partial => 'spree/admin/shared/header' %>
34
- <%= render :partial => 'spree/admin/shared/menu' %>
35
- <%= render :partial => 'spree/admin/shared/sub_menu' %>
36
35
  <%= render :partial => 'spree/admin/shared/content_header' %>
37
36
 
38
37
  <div class="container">
@@ -0,0 +1,58 @@
1
+ <!doctype html>
2
+ <html lang="<%= I18n.locale %>">
3
+ <head>
4
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
5
+ <title>Solidus Style Guide</title>
6
+
7
+ <%= stylesheet_link_tag "spree/backend/all" %>
8
+ <%= javascript_include_tag "spree/backend/all" %>
9
+ <%= render "spree/admin/shared/translations" %>
10
+ </head>
11
+
12
+ <body class="admin style-guide">
13
+
14
+ <div class="style-guide-sidebar">
15
+ <header>
16
+ <%= link_to spree.admin_path, class: 'brand-link' do %>
17
+ <%- image_tag('solidus-style-guide-logo.png') %>
18
+ <%- end %>
19
+ </header>
20
+ <ul class="style-guide-nav" data-sticky>
21
+ <%- @topics.each do |topic, subjects| %>
22
+ <li>
23
+ <%= link_to topic, "##{topic}" %>
24
+ <ul>
25
+ <%- subjects.each do |subject| %>
26
+ <li>
27
+ <%= link_to subject.titleize, "##{subject}" %>
28
+ </li>
29
+ <%- end %>
30
+ </ul>
31
+ </li>
32
+ <%- end %>
33
+ </ul>
34
+ </div>
35
+
36
+ <div class="style-guide-main-content">
37
+ <div class="flash-wrapper js-flash-wrapper"></div>
38
+
39
+ <div class="container">
40
+ <div class="style-guide-intro">
41
+ <%= yield %>
42
+ </div>
43
+
44
+ <%- @topics.each do |topic, subjects| %>
45
+ <h2><%= link_to '', "#", id: "#{topic}" %></h2>
46
+ <%- subjects.each do |subject| %>
47
+ <section class="style-guide-section">
48
+ <h3 class="style-guide-section-header">
49
+ <span><%= link_to subject.titleize, "#", id: "#{subject}" %></span>
50
+ </h3>
51
+ <%= render partial: "spree/admin/style_guide/topics/#{topic}/#{subject}" %>
52
+ </section>
53
+ <%- end %>
54
+ <%- end %>
55
+ </div>
56
+ </div>
57
+ </body>
58
+ </html>
data/config/routes.rb CHANGED
@@ -87,8 +87,8 @@ Spree::Core::Engine.add_routes do
87
87
  get :confirm
88
88
  put :complete
89
89
  post :resend
90
- get :open_adjustments
91
- get :close_adjustments
90
+ get "/adjustments/unfinalize", to: "orders#unfinalize_adjustments"
91
+ get "/adjustments/finalize", to: "orders#finalize_adjustments"
92
92
  put :approve
93
93
  put :cancel
94
94
  put :resume
@@ -208,6 +208,8 @@ Spree::Core::Engine.add_routes do
208
208
  end
209
209
  end
210
210
  end
211
+
212
+ resources :style_guide
211
213
  end
212
214
 
213
215
  get '/admin', to: 'admin/root#index', as: :admin
@@ -20,7 +20,6 @@ module Spree
20
20
  spree/backend/address_states.js
21
21
  jqPlot/excanvas.min.js
22
22
  spree/backend/images/new.js
23
- jquery.jstree/themes/apple/*
24
23
  fontawesome-webfont*
25
24
  select2_locale*
26
25
  ]
data/lib/spree/backend.rb CHANGED
@@ -1,10 +1,7 @@
1
1
  require 'rails/all'
2
2
  require 'jquery-rails'
3
3
  require 'jquery-ui-rails'
4
- require 'coffee-rails'
5
- require 'sass-rails'
6
4
  require 'bourbon'
7
- require 'deface'
8
5
  require 'select2-rails'
9
6
  require 'handlebars_assets'
10
7
 
@@ -1,10 +1,10 @@
1
1
  # encoding: UTF-8
2
- version = File.read(File.expand_path("../../SOLIDUS_VERSION", __FILE__)).strip
2
+ require_relative '../core/lib/spree/core/version.rb'
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.name = 'solidus_backend'
7
- s.version = version
7
+ s.version = Spree.solidus_version
8
8
  s.summary = 'Admin interface for the Solidus e-commerce framework.'
9
9
  s.description = s.summary
10
10
 
@@ -18,12 +18,10 @@ Gem::Specification.new do |s|
18
18
  s.require_path = 'lib'
19
19
  s.requirements << 'none'
20
20
 
21
- s.add_dependency 'solidus_api', version
22
- s.add_dependency 'solidus_core', version
21
+ s.add_dependency 'solidus_api', s.version
22
+ s.add_dependency 'solidus_core', s.version
23
23
 
24
- s.add_dependency 'bourbon'
25
- s.add_dependency 'sass-rails'
26
- s.add_dependency 'coffee-rails'
24
+ s.add_dependency 'bourbon', '>= 4', '< 6'
27
25
  s.add_dependency 'jquery-rails'
28
26
  s.add_dependency 'jquery-ui-rails', '~> 5.0.0'
29
27
  s.add_dependency 'select2-rails', '3.5.9.1' # 3.5.9.2 breaks forms
@@ -7,7 +7,7 @@ require 'spec_helper'
7
7
  describe Spree::Admin::ProductsController, :type => :controller do
8
8
  stub_authorization!
9
9
 
10
- # Regression test for GH #538
10
+ # Regression test for GH https://github.com/spree/spree/issues/538
11
11
  it "cannot find a non-existent product" do
12
12
  spree_get :edit, :id => "non-existent-product"
13
13
  expect(response).to redirect_to(spree.admin_products_path)
@@ -66,7 +66,7 @@ describe Spree::Admin::OrdersController, :type => :controller do
66
66
  end
67
67
  end
68
68
 
69
- # Test for #3346
69
+ # Test for https://github.com/spree/spree/issues/3346
70
70
  context "#new" do
71
71
  let(:user) { create(:user) }
72
72
  before do
@@ -112,7 +112,7 @@ describe Spree::Admin::OrdersController, :type => :controller do
112
112
  end
113
113
  end
114
114
 
115
- # Regression test for #3684
115
+ # Regression test for https://github.com/spree/spree/issues/3684
116
116
  context "#edit" do
117
117
  it "does not refresh rates if the order is completed" do
118
118
  allow(order).to receive_messages :completed? => true
@@ -275,7 +275,7 @@ describe Spree::Admin::OrdersController, :type => :controller do
275
275
  end
276
276
  end
277
277
 
278
- # Test for #3919
278
+ # Test for https://github.com/spree/spree/issues/3919
279
279
  context "search" do
280
280
  let(:user) { create(:user) }
281
281
 
@@ -299,38 +299,38 @@ describe Spree::Admin::OrdersController, :type => :controller do
299
299
  let(:order) { create(:order) }
300
300
  let!(:finalized_adjustment) { create(:adjustment, finalized: true, adjustable: order, order: order) }
301
301
 
302
- it "changes all the closed adjustments to open" do
303
- spree_post :open_adjustments, id: order.number
302
+ it "changes all the finalized adjustments to unfinalized" do
303
+ spree_post :unfinalize_adjustments, id: order.number
304
304
  expect(finalized_adjustment.reload.finalized).to eq(false)
305
305
  end
306
306
 
307
307
  it "sets the flash success message" do
308
- spree_post :open_adjustments, id: order.number
309
- expect(flash[:success]).to eql('All adjustments successfully opened!')
308
+ spree_post :unfinalize_adjustments, id: order.number
309
+ expect(flash[:success]).to eql('All adjustments successfully unfinalized!')
310
310
  end
311
311
 
312
312
  it "redirects back" do
313
- spree_post :open_adjustments, id: order.number
313
+ spree_post :unfinalize_adjustments, id: order.number
314
314
  expect(response).to redirect_to(:back)
315
315
  end
316
316
  end
317
317
 
318
- context "#close_adjustments" do
318
+ context "#finalize_adjustments" do
319
319
  let(:order) { create(:order) }
320
320
  let!(:not_finalized_adjustment) { create(:adjustment, finalized: false, adjustable: order, order: order) }
321
321
 
322
- it "changes all the open adjustments to closed" do
323
- spree_post :close_adjustments, id: order.number
322
+ it "changes all the unfinalized adjustments to finalized" do
323
+ spree_post :finalize_adjustments, id: order.number
324
324
  expect(not_finalized_adjustment.reload.finalized).to eq(true)
325
325
  end
326
326
 
327
327
  it "sets the flash success message" do
328
- spree_post :close_adjustments, id: order.number
329
- expect(flash[:success]).to eql('All adjustments successfully closed!')
328
+ spree_post :finalize_adjustments, id: order.number
329
+ expect(flash[:success]).to eql('All adjustments successfully finalized!')
330
330
  end
331
331
 
332
332
  it "redirects back" do
333
- spree_post :close_adjustments, id: order.number
333
+ spree_post :finalize_adjustments, id: order.number
334
334
  expect(response).to redirect_to(:back)
335
335
  end
336
336
  end