JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-4.0_full
[ckeditor.git] / _source / core / plugins.js
diff --git a/_source/core/plugins.js b/_source/core/plugins.js
deleted file mode 100644 (file)
index fda9c88..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*\r
-Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.\r
-For licensing, see LICENSE.html or http://ckeditor.com/license\r
-*/\r
-\r
-/**\r
- * @fileOverview Defines the {@link CKEDITOR.plugins} object, which is used to\r
- *             manage plugins registration and loading.\r
- */\r
-\r
-/**\r
- * Manages plugins registration and loading.\r
- * @namespace\r
- * @augments CKEDITOR.resourceManager\r
- * @example\r
- */\r
-CKEDITOR.plugins = new CKEDITOR.resourceManager(\r
-       '_source/' +    // @Packager.RemoveLine\r
-       'plugins/', 'plugin' );\r
-\r
-// PACKAGER_RENAME( CKEDITOR.plugins )\r
-\r
-CKEDITOR.plugins.load = CKEDITOR.tools.override( CKEDITOR.plugins.load, function( originalLoad )\r
-       {\r
-               return function( name, callback, scope )\r
-               {\r
-                       var allPlugins = {};\r
-\r
-                       var loadPlugins = function( names )\r
-                       {\r
-                               originalLoad.call( this, names, function( plugins )\r
-                                       {\r
-                                               CKEDITOR.tools.extend( allPlugins, plugins );\r
-\r
-                                               var requiredPlugins = [];\r
-                                               for ( var pluginName in plugins )\r
-                                               {\r
-                                                       var plugin = plugins[ pluginName ],\r
-                                                               requires = plugin && plugin.requires;\r
-\r
-                                                       if ( requires )\r
-                                                       {\r
-                                                               for ( var i = 0 ; i < requires.length ; i++ )\r
-                                                               {\r
-                                                                       if ( !allPlugins[ requires[ i ] ] )\r
-                                                                               requiredPlugins.push( requires[ i ] );\r
-                                                               }\r
-                                                       }\r
-                                               }\r
-\r
-                                               if ( requiredPlugins.length )\r
-                                                       loadPlugins.call( this, requiredPlugins );\r
-                                               else\r
-                                               {\r
-                                                       // Call the "onLoad" function for all plugins.\r
-                                                       for ( pluginName in allPlugins )\r
-                                                       {\r
-                                                               plugin = allPlugins[ pluginName ];\r
-                                                               if ( plugin.onLoad && !plugin.onLoad._called )\r
-                                                               {\r
-                                                                       plugin.onLoad();\r
-                                                                       plugin.onLoad._called = 1;\r
-                                                               }\r
-                                                       }\r
-\r
-                                                       // Call the callback.\r
-                                                       if ( callback )\r
-                                                               callback.call( scope || window, allPlugins );\r
-                                               }\r
-                                       }\r
-                                       , this);\r
-\r
-                       };\r
-\r
-                       loadPlugins.call( this, name );\r
-               };\r
-       });\r
-\r
-/**\r
- * Loads a specific language file, or auto detect it. A callback is\r
- * then called when the file gets loaded.\r
- * @param {String} pluginName The name of the plugin to which the provided translation\r
- *             should be attached.\r
- * @param {String} languageCode The code of the language translation provided.\r
- * @param {Object} languageEntries An object that contains pairs of label and\r
- *             the respective translation.\r
- * @example\r
- * CKEDITOR.plugins.setLang( 'myPlugin', 'en', {\r
- *     title : 'My plugin',\r
- *     selectOption : 'Please select an option'\r
- * } );\r
- */\r
-CKEDITOR.plugins.setLang = function( pluginName, languageCode, languageEntries )\r
-{\r
-       var plugin = this.get( pluginName ),\r
-               pluginLangEntries = plugin.langEntries || ( plugin.langEntries = {} ),\r
-               pluginLang = plugin.lang || ( plugin.lang = [] );\r
-\r
-       if ( CKEDITOR.tools.indexOf( pluginLang, languageCode ) == -1 )\r
-               pluginLang.push( languageCode );\r
-\r
-       pluginLangEntries[ languageCode ] = languageEntries;\r
-};\r