|
@@ -27,81 +27,81 @@
|
|
|
// Logic-improvement for ensuring that English language will be shown at least, when the required language file is missing.
|
|
|
FCKPlugin.prototype.Load = function()
|
|
|
{
|
|
|
- // Logic-modification about loading language files.
|
|
|
- switch ( this.Name )
|
|
|
- {
|
|
|
- // The following plugins do not need language files or they load language files in their own way.
|
|
|
- case 'dragresizetable':
|
|
|
- case 'tablecommands':
|
|
|
- case 'ImageManager':
|
|
|
- case 'prompt':
|
|
|
- // In this case we have to clear the list of available languages.
|
|
|
- this.AvailableLangs = null ;
|
|
|
- this.AvailableLangs = new Array() ;
|
|
|
- break ;
|
|
|
- // The following plugins have all needed language files, default logic works well for them.
|
|
|
- case 'customizations':
|
|
|
- case 'audio':
|
|
|
- case 'fckEmbedMovies':
|
|
|
- case 'flvPlayer':
|
|
|
- case 'youtube':
|
|
|
- case 'googlemaps':
|
|
|
- case 'mimetex':
|
|
|
- case 'wikilink':
|
|
|
- case 'imgmap':
|
|
|
- // No actions are needed for fully integrated plugins.
|
|
|
- break ;
|
|
|
- // For new (unknown) plugins we assume that the English language file always exists.
|
|
|
- default:
|
|
|
- // English language is loaded first, later the required language is to be loaded.
|
|
|
- LoadScript( this.Path + 'lang/en.js' ) ;
|
|
|
- }
|
|
|
- // End of logic-modification.
|
|
|
+ // Logic-modification about loading language files.
|
|
|
+ switch ( this.Name )
|
|
|
+ {
|
|
|
+ // The following plugins do not need language files or they load language files in their own way.
|
|
|
+ case 'dragresizetable':
|
|
|
+ case 'tablecommands':
|
|
|
+ case 'ImageManager':
|
|
|
+ case 'prompt':
|
|
|
+ // In this case we have to clear the list of available languages.
|
|
|
+ this.AvailableLangs = null ;
|
|
|
+ this.AvailableLangs = new Array() ;
|
|
|
+ break ;
|
|
|
+ // The following plugins have all needed language files, default logic works well for them.
|
|
|
+ case 'customizations':
|
|
|
+ case 'audio':
|
|
|
+ case 'fckEmbedMovies':
|
|
|
+ case 'flvPlayer':
|
|
|
+ case 'youtube':
|
|
|
+ case 'googlemaps':
|
|
|
+ case 'mimetex':
|
|
|
+ case 'wikilink':
|
|
|
+ case 'imgmap':
|
|
|
+ // No actions are needed for fully integrated plugins.
|
|
|
+ break ;
|
|
|
+ // For new (unknown) plugins we assume that the English language file always exists.
|
|
|
+ default:
|
|
|
+ // English language is loaded first, later the required language is to be loaded.
|
|
|
+ LoadScript( this.Path + 'lang/en.js' ) ;
|
|
|
+ }
|
|
|
+ // End of logic-modification.
|
|
|
|
|
|
- // Load the language file, if defined.
|
|
|
- if ( this.AvailableLangs.length > 0 )
|
|
|
- {
|
|
|
- var sLang ;
|
|
|
+ // Load the language file, if defined.
|
|
|
+ if ( this.AvailableLangs.length > 0 )
|
|
|
+ {
|
|
|
+ var sLang ;
|
|
|
|
|
|
- // Check if the plugin has the language file for the active language.
|
|
|
- if ( this.AvailableLangs.IndexOf( FCKLanguageManager.ActiveLanguage.Code ) >= 0 )
|
|
|
- sLang = FCKLanguageManager.ActiveLanguage.Code ;
|
|
|
- else
|
|
|
- // Load the default language file (first one) if the current one is not available.
|
|
|
- sLang = this.AvailableLangs[0] ;
|
|
|
+ // Check if the plugin has the language file for the active language.
|
|
|
+ if ( this.AvailableLangs.IndexOf( FCKLanguageManager.ActiveLanguage.Code ) >= 0 )
|
|
|
+ sLang = FCKLanguageManager.ActiveLanguage.Code ;
|
|
|
+ else
|
|
|
+ // Load the default language file (first one) if the current one is not available.
|
|
|
+ sLang = this.AvailableLangs[0] ;
|
|
|
|
|
|
- // Add the main plugin script.
|
|
|
- LoadScript( this.Path + 'lang/' + sLang + '.js' ) ;
|
|
|
- }
|
|
|
+ // Add the main plugin script.
|
|
|
+ LoadScript( this.Path + 'lang/' + sLang + '.js' ) ;
|
|
|
+ }
|
|
|
|
|
|
- // Add the main plugin script.
|
|
|
- // Logic-modification about loading compressed version of some plugins.
|
|
|
- //LoadScript( this.Path + 'fckplugin.js' ) ;
|
|
|
- var file;
|
|
|
- switch ( this.Name )
|
|
|
- {
|
|
|
- case 'asciimath':
|
|
|
- case 'audio':
|
|
|
- case 'autogrow':
|
|
|
- case 'customizations':
|
|
|
- case 'dragresizetable':
|
|
|
- case 'fckEmbedMovies':
|
|
|
- case 'flvPlayer':
|
|
|
- case 'googlemaps':
|
|
|
- case 'ImageManager':
|
|
|
- case 'imgmap':
|
|
|
- case 'mimetex':
|
|
|
- case 'prompt':
|
|
|
- case 'tablecommands':
|
|
|
- case 'wikilink':
|
|
|
- case 'youtube':
|
|
|
- file = ( window.document.location.toString().indexOf('fckeditor.original.html') != -1 )
|
|
|
- ? 'fckplugin.js'
|
|
|
- : 'fckplugin_compressed.js';
|
|
|
- break;
|
|
|
- default:
|
|
|
- file = 'fckplugin.js';
|
|
|
- }
|
|
|
- LoadScript( this.Path + file ) ;
|
|
|
- // End of logic-modification.
|
|
|
+ // Add the main plugin script.
|
|
|
+ // Logic-modification about loading compressed version of some plugins.
|
|
|
+ //LoadScript( this.Path + 'fckplugin.js' ) ;
|
|
|
+ var file;
|
|
|
+ switch ( this.Name )
|
|
|
+ {
|
|
|
+ case 'asciimath':
|
|
|
+ case 'audio':
|
|
|
+ case 'autogrow':
|
|
|
+ case 'customizations':
|
|
|
+ case 'dragresizetable':
|
|
|
+ case 'fckEmbedMovies':
|
|
|
+ case 'flvPlayer':
|
|
|
+ case 'googlemaps':
|
|
|
+ case 'ImageManager':
|
|
|
+ case 'imgmap':
|
|
|
+ case 'mimetex':
|
|
|
+ case 'prompt':
|
|
|
+ case 'tablecommands':
|
|
|
+ case 'wikilink':
|
|
|
+ case 'youtube':
|
|
|
+ file = ( window.document.location.toString().indexOf('fckeditor.original.html') != -1 )
|
|
|
+ ? 'fckplugin.js'
|
|
|
+ : 'fckplugin_compressed.js';
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ file = 'fckplugin.js';
|
|
|
+ }
|
|
|
+ LoadScript( this.Path + file ) ;
|
|
|
+ // End of logic-modification.
|
|
|
}
|