Skip to content
This repository
Browse code

[#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...
commit 255fb97aa1146614314dee7bef7cf00504ae6958 1 parent ce2d1fe
peakpg authored March 13, 2012

Showing 96 changed files with 42 additions and 33,501 deletions. Show diff stats Hide diff stats

  1. 6  Gemfile.lock
  2. 9  vendor/assets/javascripts/bcms/ckeditor/editor.js → app/assets/javascripts/bcms/ckeditor.js
  3. 9  app/assets/javascripts/browsercms/application.js
  4. 2  {vendor/assets/javascripts/bcms → app/assets/javascripts}/ckeditor/config.js
  5. 2  app/assets/javascripts/cms/application.js
  6. 19  browsercms.gemspec
  7. 7  lib/cms/engine.rb
  8. 2  lib/cms/version.rb
  9. 15  test/dummy/config/initializers/quiet_sprocket_assets.rb
  10. 2  todo_list.markdown
  11. 6  vendor/assets/javascripts/bcms/ckeditor.js
  12. 108  vendor/assets/javascripts/bcms/ckeditor/ckeditor.js
  13. 64  vendor/assets/javascripts/bcms/ckeditor/core/_bootstrap.js
  14. 143  vendor/assets/javascripts/bcms/ckeditor/core/ajax.js
  15. 96  vendor/assets/javascripts/bcms/ckeditor/core/ckeditor.js
  16. 190  vendor/assets/javascripts/bcms/ckeditor/core/ckeditor_base.js
  17. 241  vendor/assets/javascripts/bcms/ckeditor/core/ckeditor_basic.js
  18. 70  vendor/assets/javascripts/bcms/ckeditor/core/command.js
  19. 72  vendor/assets/javascripts/bcms/ckeditor/core/commanddefinition.js
  20. 287  vendor/assets/javascripts/bcms/ckeditor/core/config.js
  21. 21  vendor/assets/javascripts/bcms/ckeditor/core/dom.js
  22. 210  vendor/assets/javascripts/bcms/ckeditor/core/dom/document.js
  23. 49  vendor/assets/javascripts/bcms/ckeditor/core/dom/documentfragment.js
  24. 204  vendor/assets/javascripts/bcms/ckeditor/core/dom/domobject.js
  25. 1,384  vendor/assets/javascripts/bcms/ckeditor/core/dom/element.js
  26. 104  vendor/assets/javascripts/bcms/ckeditor/core/dom/elementpath.js
  27. 137  vendor/assets/javascripts/bcms/ckeditor/core/dom/event.js
  28. 649  vendor/assets/javascripts/bcms/ckeditor/core/dom/node.js
  29. 23  vendor/assets/javascripts/bcms/ckeditor/core/dom/nodelist.js
  30. 1,668  vendor/assets/javascripts/bcms/ckeditor/core/dom/range.js
  31. 123  vendor/assets/javascripts/bcms/ckeditor/core/dom/text.js
  32. 411  vendor/assets/javascripts/bcms/ckeditor/core/dom/walker.js
  33. 96  vendor/assets/javascripts/bcms/ckeditor/core/dom/window.js
  34. 200  vendor/assets/javascripts/bcms/ckeditor/core/dtd.js
  35. 650  vendor/assets/javascripts/bcms/ckeditor/core/editor.js
  36. 178  vendor/assets/javascripts/bcms/ckeditor/core/editor_basic.js
  37. 219  vendor/assets/javascripts/bcms/ckeditor/core/env.js
  38. 335  vendor/assets/javascripts/bcms/ckeditor/core/event.js
  39. 120  vendor/assets/javascripts/bcms/ckeditor/core/eventInfo.js
  40. 123  vendor/assets/javascripts/bcms/ckeditor/core/focusmanager.js
  41. 212  vendor/assets/javascripts/bcms/ckeditor/core/htmlparser.js
  42. 140  vendor/assets/javascripts/bcms/ckeditor/core/htmlparser/basicwriter.js
  43. 44  vendor/assets/javascripts/bcms/ckeditor/core/htmlparser/cdata.js
  44. 59  vendor/assets/javascripts/bcms/ckeditor/core/htmlparser/comment.js
  45. 196  vendor/assets/javascripts/bcms/ckeditor/core/htmlparser/element.js
  46. 233  vendor/assets/javascripts/bcms/ckeditor/core/htmlparser/filter.js
  47. 434  vendor/assets/javascripts/bcms/ckeditor/core/htmlparser/fragment.js
  48. 55  vendor/assets/javascripts/bcms/ckeditor/core/htmlparser/text.js
  49. 58  vendor/assets/javascripts/bcms/ckeditor/core/imagecacher.js
  50. 147  vendor/assets/javascripts/bcms/ckeditor/core/lang.js
  51. 238  vendor/assets/javascripts/bcms/ckeditor/core/loader.js
  52. 66  vendor/assets/javascripts/bcms/ckeditor/core/plugindefinition.js
  53. 82  vendor/assets/javascripts/bcms/ckeditor/core/plugins.js
  54. 233  vendor/assets/javascripts/bcms/ckeditor/core/resourcemanager.js
  55. 194  vendor/assets/javascripts/bcms/ckeditor/core/scriptloader.js
  56. 185  vendor/assets/javascripts/bcms/ckeditor/core/skins.js
  57. 184  vendor/assets/javascripts/bcms/ckeditor/core/test.js
  58. 18  vendor/assets/javascripts/bcms/ckeditor/core/themes.js
  59. 531  vendor/assets/javascripts/bcms/ckeditor/core/tools.js
  60. 106  vendor/assets/javascripts/bcms/ckeditor/core/ui.js
  61. 165  vendor/assets/javascripts/bcms/ckeditor/core/xml.js
  62. 82  vendor/assets/javascripts/bcms/ckeditor/lang/_languages.js
  63. 59  vendor/assets/javascripts/bcms/ckeditor/lang/_translationstatus.txt
  64. 674  vendor/assets/javascripts/bcms/ckeditor/lang/af.js
  65. 674  vendor/assets/javascripts/bcms/ckeditor/lang/ar.js
  66. 674  vendor/assets/javascripts/bcms/ckeditor/lang/bg.js
  67. 674  vendor/assets/javascripts/bcms/ckeditor/lang/bn.js
  68. 674  vendor/assets/javascripts/bcms/ckeditor/lang/bs.js
  69. 674  vendor/assets/javascripts/bcms/ckeditor/lang/ca.js
  70. 674  vendor/assets/javascripts/bcms/ckeditor/lang/cs.js
  71. 674  vendor/assets/javascripts/bcms/ckeditor/lang/da.js
  72. 674  vendor/assets/javascripts/bcms/ckeditor/lang/de.js
  73. 674  vendor/assets/javascripts/bcms/ckeditor/lang/el.js
  74. 674  vendor/assets/javascripts/bcms/ckeditor/lang/en-au.js
  75. 674  vendor/assets/javascripts/bcms/ckeditor/lang/en-ca.js
  76. 674  vendor/assets/javascripts/bcms/ckeditor/lang/en-uk.js
  77. 674  vendor/assets/javascripts/bcms/ckeditor/lang/en.js
  78. 674  vendor/assets/javascripts/bcms/ckeditor/lang/eo.js
  79. 674  vendor/assets/javascripts/bcms/ckeditor/lang/es.js
  80. 674  vendor/assets/javascripts/bcms/ckeditor/lang/et.js
  81. 674  vendor/assets/javascripts/bcms/ckeditor/lang/eu.js
  82. 674  vendor/assets/javascripts/bcms/ckeditor/lang/fa.js
  83. 674  vendor/assets/javascripts/bcms/ckeditor/lang/fi.js
  84. 674  vendor/assets/javascripts/bcms/ckeditor/lang/fo.js
  85. 674  vendor/assets/javascripts/bcms/ckeditor/lang/fr-ca.js
  86. 674  vendor/assets/javascripts/bcms/ckeditor/lang/fr.js
  87. 674  vendor/assets/javascripts/bcms/ckeditor/lang/gl.js
  88. 674  vendor/assets/javascripts/bcms/ckeditor/lang/gu.js
  89. 674  vendor/assets/javascripts/bcms/ckeditor/lang/he.js
  90. 674  vendor/assets/javascripts/bcms/ckeditor/lang/hi.js
  91. 674  vendor/assets/javascripts/bcms/ckeditor/lang/hr.js
  92. 674  vendor/assets/javascripts/bcms/ckeditor/lang/hu.js
  93. 674  vendor/assets/javascripts/bcms/ckeditor/lang/is.js
  94. 674  vendor/assets/javascripts/bcms/ckeditor/lang/it.js
  95. 674  vendor/assets/javascripts/bcms/ckeditor/lang/ja.js
6  Gemfile.lock
... ...
@@ -1,8 +1,9 @@
1 1
 PATH
2 2
   remote: .
3 3
   specs:
4  
-    browsercms (3.4.0.rc2)
  4
+    browsercms (3.4.0.rc3)
5 5
       ancestry (~> 1.2.4)
  6
+      ckeditor_rails (~> 3.6.2.2)
6 7
       jquery-rails (~> 1.0.14)
7 8
       rails (~> 3.1.0)
8 9
       term-ansicolor
@@ -61,6 +62,9 @@ GEM
61 62
       xpath (~> 0.1.4)
62 63
     childprocess (0.2.2)
63 64
       ffi (~> 1.0.6)
  65
+    ckeditor_rails (3.6.2.2)
  66
+      railties (~> 3.0)
  67
+      thor (~> 0.14)
64 68
     cucumber (1.1.0)
65 69
       builder (>= 2.1.2)
66 70
       diff-lcs (>= 1.1.2)
9  vendor/assets/javascripts/bcms/ckeditor/editor.js → app/assets/javascripts/bcms/ckeditor.js
... ...
@@ -1,13 +1,16 @@
1 1
 //
2  
-// Generic functions for loading WYSIWYG editors for BrowserCMS
  2
+//  Manifest file for loading the CKeditor JS. Loads it from ckeditor-rails gem.
  3
+//  See /assets/ckeditor/config.js for default configuration.
3 4
 //
  5
+//= require ckeditor-jquery
  6
+
4 7
 jQuery(function($){
5 8
   $('textarea.editor').each(function(e){
6 9
     if(editorEnabled()) {
7 10
       loadEditor(this.id)
8 11
     }
9 12
   });
10  
-})
  13
+});
11 14
 
