spree_frontend 4.1.0 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/mobile_navigation.js +5 -6
- data/app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/mobile_navigation.scss +5 -0
- data/app/controllers/spree/addresses_controller.rb +1 -10
- data/app/controllers/spree/store_controller.rb +1 -1
- data/app/helpers/spree/addresses_helper.rb +6 -0
- data/app/helpers/spree/frontend_helper.rb +1 -1
- data/app/views/spree/checkout/_address.html.erb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66009bd783576beb6c4a4536bb0b4398b1a41842c193382858000b665073d193
|
4
|
+
data.tar.gz: 93fd6bf61fc0e457e41f3904c2e284be0c85b403887b58f93d9b5ac0f1ec61b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d2ddf2d9958332be7bb3fd40dbc8a2c649176090a636bfba1f9109e3b00788c47b2c0e32f41f404c3c418a75cd14781f69290f10b3333126a9be9d324d9d3a1
|
7
|
+
data.tar.gz: ef2b78d65c6756d35f5d88783d130d8b950853fc07d24bfdd6a4de2a7d14907269026aafb59fadeb5947ea345f625a16641f05cfd35a2e1bbb445ab6a114e6a1
|
@@ -6,6 +6,7 @@ Spree.ready(function($) {
|
|
6
6
|
if (this.mobileNavigation !== null) {
|
7
7
|
this.burgerButton = document.querySelector('.navbar-toggler');
|
8
8
|
this.closeButton = document.querySelector('#mobile-navigation-close-button');
|
9
|
+
this.mobileNavigationList = document.querySelector('.mobile-navigation-list');
|
9
10
|
this.categoryLinks = document.querySelectorAll('.mobile-navigation-category-link');
|
10
11
|
this.backButton = document.querySelector('#mobile-navigation-back-button');
|
11
12
|
this.overlay = document.querySelector('#overlay');
|
@@ -14,7 +15,6 @@ Spree.ready(function($) {
|
|
14
15
|
|
15
16
|
this.onResize = this.onResize.bind(this);
|
16
17
|
this.onCategoryClick = this.onCategoryClick.bind(this);
|
17
|
-
this.onTouchMove = this.onTouchMove.bind(this);
|
18
18
|
this.onBurgerClick = this.onBurgerClick.bind(this);
|
19
19
|
this.onCloseClick = this.onCloseClick.bind(this);
|
20
20
|
this.onBackClick = this.onBackClick.bind(this);
|
@@ -23,7 +23,6 @@ Spree.ready(function($) {
|
|
23
23
|
window.addEventListener('resize', this.onResize);
|
24
24
|
window.addEventListener('turbolinks:request-start', this.onCloseClick);
|
25
25
|
|
26
|
-
this.mobileNavigation.addEventListener('touchmove', this.onTouchMove, false);
|
27
26
|
this.burgerButton.addEventListener('click', this.onBurgerClick, false);
|
28
27
|
this.closeButton.addEventListener('click', this.onCloseClick, false);
|
29
28
|
this.backButton.addEventListener('click', this.onBackClick, false);
|
@@ -45,10 +44,6 @@ Spree.ready(function($) {
|
|
45
44
|
this.openCategory(category);
|
46
45
|
}
|
47
46
|
|
48
|
-
MobileNavigationManager.prototype.onTouchMove = function(e) {
|
49
|
-
e.preventDefault();
|
50
|
-
};
|
51
|
-
|
52
47
|
MobileNavigationManager.prototype.onBurgerClick = function() {
|
53
48
|
if (this.navigationOpen) {
|
54
49
|
this.close();
|
@@ -84,6 +79,8 @@ Spree.ready(function($) {
|
|
84
79
|
this.openedCategories.push(category);
|
85
80
|
var subList = document.querySelector('ul[data-category=' + category + ']');
|
86
81
|
if (subList) {
|
82
|
+
this.mobileNavigationList.classList.add('mobile-navigation-list-subcategory-shown');
|
83
|
+
this.mobileNavigationList.scrollTop = 0
|
87
84
|
subList.classList.add('shown');
|
88
85
|
this.backButton.classList.add('shown');
|
89
86
|
}
|
@@ -99,6 +96,7 @@ Spree.ready(function($) {
|
|
99
96
|
if (this.openedCategories[this.openedCategories.length - 1] === 'main') {
|
100
97
|
this.backButton.classList.remove('shown');
|
101
98
|
}
|
99
|
+
this.mobileNavigationList.classList.remove('mobile-navigation-list-subcategory-shown')
|
102
100
|
return false;
|
103
101
|
}
|
104
102
|
|
@@ -116,6 +114,7 @@ Spree.ready(function($) {
|
|
116
114
|
var category = openedCategories.pop();
|
117
115
|
this.closeCategory(category);
|
118
116
|
}
|
117
|
+
this.mobileNavigationList.classList.remove('mobile-navigation-list-subcategory-shown')
|
119
118
|
this.backButton.classList.remove('shown');
|
120
119
|
}
|
121
120
|
|
@@ -17,6 +17,8 @@
|
|
17
17
|
}
|
18
18
|
&-list, &-sublist {
|
19
19
|
margin: 0;
|
20
|
+
overflow-y: auto;
|
21
|
+
overflow-x: hidden;
|
20
22
|
padding: 0 19px;
|
21
23
|
&-item {
|
22
24
|
padding: 16px 0;
|
@@ -39,6 +41,9 @@
|
|
39
41
|
@include media-breakpoint-up(sm) {
|
40
42
|
padding-top: $spree-header-tablet-height;
|
41
43
|
}
|
44
|
+
&-subcategory-shown {
|
45
|
+
overflow-y: hidden;
|
46
|
+
}
|
42
47
|
}
|
43
48
|
|
44
49
|
&-sublist {
|
@@ -57,16 +57,7 @@ module Spree
|
|
57
57
|
private
|
58
58
|
|
59
59
|
def address_params
|
60
|
-
params
|
61
|
-
:firstname,
|
62
|
-
:lastname,
|
63
|
-
:address1,
|
64
|
-
:address2,
|
65
|
-
:city,
|
66
|
-
:state_id,
|
67
|
-
:zipcode,
|
68
|
-
:country_id,
|
69
|
-
:phone)
|
60
|
+
params.require(:address).permit(permitted_address_attributes)
|
70
61
|
end
|
71
62
|
end
|
72
63
|
end
|
@@ -33,5 +33,11 @@ module Spree
|
|
33
33
|
content_tag(:noscript, form.text_field(:state_name, class: 'required')) +
|
34
34
|
javascript_tag("document.write(\"<span class='d-block position-relative'>#{state_elements.html_safe}</span>\");")
|
35
35
|
end
|
36
|
+
|
37
|
+
def user_available_addresses
|
38
|
+
return unless try_spree_current_user
|
39
|
+
|
40
|
+
try_spree_current_user.addresses.where(country: available_countries)
|
41
|
+
end
|
36
42
|
end
|
37
43
|
end
|
@@ -255,7 +255,7 @@ module Spree
|
|
255
255
|
return '' if current_store.send(service).blank?
|
256
256
|
|
257
257
|
link_to "https://#{service}.com/#{current_store.send(service)}", target: :blank, rel: 'nofollow noopener' do
|
258
|
-
content_tag :
|
258
|
+
content_tag :figure, id: service, class: 'px-2' do
|
259
259
|
icon(name: service, width: 22, height: 22)
|
260
260
|
end
|
261
261
|
end
|
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.
|
4
|
+
version: 4.1.1
|
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-03-
|
11
|
+
date: 2020-03-16 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.
|
19
|
+
version: 4.1.1
|
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.
|
26
|
+
version: 4.1.1
|
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.
|
33
|
+
version: 4.1.1
|
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.
|
40
|
+
version: 4.1.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bootstrap
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|