spree_core 0.70.3 → 0.70.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/assets/javascripts/admin/checkouts/edit.js +1 -1
- data/app/assets/javascripts/store/checkout.js +6 -4
- data/app/models/calculator/{price_bucket.rb → price_sack.rb} +2 -2
- data/app/models/payment.rb +9 -3
- data/app/models/payment_method.rb +4 -0
- data/app/models/payment_method/check.rb +4 -0
- data/app/views/checkout/_payment.html.erb +1 -0
- data/config/locales/en.yml +1 -1
- data/lib/spree_core/railtie.rb +3 -3
- data/lib/spree_core/version.rb +1 -1
- metadata +15 -15
@@ -40,7 +40,7 @@ $(document).ready(function(){
|
|
40
40
|
});
|
41
41
|
}
|
42
42
|
|
43
|
-
$("#customer_search").autocomplete("/admin/users.json?authenticity_token=" + $('meta[name=csrf-token]').attr("content"), {
|
43
|
+
$("#customer_search").autocomplete("/admin/users.json?authenticity_token=" + encodeURIComponent($('meta[name=csrf-token]').attr("content")), {
|
44
44
|
minChars: 5,
|
45
45
|
delay: 1500,
|
46
46
|
parse: prep_user_autocomplete_data,
|
@@ -60,10 +60,6 @@
|
|
60
60
|
}
|
61
61
|
}).triggerHandler('click');
|
62
62
|
|
63
|
-
$('form.edit_order').submit(function() {
|
64
|
-
$(this).find(':submit, :image').attr('disabled', true).removeClass('primary').addClass('disabled');
|
65
|
-
});
|
66
|
-
|
67
63
|
}
|
68
64
|
|
69
65
|
if($('#checkout_form_payment').is('*')){
|
@@ -75,3 +71,9 @@
|
|
75
71
|
}
|
76
72
|
});
|
77
73
|
})(jQuery);
|
74
|
+
|
75
|
+
function disableSaveOnClick() {
|
76
|
+
$('form.edit_spree_order').submit(function() {
|
77
|
+
$(this).find(':submit, :image').attr('disabled', true).removeClass('primary').addClass('disabled');
|
78
|
+
});
|
79
|
+
}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
class Calculator::
|
1
|
+
class Calculator::PriceSack < Calculator
|
2
2
|
preference :minimal_amount, :decimal, :default => 0
|
3
3
|
preference :normal_amount, :decimal, :default => 0
|
4
4
|
preference :discount_amount, :decimal, :default => 0
|
5
5
|
|
6
6
|
def self.description
|
7
|
-
I18n.t("
|
7
|
+
I18n.t("price_sack")
|
8
8
|
end
|
9
9
|
|
10
10
|
# as object we always get line items, as calculable we have Coupon, ShippingMethod
|
data/app/models/payment.rb
CHANGED
@@ -69,9 +69,15 @@ class Payment < ActiveRecord::Base
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def process!
|
72
|
-
if
|
73
|
-
|
74
|
-
|
72
|
+
if payment_method && payment_method.source_required?
|
73
|
+
if source
|
74
|
+
if !processing? && source.respond_to?(:process!)
|
75
|
+
started_processing!
|
76
|
+
source.process!(self) # source is responsible for updating the payment state when it's done processing
|
77
|
+
end
|
78
|
+
else
|
79
|
+
raise Spree::GatewayError.new(I18n.t(:payment_processing_failed))
|
80
|
+
end
|
75
81
|
end
|
76
82
|
end
|
77
83
|
|
data/config/locales/en.yml
CHANGED
@@ -672,7 +672,7 @@ en:
|
|
672
672
|
preview: Preview
|
673
673
|
previous: Previous
|
674
674
|
price: Price
|
675
|
-
|
675
|
+
price_sack: Price Sack
|
676
676
|
price_with_vat_included: "%{price} (inc. VAT)"
|
677
677
|
problem_authorizing_card: "Problem authorizing credit card"
|
678
678
|
problem_capturing_card: "Problem capturing credit card"
|
data/lib/spree_core/railtie.rb
CHANGED
@@ -28,9 +28,9 @@ module SpreeCore
|
|
28
28
|
Calculator::FlatRate,
|
29
29
|
Calculator::FlexiRate,
|
30
30
|
Calculator::PerItem,
|
31
|
-
Calculator::
|
31
|
+
Calculator::PriceSack]
|
32
32
|
|
33
|
-
|
33
|
+
app.config.spree.calculators.tax_rates = [
|
34
34
|
Calculator::SalesTax,
|
35
35
|
Calculator::Vat]
|
36
36
|
end
|
@@ -56,7 +56,7 @@ module SpreeCore
|
|
56
56
|
|
57
57
|
# sets the manifests / assets to be precompiled
|
58
58
|
initializer "spree.assets.precompile" do |app|
|
59
|
-
app.config.assets.precompile += ['store/all.*', 'admin/all.*', 'admin/spree_dash.*', 'admin/orders/edit_form.js', 'jqPlot/excanvas.min.js', 'admin/images/new.js', 'jquery.jstree/themes/apple/*']
|
59
|
+
app.config.assets.precompile += ['store/all.*', 'admin/all.*', 'admin/spree_dash.*', 'admin/orders/edit_form.js', 'admin/address_states.js', 'jqPlot/excanvas.min.js', 'admin/images/new.js', 'jquery.jstree/themes/apple/*']
|
60
60
|
end
|
61
61
|
|
62
62
|
# turn off asset debugging since that kills performance in development mode
|
data/lib/spree_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 271
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 70
|
9
|
-
-
|
10
|
-
version: 0.70.
|
9
|
+
- 4
|
10
|
+
version: 0.70.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sean Schofield
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-03-04 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
@@ -103,12 +103,12 @@ dependencies:
|
|
103
103
|
requirements:
|
104
104
|
- - "="
|
105
105
|
- !ruby/object:Gem::Version
|
106
|
-
hash:
|
106
|
+
hash: 27
|
107
107
|
segments:
|
108
108
|
- 1
|
109
|
-
- 0
|
110
109
|
- 3
|
111
|
-
|
110
|
+
- 0
|
111
|
+
version: 1.3.0
|
112
112
|
requirement: *id006
|
113
113
|
type: :runtime
|
114
114
|
prerelease: false
|
@@ -151,12 +151,12 @@ dependencies:
|
|
151
151
|
requirements:
|
152
152
|
- - "="
|
153
153
|
- !ruby/object:Gem::Version
|
154
|
-
hash:
|
154
|
+
hash: 27
|
155
155
|
segments:
|
156
156
|
- 2
|
157
|
-
-
|
158
|
-
-
|
159
|
-
version: 2.
|
157
|
+
- 5
|
158
|
+
- 0
|
159
|
+
version: 2.5.0
|
160
160
|
requirement: *id009
|
161
161
|
type: :runtime
|
162
162
|
prerelease: false
|
@@ -221,12 +221,12 @@ dependencies:
|
|
221
221
|
version: 3.1.1
|
222
222
|
- - <=
|
223
223
|
- !ruby/object:Gem::Version
|
224
|
-
hash:
|
224
|
+
hash: 11
|
225
225
|
segments:
|
226
226
|
- 3
|
227
227
|
- 1
|
228
|
-
-
|
229
|
-
version: 3.1.
|
228
|
+
- 4
|
229
|
+
version: 3.1.4
|
230
230
|
requirement: *id013
|
231
231
|
type: :runtime
|
232
232
|
prerelease: false
|
@@ -477,7 +477,7 @@ files:
|
|
477
477
|
- app/models/calculator/flat_rate.rb
|
478
478
|
- app/models/calculator/flexi_rate.rb
|
479
479
|
- app/models/calculator/per_item.rb
|
480
|
-
- app/models/calculator/
|
480
|
+
- app/models/calculator/price_sack.rb
|
481
481
|
- app/models/calculator/sales_tax.rb
|
482
482
|
- app/models/calculator/vat.rb
|
483
483
|
- app/models/calculator.rb
|