spree 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of spree might be problematic. Click here for more details.
- data/CHANGELOG +4 -0
- data/app/controllers/checkouts_controller.rb +6 -0
- data/config/environment.rb +3 -3
- data/db/sample/checkouts.yml +1 -1
- data/lib/spree.rb +1 -1
- data/public/javascripts/calendar_date_select/format_db.js +27 -0
- data/public/javascripts/calendar_date_select/format_euro_24hr_ymd.js +7 -0
- data/public/javascripts/calendar_date_select/format_iso_date.js +46 -0
- data/public/javascripts/calendar_date_select/locale/de.js +11 -0
- data/public/javascripts/calendar_date_select/locale/fi.js +10 -0
- data/public/javascripts/calendar_date_select/locale/fr.js +10 -0
- data/public/javascripts/calendar_date_select/locale/pl.js +10 -0
- data/public/javascripts/calendar_date_select/locale/pt.js +11 -0
- data/public/javascripts/calendar_date_select/locale/ru.js +10 -0
- data/public/stylesheets/compiled/screen.css +1 -1
- metadata +12 -30
- data/public/images/flags/dk.png +0 -0
- data/public/images/pp_checkout.gif +0 -0
data/CHANGELOG
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
class CheckoutsController < Spree::BaseController
|
2
2
|
include ActionView::Helpers::NumberHelper # Needed for JS usable rate information
|
3
3
|
before_filter :load_data
|
4
|
+
before_filter :prevent_editing_complete_order, :only => [:edit, :update]
|
4
5
|
|
5
6
|
resource_controller :singleton
|
6
7
|
belongs_to :order
|
@@ -155,4 +156,9 @@ class CheckoutsController < Spree::BaseController
|
|
155
156
|
def credit_hash
|
156
157
|
Hash[*@order.credits.select {|c| c.amount !=0 }.collect { |c| [c.description, number_to_currency(c.amount)] }.flatten]
|
157
158
|
end
|
159
|
+
|
160
|
+
def prevent_editing_complete_order
|
161
|
+
load_object
|
162
|
+
redirect_to order_url(parent_object) if @order.checkout_complete
|
163
|
+
end
|
158
164
|
end
|
data/config/environment.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
# ENV['RAILS_ENV'] ||= 'production'
|
6
6
|
|
7
7
|
# Specifies gem version of Rails to use when vendor/rails is not present
|
8
|
-
SPREE_GEM_VERSION = '0.9.
|
8
|
+
SPREE_GEM_VERSION = '0.9.2' unless defined? SPREE_GEM_VERSION
|
9
9
|
|
10
10
|
# Bootstrap the Rails environment, frameworks, and default configuration
|
11
11
|
require File.join(File.dirname(__FILE__), 'boot')
|
@@ -31,8 +31,8 @@ Spree::Initializer.run do |config|
|
|
31
31
|
config.gem "activemerchant", :lib => "active_merchant", :version => '>=1.4.1'
|
32
32
|
config.gem "tlsmail", :version => '0.0.1'
|
33
33
|
config.gem 'activerecord-tableless', :lib => 'tableless', :version => '>=0.1.0'
|
34
|
-
config.gem 'haml', :version => '2.2.0'
|
35
|
-
config.gem '
|
34
|
+
config.gem 'haml', :version => '>=2.2.0'
|
35
|
+
config.gem 'compass', :version => '0.8.17', :source => "http://gemcutter.org"
|
36
36
|
config.gem 'calendar_date_select', :version => '1.15'
|
37
37
|
config.gem 'rsl-stringex', :lib => 'stringex', :source => "http://gems.github.com"
|
38
38
|
config.gem 'chronic' #required for whenever
|
data/db/sample/checkouts.yml
CHANGED
data/lib/spree.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
// DB No Seconds Format: 2007-12-05 12:00
|
2
|
+
|
3
|
+
Date.padded2 = function(hour) { padded2 = hour.toString(); if ((parseInt(hour) < 10) || (parseInt(hour) == null)) padded2="0" + padded2; return padded2; }
|
4
|
+
Date.prototype.getAMPMHour = function() { hour=Date.padded2(this.getHours()); return (hour == null) ? 00 : (hour > 24 ? hour - 24 : hour ) }
|
5
|
+
Date.prototype.getAMPM = function() { return (this.getHours() < 12) ? "" : ""; }
|
6
|
+
|
7
|
+
Date.prototype.toFormattedString = function(include_time){
|
8
|
+
str = this.getFullYear() + "-" + (this.getMonth() + 1) + "-" + Date.padded2(this.getDate());
|
9
|
+
if (include_time) { hour=this.getHours(); str += " " + this.getAMPMHour() + ":" + this.getPaddedMinutes() }
|
10
|
+
return str;
|
11
|
+
}
|
12
|
+
|
13
|
+
Date.parseFormattedString = function (string) {
|
14
|
+
var regexp = '([0-9]{4})-(([0-9]{1,2})-(([0-9]{1,2})( ([0-9]{1,2}):([0-9]{2})? *)?)?)?';
|
15
|
+
var d = string.match(new RegExp(regexp, "i"));
|
16
|
+
if (d==null) return Date.parse(string); // at least give javascript a crack at it.
|
17
|
+
var offset = 0;
|
18
|
+
var date = new Date(d[1], 0, 1);
|
19
|
+
if (d[3]) { date.setMonth(d[3] - 1); }
|
20
|
+
if (d[5]) { date.setDate(d[5]); }
|
21
|
+
if (d[7]) {
|
22
|
+
date.setHours(parseInt(d[7], 10));
|
23
|
+
}
|
24
|
+
if (d[8]) { date.setMinutes(d[8]); }
|
25
|
+
if (d[10]) { date.setSeconds(d[10]); }
|
26
|
+
return date;
|
27
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
// Formats date and time as "2000.01.20 17:00"
|
2
|
+
Date.prototype.toFormattedString = function(include_time)
|
3
|
+
{
|
4
|
+
str = this.getFullYear() + "." + Date.padded2(this.getMonth()+1) + "." + Date.padded2(this.getDate());
|
5
|
+
if (include_time) { str += " " + this.getHours() + ":" + this.getPaddedMinutes() }
|
6
|
+
return str;
|
7
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
Date.prototype.toFormattedString = function(include_time) {
|
2
|
+
var hour;
|
3
|
+
var str = this.getFullYear() + "-" + Date.padded2(this.getMonth() + 1) + "-" +Date.padded2(this.getDate());
|
4
|
+
if (include_time) {
|
5
|
+
hour = this.getHours();
|
6
|
+
str += " " + this.getHours() + ":" + this.getPaddedMinutes();
|
7
|
+
}
|
8
|
+
return str;
|
9
|
+
};
|
10
|
+
|
11
|
+
Date.parseFormattedString = function (string) {
|
12
|
+
|
13
|
+
var regexp = "([0-9]{4})(-([0-9]{2})(-([0-9]{2})" +
|
14
|
+
"( ([0-9]{1,2}):([0-9]{2})?" +
|
15
|
+
"?)?)?)?";
|
16
|
+
|
17
|
+
var d = string.match(new RegExp(regexp, "i"));
|
18
|
+
if (d === null) {
|
19
|
+
return Date.parse(string); // at least give javascript a crack at it.
|
20
|
+
}
|
21
|
+
var offset = 0;
|
22
|
+
var date = new Date(d[1], 0, 1);
|
23
|
+
if (d[3]) {
|
24
|
+
date.setMonth(d[3] - 1);
|
25
|
+
}
|
26
|
+
if (d[5]) {
|
27
|
+
date.setDate(d[5]);
|
28
|
+
}
|
29
|
+
if (d[7]) {
|
30
|
+
date.setHours(d[7]);
|
31
|
+
}
|
32
|
+
if (d[8]) {
|
33
|
+
date.setMinutes(d[8]);
|
34
|
+
}
|
35
|
+
if (d[0]) {
|
36
|
+
date.setSeconds(d[0]);
|
37
|
+
}
|
38
|
+
if (d[2]) {
|
39
|
+
date.setMilliseconds(Number("0." + d[2]));
|
40
|
+
}
|
41
|
+
if (d[4]) {
|
42
|
+
offset = (Number(d[6])) + Number(d[8]);
|
43
|
+
offset = ((d[5] == '-') ? 1 : -1);
|
44
|
+
}
|
45
|
+
return date;
|
46
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Date.weekdays = $w('Mo Di Mi Do Fr Sa So');
|
2
|
+
Date.months = $w('Januar Februar März April Mai Juni Juli August September Oktober November Dezember');
|
3
|
+
|
4
|
+
Date.first_day_of_week = 1;
|
5
|
+
|
6
|
+
_translations = {
|
7
|
+
"OK": "OK",
|
8
|
+
"Now": "Jetzt",
|
9
|
+
"Today": "Heute",
|
10
|
+
"Clear": "Löschen"
|
11
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Date.weekdays = $w("Ma Ti Ke To Pe La Su");
|
2
|
+
Date.months = $w("Tammikuu Helmikuu Maaliskuu Huhtikuu Toukokuu Kes�kuu Hein�kuu Elokuu Syyskuu Lokakuu Marraskuu Joulukuu" );
|
3
|
+
|
4
|
+
Date.first_day_of_week = 1
|
5
|
+
|
6
|
+
_translations = {
|
7
|
+
"OK": "OK",
|
8
|
+
"Now": "Nyt",
|
9
|
+
"Today": "T�n��n"
|
10
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Date.weekdays = $w('L Ma Me J V S D');
|
2
|
+
Date.months = $w('Janvier Février Mars Avril Mai Juin Juillet Août Septembre Octobre Novembre Décembre');
|
3
|
+
|
4
|
+
Date.first_day_of_week = 1;
|
5
|
+
|
6
|
+
_translations = {
|
7
|
+
"OK": "OK",
|
8
|
+
"Now": "Maintenant",
|
9
|
+
"Today": "Aujourd'hui"
|
10
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Date.weekdays = $w('P W Ś C P S N');
|
2
|
+
Date.months = $w('Styczeń Luty Marzec Kwiecień Maj Czerwiec Lipiec Sierpień Wrzesień Październik Listopad Grudzień');
|
3
|
+
|
4
|
+
Date.first_day_of_week = 1
|
5
|
+
|
6
|
+
_translations = {
|
7
|
+
"OK": "OK",
|
8
|
+
"Now": "Teraz",
|
9
|
+
"Today": "Dziś"
|
10
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Date.weekdays = $w('D S T Q Q S S');
|
2
|
+
Date.months = $w('Janeiro Fevereiro Março Abril Maio Junho Julho Agosto Setembro Outubro Novembro Dezembro');
|
3
|
+
|
4
|
+
Date.first_day_of_week = 0
|
5
|
+
|
6
|
+
_translations = {
|
7
|
+
"OK": "OK",
|
8
|
+
"Now": "Agora",
|
9
|
+
"Today": "Hoje",
|
10
|
+
"Clear": "Limpar"
|
11
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-20 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -446,8 +446,6 @@ files:
|
|
446
446
|
- app/views/admin/zones/edit.html.erb
|
447
447
|
- app/views/admin/zones/index.html.erb
|
448
448
|
- app/views/admin/zones/new.html.erb
|
449
|
-
- app/views/calculators
|
450
|
-
- app/views/charges
|
451
449
|
- app/views/checkouts
|
452
450
|
- app/views/checkouts/_billing.html.erb
|
453
451
|
- app/views/checkouts/_confirmation.html.erb
|
@@ -1423,7 +1421,6 @@ files:
|
|
1423
1421
|
- public/images/flags/de.png
|
1424
1422
|
- public/images/flags/de_CH.png
|
1425
1423
|
- public/images/flags/dj.png
|
1426
|
-
- public/images/flags/dk.png
|
1427
1424
|
- public/images/flags/dm.png
|
1428
1425
|
- public/images/flags/do.png
|
1429
1426
|
- public/images/flags/dz.png
|
@@ -1619,7 +1616,6 @@ files:
|
|
1619
1616
|
- public/images/grid.png
|
1620
1617
|
- public/images/left_01.png
|
1621
1618
|
- public/images/left_01_small.png
|
1622
|
-
- public/images/lightbox
|
1623
1619
|
- public/images/master_cid.jpg
|
1624
1620
|
- public/images/menu-current.png
|
1625
1621
|
- public/images/menu-hover.png
|
@@ -1630,7 +1626,6 @@ files:
|
|
1630
1626
|
- public/images/orange
|
1631
1627
|
- public/images/orange/left_03.png
|
1632
1628
|
- public/images/orange/right_03.png
|
1633
|
-
- public/images/pp_checkout.gif
|
1634
1629
|
- public/images/progress.gif
|
1635
1630
|
- public/images/rails.png
|
1636
1631
|
- public/images/right_01.png
|
@@ -1683,10 +1678,20 @@ files:
|
|
1683
1678
|
- public/javascripts/calendar_date_select
|
1684
1679
|
- public/javascripts/calendar_date_select/calendar_date_select.js
|
1685
1680
|
- public/javascripts/calendar_date_select/format_american.js
|
1681
|
+
- public/javascripts/calendar_date_select/format_db.js
|
1686
1682
|
- public/javascripts/calendar_date_select/format_euro_24hr.js
|
1683
|
+
- public/javascripts/calendar_date_select/format_euro_24hr_ymd.js
|
1687
1684
|
- public/javascripts/calendar_date_select/format_finnish.js
|
1688
1685
|
- public/javascripts/calendar_date_select/format_hyphen_ampm.js
|
1686
|
+
- public/javascripts/calendar_date_select/format_iso_date.js
|
1689
1687
|
- public/javascripts/calendar_date_select/format_italian.js
|
1688
|
+
- public/javascripts/calendar_date_select/locale
|
1689
|
+
- public/javascripts/calendar_date_select/locale/de.js
|
1690
|
+
- public/javascripts/calendar_date_select/locale/fi.js
|
1691
|
+
- public/javascripts/calendar_date_select/locale/fr.js
|
1692
|
+
- public/javascripts/calendar_date_select/locale/pl.js
|
1693
|
+
- public/javascripts/calendar_date_select/locale/pt.js
|
1694
|
+
- public/javascripts/calendar_date_select/locale/ru.js
|
1690
1695
|
- public/javascripts/checkout.js
|
1691
1696
|
- public/javascripts/controls.js
|
1692
1697
|
- public/javascripts/dragdrop.js
|
@@ -1771,8 +1776,6 @@ files:
|
|
1771
1776
|
- public/stylesheets/compiled/ie.css
|
1772
1777
|
- public/stylesheets/compiled/print.css
|
1773
1778
|
- public/stylesheets/compiled/screen.css
|
1774
|
-
- public/stylesheets/orders
|
1775
|
-
- public/stylesheets/prototypes
|
1776
1779
|
- public/stylesheets/sass
|
1777
1780
|
- public/stylesheets/sass/_buttons.sass
|
1778
1781
|
- public/stylesheets/sass/_cart.sass
|
@@ -1790,16 +1793,6 @@ files:
|
|
1790
1793
|
- public/stylesheets/sass/print.sass
|
1791
1794
|
- public/stylesheets/sass/screen.sass
|
1792
1795
|
- public/stylesheets/scaffold.css
|
1793
|
-
- public/Users
|
1794
|
-
- public/Users/schof
|
1795
|
-
- public/Users/schof/open_source
|
1796
|
-
- public/Users/schof/open_source/spree
|
1797
|
-
- public/Users/schof/open_source/spree/vendor
|
1798
|
-
- public/Users/schof/open_source/spree/vendor/extensions
|
1799
|
-
- public/Users/schof/open_source/spree/vendor/extensions/localization
|
1800
|
-
- public/Users/schof/open_source/spree/vendor/extensions/localization/public
|
1801
|
-
- public/Users/schof/open_source/spree/vendor/extensions/localization/public/images
|
1802
|
-
- public/Users/schof/open_source/spree/vendor/extensions/localization/public/images/flags
|
1803
1796
|
- Rakefile
|
1804
1797
|
- README.markdown
|
1805
1798
|
- script
|
@@ -1881,9 +1874,6 @@ files:
|
|
1881
1874
|
- spec/views/admin
|
1882
1875
|
- spec/views/admin/configurations
|
1883
1876
|
- spec/views/admin/configurations/index.html.erb_spec.rb
|
1884
|
-
- spec/views/admin/mail_settings
|
1885
|
-
- spec/views/admin/products
|
1886
|
-
- spec/views/admin/variants
|
1887
1877
|
- test
|
1888
1878
|
- test/factories
|
1889
1879
|
- test/factories/address_factory.rb
|
@@ -2454,12 +2444,6 @@ files:
|
|
2454
2444
|
- vendor/plugins/has_calculator/lib
|
2455
2445
|
- vendor/plugins/has_calculator/lib/has_calculator.rb
|
2456
2446
|
- vendor/plugins/has_calculator/README
|
2457
|
-
- vendor/plugins/has_many_polymorphs
|
2458
|
-
- vendor/plugins/has_many_polymorphs/test
|
2459
|
-
- vendor/plugins/has_many_polymorphs/test/integration
|
2460
|
-
- vendor/plugins/has_many_polymorphs/test/integration/app
|
2461
|
-
- vendor/plugins/has_many_polymorphs/test/integration/app/vendor
|
2462
|
-
- vendor/plugins/has_many_polymorphs/test/integration/app/vendor/plugins
|
2463
2447
|
- vendor/plugins/in_place_editing
|
2464
2448
|
- vendor/plugins/in_place_editing/init.rb
|
2465
2449
|
- vendor/plugins/in_place_editing/lib
|
@@ -2675,8 +2659,6 @@ rdoc_options:
|
|
2675
2659
|
- --exclude
|
2676
2660
|
- log
|
2677
2661
|
- --exclude
|
2678
|
-
- pkg
|
2679
|
-
- --exclude
|
2680
2662
|
- public
|
2681
2663
|
- --exclude
|
2682
2664
|
- script
|
data/public/images/flags/dk.png
DELETED
Binary file
|
Binary file
|