diff --git a/Gemfile b/Gemfile
index 1c86bf33..1245b5f3 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,53 +2,53 @@ source 'http://rubygems.org'
# add in all the runtime dependencies
-gem 'rake', '0.9.2'
+gem 'rake', '0.9.2'
-gem 'rails', '~> 3.1.3'
+gem 'rails', '~> 3.1.3'
-gem 'devise', '~> 1.5.3'
-gem 'cancan', '~> 1.6.7'
+gem 'devise', '~> 1.5.3'
+gem 'cancan', '~> 1.6.7'
-gem 'mongo', '~> 1.5.2'
-gem 'bson_ext', '~> 1.5.2'
-gem 'mongoid', '~> 2.4.0'
+gem 'mongo', '~> 1.5.2'
+gem 'bson_ext', '~> 1.5.2'
+gem 'mongoid', '~> 2.4.0'
gem 'locomotive_mongoid_acts_as_tree', '~> 0.1.5.8'
-gem 'custom_fields', :path => '../gems/custom_fields' # DEV
-# gem 'custom_fields', :git => 'git://github.com/locomotivecms/custom_fields.git', :branch => 'experimental'
+gem 'custom_fields', :path => '../gems/custom_fields' # DEV
+# gem 'custom_fields', :git => 'git://github.com/locomotivecms/custom_fields.git', :branch => 'experimental'
gem 'kaminari'
-gem 'haml', '~> 3.1.3'
-gem 'sass-rails', '~> 3.1.4'
-gem 'coffee-script', '~> 2.2.0'
-gem 'uglifier', '~> 1.0.4'
-gem 'compass', '~> 0.12.alpha.4'
-gem 'jquery-rails', '~> 1.0.16'
-gem 'rails-backbone', '0.5.4'
+gem 'haml', '~> 3.1.3'
+gem 'sass-rails', '~> 3.1.4'
+gem 'coffee-script', '~> 2.2.0'
+gem 'uglifier', '~> 1.0.4'
+gem 'compass', '~> 0.12.alpha.4'
+gem 'jquery-rails', '~> 1.0.16'
+gem 'rails-backbone', '0.5.4'
gem 'codemirror-rails'
-gem 'tinymce-rails'
-gem 'locomotive-aloha-rails', :path => '../gems/aloha-rails'
-gem 'flash_cookie_session', '~> 1.1.1'
+gem 'locomotive-tinymce-rails', '~> 3.4.7'
+gem 'locomotive-aloha-rails', '~> 0.20.1'
+gem 'flash_cookie_session', '~> 1.1.1'
-gem 'locomotive_liquid', '2.2.2', :require => 'liquid'
-gem 'formtastic', '~> 2.0.2'
-gem 'responders', '~> 0.6.4'
-gem 'cells', '~> 3.7.1'
-gem 'RedCloth', '~> 4.2.8'
-gem 'sanitize', '~> 2.0.3'
-gem 'highline', '~> 1.6.2'
+gem 'locomotive_liquid', '2.2.2', :require => 'liquid'
+gem 'formtastic', '~> 2.0.2'
+gem 'responders', '~> 0.6.4'
+gem 'cells', '~> 3.7.1'
+gem 'RedCloth', '~> 4.2.8'
+gem 'sanitize', '~> 2.0.3'
+gem 'highline', '~> 1.6.2'
-gem 'rmagick', '2.12.2', :require => 'RMagick'
-gem 'carrierwave-mongoid', '~> 0.1.3'
-gem 'fog', '~> 1.0.0'
-gem 'dragonfly', '~> 0.9.8'
-gem 'rack-cache', '~> 1.1', :require => 'rack/cache'
-gem 'mimetype-fu', '~> 0.1.2'
+gem 'rmagick', '2.12.2', :require => 'RMagick'
+gem 'carrierwave-mongoid', '~> 0.1.3'
+gem 'fog', '~> 1.0.0'
+gem 'dragonfly', '~> 0.9.8'
+gem 'rack-cache', '~> 1.1', :require => 'rack/cache'
+gem 'mimetype-fu', '~> 0.1.2'
gem 'rubyzip'
-gem 'actionmailer-with-request', '~> 0.3.0', :require => 'actionmailer_with_request'
-gem 'httparty', '~> 0.8.1'
-gem 'delayed_job_mongoid', '~> 1.0.8'
-gem 'SystemTimer', :platforms => :ruby_18
+gem 'actionmailer-with-request', '~> 0.3.0', :require => 'actionmailer_with_request'
+gem 'httparty', '~> 0.8.1'
+gem 'delayed_job_mongoid', '~> 1.0.8'
+gem 'SystemTimer', :platforms => :ruby_18
# The rest of the dependencies are for use when in the locomotive dev environment
diff --git a/Gemfile.lock b/Gemfile.lock
index f361e826..14952577 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -2,7 +2,7 @@ PATH
remote: ../gems/aloha-rails
specs:
locomotive-aloha-rails (0.20.1)
- railties (>= 3.1)
+ actionpack (~> 3.1.3)
PATH
remote: ../gems/custom_fields
@@ -12,6 +12,12 @@ PATH
carrierwave-mongoid (~> 0.1.3)
mongoid (~> 2.4.0)
+PATH
+ remote: ../gems/tinymce-rails
+ specs:
+ locomotive-tinymce-rails (3.4.7)
+ actionpack (~> 3.1.3)
+
GEM
remote: http://rubygems.org/
specs:
@@ -262,8 +268,6 @@ GEM
term-ansicolor (1.0.7)
thor (0.14.6)
tilt (1.3.3)
- tinymce-rails (3.4.7)
- railties (~> 3.1.0)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
@@ -316,6 +320,7 @@ DEPENDENCIES
kaminari
launchy
locomotive-aloha-rails!
+ locomotive-tinymce-rails!
locomotive_liquid (= 2.2.2)
locomotive_mongoid_acts_as_tree (~> 0.1.5.8)
mimetype-fu (~> 0.1.2)
@@ -334,7 +339,6 @@ DEPENDENCIES
rubyzip
sanitize (~> 2.0.3)
sass-rails (~> 3.1.4)
- tinymce-rails
uglifier (~> 1.0.4)
unicorn
xpath (~> 0.1.4)
diff --git a/app/assets/javascripts/locomotive/utils/aloha_settings.js.coffee b/app/assets/javascripts/locomotive/utils/aloha_settings.js.coffee
index ba2fd965..5beb6b5b 100644
--- a/app/assets/javascripts/locomotive/utils/aloha_settings.js.coffee
+++ b/app/assets/javascripts/locomotive/utils/aloha_settings.js.coffee
@@ -1,9 +1,6 @@
-# unless window.Aloha?
-# window.Aloha = {}
+window.Aloha = window.Aloha ?= {}
-Aloha = window.Aloha ?= {}
-
-Aloha.settings =
+window.Aloha.settings =
logLevels: { 'error': true, 'warn': true, 'info': false, 'debug': false }
diff --git a/app/helpers/locomotive/content_types_helper.rb b/app/helpers/locomotive/content_types_helper.rb
index 5817b566..4ecb4f58 100644
--- a/app/helpers/locomotive/content_types_helper.rb
+++ b/app/helpers/locomotive/content_types_helper.rb
@@ -28,8 +28,10 @@ module Locomotive::ContentTypesHelper
visible << content_type
end
- visible.map { |c| yield(c) }
- yield(others)
+ if visible.size > 0
+ visible.map { |c| yield(c) }
+ yield(others) if others.size > 0
+ end
end
def is_content_type_selected(content_type)
diff --git a/lib/locomotive/dependencies.rb b/lib/locomotive/dependencies.rb
index 10ed65d5..22b197ba 100644
--- a/lib/locomotive/dependencies.rb
+++ b/lib/locomotive/dependencies.rb
@@ -28,7 +28,5 @@ require 'compass'
require 'codemirror/rails'
require 'jquery/rails'
require 'backbone-rails'
-require 'tinymce/version'
-require 'tinymce/railtie'
-require 'aloha/version'
-require 'aloha/railtie'
+require 'tinymce/rails'
+require 'aloha/rails'
diff --git a/lib/locomotive/engine.rb b/lib/locomotive/engine.rb
index 6f4f5260..82b0b13a 100644
--- a/lib/locomotive/engine.rb
+++ b/lib/locomotive/engine.rb
@@ -21,36 +21,18 @@ module Locomotive
end
initializer "Locomotive precompile hook" do |app|
- # app.config.assets.precompile += %w(locomotive.js locomotive.css locomotive/inline_editor.js locomotive/inline_editor.css
- # locomotive/not_logged_in.js locomotive/not_logged_in.css
- # locomotive/aloha.js)
-
app.config.assets.precompile += %w(locomotive.js locomotive.css locomotive/inline_editor.js locomotive/inline_editor.css
locomotive/not_logged_in.js locomotive/not_logged_in.css
locomotive/aloha.js)
+ # very useful to see what happens during the precompilation of the assets
def compile_asset?(path)
- # ignores any filename that begins with '_' (e.g. sass partials)
- # all other css/js/sass/image files are processed
- if File.basename(path) =~ /^[^_].*\.\w+$/
- puts "Compiling: #{path}"
- true
- else
- puts "Ignoring: #{path}"
- false
- end
+ puts "Compiling: #{path}"
+ true
end
app.config.assets.precompile = [ method(:compile_asset?).to_proc ]
- # app.config.assets.precompile += lambda { |f| puts f.inspect; true }
-
- # locomotive/aloha.js locomotive/aloha.css
- # locomotive/aloha/img/*)
- # # locomotive/utils/aloha_settings.js
- # # locomotive/aloha/*.js
- # # locomotive/aloha.css
- # # locomotive/aloha/plugins/*.css)
end
end
diff --git a/lib/locomotive/liquid/tags/inline_editor.rb b/lib/locomotive/liquid/tags/inline_editor.rb
index cc478ceb..77f345e1 100644
--- a/lib/locomotive/liquid/tags/inline_editor.rb
+++ b/lib/locomotive/liquid/tags/inline_editor.rb
@@ -11,8 +11,7 @@ module Liquid
%{
- #{ActionController::Base.helpers.stylesheet_link_tag 'aloha'}
-
+ #{ActionController::Base.helpers.stylesheet_link_tag 'aloha/css/aloha.css'}
#{ActionController::Base.helpers.javascript_include_tag 'locomotive/aloha', :'data-aloha-plugins' => plugins}
@@ -32,18 +31,4 @@ module Liquid
::Liquid::Template.register_tag('inline_editor', InlineEditor)
end
end
-end
-
-# = javascript_include_tag 'locomotive/not_logged_in'
-# = stylesheet_link_tag 'locomotive/not_logged_in', :media => 'screen'
-
-#
-#
-#
-
-
-
-
-#{ActionController::Base.helpers.javascript_include_tag 'locomotive/aloha', :'data-aloha-plugins' => 'common/format,common/highlighteditables,common/list,common/link,common/undo,common/paste'}
-
- #
\ No newline at end of file
+end
\ No newline at end of file
diff --git a/locomotive_cms.gemspec b/locomotive_cms.gemspec
index 895c488d..99d9c77b 100644
--- a/locomotive_cms.gemspec
+++ b/locomotive_cms.gemspec
@@ -17,92 +17,52 @@ Gem::Specification.new do |s|
s.required_rubygems_version = '>= 1.3.6'
s.rubyforge_project = 'nowarning'
- s.add_dependency 'rails', '~> 3.1.3'
+ s.add_dependency 'rails', '~> 3.1.3'
- s.add_dependency 'devise', '~> 1.5.3'
- s.add_dependency 'cancan', '~> 1.6.7'
+ s.add_dependency 'devise', '~> 1.5.3'
+ s.add_dependency 'cancan', '~> 1.6.7'
- s.add_dependency 'mongo', '~> 1.5.2'
- s.add_dependency 'bson_ext', '~> 1.5.2'
- s.add_dependency 'mongoid', '~> 2.4.0'
+ s.add_dependency 'mongo', '~> 1.5.2'
+ s.add_dependency 'bson_ext', '~> 1.5.2'
+ s.add_dependency 'mongoid', '~> 2.4.0'
s.add_dependency 'locomotive_mongoid_acts_as_tree', '0.1.5.8'
- s.add_dependency 'custom_fields', '~> 2.0.0.rc1'
+ s.add_dependency 'custom_fields', '~> 2.0.0.rc1'
s.add_dependency 'kaminari'
- s.add_dependency 'haml', '~> 3.1.3'
- s.add_dependency 'sass-rails', '~> 3.1.4'
- s.add_dependency 'coffee-script', '~> 2.2.0'
- s.add_dependency 'uglifier', '~> 1.2.2'
- s.add_dependency 'compass', '~> 0.12.alpha.4'
- s.add_dependency 'jquery-rails', '~> 1.0.16'
- s.add_dependency 'rails-backbone', '0.5.4'
+ s.add_dependency 'haml', '~> 3.1.3'
+ s.add_dependency 'sass-rails', '~> 3.1.4'
+ s.add_dependency 'coffee-script', '~> 2.2.0'
+ s.add_dependency 'uglifier', '~> 1.2.2'
+ s.add_dependency 'compass', '~> 0.12.alpha.4'
+ s.add_dependency 'jquery-rails', '~> 1.0.16'
+ s.add_dependency 'rails-backbone', '0.5.4'
s.add_dependency 'codemirror-rails'
- s.add_dependency 'tinymce-rails'
- s.add_dependency 'locomotive-aloha-rails'
- s.add_dependency 'flash_cookie_session', '~> 1.1.1'
+ s.add_dependency 'locomotive-tinymce-rails', '~> 3.4.7'
+ s.add_dependency 'locomotive-aloha-rails', '~> 0.20.1'
+ s.add_dependency 'flash_cookie_session', '~> 1.1.1'
- s.add_dependency 'locomotive_liquid', '2.2.2'
- s.add_dependency 'formtastic', '~> 2.0.2'
- s.add_dependency 'responders', '~> 0.6.4'
- s.add_dependency 'cells', '~> 3.7.1'
- s.add_dependency 'RedCloth', '~> 4.2.8'
- s.add_dependency 'sanitize', '~> 2.0.3'
- s.add_dependency 'highline', '~> 1.6.2'
+ s.add_dependency 'locomotive_liquid', '2.2.2'
+ s.add_dependency 'formtastic', '~> 2.0.2'
+ s.add_dependency 'responders', '~> 0.6.4'
+ s.add_dependency 'cells', '~> 3.7.1'
+ s.add_dependency 'RedCloth', '~> 4.2.8'
+ s.add_dependency 'sanitize', '~> 2.0.3'
+ s.add_dependency 'highline', '~> 1.6.2'
- s.add_dependency 'rmagick', '2.12.2'
- s.add_dependency 'carrierwave-mongoid', '~> 0.1.3'
- s.add_dependency 'fog', '~> 1.0.0'
- s.add_dependency 'dragonfly', '~> 0.9.8'
- s.add_dependency 'rack-cache', '~> 1.1'
- s.add_dependency 'mimetype-fu', '~> 0.1.2'
+ s.add_dependency 'rmagick', '2.12.2'
+ s.add_dependency 'carrierwave-mongoid', '~> 0.1.3'
+ s.add_dependency 'fog', '~> 1.0.0'
+ s.add_dependency 'dragonfly', '~> 0.9.8'
+ s.add_dependency 'rack-cache', '~> 1.1'
+ s.add_dependency 'mimetype-fu', '~> 0.1.2'
s.add_dependency 'rubyzip'
s.add_dependency 'actionmailer-with-request', '~> 0.3.0'
s.add_dependency 'httparty', '~> 0.8.1'
s.add_dependency 'delayed_job_mongoid', '~> 1.0.8'
- # s.add_dependency 'SystemTimer', :platforms => :ruby_18
-
- # s.add_dependency 'rails', '~> 3.1.3'
- # # s.add_dependency 'warden'
- # s.add_dependency 'devise', '~> 1.5.3'
- #
- # s.add_dependency 'mongo', '~> 1.5.2'
- # s.add_dependency 'bson_ext', '~> 1.5.2'
- # s.add_dependency 'mongoid', '~> 2.4.0'
- #
- # s.add_dependency 'locomotive_mongoid_acts_as_tree', '0.1.5.7'
- # s.add_dependency 'kaminari'
- #
- # s.add_dependency 'sass', '3.1.2'
- # s.add_dependency 'locomotive_liquid', '2.2.2'
- # s.add_dependency 'formtastic', '~> 1.2.3'
- # s.add_dependency 'cells', '~> 3.7.0'
- # s.add_dependency 'highline'
- # s.add_dependency 'sanitize'
- #
- # s.add_dependency 'json_pure', '1.5.1'
- # s.add_dependency 'bushido'
- # s.add_dependency 'heroku', '1.19.1'
- #
- # s.add_dependency 'rmagick', '2.12.2'
- # s.add_dependency 'carrierwave', '0.5.6'
- # s.add_dependency 'dragonfly', '~> 0.9.1'
- # s.add_dependency 'rack-cache'
- #
- # s.add_dependency 'custom_fields', '2.0.0.rc1'
- # s.add_dependency 'cancan', '~> 1.6.0'
- # s.add_dependency 'fog', '0.8.2'
- # s.add_dependency 'mimetype-fu'
- # s.add_dependency 'actionmailer-with-request'
- # s.add_dependency 'httparty', '0.7.8'
- # s.add_dependency 'RedCloth', '4.2.9'
- # s.add_dependency 'delayed_job_mongoid', '1.0.8'
- # s.add_dependency 'rubyzip'
- # s.add_dependency 'locomotive_jammit-s3'
-
s.files = Dir[ 'Gemfile',
'{app}/**/*',
'{config}/**/*',