spree_sort_products 1.3.2 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -8,27 +8,36 @@ Spree Sort Products extends the ability of a taxon on its products to be sorted
8
8
  * Get the latest greatest from github:
9
9
 
10
10
  ```ruby
11
+ gem 'jquery-dragsort-rails', '~> 1.0.0'
11
12
  gem 'spree_sort_products' , :git => 'git://github.com/suryart/spree_sort_products.git'
12
13
  ```
13
14
 
14
15
  * Get the 1-3-stable branch for Spree 1.3.x from github:
15
16
 
16
17
  ```ruby
18
+ gem 'jquery-dragsort-rails', '~> 1.0.0'
17
19
  gem 'spree_sort_products' , :git => 'git://github.com/suryart/spree_sort_products.git', :branch => '1-3-stable'
18
20
  ```
19
21
 
20
22
  * Or get it from rubygems.org by mentioning the following line in your Gemfile:
21
23
 
22
24
  ```ruby
25
+ gem 'jquery-dragsort-rails', '~> 1.0.0'
23
26
  gem 'spree_sort_products', '1.3.2'
24
27
  ```
25
28
 
29
+ Please note that this extension uses [jquery-dragsort-rails](https://github.com/suryart/jquery-dragsort-rails) to achieve 3D sorting.
30
+
26
31
  ## Caution
27
32
 
28
33
  Just make sure that you have **admin/taxonomy_overrides** and **admin/sort_products** files precompiled. If it's not happening by default then please add/edit this in your **config/environments/production.rb** file:
29
34
 
30
35
  Rails.application.config.assets.precompile += %w(admin/taxonomy_overrides admin/sort_products)
31
36
 
37
+ ## TODOs
38
+
39
+ * Write test cases.
40
+
32
41
  ### Then run the following commands:
33
42
 
34
43
  $ bundle install
@@ -1,6 +1,6 @@
1
1
  module Spree
2
2
  module Admin
3
- TaxonsController.class_eval do
3
+ class TaxonsController < Spree::Admin::BaseController
4
4
  before_filter :load_taxon, :only => [:sort_products, :update_products]
5
5
 
6
6
  def sort_products
@@ -20,14 +20,13 @@
20
20
 
21
21
  <ul id="products" class="thumbnails">
22
22
  <% @products.each do |product| %>
23
- <%= content_tag_for :li, product, :class=> "three columns", :style => 'list-style-type: none' do %>
23
+ <%= content_tag_for :li, product, :class=> "three columns", :style => 'height: 300px; list-style-type: none' do %>
24
24
  <div class="two columns thumbnail" style = "cursor: pointer;" value="<%= product.id %>">
25
25
  <%= product_image(product, :width => "145", :height => "190", :id=>"image-map") %>
26
26
  <div class="caption">
27
27
  <% product_name = product.name.split(" ") %>
28
28
  <% product_name.delete(product_name.last) %>
29
29
  <h5><%= product_name.join(" ") %></h5>
30
- <p><%= truncate(product.description, :length => 45, :separator => ' ') %></p>
31
30
  </div>
32
31
  </div>
33
32
  <% end %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_sort_products
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -27,6 +27,22 @@ dependencies:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: 1.3.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: jquery-dragsort-rails
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 1.0.0
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.0.0
30
46
  - !ruby/object:Gem::Dependency
31
47
  name: capybara
32
48
  requirement: !ruby/object:Gem::Requirement
@@ -202,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
218
  version: '0'
203
219
  segments:
204
220
  - 0
205
- hash: 547993373614995130
221
+ hash: -1882493535443690549
206
222
  requirements:
207
223
  - none
208
224
  rubyforge_project: