Permalink
Browse files

[#487] Upgrade CKeditor

* Replace included CKeditor files with ckeditor-rails gem which is Asset Pipeline ready
* Remove all vendored asset files for ckeditor
* Override default config.js provided by ckeditor.js gem.
* Move CKEditor 'boot' files from vendor into app directory.
* Add gem dependency on ckeditor_rails
* Bump to RC3
  • Loading branch information...
1 parent ce2d1fe commit 255fb97aa1146614314dee7bef7cf00504ae6958 @peakpg peakpg committed Mar 13, 2012
Showing 370 changed files with 42 additions and 95,359 deletions.
View
@@ -1,8 +1,9 @@
PATH
remote: .
specs:
- browsercms (3.4.0.rc2)
+ browsercms (3.4.0.rc3)
ancestry (~> 1.2.4)
+ ckeditor_rails (~> 3.6.2.2)
jquery-rails (~> 1.0.14)
rails (~> 3.1.0)
term-ansicolor
@@ -61,6 +62,9 @@ GEM
xpath (~> 0.1.4)
childprocess (0.2.2)
ffi (~> 1.0.6)
+ ckeditor_rails (3.6.2.2)
+ railties (~> 3.0)
+ thor (~> 0.14)
cucumber (1.1.0)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
@@ -1,13 +1,16 @@
//
-// Generic functions for loading WYSIWYG editors for BrowserCMS
+// Manifest file for loading the CKeditor JS. Loads it from ckeditor-rails gem.
+// See /assets/ckeditor/config.js for default configuration.
//
+//= require ckeditor-jquery
+
jQuery(function($){
$('textarea.editor').each(function(e){
if(editorEnabled()) {
loadEditor(this.id)
}
});
-})
+});
function editorEnabled() {
return $.cookie('editorEnabled') ? $.cookie('editorEnabled') == "true" : true
@@ -51,4 +54,4 @@ function loadEditor(id) {
} else {
return false
}
-}
+}
@@ -1,9 +0,0 @@
-// This is a manifest file that'll be compiled into including all the files listed below.
-// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
-// be included in the compiled file accessible from http://example.com/assets/application.js
-// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
-// the compiled file.
-//
-//= require jquery
-//= require jquery_ujs
-//= require_tree .
@@ -1,3 +1,5 @@
+// Default configuration for the CKeditor in BrowseCMS projects.
+
CKEDITOR.config.toolbar_CMS = [
['Source','-','Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker','Scayt','-','Undo','Redo','Find','Replace','RemoveFormat','-','NumberedList','BulletedList','Outdent','Indent','HorizontalRule'],
'/',
@@ -1,5 +1,5 @@
//
-// Javascript librarys required for the Admin area of the CMS.
+// Javascript libraries required for the Admin area of the CMS.
//
//= require jquery
//= require jquery-ui
View
@@ -2,33 +2,34 @@ require File.dirname(__FILE__) + "/lib/cms/version.rb"
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
- s.name = %q{browsercms}
+ s.name = "browsercms"
s.version = Cms::VERSION
s.authors = ["BrowserMedia"]
s.summary = %q{BrowserCMS is a a general purpose, open source Web Content Management System (CMS), written using Ruby on Rails.}
s.description = %q{Web Content Management in Rails.}
s.email = %q{github@browsermedia.com}
- s.extra_rdoc_files = [
- "LICENSE.txt",
- "README.markdown"
- ]
+ s.extra_rdoc_files = %w{
+ LICENSE.txt
+ README.markdown
+ }
s.required_ruby_version = '>= 1.9.2'
s.files = `git ls-files`.split("\n")
- s.files -= Dir['test/dummy/*']
+ s.files -= Dir["test/dummy/*"]
s.files -= Dir["lib/tasks/cucumber.rake"]
s.files -= Dir["lib/tasks/cms.rake"]
s.files -= Dir["lib/tasks/core_tasks.rake"]
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
- s.add_dependency('rails', "~> 3.1.0 ")
+ s.add_dependency "rails", "~> 3.1.0 "
s.add_dependency "ancestry", "~> 1.2.4"
+ s.add_dependency "ckeditor_rails", "~> 3.6.2.2"
+ s.add_dependency "jquery-rails", "~> 1.0.14"
# Required only for bcms-upgrade
- s.add_dependency('term-ansicolor')
- s.add_dependency("jquery-rails", "~> 1.0.14")
+ s.add_dependency "term-ansicolor"
end
View
@@ -2,6 +2,12 @@
require 'cms/module'
require 'cms/init'
require 'browsercms'
+
+# Gem name is different than file name
+# Must be required FIRST, so that our assets paths appear before its do.
+# This allows app/assets/ckeditor/config.js to set CMS specific defaults.
+require 'ckeditor-rails'
+
module Cms
# Configuring BrowserCMS as an engine. This seems to work, but could probably be cleaned up.
@@ -35,7 +41,6 @@ class Engine < Rails::Engine
app.config.assets.precompile += ['cms/application.css']
end
-
def self.add_cms_load_paths
ActiveSupport::Dependencies.autoload_paths += %W( #{self.root}/vendor #{self.root}/app/mailers #{self.root}/app/helpers)
ActiveSupport::Dependencies.autoload_paths += %W( #{self.root}/app/controllers #{self.root}/app/models #{self.root}/app/portlets)
View
@@ -2,5 +2,5 @@
# Allows the precise version of BrowserCMS to be determined programatically.
#
module Cms
- VERSION = "3.4.0.rc2"
+ VERSION = "3.4.0.rc3"
end
@@ -1,8 +1,13 @@
# This removes all the Sprocket asset logging from development log, which makes them much saner.
-Rails.application.assets.logger = Logger.new('/dev/null')
-Rails::Rack::Logger.class_eval do
- def before_dispatch_with_quiet_assets(env)
- before_dispatch_without_quiet_assets(env) unless env['PATH_INFO'].index("/assets/") == 0
+silence_sprockets = true
+
+if silence_sprockets
+ Rails.application.assets.logger = Logger.new('/dev/null')
+ Rails::Rack::Logger.class_eval do
+ def before_dispatch_with_quiet_assets(env)
+ before_dispatch_without_quiet_assets(env) unless env['PATH_INFO'].index("/assets/") == 0
+ end
+
+ alias_method_chain :before_dispatch, :quiet_assets
end
- alias_method_chain :before_dispatch, :quiet_assets
end
View
@@ -1,12 +1,12 @@
# Working on release of bcms 3.4
Current:
+ * Test this on a production environment prior to releasing (things like assets and/or config options might be wonky)
Tasks:
* [CMS] Upgrade a 3rd module (with a migration) to confirm the installation and upgrade instructions work correctly.
* Audit the buglist to see what else is getting closed as part of 3.1
-* Test this on a production environment prior to releasing (things like assets and/or config options might be wonky)
* Test upgrading a browsercms v3.1.x/3.3.x to 3.4.x
* Write upgrade instructions from 3.1.x/3.3.x to 3.4
* Update Roadmap (https://github.com/browsermedia/browsercms/wiki/Roadmap)
@@ -1,6 +0,0 @@
-//
-// Loads the bcms_ckeditor javascript
-// This is a pure manifest file for use with Rails 3.1
-//
-//= require bcms/ckeditor/ckeditor
-//= require bcms/ckeditor/editor
Oops, something went wrong.

0 comments on commit 255fb97

Please sign in to comment.