Skip to content
Permalink
Browse files

Merge branch 't/10913'

  • Loading branch information...
fredck committed Oct 4, 2013
2 parents 1836e99 + 13d35e5 commit cec1019b8d3406daffd896e54688c43baa35109a
Showing with 14 additions and 2 deletions.
  1. +14 −2 core/resourcemanager.js
@@ -117,7 +117,7 @@ CKEDITOR.resourceManager.prototype = {
*/
getFilePath: function( name ) {
var external = this.externals[ name ];
return CKEDITOR.getUrl( this.getPath( name ) + ( ( external && ( typeof external.file == 'string' ) ) ? external.file : this.fileName + '.js' ) );
return CKEDITOR.getUrl( this.getPath( name ) + ( external ? external.file : this.fileName + '.js' ) );
},

/**
@@ -144,9 +144,21 @@ CKEDITOR.resourceManager.prototype = {
for ( var i = 0; i < names.length; i++ ) {
var name = names[ i ];

// If "fileName" is not provided, we assume that it may be available
// in "path". Try to extract it in this case.
if ( !fileName ) {
path = path.replace( /[^\/]+$/, function( match ) {
fileName = match;
return '';
} );
}

this.externals[ name ] = {
dir: path,
file: fileName

// Use the default file name if there is no "fileName" and it
// was not found in "path".
file: fileName || ( this.fileName + '.js' )
};
}
},

0 comments on commit cec1019

Please sign in to comment.
You can’t perform that action at this time.