Permalink
Browse files

fixed slide sortable table. fixed rake ckeditor generation

  • Loading branch information...
damianogiacomello committed Mar 26, 2012
1 parent 31eef91 commit bd74b2af9593df88cd66098a60048624f3358d25
View
@@ -1,16 +1,17 @@
+require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'rake/packagetask'
require 'rubygems/package_task'
require 'rspec/core/rake_task'
require 'spree/core/testing_support/common_rake'
+Bundler::GemHelper.install_tasks
RSpec::Core::RakeTask.new
task :default => [:spec]
spec = eval(File.read('spree_multi_slideshow.gemspec'))
-
Gem::PackageTask.new(spec) do |p|
p.gem_spec = spec
end
@@ -13,6 +13,7 @@ def update_positions
end
respond_to do |format|
+ format.html { redirect_to admin_slideshow_type_slides_url(params[:slideshow_type_id]) }
format.js { render :text => 'Ok' }
end
end
@@ -6,7 +6,7 @@
<%= link_to icon('add') + ' ' + t("slideshow_type.slide.new_page"), new_admin_slideshow_type_slide_url(@slideshow_type), :id => 'new_slide_link' %>
</p>
-<table class="index sortable" data-hook="slide_table">
+<table class="index sortable" data-hook="slide_table" data-hook data-sortable-link="<%= update_positions_admin_slideshow_type_slides_url %>">
<tr data-hook="images_header">
<th><%= t("slideshow_type.slide.thumbnail") %></th>
<th><%= t("slideshow_type.slide.title") %></th>
@@ -26,7 +26,12 @@ def run_migrations
end
def add_ckeditor
- run 'rails generate ckeditor:install --orm=active_record --backend=paperclip'
+ res = ask "Would you like to run the ckeditor generator now? [Y/n]"
+ if res == "" || res.downcase == "y"
+ run 'rails generate ckeditor:install --orm=active_record --backend=paperclip'
+ else
+ puts "Skiping rails generate ckeditor:install --orm=active_record --backend=paperclip, don't forget to run it!"
+ end
end
end

0 comments on commit bd74b2a

Please sign in to comment.