spree_frontend 4.1.0.rc1 → 4.1.0.rc2

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: a6b778bf7575ed1be482d4ee51e6f120a6e5c0b7f90ba5f34a17e6349ff8acfa
4
- data.tar.gz: 4c10823eaca354e2cfda0a6cce83177440b63c7ba82e0f9635027689da5f39e7
3
+ metadata.gz: 262122d44be5ba437437f0152a0fcb82223769278216335f195ed5453da9268a
4
+ data.tar.gz: db27b441b75b3dd5e12dd30044de2f2f2659700c494fe10494169d0f249ebc01
5
5
  SHA512:
6
- metadata.gz: 3d4335a8105a046bd52b83b7db73b9f8516090c958b325969ca1bef4fd70cf5da14382369b9c7d3831f8e3f53ab938beb90c7790077550ce64d8ce1080e39278
7
- data.tar.gz: 856c1c0a5556a46a6d7c008dde76f8c28d8a3a111f05d02a0cd5da5b01e9c779dfd4f580221013f0dc9f3079bbe79b130d92dc576da34e83c63a89d28267075b
6
+ metadata.gz: 2072e4e7335566c6a158cbb38a8e85b01821d80d4f07da17fc75325e5ae417de59c0dff4cee41ff3ecdc580515e9176feb2541bc7d28573d4ed1d4526717d5e0
7
+ data.tar.gz: aa9493dc137d0e17b7758aa055e979d62e71a2f1df64e6a0276e3600aa28151703342afaf178e30af92c8670106f7bdb8cc67f8bd192fac695c7429054a36e34
@@ -262,7 +262,10 @@ Spree.ready(function($) {
262
262
  $cartForm.attr('data-product-summary')
263
263
  ), Spree.variantById($cartForm, variantId))
264
264
  },
