spree_frontend 2.1.2 → 2.1.3
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 +9 -9
- data/app/assets/javascripts/store/product.js.coffee +3 -3
- data/app/assets/stylesheets/store/screen.css.scss +24 -2
- data/app/controllers/spree/checkout_controller.rb +1 -1
- data/app/views/spree/checkout/payment/_gateway.html.erb +5 -5
- data/app/views/spree/shared/_products.html.erb +7 -0
- data/config/routes.rb +2 -2
- 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: d8785a3b87576e5eebb362cc98645fe59ff04f75
|
4
|
+
data.tar.gz: 902320408c1675e84484a8e877a7054835dda0d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8430cf436239009f9b98b3869164e384c23eacb730d205f5f212e3d790a97c1266a713282d67bbf3eb9536e7dbf8555941a296b8d25af92f238aa4dcd4a8d81b
|
7
|
+
data.tar.gz: bd0ad3e7f55e94dfdaa6e9b48130708c693be975db8a9a10d1b3c403e60be4fb653e09d85b51e166adc760d04a6b56a53672eb0e3f90ebb567993de7b21fe8bf
|
@@ -6,18 +6,18 @@ Spree.disableSaveOnClick = ->
|
|
6
6
|
|
7
7
|
Spree.ready ($) ->
|
8
8
|
Spree.Checkout = {}
|
9
|
-
$("
|
10
|
-
$("
|
11
|
-
$("
|
9
|
+
$(".cardNumber").payment('formatCardNumber')
|
10
|
+
$(".cardExpiry").payment('formatCardExpiry')
|
11
|
+
$(".cardCode").payment('formatCardCVC')
|
12
12
|
|
13
|
-
$("
|
14
|
-
$("
|
13
|
+
$(".cardNumber").change ->
|
14
|
+
$(this).parent().siblings(".ccType").val($.payment.cardType(@value))
|
15
15
|
|
16
16
|
if ($ '#checkout_form_address').is('*')
|
17
17
|
($ '#checkout_form_address').validate()
|
18
18
|
|
19
19
|
getCountryId = (region) ->
|
20
|
-
$('
|
20
|
+
$('#' + region + 'country select').val()
|
21
21
|
|
22
22
|
updateState = (region) ->
|
23
23
|
countryId = getCountryId(region)
|
@@ -35,7 +35,7 @@ Spree.ready ($) ->
|
|
35
35
|
statesRequired = data.states_required
|
36
36
|
states = data.states
|
37
37
|
|
38
|
-
statePara = ($ '
|
38
|
+
statePara = ($ '#' + region + 'state')
|
39
39
|
stateSelect = statePara.find('select')
|
40
40
|
stateInput = statePara.find('input')
|
41
41
|
stateSpanRequired = statePara.find('state-required')
|
@@ -70,10 +70,10 @@ Spree.ready ($) ->
|
|
70
70
|
stateInput.removeClass('hidden')
|
71
71
|
stateSelect.removeClass('required')
|
72
72
|
|
73
|
-
($ '
|
73
|
+
($ '#bcountry select').change ->
|
74
74
|
updateState 'b'
|
75
75
|
|
76
|
-
($ '
|
76
|
+
($ '#scountry select').change ->
|
77
77
|
updateState 's'
|
78
78
|
|
79
79
|
updateState 'b'
|
@@ -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"],
|
@@ -327,6 +336,12 @@ nav #main-nav-bar {
|
|
327
336
|
}
|
328
337
|
}
|
329
338
|
|
339
|
+
figure#logo {
|
340
|
+
img {
|
341
|
+
padding-top:25px;
|
342
|
+
}
|
343
|
+
}
|
344
|
+
|
330
345
|
nav#taxonomies {
|
331
346
|
.taxonomy-root {
|
332
347
|
text-transform: uppercase;
|
@@ -727,6 +742,14 @@ ul#products {
|
|
727
742
|
}
|
728
743
|
}
|
729
744
|
|
745
|
+
#billing {
|
746
|
+
input[type="text"], input[type="email"],
|
747
|
+
input[type="tel"], input[type="number"],
|
748
|
+
select, textarea {
|
749
|
+
width: 100%;
|
750
|
+
}
|
751
|
+
}
|
752
|
+
|
730
753
|
#order_details, #order_summary {
|
731
754
|
padding: 0;
|
732
755
|
|
@@ -1224,7 +1247,6 @@ table.order-summary {
|
|
1224
1247
|
td { display: block; min-height: 1.25em; }
|
1225
1248
|
}
|
1226
1249
|
|
1227
|
-
|
1228
1250
|
figure#logo {
|
1229
1251
|
text-align: center;
|
1230
1252
|
}
|
@@ -97,7 +97,7 @@ module Spree
|
|
97
97
|
# attributes for a single payment and its source, discarding attributes
|
98
98
|
# for payment methods other than the one selected
|
99
99
|
def object_params
|
100
|
-
#
|
100
|
+
# has_checkout_step? check is necessary due to issue described in #2910
|
101
101
|
if @order.has_checkout_step?("payment") && @order.payment?
|
102
102
|
if params[:payment_source].present?
|
103
103
|
source_params = params.delete(:payment_source)[params[:order][:payments_attributes].first[:payment_method_id].underscore]
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<p class="field" data-hook="card_number">
|
5
5
|
<%= label_tag "card_number", Spree.t(:card_number) %><span class="required">*</span><br />
|
6
6
|
<% options_hash = Rails.env.production? ? {:autocomplete => 'off'} : {} %>
|
7
|
-
<%= text_field_tag "#{param_prefix}[number]", '', options_hash.merge(:id => 'card_number', :class => 'required', :size => 19, :maxlength => 19, :autocomplete => "off") %>
|
7
|
+
<%= text_field_tag "#{param_prefix}[number]", '', options_hash.merge(:id => 'card_number', :class => 'required cardNumber', :size => 19, :maxlength => 19, :autocomplete => "off") %>
|
8
8
|
|
9
9
|
<span id="card_type" style="display:none;">
|
10
10
|
( <span id="looks_like" ><%= Spree.t(:card_type_is) %> <span id="type"></span></span>
|
@@ -13,16 +13,16 @@
|
|
13
13
|
</span>
|
14
14
|
</p>
|
15
15
|
<p class="field" data-hook="card_expiration">
|
16
|
-
<%= label_tag "
|
17
|
-
<%= text_field_tag "#{param_prefix}[expiry]", '', :id => 'card_expiry', :class => "required", :placeholder => "MM / YY" %>
|
16
|
+
<%= label_tag "card_expiry", Spree.t(:expiration) %><span class="required">*</span><br />
|
17
|
+
<%= text_field_tag "#{param_prefix}[expiry]", '', :id => 'card_expiry', :class => "required cardExpiry", :placeholder => "MM / YY" %>
|
18
18
|
</p>
|
19
19
|
<p class="field" data-hook="card_code">
|
20
20
|
<%= label_tag "card_code", Spree.t(:card_code) %><span class="required">*</span><br />
|
21
|
-
<%= text_field_tag "#{param_prefix}[verification_value]", '', options_hash.merge(:id => 'card_code', :class => 'required', :size => 5) %>
|
21
|
+
<%= text_field_tag "#{param_prefix}[verification_value]", '', options_hash.merge(:id => 'card_code', :class => 'required cardCode', :size => 5) %>
|
22
22
|
<%= link_to "(#{Spree.t(:what_is_this)})", spree.content_path('cvv'), :target => '_blank', "data-hook" => "cvv_link", :id => "cvv_link" %>
|
23
23
|
</p>
|
24
24
|
|
25
|
-
<%= hidden_field_tag "#{param_prefix}[cc_type]", '', :id => "cc_type" %>
|
25
|
+
<%= hidden_field_tag "#{param_prefix}[cc_type]", '', :id => "cc_type", :class => 'ccType' %>
|
26
26
|
|
27
27
|
<%= hidden_field param_prefix, 'first_name', :value => @order.billing_firstname %>
|
28
28
|
<%= hidden_field param_prefix, 'last_name', :value => @order.billing_lastname %>
|
@@ -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) %>
|
data/config/routes.rb
CHANGED
@@ -2,7 +2,7 @@ Spree::Core::Engine.add_routes do
|
|
2
2
|
|
3
3
|
root :to => 'home#index'
|
4
4
|
|
5
|
-
resources :products
|
5
|
+
resources :products, :only => [:index, :show]
|
6
6
|
|
7
7
|
get '/locale/set', :to => 'locale#set'
|
8
8
|
|
@@ -19,7 +19,7 @@ Spree::Core::Engine.add_routes do
|
|
19
19
|
get '/orders/populate', :to => populate_redirect
|
20
20
|
get '/orders/:id/token/:token' => 'orders#show', :as => :token_order
|
21
21
|
|
22
|
-
resources :orders, :except => [:new, :create] do
|
22
|
+
resources :orders, :except => [:new, :create, :destroy] do
|
23
23
|
post :populate, :on => :collection
|
24
24
|
end
|
25
25
|
|
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.1.
|
4
|
+
version: 2.1.3
|
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-20 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: 2.1.
|
19
|
+
version: 2.1.3
|
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.1.
|
26
|
+
version: 2.1.3
|
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: 2.1.
|
33
|
+
version: 2.1.3
|
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.1.
|
40
|
+
version: 2.1.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: canonical-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -171,7 +171,6 @@ files:
|
|
171
171
|
- app/views/spree/checkout/edit.html.erb
|
172
172
|
- app/views/spree/checkout/payment/_check.html.erb
|
173
173
|
- app/views/spree/checkout/payment/_gateway.html.erb
|
174
|
-
- app/views/spree/checkout/registration.html.erb
|
175
174
|
- app/views/spree/content/cvv.html.erb
|
176
175
|
- app/views/spree/home/index.html.erb
|
177
176
|
- 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>
|