Bug #2867 - The online editor: Starting some optimizations for speed. Providing a compressed version of javascript for the customizations plugin. The compressed version is active when the system is in production mode. On test server mode the original source javascript is active (i.e. requested by browsers). For more information about making compressed scripts see http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Customization/Scripts_Compression .

skala
Ivan Tcholakov 16 years ago
parent 622ca97e42
commit 2a0f7206f0
  1. 11
      main/inc/lib/fckeditor/editor/plugins/customizations/fckpackager.xml
  2. 1
      main/inc/lib/fckeditor/editor/plugins/customizations/fckplugin_compressed.js
  3. 19
      main/inc/lib/fckeditor/editor/plugins/customizations/fckplugin_load.js
  4. 5
      main/inc/lib/fckeditor/myconfig.js

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

File diff suppressed because one or more lines are too long

@ -30,7 +30,7 @@
// 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.
// 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.
@ -77,6 +77,19 @@ FCKPlugin.prototype.Load = function()
LoadScript( this.Path + 'lang/' + sLang + '.js' ) ;
}
// Add the main plugin script.
LoadScript( this.Path + 'fckplugin.js' ) ;
// Add the main plugin script.
// Logic-modification about loading compressed version of some plugins.
//LoadScript( this.Path + 'fckplugin.js' ) ;
var load_source = ( window.document.location.toString().indexOf('fckeditor.original.html') != -1 ) ;
var file;
switch ( this.Name )
{
case 'customizations':
file = load_source ? 'fckplugin.js' : 'fckplugin_compressed.js';
break;
default:
file = 'fckplugin.js';
}
LoadScript( this.Path + file ) ;
// End of logic-modification.
}

@ -53,8 +53,9 @@ FCKConfig.SmileyWindowHeight = 250 ;
// This is a list of all supported by the online editor languages.
FCKConfig.AvailableLanguages = 'en,af,ar,bg,bn,bs,ca,cs,da,de,el,en-au,en-ca,en-uk,eo,es,et,eu,fa,fi,fo,fr-ca,fr,gl,gu,he,hi,hr,hu,is,it,ja,km,ko,lt,lv,mn,ms,nb,nl,no,pl,pt-br,pt,ro,ru,sk,sl,sr-latn,sr,sv,th,tr,uk,vi,zh-cn,zh' ;
// Loadding additional script that ensures the English language will be shown for plugins, if they are not provided with the requiested language files.
LoadScript( FCKConfig.PluginsPath + 'customizations/fckplugin_load.js' ) ;
// This script selects for loading source/compressed versions of some javascripts and ensures that the English language
// would be shown for plugins, if they are not provided with the requiested language files.
LoadScript( FCKConfig.PluginsPath + 'customizations/fckplugin_load.js' ) ; // Please, do not disable this script.
// Reading the list of the enabled in myconfig.php plugins.
FCKConfig.LoadPlugin = eval( '(' + FCKConfig.PageConfig.LoadPlugin + ')' ) ;
// Loading the enabled plugins.

Loading…
Cancel
Save