X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fresourcemanager.js;h=4dab1d70ecb4f997f74c2d3f715b76b7f6f44c2b;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hp=ebf6be3f16c24e8a99c4d62efa3ef42f343c029a;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/_source/core/resourcemanager.js b/_source/core/resourcemanager.js index ebf6be3..4dab1d7 100644 --- a/_source/core/resourcemanager.js +++ b/_source/core/resourcemanager.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -86,7 +86,8 @@ CKEDITOR.resourceManager.prototype = if ( this.registered[ name ] ) throw '[CKEDITOR.resourceManager.add] The resource name "' + name + '" is already registered.'; - this.registered[ name ] = definition || {}; + CKEDITOR.fire( name + CKEDITOR.tools.capitalize( this.fileName ) + 'Ready', + this.registered[ name ] = definition || {} ); }, /** @@ -126,7 +127,7 @@ CKEDITOR.resourceManager.prototype = var external = this.externals[ name ]; return CKEDITOR.getUrl( this.getPath( name ) + - ( ( external && external.file ) || ( this.fileName + '.js' ) ) ); + ( ( external && ( typeof external.file == 'string' ) ) ? external.file : this.fileName + '.js' ) ); }, /** @@ -135,13 +136,17 @@ CKEDITOR.resourceManager.prototype = * @param {String} names The resource names, separated by commas. * @param {String} path The path of the folder containing the resource. * @param {String} [fileName] The resource file name. If not provided, the - * default name is used. + * default name is used; If provided with a empty string, will implicitly indicates that {@param path} + * is already the full path. * @example * // Loads a plugin from '/myplugin/samples/plugin.js'. * CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/' ); * @example * // Loads a plugin from '/myplugin/samples/my_plugin.js'. * CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/', 'my_plugin.js' ); + * @example + * // Loads a plugin from '/myplugin/samples/my_plugin.js'. + * CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/my_plugin.js', '' ); */ addExternal : function( names, path, fileName ) {