12 15
 function editorEnabled() {
13 16
   return $.cookie('editorEnabled') ? $.cookie('editorEnabled') == "true" : true
@@ -51,4 +54,4 @@ function loadEditor(id) {
51 54
   } else {
52 55
     return false
53 56
   }
54  
-}
  57
+}
9  app/assets/javascripts/browsercms/application.js
... ...
@@ -1,9 +0,0 @@
1  
-// This is a manifest file that'll be compiled into including all the files listed below.
2  
-// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3  
-// be included in the compiled file accessible from http://example.com/assets/application.js
4  
-// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5  
-// the compiled file.
6  
-//
7  
-//= require jquery
8  
-//= require jquery_ujs
9  
-//= require_tree .
2  vendor/assets/javascripts/bcms/ckeditor/config.js → app/assets/javascripts/ckeditor/config.js
... ...
@@ -1,3 +1,5 @@
  1
+// Default configuration for the CKeditor in BrowseCMS projects.
  2
+
1 3
 CKEDITOR.config.toolbar_CMS = [
2 4
   ['Source','-','Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker','Scayt','-','Undo','Redo','Find','Replace','RemoveFormat','-','NumberedList','BulletedList','Outdent','Indent','HorizontalRule'],
3 5
   '/',
2  app/assets/javascripts/cms/application.js
... ...
@@ -1,5 +1,5 @@
1 1
 //
2  
-//  Javascript librarys required for the Admin area of the CMS.
  2
+//  Javascript libraries required for the Admin area of the CMS.
3 3
 //
4 4
 //= require jquery
5 5
 //= require jquery-ui
19  browsercms.gemspec
@@ -2,33 +2,34 @@ require File.dirname(__FILE__) + "/lib/cms/version.rb"
2 2
 
3 3
 Gem::Specification.new do |s|
4 4
   s.platform = Gem::Platform::RUBY
5  
-  s.name = %q{browsercms}
  5
+  s.name = "browsercms"
6 6
   s.version = Cms::VERSION
7 7
 
8 8
   s.authors = ["BrowserMedia"]
9 9
   s.summary = %q{BrowserCMS is a a general purpose, open source Web Content Management System (CMS), written using Ruby on Rails.}
10 10
   s.description = %q{Web Content Management in Rails.}
11 11
   s.email = %q{github@browsermedia.com}
12  
-  s.extra_rdoc_files = [
13  
-      "LICENSE.txt",
14  
-      "README.markdown"
15  
-  ]
  12
+  s.extra_rdoc_files = %w{
  13
+      LICENSE.txt
  14
+      README.markdown
  15
+  }
16 16
   s.required_ruby_version = '>= 1.9.2'
17 17
 
18 18
   s.files         = `git ls-files`.split("\n")
19  
-  s.files         -= Dir['test/dummy/*']
  19
+  s.files         -= Dir["test/dummy/*"]
20 20
   s.files -= Dir["lib/tasks/cucumber.rake"]
21 21
   s.files -= Dir["lib/tasks/cms.rake"]
22 22
   s.files -= Dir["lib/tasks/core_tasks.rake"]
23 23
   s.test_files    = `git ls-files -- {test,spec,features}/*`.split("\n")
24 24
   s.executables   = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
25 25
 
26  
-  s.add_dependency('rails', "~> 3.1.0 ")
  26
+  s.add_dependency "rails", "~> 3.1.0 "
27 27
   s.add_dependency "ancestry", "~> 1.2.4"
  28
+  s.add_dependency "ckeditor_rails", "~> 3.6.2.2"
  29
+  s.add_dependency "jquery-rails", "~> 1.0.14"
28 30
 
29 31
   # Required only for bcms-upgrade
30  
-  s.add_dependency('term-ansicolor')
31  
-  s.add_dependency("jquery-rails", "~> 1.0.14")
  32
+  s.add_dependency "term-ansicolor"
32 33
 
33 34
 end
34 35
 
7  lib/cms/engine.rb
@@ -2,6 +2,12 @@
2 2
 require 'cms/module'
3 3
 require 'cms/init'
4 4
 require 'browsercms'
  5
+
  6
+# Gem name is different than file name
  7
+# Must be required FIRST, so that our assets paths appear before its do.
  8
+# This allows app/assets/ckeditor/config.js to set CMS specific defaults.
  9
+require 'ckeditor-rails'
  10
+
5 11
 module Cms
6 12
 
7 13
   # Configuring BrowserCMS as an engine. This seems to work, but could probably be cleaned up.
@@ -35,7 +41,6 @@ class Engine < Rails::Engine
35 41
       app.config.assets.precompile += ['cms/application.css']
36 42
     end
37 43
 
38  
-
39 44
     def self.add_cms_load_paths
40 45
       ActiveSupport::Dependencies.autoload_paths += %W( #{self.root}/vendor #{self.root}/app/mailers #{self.root}/app/helpers)
41 46
       ActiveSupport::Dependencies.autoload_paths += %W( #{self.root}/app/controllers #{self.root}/app/models #{self.root}/app/portlets)
2  lib/cms/version.rb
@@ -2,5 +2,5 @@
2 2
 # Allows the precise version of BrowserCMS to be determined programatically.
3 3
 #
4 4
 module Cms
5  
-  VERSION = "3.4.0.rc2"
  5
+  VERSION = "3.4.0.rc3"
6 6
 end
15  test/dummy/config/initializers/quiet_sprocket_assets.rb
... ...
@@ -1,8 +1,13 @@
1 1
 # This removes all the Sprocket asset logging from development log, which makes them much saner.
2  
-Rails.application.assets.logger = Logger.new('/dev/null')
3  
-Rails::Rack::Logger.class_eval do
4  
-  def before_dispatch_with_quiet_assets(env)
5  
-    before_dispatch_without_quiet_assets(env) unless env['PATH_INFO'].index("/assets/") == 0
  2
+silence_sprockets = true
  3
+
  4
+if silence_sprockets
  5
+  Rails.application.assets.logger = Logger.new('/dev/null')
  6
+  Rails::Rack::Logger.class_eval do
  7
+    def before_dispatch_with_quiet_assets(env)
  8
+      before_dispatch_without_quiet_assets(env) unless env['PATH_INFO'].index("/assets/") == 0
  9
+    end
  10
+
  11
+    alias_method_chain :before_dispatch, :quiet_assets
6 12
   end
7  
-  alias_method_chain :before_dispatch, :quiet_assets
8 13
 end
2  todo_list.markdown
Source Rendered
... ...
@@ -1,12 +1,12 @@
1 1
 # Working on release of bcms 3.4
2 2
 
3 3
 Current:
  4
+    * Test this on a production environment prior to releasing (things like assets and/or config options might be wonky)
4 5
 
5 6
 Tasks:
6 7
 
7 8
 * [CMS] Upgrade a 3rd module (with a migration) to confirm the installation and upgrade instructions work correctly.
8 9
 * Audit the buglist to see what else is getting closed as part of 3.1
9  
-* Test this on a production environment prior to releasing (things like assets and/or config options might be wonky)
10 10
 * Test upgrading a browsercms v3.1.x/3.3.x to 3.4.x
11 11
 * Write upgrade instructions from 3.1.x/3.3.x to 3.4
12 12
 * Update Roadmap (https://github.com/browsermedia/browsercms/wiki/Roadmap)
6  vendor/assets/javascripts/bcms/ckeditor.js
... ...
@@ -1,6 +0,0 @@
1  
-//
2  
-//  Loads the bcms_ckeditor javascript
3  
-//  This is a pure manifest file for use with Rails 3.1
4  
-//
5  
-//= require bcms/ckeditor/ckeditor
6  
-//= require bcms/ckeditor/editor
108  vendor/assets/javascripts/bcms/ckeditor/ckeditor.js
0 additions, 108 deletions not shown
64  vendor/assets/javascripts/bcms/ckeditor/core/_bootstrap.js
... ...
@@ -1,64 +0,0 @@
1  
-/*
2  
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
3  
-For licensing, see LICENSE.html or http://ckeditor.com/license
4  
-*/
5  
-
6  
-/**
7  
- * @fileOverview API initialization code.
8  
- */
9  
-
10  
-(function()
11  
-{
12  
-	// Check is High Contrast is active by creating a temporary element with a
13  
-	// background image.
14  
-
15  
-	var testImage = ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 ) ? ( CKEDITOR.basePath + 'images/spacer.gif' ) : 'about:blank';
16  
-
17  
-	var hcDetect = CKEDITOR.dom.element.createFromHtml(
18  
-		'<div style="width:0px;height:0px;' +
19  
-			'position:absolute;left:-10000px;' +
20  
-			'background-image:url(' + testImage + ')"></div>', CKEDITOR.document );
21  
-
22  
-	hcDetect.appendTo( CKEDITOR.document.getHead() );
23  
-
24  
-	// Update CKEDITOR.env.
25  
-	if ( ( CKEDITOR.env.hc = ( hcDetect.getComputedStyle( 'background-image' ) == 'none' ) ) )
26  
-		CKEDITOR.env.cssClass += ' cke_hc';
27  
-
28  
-	hcDetect.remove();
29  
-})();
30  
-
31  
-// Load core plugins.
32  
-CKEDITOR.plugins.load( CKEDITOR.config.corePlugins.split( ',' ), function()
33  
-	{
34  
-		CKEDITOR.status = 'loaded';
35  
-		CKEDITOR.fire( 'loaded' );
36  
-
37  
-		// Process all instances created by the "basic" implementation.
38  
-		var pending = CKEDITOR._.pending;
39  
-		if ( pending )
40  
-		{
41  
-			delete CKEDITOR._.pending;
42  
-
43  
-			for ( var i = 0 ; i < pending.length ; i++ )
44  
-				CKEDITOR.add( pending[ i ] );
45  
-		}
46  
-	});
47  
-
48  
-/*
49  
-TODO: Enable the following and check if effective.
50  
-
51  
-if ( CKEDITOR.env.ie )
52  
-{
53  
-	// Remove IE mouse flickering on IE6 because of background images.
54  
-	try
55  
-	{
56  
-		document.execCommand( 'BackgroundImageCache', false, true );
57  
-	}
58  
-	catch (e)
59  
-	{
60  
-		// We have been reported about loading problems caused by the above
61  
-		// line. For safety, let's just ignore errors.
62  
-	}
63  
-}
64  
-*/
143  vendor/assets/javascripts/bcms/ckeditor/core/ajax.js
... ...
@@ -1,143 +0,0 @@
1  
-/*
2  
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
3  
-For licensing, see LICENSE.html or http://ckeditor.com/license
4  
-*/
5  
-
6  
-/**
7  
- * @fileOverview Defines the {@link CKEDITOR.ajax} object, which holds ajax methods for
8  
- *		data loading.
9  
- */
10  
-
11  
-/**
12  
- * Ajax methods for data loading.
13  
- * @namespace
14  
- * @example
15  
- */
16  
-CKEDITOR.ajax = (function()
17  
-{
18  
-	var createXMLHttpRequest = function()
19  
-	{
20  
-		// In IE, using the native XMLHttpRequest for local files may throw
21  
-		// "Access is Denied" errors.
22  
-		if ( !CKEDITOR.env.ie || location.protocol != 'file:' )
23  
-			try { return new XMLHttpRequest(); } catch(e) {}
24  
-
25  
-		try { return new ActiveXObject( 'Msxml2.XMLHTTP' ); } catch (e) {}
26  
-		try { return new ActiveXObject( 'Microsoft.XMLHTTP' ); } catch (e) {}
27  
-
28  
-		return null;
29  
-	};
30  
-
31  
-	var checkStatus = function( xhr )
32  
-	{
33  
-		// HTTP Status Codes:
34  
-		//	 2xx : Success
35  
-		//	 304 : Not Modified
36  
-		//	   0 : Returned when running locally (file://)
37  
-		//	1223 : IE may change 204 to 1223 (see http://dev.jquery.com/ticket/1450)
38  
-
39  
-		return ( xhr.readyState == 4 &&
40  
-				(	( xhr.status >= 200 && xhr.status < 300 ) ||
41  
-					xhr.status == 304 ||
42  
-					xhr.status === 0 ||
43  
-					xhr.status == 1223 ) );
44  
-	};
45  
-
46  
-	var getResponseText = function( xhr )
47  
-	{
48  
-		if ( checkStatus( xhr ) )
49  
-			return xhr.responseText;
50  
-		return null;
51  
-	};
52  
-
53  
-	var getResponseXml = function( xhr )
54  
-	{
55  
-		if ( checkStatus( xhr ) )
56  
-		{
57  
-			var xml = xhr.responseXML;
58  
-			return new CKEDITOR.xml( xml && xml.firstChild ? xml : xhr.responseText );
59  
-		}
60  
-		return null;
61  
-	};
62  
-
63  
-	var load = function( url, callback, getResponseFn )
64  
-	{
65  
-		var async = !!callback;
66  
-
67  
-		var xhr = createXMLHttpRequest();
68  
-
69  
-		if ( !xhr )
70  
-			return null;
71  
-
72  
-		xhr.open( 'GET', url, async );
73  
-
74  
-		if ( async )
75  
-		{
76  
-			// TODO: perform leak checks on this closure.
77  
-			/** @ignore */
78  
-			xhr.onreadystatechange = function()
79  
-			{
80  
-				if ( xhr.readyState == 4 )
81  
-				{
82  
-					callback( getResponseFn( xhr ) );
83  
-					xhr = null;
84  
-				}
85  
-			};
86  
-		}
87  
-
88  
-		xhr.send(null);
89  
-
90  
-		return async ? '' : getResponseFn( xhr );
91  
-	};
92  
-
93  
-	return 	/** @lends CKEDITOR.ajax */ {
94  
-
95  
-		/**
96  
-		 * Loads data from an URL as plain text.
97  
-		 * @param {String} url The URL from which load data.
98  
-		 * @param {Function} [callback] A callback function to be called on
99  
-		 *		data load. If not provided, the data will be loaded
100  
-		 *		asynchronously, passing the data value the function on load.
101  
-		 * @returns {String} The loaded data. For asynchronous requests, an
102  
-		 *		empty string. For invalid requests, null.
103  
-		 * @example
104  
-		 * // Load data synchronously.
105  
-		 * var data = CKEDITOR.ajax.load( 'somedata.txt' );
106  
-		 * alert( data );
107  
-		 * @example
108  
-		 * // Load data asynchronously.
109  
-		 * var data = CKEDITOR.ajax.load( 'somedata.txt', function( data )
110  
-		 *     {
111  
-		 *         alert( data );
112  
-		 *     } );
113  
-		 */
114  
-		load : function( url, callback )
115  
-		{
116  
-			return load( url, callback, getResponseText );
117  
-		},
118  
-
119  
-		/**
120  
-		 * Loads data from an URL as XML.
121  
-		 * @param {String} url The URL from which load data.
122  
-		 * @param {Function} [callback] A callback function to be called on
123  
-		 *		data load. If not provided, the data will be loaded
124  
-		 *		asynchronously, passing the data value the function on load.
125  
-		 * @returns {CKEDITOR.xml} An XML object holding the loaded data. For asynchronous requests, an
126  
-		 *		empty string. For invalid requests, null.
127  
-		 * @example
128  
-		 * // Load XML synchronously.
129  
-		 * var xml = CKEDITOR.ajax.loadXml( 'somedata.xml' );
130  
-		 * alert( xml.getInnerXml( '//' ) );
131  
-		 * @example
132  
-		 * // Load XML asynchronously.
133  
-		 * var data = CKEDITOR.ajax.loadXml( 'somedata.xml', function( xml )
134  
-		 *     {
135  
-		 *         alert( xml.getInnerXml( '//' ) );
136  
-		 *     } );
137  
-		 */
138  
-		loadXml : function( url, callback )
139  
-		{
140  
-			return load( url, callback, getResponseXml );
141  
-		}
142  
-	};
143  
-})();
96  vendor/assets/javascripts/bcms/ckeditor/core/ckeditor.js
... ...
@@ -1,96 +0,0 @@
1  
-/*
2  
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
3  
-For licensing, see LICENSE.html or http://ckeditor.com/license
4  
-*/
5  
-
6  
-/**
7  
- * @fileOverview Contains the third and last part of the {@link CKEDITOR} object
8  
- *		definition.
9  
- */
10  
-
11  
-// Remove the CKEDITOR.loadFullCore reference defined on ckeditor_basic.
12  
-delete CKEDITOR.loadFullCore;
13  
-
14  
-/**
15  
- * Holds references to all editor instances created. The name of the properties
16  
- * in this object correspond to instance names, and their values contains the
17  
- * {@link CKEDITOR.editor} object representing them.
18  
- * @type {Object}
19  
- * @example
20  
- * alert( <b>CKEDITOR.instances</b>.editor1.name );  // "editor1"
21  
- */
22  
-CKEDITOR.instances = {};
23  
-
24  
-/**
25  
- * The document of the window holding the CKEDITOR object.
26  
- * @type {CKEDITOR.dom.document}
27  
- * @example
28  
- * alert( <b>CKEDITOR.document</b>.getBody().getName() );  // "body"
29  
- */
30  
-CKEDITOR.document = new CKEDITOR.dom.document( document );
31  
-
32  
-/**
33  
- * Adds an editor instance to the global {@link CKEDITOR} object. This function
34  
- * is available for internal use mainly.
35  
- * @param {CKEDITOR.editor} editor The editor instance to be added.
36  
- * @example
37  
- */
38  
-CKEDITOR.add = function( editor )
39  
-{
40  
-	CKEDITOR.instances[ editor.name ] = editor;
41  
-
42  
-	editor.on( 'focus', function()
43  
-		{
44  
-			if ( CKEDITOR.currentInstance != editor )
45  
-			{
46  
-				CKEDITOR.currentInstance = editor;
47  
-				CKEDITOR.fire( 'currentInstance' );
48  
-			}
49  
-		});
50  
-
51  
-	editor.on( 'blur', function()
52  
-		{
53  
-			if ( CKEDITOR.currentInstance == editor )
54  
-			{
55  
-				CKEDITOR.currentInstance = null;
56  
-				CKEDITOR.fire( 'currentInstance' );
57  
-			}
58  
-		});
59  
-};
60  
-
61  
-/**
62  
- * Removes and editor instance from the global {@link CKEDITOR} object. his function
63  
- * is available for internal use mainly.
64  
- * @param {CKEDITOR.editor} editor The editor instance to be added.
65  
- * @example
66  
- */
67  
-CKEDITOR.remove = function( editor )
68  
-{
69  
-	delete CKEDITOR.instances[ editor.name ];
70  
-};
71  
-
72  
-// Load the bootstrap script.
73  
-CKEDITOR.loader.load( 'core/_bootstrap' );		// @Packager.RemoveLine
74  
-
75  
-// Tri-state constants.
76  
-
77  
-/**
78  
- * Used to indicate the ON or ACTIVE state.
79  
- * @constant
80  
- * @example
81  
- */
82  
-CKEDITOR.TRISTATE_ON = 1;
83  
-
84  
-/**
85  
- * Used to indicate the OFF or NON ACTIVE state.
86  
- * @constant
87  
- * @example
88  
- */
89  
-CKEDITOR.TRISTATE_OFF = 2;
90  
-
91  
-/**
92  
- * Used to indicate DISABLED state.
93  
- * @constant
94  
- * @example
95  
- */
96  
-CKEDITOR.TRISTATE_DISABLED = 0;
190  vendor/assets/javascripts/bcms/ckeditor/core/ckeditor_base.js
... ...
@@ -1,190 +0,0 @@
1  
-/*
2  
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
3  
-For licensing, see LICENSE.html or http://ckeditor.com/license
4  
-*/
5  
-
6  
-/**
7  
- * @fileOverview Contains the first and essential part of the {@link CKEDITOR}
8  
- *		object definition.
9  
- */
10  
-
11  
-// #### Compressed Code
12  
-// Must be updated on changes in the script, as well as updated in the
13  
-// ckeditor_source.js and ckeditor_basic_source.js files.
14  
-
15  
-// if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',version:'3.0',rev:'4148',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf('://')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;return d;})(),getUrl:function(d){if(d.indexOf('://')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/')d+=(d.indexOf('?')>=0?'&':'?')+('t=')+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();
16  
-
17  
-// #### Raw code
18  
-// ATTENTION: read the above "Compressed Code" notes when changing this code.
19  
-
20  
-if ( !window.CKEDITOR )
21  
-{
22  
-	/**
23  
-	 * This is the API entry point. The entire CKEditor code runs under this object.
24  
-	 * @name CKEDITOR
25  
-	 * @namespace
26  
-	 * @example
27  
-	 */
28  
-	window.CKEDITOR = (function()
29  
-	{
30  
-		var CKEDITOR =
31  
-		/** @lends CKEDITOR */
32  
-		{
33  
-
34  
-			/**
35  
-			 * A constant string unique for each release of CKEditor. Its value
36  
-			 * is used, by default, to build the URL for all resources loaded
37  
-			 * by the editor code, guaranteing clean cache results when
38  
-			 * upgrading.
39  
-			 * @type String
40  
-			 * @example
41  
-			 * alert( CKEDITOR.timestamp );  // e.g. '87dm'
42  
-			 */
43  
-			// The production implementation contains a fixed timestamp, unique
44  
-			// for each release, generated by the releaser.
45  
-			// (Base 36 value of each component of YYMMDDHH - 4 chars total - e.g. 87bm == 08071122)
46  
-			timestamp : '97KD',
47  
-
48  
-			/**
49  
-			 * Contains the CKEditor version number.
50  
-			 * @type String
51  
-			 * @example
52  
-			 * alert( CKEDITOR.version );  // e.g. 'CKEditor 3.0 Beta'
53  
-			 */
54  
-			version : '3.0',
55  
-
56  
-			/**
57  
-			 * Contains the CKEditor revision number.
58  
-			 * Revision number is incremented automatically after each modification of CKEditor source code.
59  
-			 * @type String
60  
-			 * @example
61  
-			 * alert( CKEDITOR.revision );  // e.g. '3975'
62  
-			 */
63  
-			revision : '4148',
64  
-
65  
-			/**
66  
-			 * Private object used to hold core stuff. It should not be used out of
67  
-			 * the API code as properties defined here may change at any time
68  
-			 * without notice.
69  
-			 * @private
70  
-			 */
71  
-			_ : {},
72  
-
73  
-			/**
74  
-			 * Indicates the API loading status. The following status are available:
75  
-			 *		<ul>
76  
-			 *			<li><b>unloaded</b>: the API is not yet loaded.</li>
77  
-			 *			<li><b>basic_loaded</b>: the basic API features are available.</li>
78  
-			 *			<li><b>basic_ready</b>: the basic API is ready to load the full core code.</li>
79  
-			 *			<li><b>loading</b>: the full API is being loaded.</li>
80  
-			 *			<li><b>ready</b>: the API can be fully used.</li>
81  
-			 *		</ul>
82  
-			 * @type String
83  
-			 * @example
84  
-			 * if ( <b>CKEDITOR.status</b> == 'ready' )
85  
-			 * {
86  
-			 *     // The API can now be fully used.
87  
-			 * }
88  
-			 */
89  
-			status : 'unloaded',
90  
-
91  
-			/**
92  
-			 * Contains the full URL for the CKEditor installation directory.
93  
-			 * It's possible to manually provide the base path by setting a
94  
-			 * global variable named CKEDITOR_BASEPATH. This global variable
95  
-			 * must be set "before" the editor script loading.
96  
-			 * @type String
97  
-			 * @example
98  
-			 * alert( <b>CKEDITOR.basePath</b> );  // "http://www.example.com/ckeditor/" (e.g.)
99  
-			 */
100  
-			basePath : (function()
101  
-			{
102  
-				// ATTENTION: fixes on this code must be ported to
103  
-				// var basePath in "core/loader.js".
104  
-
105  
-				// Find out the editor directory path, based on its <script> tag.
106  
-				var path = window.CKEDITOR_BASEPATH || '';
107  
-
108  
-				if ( !path )
109  
-				{
110  
-					var scripts = document.getElementsByTagName( 'script' );
111  
-
112  
-					for ( var i = 0 ; i < scripts.length ; i++ )
113  
-					{
114  
-						var match = scripts[i].src.match( /(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i );
115  
-
116  
-						if ( match )
117  
-						{
118  
-							path = match[1];
119  
-							break;
120  
-						}
121  
-					}
122  
-				}
123  
-
124  
-				// In IE (only) the script.src string is the raw valued entered in the
125  
-				// HTML. Other browsers return the full resolved URL instead.
126  
-				if ( path.indexOf('://') == -1 )
127  
-				{
128  
-					// Absolute path.
129  
-					if ( path.indexOf( '/' ) === 0 )
130  
-						path = location.href.match( /^.*?:\/\/[^\/]*/ )[0] + path;
131  
-					// Relative path.
132  
-					else
133  
-						path = location.href.match( /^[^\?]*\/(?:)/ )[0] + path;
134  
-				}
135  
-
136  
-				return path;
137  
-			})(),
138  
-
139  
-			/**
140  
-			 * Gets the full URL for CKEditor resources. By default, URLs
141  
-			 * returned by this function contains a querystring parameter ("t")
142  
-			 * set to the {@link CKEDITOR.timestamp} value.
143  
-			 * It's possible to provide a custom implementation to this
144  
-			 * function by setting a global variable named CKEDITOR_GETURL.
145  
-			 * This global variable must be set "before" the editor script
146  
-			 * loading. If the custom implementation returns nothing, the
147  
-			 * default implementation is used.
148  
-			 * @returns {String} The full URL.
149  
-			 * @example
150  
-			 * // e.g. http://www.example.com/ckeditor/skins/default/editor.css?t=87dm
151  
-			 * alert( CKEDITOR.getUrl( 'skins/default/editor.css' ) );
152  
-			 * @example
153  
-			 * // e.g. http://www.example.com/skins/default/editor.css?t=87dm
154  
-			 * alert( CKEDITOR.getUrl( '/skins/default/editor.css' ) );
155  
-			 * @example
156  
-			 * // e.g. http://www.somesite.com/skins/default/editor.css?t=87dm
157  
-			 * alert( CKEDITOR.getUrl( 'http://www.somesite.com/skins/default/editor.css' ) );
158  
-			 */
159  
-			getUrl : function( resource )
160  
-			{
161  
-				// If this is not a full or absolute path.
162  
-				if ( resource.indexOf('://') == -1 && resource.indexOf( '/' ) !== 0 )
163  
-					resource = this.basePath + resource;
164  
-
165  
-				// Add the timestamp, except for directories.
166  
-				if ( this.timestamp && resource.charAt( resource.length - 1 ) != '/' )
167  
-					resource += ( resource.indexOf( '?' ) >= 0 ? '&' : '?' ) + 't=' + this.timestamp;
168  
-
169  
-				return resource;
170  
-			}
171  
-		};
172  
-
173  
-		// Make it possible to override the getUrl function with a custom
174  
-		// implementation pointing to a global named CKEDITOR_GETURL.
175  
-		var newGetUrl = window.CKEDITOR_GETURL;
176  
-		if ( newGetUrl )
177  
-		{
178  
-			var originalGetUrl = CKEDITOR.getUrl;
179  
-			CKEDITOR.getUrl = function ( resource )
180  
-			{
181  
-				return newGetUrl.call( CKEDITOR, resource ) ||
182  
-					originalGetUrl.call( CKEDITOR, resource );
183  
-			};
184  
-		}
185  
-
186  
-		return CKEDITOR;
187  
-	})();
188  
-}
189  
-
190  
-// PACKAGER_RENAME( CKEDITOR )
241  vendor/assets/javascripts/bcms/ckeditor/core/ckeditor_basic.js
... ...
@@ -1,241 +0,0 @@
1  
-/*
2  
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
3  
-For licensing, see LICENSE.html or http://ckeditor.com/license
4  
-*/
5  
-
6  
-/**
7  
- * @fileOverview Contains the second part of the {@link CKEDITOR} object
8  
- *		definition, which defines the basic editor features to be available in
9  
- *		the root ckeditor_basic.js file.
10  
- */
11  
-
12  
-if ( CKEDITOR.status == 'unloaded' )
13  
-{
14  
-	(function()
15  
-	{
16  
-		CKEDITOR.event.implementOn( CKEDITOR );
17  
-
18  
-		/**
19  
-		 * Forces the full CKEditor core code, in the case only the basic code has been
20  
-		 * loaded (ckeditor_basic.js). This method self-destroys (becomes undefined) in
21  
-		 * the first call or as soon as the full code is available.
22  
-		 * @example
23  
-		 * // Check if the full core code has been loaded and load it.
24  
-		 * if ( CKEDITOR.loadFullCore )
25  
-		 *     <b>CKEDITOR.loadFullCore()</b>;
26  
-		 */
27  
-		CKEDITOR.loadFullCore = function()
28  
-		{
29  
-			// If not the basic code is not ready it, just mark it to be loaded.
30  
-			if ( CKEDITOR.status != 'basic_ready' )
31  
-			{
32  
-				CKEDITOR.loadFullCore._load = true;
33  
-				return;
34  
-			}
35  
-
36  
-			// Destroy this function.
37  
-			delete CKEDITOR.loadFullCore;
38  
-
39  
-			// Append the script to the head.
40  
-			var script = document.createElement( 'script' );
41  
-			script.type = 'text/javascript';
42  
-			script.src = CKEDITOR.basePath + 'ckeditor.js';
43  
-
44  
-			document.getElementsByTagName( 'head' )[0].appendChild( script );
45  
-		};
46  
-
47  
-		/**
48  
-		 * The time to wait (in seconds) to load the full editor code after the
49  
-		 * page load, if the "ckeditor_basic" file is used. If set to zero, the
50  
-		 * editor is loaded on demand, as soon as an instance is created.
51  
-		 *
52  
-		 * This value must be set on the page before the page load completion.
53  
-		 * @type Number
54  
-		 * @default 0 (zero)
55  
-		 * @example
56  
-		 * // Loads the full source after five seconds.
57  
-		 * CKEDITOR.loadFullCoreTimeout = 5;
58  
-		 */
59  
-		CKEDITOR.loadFullCoreTimeout = 0;
60  
-
61  
-		/**
62  
-		 * The class name used to identify &lt;textarea&gt; elements to be replace
63  
-		 * by CKEditor instances.
64  
-		 * @type String
65  
-		 * @default 'ckeditor'
66  
-		 * @example
67  
-		 * <b>CKEDITOR.replaceClass</b> = 'rich_editor';
68  
-		 */
69  
-		CKEDITOR.replaceClass = 'ckeditor';
70  
-
71  
-		/**
72  
-		 * Enables the replacement of all textareas with class name matching
73  
-		 * {@link CKEDITOR.replaceClass}.
74  
-		 * @type Boolean
75  
-		 * @default true
76  
-		 * @example
77  
-		 * // Disable the auto-replace feature.
78  
-		 * <b>CKEDITOR.replaceByClassEnabled</b> = false;
79  
-		 */
80  
-		CKEDITOR.replaceByClassEnabled = true;
81  
-
82  
-		var createInstance = function( elementOrIdOrName, config, creationFunction )
83  
-		{
84  
-			if ( CKEDITOR.env.isCompatible )
85  
-			{
86  
-				// Load the full core.
87  
-				if ( CKEDITOR.loadFullCore )
88  
-					CKEDITOR.loadFullCore();
89  
-
90  
-				var editor = creationFunction( elementOrIdOrName, config );
91  
-				CKEDITOR.add( editor );
92  
-				return editor;
93  
-			}
94  
-
95  
-			return null;
96  
-		};
97  
-
98  
-		/**
99  
-		 * Replaces a &lt;textarea&gt; or a DOM element (DIV) with a CKEditor
100  
-		 * instance. For textareas, the initial value in the editor will be the
101  
-		 * textarea value. For DOM elements, their innerHTML will be used
102  
-		 * instead. We recommend using TEXTAREA and DIV elements only.
103  
-		 * @param {Object|String} elementOrIdOrName The DOM element (textarea), its
104  
-		 *		ID or name.
105  
-		 * @param {Object} [config] The specific configurations to apply to this
106  
-		 *		editor instance. Configurations set here will override global CKEditor
107  
-		 *		settings.
108  
-		 * @returns {CKEDITOR.editor} The editor instance created.
109  
-		 * @example
110  
-		 * &lt;textarea id="myfield" name="myfield"&gt;&lt:/textarea&gt;
111  
-		 * ...
112  
-		 * <b>CKEDITOR.replace( 'myfield' )</b>;
113  
-		 * @example
114  
-		 * var textarea = document.body.appendChild( document.createElement( 'textarea' ) );
115  
-		 * <b>CKEDITOR.replace( textarea )</b>;
116  
-		 */
117  
-		CKEDITOR.replace = function( elementOrIdOrName, config )
118  
-		{
119  
-			return createInstance( elementOrIdOrName, config, CKEDITOR.editor.replace );
120  
-		};
121  
-
122  
-		/**
123  
-		 * Creates a new editor instance inside a specific DOM element.
124  
-		 * @param {Object|String} elementOrId The DOM element or its ID.
125  
-		 * @param {Object} [config] The specific configurations to apply to this
126  
-		 *		editor instance. Configurations set here will override global CKEditor
127  
-		 *		settings.
128  
-		 * @returns {CKEDITOR.editor} The editor instance created.
129  
-		 * @example
130  
-		 * &lt;div id="editorSpace"&gt;&lt:/div&gt;
131  
-		 * ...
132  
-		 * <b>CKEDITOR.appendTo( 'editorSpace' )</b>;
133  
-		 */
134  
-		CKEDITOR.appendTo = function( elementOrId, config )
135  
-		{
136  
-			return createInstance( elementOrId, config, CKEDITOR.editor.appendTo );
137  
-		};
138  
-
139  
-		/**
140  
-		 * @ignore
141  
-		 * Documented at ckeditor.js.
142  
-		 */
143  
-		CKEDITOR.add = function( editor )
144  
-		{
145  
-			// For now, just put the editor in the pending list. It will be
146  
-			// processed as soon as the full code gets loaded.
147  
-			var pending = this._.pending || ( this._.pending = [] );
148  
-			pending.push( editor );
149  
-		};
150  
-
151  
-		/**
152  
-		 * Replace all &lt;textarea&gt; elements available in the document with
153  
-		 * editor instances.
154  
-		 * @example
155  
-		 * // Replace all &lt;textarea&gt; elements in the page.
156  
-		 * CKEDITOR.replaceAll();
157  
-		 * @example
158  
-		 * // Replace all &lt;textarea class="myClassName"&gt; elements in the page.
159  
-		 * CKEDITOR.replaceAll( 'myClassName' );
160  
-		 * @example
161  
-		 * // Selectively replace &lt;textarea&gt; elements, based on custom assertions.
162  
-		 * CKEDITOR.replaceAll( function( textarea, config )
163  
-		 *     {
164  
-		 *         // Custom code to evaluate the replace, returning false
165  
-		 *         // if it must not be done.
166  
-		 *         // It also passes the "config" parameter, so the
167  
-		 *         // developer can customize the instance.
168  
-		 *     } );
169  
-		 */
170  
-		CKEDITOR.replaceAll = function()
171  
-		{
172  
-			var textareas = document.getElementsByTagName( 'textarea' );
173  
-
174  
-			for ( var i = 0 ; i < textareas.length ; i++ )
175  
-			{
176  
-				var config = null;
177  
-				var textarea = textareas[i];
178  
-				var name = textarea.name;
179  
-
180  
-				// The "name" and/or "id" attribute must exist.
181  
-				if ( !textarea.name && !textarea.id )
182  
-					continue;
183  
-
184  
-				if ( typeof arguments[0] == 'string' )
185  
-				{
186  
-					// The textarea class name could be passed as the function
187  
-					// parameter.
188  
-
189  
-					var classRegex = new RegExp( '(?:^| )' + arguments[0] + '(?:$| )' );
190  
-
191  
-					if ( !classRegex.test( textarea.className ) )
192  
-						continue;
193  
-				}
194  
-				else if ( typeof arguments[0] == 'function' )
195  
-				{
196  
-					// An assertion function could be passed as the function parameter.
197  
-					// It must explicitly return "false" to ignore a specific <textarea>.
198  
-					config = {};
199  
-					if ( arguments[0]( textarea, config ) === false )
200  
-						continue;
201  
-				}
202  
-
203  
-				this.replace( textarea, config );
204  
-			}
205  
-		};
206  
-
207  
-		(function()
208  
-		{
209  
-			var onload = function()
210  
-			{
211  
-				var loadFullCore = CKEDITOR.loadFullCore,
212  
-					loadFullCoreTimeout = CKEDITOR.loadFullCoreTimeout;
213  
-
214  
-				// Replace all textareas with the default class name.
215  
-				if ( CKEDITOR.replaceByClassEnabled )
216  
-					CKEDITOR.replaceAll( CKEDITOR.replaceClass );
217  
-
218  
-				CKEDITOR.status = 'basic_ready';
219  
-
220  
-				if ( loadFullCore && loadFullCore._load )
221  
-					loadFullCore();
222  
-				else if ( loadFullCoreTimeout )
223  
-				{
224  
-					setTimeout( function()
225  
-						{
226  
-							if ( CKEDITOR.loadFullCore )
227  
-								CKEDITOR.loadFullCore();
228  
-						}
229  
-						, loadFullCoreTimeout * 1000 );
230  
-				}
231  
-			};
232  
-
233  
-			if ( window.addEventListener )
234  
-				window.addEventListener( 'load', onload, false );
235  
-			else if ( window.attachEvent )
236  
-				window.attachEvent( 'onload', onload );
237  
-		})();
238  
-
239  
-		CKEDITOR.status = 'basic_loaded';
240  
-	})();
241  
-}
70  vendor/assets/javascripts/bcms/ckeditor/core/command.js
... ...
@@ -1,70 +0,0 @@
1  
-/*
2  
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
3  
-For licensing, see LICENSE.html or http://ckeditor.com/license
4  
-*/
5  
-
6  
-CKEDITOR.command = function( editor, commandDefinition )
7  
-{
8  
-	this.exec = function( data )
9  
-	{
10  
-		if ( this.state == CKEDITOR.TRISTATE_DISABLED )
11  
-			return false;
12  
-
13  
-		// The editor will always have the focus when executing a command.
14  
-		editor.focus();
15  
-
16  
-		return ( commandDefinition.exec.call( this, editor, data ) !== false );
17  
-	};
18  
-
19  
-	CKEDITOR.tools.extend( this, commandDefinition,
20  
-		// Defaults
21  
-		{
22  
-			modes : { wysiwyg : 1 },
23  
-			state : CKEDITOR.TRISTATE_OFF
24  
-		});
25  
-
26  
-	// Call the CKEDITOR.event constructor to initialize this instance.
27  
-	CKEDITOR.event.call( this );
28  
-};
29  
-
30  
-CKEDITOR.command.prototype =
31  
-{
32  
-	enable : function()
33  
-	{
34  
-		if ( this.state == CKEDITOR.TRISTATE_DISABLED )
35  
-			this.setState( ( !this.preserveState || ( typeof this.previousState == 'undefined' ) ) ? CKEDITOR.TRISTATE_OFF : this.previousState );
36  
-	},
37  
-
38  
-	disable : function()
39  
-	{
40  
-		this.setState( CKEDITOR.TRISTATE_DISABLED );
41  
-	},
42  
-
43  
-	setState : function( newState )
44  
-	{
45  
-		// Do nothing if there is no state change.
46  
-		if ( this.state == newState )
47  
-			return false;
48  
-
49  
-		this.previousState = this.state;
50  
-
51  
-		// Set the new state.
52  
-		this.state = newState;
53  
-
54  
-		// Fire the "state" event, so other parts of the code can react to the
55  
-		// change.
56  
-		this.fire( 'state' );
57  
-
58  
-		return true;
59  
-	},
60  
-
61  
-	toggleState : function()
62  
-	{
63  
-		if ( this.state == CKEDITOR.TRISTATE_OFF )
64  
-			this.setState( CKEDITOR.TRISTATE_ON );
65  
-		else if ( this.state == CKEDITOR.TRISTATE_ON )
66  
-			this.setState( CKEDITOR.TRISTATE_OFF );
67  
-	}
68  
-};
69  
-
70  
-CKEDITOR.event.implementOn( CKEDITOR.command.prototype, true );
72  vendor/assets/javascripts/bcms/ckeditor/core/commanddefinition.js
... ...
@@ -1,72 +0,0 @@
1  
-/*
2  
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
3  
-For licensing, see LICENSE.html or http://ckeditor.com/license