spree_frontend 2.0.6 → 2.0.7
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/store/checkout.js.coffee +12 -12
- data/app/assets/javascripts/store/product.js.coffee +3 -3
- data/app/assets/stylesheets/store/screen.css.scss +18 -1
- data/app/controllers/spree/checkout_controller.rb +1 -1
- data/app/views/spree/shared/_products.html.erb +7 -0
- metadata +6 -7
- data/app/views/spree/checkout/registration.html.erb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4de87e043800f121326d03ee2f4505f2cac7cba
|
4
|
+
data.tar.gz: 0033ae9ddaf67d6e00101df373814f8836439217
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac65662b06b0698ce296c01c5fca6e18fe9b64c58be38e4b3d5eb6d054f42db07042dddc99b1949391246af4d61174db5ee71e8179b39ea0d6da7523bddb3285
|
7
|
+
data.tar.gz: 2dfc4519d9269b627809631f312538a146dae97575ec6b93978573cd8d4cd8a2752040d0b01a577c464be22ac248aa30388f522858279306f096fd73d6184637
|
@@ -8,9 +8,9 @@ Spree.ready ($) ->
|
|
8
8
|
($ '#checkout_form_address').validate()
|
9
9
|
|
10
10
|
getCountryId = (region) ->
|
11
|
-
$('
|
11
|
+
$('#' + region + 'country select').val()
|
12
12
|
|
13
|
-
updateState = (region) ->
|
13
|
+
Spree.updateState = (region) ->
|
14
14
|
countryId = getCountryId(region)
|
15
15
|
if countryId?
|
16
16
|
unless Spree.Checkout[countryId]?
|
@@ -18,15 +18,15 @@ Spree.ready ($) ->
|
|
18
18
|
Spree.Checkout[countryId] =
|
19
19
|
states: data.states
|
20
20
|
states_required: data.states_required
|
21
|
-
fillStates(Spree.Checkout[countryId], region)
|
21
|
+
Spree.fillStates(Spree.Checkout[countryId], region)
|
22
22
|
else
|
23
|
-
fillStates(Spree.Checkout[countryId], region)
|
23
|
+
Spree.fillStates(Spree.Checkout[countryId], region)
|
24
24
|
|
25
|
-
fillStates = (data, region) ->
|
25
|
+
Spree.fillStates = (data, region) ->
|
26
26
|
statesRequired = data.states_required
|
27
27
|
states = data.states
|
28
28
|
|
29
|
-
statePara = ($ '
|
29
|
+
statePara = ($ '#' + region + 'state')
|
30
30
|
stateSelect = statePara.find('select')
|
31
31
|
stateInput = statePara.find('input')
|
32
32
|
stateSpanRequired = statePara.find('state-required')
|
@@ -60,13 +60,13 @@ Spree.ready ($) ->
|
|
60
60
|
stateInput.removeClass('hidden')
|
61
61
|
stateSelect.removeClass('required')
|
62
62
|
|
63
|
-
($ '
|
64
|
-
updateState 'b'
|
63
|
+
($ '#bcountry select').change ->
|
64
|
+
Spree.updateState 'b'
|
65
65
|
|
66
|
-
($ '
|
67
|
-
updateState 's'
|
66
|
+
($ '#scountry select').change ->
|
67
|
+
Spree.updateState 's'
|
68
68
|
|
69
|
-
updateState 'b'
|
69
|
+
Spree.updateState 'b'
|
70
70
|
|
71
71
|
order_use_billing = ($ 'input#order_use_billing')
|
72
72
|
order_use_billing.change ->
|
@@ -79,7 +79,7 @@ Spree.ready ($) ->
|
|
79
79
|
else
|
80
80
|
($ '#shipping .inner').show()
|
81
81
|
($ '#shipping .inner input, #shipping .inner select').prop 'disabled', false
|
82
|
-
updateState('s')
|
82
|
+
Spree.updateState('s')
|
83
83
|
|
84
84
|
update_shipping_form_state order_use_billing
|
85
85
|
|
@@ -22,10 +22,10 @@ $ ->
|
|
22
22
|
($ 'li.tmb-' + variantId).show()
|
23
23
|
currentThumb = ($ '#' + ($ '#main-image').data('selectedThumbId'))
|
24
24
|
if not currentThumb.hasClass('vtmb-' + variantId)
|
25
|
-
thumb = ($ ($ 'ul.thumbnails li:visible.vtmb').eq(0))
|
26
|
-
thumb = ($ ($ 'ul.thumbnails li:visible').eq(0)) unless thumb.length > 0
|
25
|
+
thumb = ($ ($ '#product-images ul.thumbnails li:visible.vtmb').eq(0))
|
26
|
+
thumb = ($ ($ '#product-images ul.thumbnails li:visible').eq(0)) unless thumb.length > 0
|
27
27
|
newImg = thumb.find('a').attr('href')
|
28
|
-
($ 'ul.thumbnails li').removeClass 'selected'
|
28
|
+
($ '#product-images ul.thumbnails li').removeClass 'selected'
|
29
29
|
thumb.addClass 'selected'
|
30
30
|
($ '#main-image img').attr 'src', newImg
|
31
31
|
($ '#main-image').data 'selectedThumb', newImg
|
@@ -113,10 +113,14 @@ input[type="password"], input[type="search"], input[type="tel"],
|
|
113
113
|
input[type="text"], input[type="time"], input[type="url"],
|
114
114
|
input[type="week"] {
|
115
115
|
border: $default_border;
|
116
|
-
padding: 5px
|
116
|
+
padding: 5px;
|
117
117
|
font-family: $ff_base;
|
118
118
|
font-size: $input_box_font_size;
|
119
119
|
|
120
|
+
-webkit-box-sizing: border-box;
|
121
|
+
-moz-box-sizing: border-box;
|
122
|
+
box-sizing: border-box;
|
123
|
+
|
120
124
|
&:active, &:focus {
|
121
125
|
border-color: $link_text_color;
|
122
126
|
outline: none;
|
@@ -146,6 +150,11 @@ span.required {
|
|
146
150
|
|
147
151
|
fieldset {
|
148
152
|
margin: 0;
|
153
|
+
min-width: 100%;
|
154
|
+
|
155
|
+
-webkit-box-sizing: border-box;
|
156
|
+
-moz-box-sizing: border-box;
|
157
|
+
box-sizing: border-box;
|
149
158
|
}
|
150
159
|
|
151
160
|
input[type="submit"], input[type="button"],
|
@@ -727,6 +736,14 @@ ul#products {
|
|
727
736
|
}
|
728
737
|
}
|
729
738
|
|
739
|
+
#billing {
|
740
|
+
input[type="text"], input[type="email"],
|
741
|
+
input[type="tel"], input[type="number"],
|
742
|
+
select, textarea {
|
743
|
+
width: 100%;
|
744
|
+
}
|
745
|
+
}
|
746
|
+
|
730
747
|
#order_details, #order_summary {
|
731
748
|
padding: 0;
|
732
749
|
|
@@ -99,7 +99,7 @@ module Spree
|
|
99
99
|
# attributes for a single payment and its source, discarding attributes
|
100
100
|
# for payment methods other than the one selected
|
101
101
|
def object_params
|
102
|
-
#
|
102
|
+
# has_checkout_step? check is necessary due to issue described in #2910
|
103
103
|
if @order.has_checkout_step?("payment") && @order.payment?
|
104
104
|
if params[:payment_source].present?
|
105
105
|
source_params = params.delete(:payment_source)[params[:order][:payments_attributes].first[:payment_method_id].underscore]
|
@@ -2,6 +2,13 @@
|
|
2
2
|
paginated_products = @searcher.retrieve_products if params.key?(:keywords)
|
3
3
|
paginated_products ||= products
|
4
4
|
%>
|
5
|
+
|
6
|
+
<% content_for :head do %>
|
7
|
+
<% if paginated_products.respond_to?(:num_pages) %>
|
8
|
+
<%= rel_next_prev_link_tags paginated_products %>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
11
|
+
|
5
12
|
<% if products.empty? %>
|
6
13
|
<%= Spree.t(:no_products_found) %>
|
7
14
|
<% elsif params.key?(:keywords) %>
|
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: 2.0.
|
4
|
+
version: 2.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.0.
|
19
|
+
version: 2.0.7
|
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: 2.0.
|
26
|
+
version: 2.0.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: spree_api
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.0.
|
33
|
+
version: 2.0.7
|
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: 2.0.
|
40
|
+
version: 2.0.7
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: jquery-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,7 +200,6 @@ files:
|
|
200
200
|
- app/views/spree/checkout/edit.html.erb
|
201
201
|
- app/views/spree/checkout/payment/_check.html.erb
|
202
202
|
- app/views/spree/checkout/payment/_gateway.html.erb
|
203
|
-
- app/views/spree/checkout/registration.html.erb
|
204
203
|
- app/views/spree/content/cvv.html.erb
|
205
204
|
- app/views/spree/home/index.html.erb
|
206
205
|
- app/views/spree/layouts/spree_application.html.erb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @user } %>
|
2
|
-
<h1><%= Spree.t(:registration) %></h1>
|
3
|
-
<div id="registration" data-hook>
|
4
|
-
<div id="account" class="columns alpha eight">
|
5
|
-
<!-- TODO: add partial with registration form -->
|
6
|
-
</div>
|
7
|
-
<% if Spree::Config[:allow_guest_checkout] %>
|
8
|
-
<div id="guest_checkout" data-hook class="columns omega eight">
|
9
|
-
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
|
10
|
-
<h6><%= Spree.t(:guest_user_account) %></h6>
|
11
|
-
<%= form_for @order, :url => update_checkout_registration_path, :method => :put, :html => { :id => 'checkout_form_registration' } do |f| %>
|
12
|
-
<p>
|
13
|
-
<%= f.label :email, Spree.t(:email) %><br />
|
14
|
-
<%= f.email_field :email, :class => 'title' %>
|
15
|
-
</p>
|
16
|
-
<p><%= f.submit Spree.t(:continue), :class => 'button primary' %></p>
|
17
|
-
<% end %>
|
18
|
-
</div>
|
19
|
-
<% end %>
|
20
|
-
</div>
|