spree_frontend 4.1.7 → 4.1.8

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: abeb5be8e52c16a43557e80432a4b557fd3b124aa11a1785092e7ea427230ba4
4
- data.tar.gz: 1ce85a68e7844356ab07f5ed83266510ce743281f73c50a76718a7128eb60686
3
+ metadata.gz: c2d3e1b2a20d956cabfccd9cec656802fb73f4476132fb671872547153f48119
4
+ data.tar.gz: 320b77ae82bac0ddefe481fcc204c57a66b2ef8d3150ab5aa8177d93aeb0397b
5
5
  SHA512:
6
- metadata.gz: a941265f5cef8292aa3c7e239e0ce8ac79d0b4c0d93fe2d1ed6062bbd6639d3a20602fedb7f2dbdcf547ccb7edfabf516fb0917b8a7a261ea06c3be1c27400dc
7
- data.tar.gz: 954fd27ccf2e62760b932385f619c3844b557147bf7f8a9d52bbe5a8e0ab52f252fb01c7ac8535887c86fcc1104c9b1141a28138f1a57869cbc3334467b2c0b4
6
+ metadata.gz: 74053b67c46b9e580641840f65244cde9e3e38b9a0947a704022734706d9bee8d94d63ff72806c9d37fd58ff0c52612967cc65e5e190c1d5ea3ff39c0901e65b
7
+ data.tar.gz: 2120bc4a5b8ebeb1c09713e6b5834f2d9c966cfe80d481d0a2025a433a82693353a64edcd714f53f2615437bc4c0d4d13bd25df23ad2cfeb912e4c3a5d1beb2f
@@ -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";
@@ -0,0 +1,6 @@
1
+ #picturesModal {
2
+ .close {
3
+ right: 0;
4
+ z-index: 3;
5
+ }
6
+ }
@@ -235,6 +235,10 @@ module Spree
235
235
  @static_filters ||= Spree::Frontend::Config[:products_filters]
236
236
  end
237
237
 
238
+ def additional_filters_partials
239
+ @additional_filters_partials ||= Spree::Frontend::Config[:additional_filters_partials]
240
+ end
241
+
238
242
  def filtering_params
239
243
  @filtering_params ||= available_option_types.map(&:filter_param).concat(static_filters)
240
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.7
4
+ version: 4.1.8
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-06-08 00:00:00.000000000 Z
11
+ date: 2020-08-05 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.7
19
+ version: 4.1.8
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.7
26
+ version: 4.1.8
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.7
33
+ version: 4.1.8
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.7
40
+ version: 4.1.8
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.8
505
+ documentation_uri: https://guides.spreecommerce.org/
506
+ source_code_uri: https://github.com/spree/spree/tree/v4.1.8
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: []