spree_ajax_cart 0.70.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,8 @@
1
- OrdersController.class_eval do
1
+ Spree::OrdersController.class_eval do
2
2
  respond_to :js, :only => [:populate, :edit, :update]
3
3
  respond_override :populate => { :js => { :success => lambda { render "populate" ,:object => @order } } }
4
4
 
5
5
  def ajax_cart
6
- #edit
7
6
  render :partial => 'orders/ajax_cart'
8
7
  end
9
8
 
@@ -1,4 +1,4 @@
1
- OrdersHelper.module_eval do
1
+ Spree::OrdersHelper.module_eval do
2
2
 
3
3
  def cart_item_count
4
4
  return "" if current_page?(cart_path)
@@ -1,7 +1,7 @@
1
1
  <div id="cart">
2
2
  <h3 id="cart-title" style="width: 660px;"><%= t(:shopping_cart) %></h3>
3
3
 
4
- <% if current_order.line_items.empty? %>
4
+ <% if current_order.empty? && current_order.line_items.empty? %>
5
5
  <div data-hook="empty_cart">
6
6
  <p><%= t(:your_cart_is_empty) %></p>
7
7
  <p><%= link_to t(:continue_shopping), products_path, :class => 'button continue' %></p>
@@ -28,9 +28,9 @@
28
28
  <tr class="<%= cycle('', 'alt') %>">
29
29
  <td data-hook="cart_item_image">
30
30
  <% if variant.images.length == 0 %>
31
- <%= small_image(variant.product) %>
31
+ <%= mini_image(variant.product) %>
32
32
  <% else %>
33
- <%= image_tag variant.images.first.attachment.url(:small) %>
33
+ <%= image_tag variant.images.first.attachment.url(:mini) %>
34
34
  <% end %>
35
35
  </td>
36
36
  <td data-hook="cart_item_description">
@@ -38,7 +38,7 @@
38
38
  <%= variant.options_text %>
39
39
 
40
40
 
41
- <%= truncate(strip_tags(variant.product.description), :length => 60, :omission => "...") %>
41
+ <%= truncate(strip_tags(variant.product.description), :length => 30, :omission => "...") %>
42
42
  </td>
43
43
  <td data-hook="cart_item_price">
44
44
  <%= product_price(order_form.variant) %>
File without changes
@@ -4,26 +4,26 @@ module SpreeAjaxCart
4
4
 
5
5
  def add_javascripts
6
6
  append_file "app/assets/javascripts/store/all.js", "//= require store/spree_ajax_cart\n"
7
- append_file "app/assets/javascripts/admin/all.js", "//= require admin/spree_ajax_cart\n"
7
+ #append_file "app/assets/javascripts/admin/all.js", "//= require admin/spree_ajax_cart\n"
8
8
  end
9
9
 
10
10
  def add_stylesheets
11
11
  inject_into_file "app/assets/stylesheets/store/all.css", " *= require store/spree_ajax_cart\n", :before => /\*\//, :verbose => true
12
- inject_into_file "app/assets/stylesheets/admin/all.css", " *= require admin/spree_ajax_cart\n", :before => /\*\//, :verbose => true
12
+ #inject_into_file "app/assets/stylesheets/admin/all.css", " *= require admin/spree_ajax_cart\n", :before => /\*\//, :verbose => true
13
13
  end
14
14
 
15
- def add_migrations
16
- run 'bundle exec rake railties:install:migrations FROM=spree_ajax_cart'
17
- end
15
+ #def add_migrations
16
+ # run 'bundle exec rake railties:install:migrations FROM=spree_ajax_cart'
17
+ #end
18
18
 
19
- def run_migrations
20
- res = ask "Would you like to run the migrations now? [Y/n]"
21
- if res == "" || res.downcase == "y"
22
- run 'bundle exec rake db:migrate'
23
- else
24
- puts "Skiping rake db:migrate, don't forget to run it!"
25
- end
26
- end
19
+ #def run_migrations
20
+ # res = ask "Would you like to run the migrations now? [Y/n]"
21
+ # if res == "" || res.downcase == "y"
22
+ # run 'bundle exec rake db:migrate'
23
+ # else
24
+ # puts "Skiping rake db:migrate, don't forget to run it!"
25
+ # end
26
+ #end
27
27
  end
28
28
  end
29
29
  end
metadata CHANGED
@@ -1,59 +1,54 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: spree_ajax_cart
3
- version: !ruby/object:Gem::Version
4
- hash: 271
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 70
9
- - 4
10
- version: 0.70.4
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Damiano Giacomello
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-03-22 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-10-25 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: spree_core
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
32
22
  type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: rspec-rails
36
23
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec-rails
32
+ requirement: !ruby/object:Gem::Requirement
38
33
  none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
46
38
  type: :development
47
- version_requirements: *id002
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
48
46
  description:
49
47
  email: damiano.giacomello@diginess.it
50
48
  executables: []
51
-
52
49
  extensions: []
53
-
54
50
  extra_rdoc_files: []
55
-
56
- files:
51
+ files:
57
52
  - README.md
58
53
  - LICENSE
59
54
  - lib/generators/spree_ajax_cart/install/install_generator.rb
@@ -68,47 +63,36 @@ files:
68
63
  - app/assets/stylesheets/store/jquery.qtip.min.css
69
64
  - app/assets/stylesheets/store/qtip-ajax_cart.css
70
65
  - app/assets/stylesheets/store/spree_ajax_cart.css
71
- - app/controllers/orders_controller_decorator.rb
72
- - app/helpers/orders_helper_decorator.rb
73
- - app/views/orders/_ajax_cart.html.erb
74
- - app/views/orders/populate.js.erb
66
+ - app/controllers/spree/orders_controller_decorator.rb
67
+ - app/helpers/spree/orders_helper_decorator.rb
68
+ - app/views/spree/orders/_ajax_cart.html.erb
69
+ - app/views/spree/orders/populate.js.erb
75
70
  - config/locales/en.yml
76
71
  - config/locales/it.yml
77
72
  - config/routes.rb
78
73
  homepage:
79
74
  licenses: []
80
-
81
75
  post_install_message:
82
76
  rdoc_options: []
83
-
84
- require_paths:
77
+ require_paths:
85
78
  - lib
86
- required_ruby_version: !ruby/object:Gem::Requirement
79
+ required_ruby_version: !ruby/object:Gem::Requirement
87
80
  none: false
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- hash: 57
92
- segments:
93
- - 1
94
- - 8
95
- - 7
81
+ requirements:
82
+ - - ! '>='
83
+ - !ruby/object:Gem::Version
96
84
  version: 1.8.7
97
- required_rubygems_version: !ruby/object:Gem::Requirement
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
86
  none: false
99
- requirements:
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- hash: 3
103
- segments:
104
- - 0
105
- version: "0"
106
- requirements:
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ requirements:
107
92
  - none
108
93
  rubyforge_project:
109
- rubygems_version: 1.8.10
94
+ rubygems_version: 1.8.22
110
95
  signing_key:
111
96
  specification_version: 3
112
97
  summary: Add link_to_ajax_cart helper for Spree
113
98
  test_files: []
114
-