bad display of content types if none + add new gems for tinymce and aloha
This commit is contained in:
parent
7af9ea34a6
commit
4d0f8610c5
4
Gemfile
4
Gemfile
@ -25,8 +25,8 @@ 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 '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'
|
||||
|
12
Gemfile.lock
12
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)
|
||||
|
@ -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 }
|
||||
|
||||
|
@ -28,8 +28,10 @@ module Locomotive::ContentTypesHelper
|
||||
visible << content_type
|
||||
end
|
||||
|
||||
if visible.size > 0
|
||||
visible.map { |c| yield(c) }
|
||||
yield(others)
|
||||
yield(others) if others.size > 0
|
||||
end
|
||||
end
|
||||
|
||||
def is_content_type_selected(content_type)
|
||||
|
@ -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'
|
||||
|
@ -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
|
||||
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
|
||||
|
@ -11,8 +11,7 @@ module Liquid
|
||||
%{
|
||||
<meta content="true" name="inline-editor" />
|
||||
|
||||
#{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}
|
||||
|
||||
|
||||
@ -33,17 +32,3 @@ module Liquid
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# = javascript_include_tag 'locomotive/not_logged_in'
|
||||
# = stylesheet_link_tag 'locomotive/not_logged_in', :media => 'screen'
|
||||
|
||||
# <link href="/assets/locomotive/aloha/css/aloha.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
# <script type="text/javascript" src="/assets/locomotive/utils/aloha_settings.js"></script>
|
||||
# <script type="text/javascript" src="/assets/locomotive/aloha/lib/aloha.js" data-aloha-plugins="common/format,common/highlighteditables,common/list,common/link,common/undo,common/paste"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
#{ActionController::Base.helpers.javascript_include_tag 'locomotive/aloha', :'data-aloha-plugins' => 'common/format,common/highlighteditables,common/list,common/link,common/undo,common/paste'}
|
||||
|
||||
# <script type="text/javascript" src="/assets/aloha/lib/aloha.js" data-aloha-plugins="common/format,common/highlighteditables,common/list,common/link,common/undo,common/paste"></script>
|
@ -39,8 +39,8 @@ Gem::Specification.new do |s|
|
||||
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 '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'
|
||||
@ -63,46 +63,6 @@ Gem::Specification.new do |s|
|
||||
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}/**/*',
|
||||
|
Loading…
Reference in New Issue
Block a user