spree_frontend 4.1.6 → 4.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 970239d531b6d929609cf3c4d28f2c448840c5471293c6c26c1d50510a77f325
4
- data.tar.gz: 323efddb286a2fcff39fe461a0b531afb9aed27b2e7b8f0ddc3a7424005f3c93
3
+ metadata.gz: 996c8507c85da2436c1ce465db2e6d58e23438ebd35a641917b7625709eda853
4
+ data.tar.gz: 4aab159f3787026ede7868304085146fa37396f44bb396ffa82e021c683532a6
5
5
  SHA512:
6
- metadata.gz: 599d44e41a5158490b33e78023191a0b50ba8c32701c7a189b718b65755ed4acc5953599dd5e9d87c84c6f19a04119cf2e7cac5542291d227601470b07eeb189
7
- data.tar.gz: 63186815000d404797933b19cba9f4b80ed37c1ca43f65446a05e99f74e6ecca4b6a53c454160dfaa268eae88c3d6ac805d17c8e4bc5b73ff03eb5d3f2285e9e
6
+ metadata.gz: baffee9364a81637cb79bb1ef3ea11101f3ab4e07cf691ec6816b4bfeee0bd57d7ad0cddd947bb9e2d0ff7d397acc6151dcc6dc598e869a65abe5b820b06fa11
7
+ data.tar.gz: 8d4a1e4e959f45472987a9770f6a4ac87f45f8d77d9588fbfd48e959eaaa4671c4ffa0afc5e20c0e6c0c14da502bcbd29eb89a159c53400f8db00d8e13931e46
@@ -1,56 +1,54 @@
1
- (function ($) {
2
- $(document).ready(function () {
3
- if ($('.select_address').length > 0) {
4
- $('input#order_use_billing').unbind('change')
1
+ Spree.ready(function ($) {
2
+ if ($('.select_address').length > 0) {
3
+ $('input#order_use_billing').unbind('change');
5
4
 
6
- hide_address_form('billing')
7
- hide_address_form('shipping')
5
+ hide_address_form('billing');
6
+ hide_address_form('shipping');
8
7
 
9
- if ($('input#order_use_billing').is(':checked')) {
10
- $('#shipping .select_address').hide()
11
- }
12
-
13
- $('input#order_use_billing').click(function () {
14
- if ($(this).is(':checked')) {
15
- $('#shipping .select_address').hide()
16
- hide_address_form('shipping')
17
- } else {
18
- $('#shipping .select_address').show()
19
- if ($("input[name='order[ship_address_id]']:checked").val() == '0') {
20
- show_address_form('shipping')
21
- } else {
22
- hide_address_form('shipping')
23
- }
24
- }
25
- })
26
-
27
- $("input[name='order[bill_address_id]']:radio").change(function () {
28
- if ($("input[name='order[bill_address_id]']:checked").val() == '0') {
29
- show_address_form('billing')
30
- } else {
31
- hide_address_form('billing')
32
- }
33
- })
8
+ if ($('input#order_use_billing').is(':checked')) {
9
+ $('#shipping .select_address').hide()
10
+ }
34
11
 
35
- $("input[name='order[ship_address_id]']:radio").change(function () {
12
+ $('input#order_use_billing').click(function () {
13
+ if ($(this).is(':checked')) {
14
+ $('#shipping .select_address').hide()
15
+ hide_address_form('shipping')
16
+ } else {
17
+ $('#shipping .select_address').show()
36
18
  if ($("input[name='order[ship_address_id]']:checked").val() == '0') {
37
19
  show_address_form('shipping')
38
20
  } else {
39
21
  hide_address_form('shipping')
40
22
  }
41
- })
42
- }
43
- })
23
+ }
24
+ });
25
+
26
+ $("input[name='order[bill_address_id]']:radio").change(function () {
27
+ if ($("input[name='order[bill_address_id]']:checked").val() == '0') {
28
+ show_address_form('billing')
29
+ } else {
30
+ hide_address_form('billing')
31
+ }
32
+ });
33
+
34
+ $("input[name='order[ship_address_id]']:radio").change(function () {
35
+ if ($("input[name='order[ship_address_id]']:checked").val() == '0') {
36
+ show_address_form('shipping')
37
+ } else {
38
+ hide_address_form('shipping')
39
+ }
40
+ })
41
+ }
44
42
 
45
- function hide_address_form (address_type) {
46
- $('#' + address_type + ' .inner').hide()
43
+ function hide_address_form(address_type) {
44
+ $('#' + address_type + ' .inner').hide();
47
45
  $('#' + address_type + ' .inner input').prop('disabled', true)
48
46
  $('#' + address_type + ' .inner select').prop('disabled', true)
49
47
  }
50
48
 
51
- function show_address_form (address_type) {
52
- $('#' + address_type + ' .inner').show()
49
+ function show_address_form(address_type) {
50
+ $('#' + address_type + ' .inner').show();
53
51
  $('#' + address_type + ' .inner input').prop('disabled', false)
54
52
  $('#' + address_type + ' .inner select').prop('disabled', false)
55
53
  }
56
- })(jQuery)
54
+ });
@@ -266,6 +266,12 @@ Spree.ready(function($) {
266
266
  Spree.showProductAddedModal(JSON.parse(
267
267
  $cartForm.attr('data-product-summary')
268
268
  ), Spree.variantById($cartForm, variantId))
269
+ $cartForm.trigger({
270
+ type: 'product_add_to_cart',
271
+ variant: Spree.variantById($cartForm, variantId),
272
+ quantity_increment: quantity,
273
+ cart: response.attributes
274
+ })
269
275
  },
270
276
  function(error) {
271
277
  if (typeof error === 'string' && error !== '') {
@@ -47,6 +47,7 @@
47
47
  @import "spree/frontend/views/spree/shared/product";
48
48
  @import "spree/frontend/views/spree/products/show";
49
49
  @import "spree/frontend/views/spree/products/cart_form";
50
+ @import "spree/frontend/views/spree/products/gallery_modal";
50
51
  @import "spree/frontend/views/spree/shared/product_added_modal";
51
52
  @import "spree/frontend/views/spree/shared/mobile_navigation";
52
53
  @import "spree/frontend/views/spree/shared/no_product_available";
@@ -149,7 +149,7 @@
149
149
  }
150
150
  hr {
151
151
  margin: 0;
152
- width: 33%;
152
+ flex: 1;
153
153
  border: 1px solid theme-color('info');
154
154
  }
155
155
  }
@@ -0,0 +1,6 @@
1
+ #picturesModal {
2
+ .close {
3
+ right: 0;
4
+ z-index: 3;
5
+ }
6
+ }
@@ -101,7 +101,8 @@ module Spree
101
101
  end
102
102
  end
103
103
  content = content_tag('ul', raw(items.join("\n")), class: 'nav justify-content-between checkout-progress-steps', id: "checkout-step-#{@order.state}")
104
- content << content_tag('div', raw('<hr /><hr /><hr />'), class: "checkout-progress-steps-line state-#{@order.state}")
104
+ hrs = '<hr />' * (states.length - 1)
105
+ content << content_tag('div', raw(hrs), class: "checkout-progress-steps-line state-#{@order.state}")
105
106
  end
106
107
 
107
108
  def flash_messages(opts = {})
@@ -234,6 +235,10 @@ module Spree
234
235
  @static_filters ||= Spree::Frontend::Config[:products_filters]
235
236
  end
236
237
 
238
+ def additional_filters_partials
239
+ @additional_filters_partials ||= Spree::Frontend::Config[:additional_filters_partials]
240
+ end
241
+
237
242
  def filtering_params
238
243
  @filtering_params ||= available_option_types.map(&:filter_param).concat(static_filters)
239
244
  end
@@ -3,6 +3,7 @@ module Spree
3
3
  preference :coupon_codes_enabled, :boolean, default: true # Determines if we show coupon code form at cart and checkout
4
4
  preference :locale, :string, default: Rails.application.config.i18n.default_locale
5
5
  preference :products_filters, :array, default: %w(keywords price sort_by)
6
+ preference :additional_filters_partials, :array, default: %w()
6
7
  preference :remember_me_enabled, :boolean, default: true
7
8
  end
8
9
  end
@@ -53,6 +53,10 @@
53
53
  <% end %>
54
54
  </div>
55
55
  </div>
56
+
57
+ <% additional_filters_partials.each do |partial| %>
58
+ <%= render "spree/products/filters/#{partial}", permitted_params: permitted_params %>
59
+ <% end %>
56
60
  </div>
57
61
  </div>
58
62
  <% end %>
@@ -51,6 +51,10 @@
51
51
  </div>
52
52
  </div>
53
53
  </div>
54
+
55
+ <% additional_filters_partials.each do |partial| %>
56
+ <%= render "spree/products/filters/mobile/#{partial}", permitted_params: permitted_params %>
57
+ <% end %>
54
58
  </div>
55
59
  </div>
56
60
  <% end %>
@@ -3,7 +3,7 @@
3
3
  <div class="modal-dialog--zoom modal-dialog mw-100 vh-100 mt-0 mb-0" role="document">
4
4
  <div class="modal-content h-100">
5
5
  <div class="modal-body h-100">
6
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
6
+ <button type="button" class="close position-absolute" data-dismiss="modal" aria-label="Close">
7
7
  <span aria-hidden="true">
8
8
  <%= icon(name: 'close',
9
9
  classes: 'd-block d-lg-none',
@@ -10,7 +10,7 @@
10
10
  <% end %>
11
11
  </div>
12
12
  <div class="card-footer text-center">
13
- <span class="price selling lead" content="<%= price.nil? 0 : price.to_d %>">
13
+ <span class="price selling lead" content="<%= price.nil? ? 0 : price.to_d %>">
14
14
  <%= display_price(product) %>
15
15
  </span>
16
16
  <span content="<%= current_currency %>"></span>
@@ -38,7 +38,7 @@
38
38
 
39
39
  <%= render partial: 'gallery_modal' %>
40
40
  </div>
41
- <div id="related-products" />
41
+ <div id="related-products"></div>
42
42
 
43
43
  <%= products_structured_data([@product]) %>
44
44
 
@@ -5,16 +5,22 @@ Gem::Specification.new do |s|
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.name = 'spree_frontend'
7
7
  s.version = Spree.version
8
- s.summary = 'Frontend e-commerce functionality for the Spree project.'
9
- s.description = s.summary
10
-
11
- s.required_ruby_version = '>= 2.5.0'
12
-
13
8
  s.author = 'Sean Schofield'
14
9
  s.email = 'sean@spreecommerce.com'
10
+ s.summary = 'Frontend e-commerce functionality for the Spree project.'
11
+ s.description = s.summary
15
12
  s.homepage = 'http://spreecommerce.org'
16
13
  s.license = 'BSD-3-Clause'
17
14
 
15
+ s.metadata = {
16
+ "bug_tracker_uri" => "https://github.com/spree/spree/issues",
17
+ "changelog_uri" => "https://github.com/spree/spree/releases/tag/v#{s.version}",
18
+ "documentation_uri" => "https://guides.spreecommerce.org/",
19
+ "source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",
20
+ }
21
+
22
+ s.required_ruby_version = '>= 2.5.0'
23
+
18
24
  s.files = `git ls-files`.split("\n").reject { |f| f.match(/^spec/) && !f.match(/^spec\/fixtures/) }
19
25
  s.require_path = 'lib'
20
26
  s.requirements << 'none'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.6
4
+ version: 4.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-06 00:00:00.000000000 Z
11
+ date: 2020-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.1.6
19
+ version: 4.1.11
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.1.6
26
+ version: 4.1.11
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: spree_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 4.1.6
33
+ version: 4.1.11
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 4.1.6
40
+ version: 4.1.11
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bootstrap
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -333,6 +333,7 @@ files:
333
333
  - app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss
334
334
  - app/assets/stylesheets/spree/frontend/views/spree/orders/show.scss
335
335
  - app/assets/stylesheets/spree/frontend/views/spree/products/cart_form.scss
336
+ - app/assets/stylesheets/spree/frontend/views/spree/products/gallery_modal.scss
336
337
  - app/assets/stylesheets/spree/frontend/views/spree/products/index.scss
337
338
  - app/assets/stylesheets/spree/frontend/views/spree/products/show.scss
338
339
  - app/assets/stylesheets/spree/frontend/views/spree/shared/_color_select.scss
@@ -498,8 +499,12 @@ files:
498
499
  homepage: http://spreecommerce.org
499
500
  licenses:
500
501
  - BSD-3-Clause
501
- metadata: {}
502
- post_install_message:
502
+ metadata:
503
+ bug_tracker_uri: https://github.com/spree/spree/issues
504
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.1.11
505
+ documentation_uri: https://guides.spreecommerce.org/
506
+ source_code_uri: https://github.com/spree/spree/tree/v4.1.11
507
+ post_install_message:
503
508
  rdoc_options: []
504
509
  require_paths:
505
510
  - lib
@@ -516,7 +521,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
516
521
  requirements:
517
522
  - none
518
523
  rubygems_version: 3.1.2
519
- signing_key:
524
+ signing_key:
520
525
  specification_version: 4
521
526
  summary: Frontend e-commerce functionality for the Spree project.
522
527
  test_files: []