265
- function(_error) {
265
+ function(error) {
266
+ if (typeof error === 'string' && error !== '') {
267
+ document.querySelector('#no-product-available .no-product-available-text').innerText = error
268
+ }
266
269
  document.getElementById('overlay').classList.add('shown')
267
270
  document.getElementById('no-product-available').classList.add('shown')
268
271
  window.scrollTo(0, 0)
@@ -22,6 +22,10 @@
22
22
  top: $spree-header-mobile-height;
23
23
  margin: auto;
24
24
 
25
+ @include media-breakpoint-up(sm) {
26
+ top: $spree-header-tablet-height;
27
+ }
28
+
25
29
  @include media-breakpoint-up(md) {
26
30
  top: 230px;
27
31
  }
@@ -3,7 +3,7 @@ module Spree
3
3
  respond_to :html
4
4
 
5
5
  def index
6
- fresh_when etag: store_etag, last_modified: current_store.updated_at.utc, public: true
6
+ fresh_when etag: store_etag, last_modified: store_last_modified, public: true
7
7
  end
8
8
  end
9
9
  end
@@ -46,5 +46,9 @@ module Spree
46
46
  config_locale
47
47
  ]
48
48
  end
49
+
50
+ def store_last_modified
51
+ (current_store.updated_at || Time.current).utc
52
+ end
49
53
  end
50
54
  end
@@ -50,8 +50,10 @@
50
50
  <div class="footer-spree-label">
51
51
  <%= link_to root[:title], root[:url] %>
52
52
  </div>
53
- <% root[:items].each do |item| %>
54
- <div class="pt-2"><%= link_to item[:title], item[:url] %></div>
53
+ <% if root[:items].present? %>
54
+ <% root[:items].each do |item| %>
55
+ <div class="pt-2"><%= link_to item[:title], item[:url] %></div>
56
+ <% end %>
55
57
  <% end %>
56
58
  </div>
57
59
  <% end %>
@@ -3,39 +3,47 @@
3
3
  <% spree_navigation_data.each do |root| %>
4
4
  <li class="navbar main-nav-bar-dropdown main-nav-bar-category">
5
5
  <%= link_to root[:title], root[:url], class: 'p-2 main-nav-bar-item main-nav-bar-category-button' %>
6
- <div class="w-100 shadow main-nav-bar-category-dropdown">
7
- <div class="container p-0 d-flex justify-content-xl-around mx-auto">
8
- <div class="row">
9
- <div class="category-links">
10
- <div class="category-links-header text-uppercase">
11
- <%= root[:subtitle] %>
12
- </div>
13
- <ul class="pl-0">
14
- <% root[:items].each do |item| %>
15
- <li>
16
- <%= link_to item[:title], item[:url], class: 'text-uppercase' %>
17
- </li>
18
- <% end %>
19
- </ul>
20
- </div>
21
- <% root[:promo_banners].each do |promo_banner| %>
22
- <%= link_to promo_banner[:url] do %>
23
- <div class="category-image category-image text-center mx-3">
24
- <%= main_nav_image(promo_banner[:image], promo_banner[:title]) %>
25
- <div class="category-box">
26
- <div class="category-box-small-text">
27
- <%= promo_banner[:subtitle] %>
6
+ <% if root[:items].present? || root[:promo_banners].present? %>
7
+ <div class="w-100 shadow main-nav-bar-category-dropdown">
8
+ <div class="container p-0 d-flex justify-content-xl-around mx-auto">
9
+ <% if root[:items].present? %>
10
+ <div class="row">
11
+ <div class="category-links">
12
+ <% if root[:subtitle].present? %>
13
+ <div class="category-links-header text-uppercase">
14
+ <%= root[:subtitle] %>
28
15
  </div>
29
- <div class="category-box-big-text">
30
- <%= promo_banner[:title] %>
31
- </div>
32
- </div>
16
+ <% end %>
17
+ <ul class="pl-0">
18
+ <% root[:items].each do |item| %>
19
+ <li>
20
+ <%= link_to item[:title], item[:url], class: 'text-uppercase' %>
21
+ </li>
22
+ <% end %>
23
+ </ul>
33
24
  </div>
34
25
  <% end %>
35
- <% end %>
26
+ <% if root[:promo_banners].present? %>
27
+ <% root[:promo_banners].each do |promo_banner| %>
28
+ <%= link_to promo_banner[:url] do %>
29
+ <div class="category-image category-image text-center mx-3">
30
+ <%= main_nav_image(promo_banner[:image], promo_banner[:title]) %>
31
+ <div class="category-box">
32
+ <div class="category-box-small-text">
33
+ <%= promo_banner[:subtitle] %>
34
+ </div>
35
+ <div class="category-box-big-text">
36
+ <%= promo_banner[:title] %>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ <% end %>
41
+ <% end %>
42
+ <% end %>
43
+ </div>
36
44
  </div>
37
45
  </div>
38
- </div>
46
+ <%end %>
39
47
  </li>
40
48
  <% end %>
41
49
  </ul>
@@ -39,7 +39,7 @@
39
39
  <li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
40
40
  <%= link_to root[:title], root[:url], class: 'w-75' %>
41
41
 
42
- <a class="w-25 text-right mobile-navigation-category-link" data-category="<%= root[:title].downcase %>" href="#" aria-label="<%= Spree.t('go_to_category')%>">
42
+ <a class="w-25 text-right mobile-navigation-category-link" data-category="<%= root[:title].parameterize %>" href="#" aria-label="<%= Spree.t('go_to_category')%>">
43
43
  <%= icon(name: 'arrow-right',
44
44
  classes: 'd-sm-none spree-icon-arrow spree-icon-arrow-right',
45
45
  width: 16,
@@ -50,14 +50,19 @@
50
50
  height: 27) %>
51
51
  </a>
52
52
 
53
- <ul class="list-unstyled position-absolute mobile-navigation-sublist" data-category="<%= root[:title].downcase %>">
54
- <li class="text-center font-weight-bold mobile-navigation-sublist-header">
55
- <%= root[:title] %>
56
- </li>
57
-
58
- <% root[:items].each do |item| %>
53
+ <ul class="list-unstyled position-absolute mobile-navigation-sublist" data-category="<%= root[:title].parameterize %>">
54
+ <% if root[:items].present? %>
55
+ <li class="text-center font-weight-bold mobile-navigation-sublist-header">
56
+ <%= root[:title] %>
57
+ </li>
58
+ <% root[:items].each do |item| %>
59
+ <li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
60
+ <%= link_to item[:title], item[:url], class: 'w-75' %>
61
+ </li>
62
+ <% end %>
63
+ <% else %>
59
64
  <li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
60
- <%= link_to item[:title], item[:url], class: 'w-75' %>
65
+ <%= link_to root[:title], root[:url], class: 'w-75' %>
61
66
  </li>
62
67
  <% end %>
63
68
  </ul>
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.0.rc1
4
+ version: 4.1.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-31 00:00:00.000000000 Z
11
+ date: 2020-02-04 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.0.rc1
19
+ version: 4.1.0.rc2
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.0.rc1
26
+ version: 4.1.0.rc2
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.0.rc1
33
+ version: 4.1.0.rc2
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.0.rc1
40
+ version: 4.1.0.rc2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bootstrap
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -511,7 +511,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
511
511
  version: 1.3.1
512
512
  requirements:
513
513
  - none
514
- rubygems_version: 3.0.3
514
+ rubygems_version: 3.0.6
515
515
  signing_key:
516
516
  specification_version: 4
517
517
  summary: Frontend e-commerce functionality for the Spree project.