00001 <?php
00002
00003
00004
00005
00006
00007
00008 class JavascriptCKEditorEventSink implements IEventSink {
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 public function on_event($event_name, $event_params, &$result) {
00019 if ($event_name == 'jcssmanager_compress') {
00020 switch($event_params) {
00021 case JCSSManager::TYPE_JS:
00022 Load::components('ckeditor');
00023
00024 foreach(CKEditor::get_all_configs() as $name => $config) {
00025 $compressed_name = 'ckeditor.' . $name;
00026 $result[$compressed_name][] = 'js/ckeditor/ckeditor.js';
00027 if (Load::is_module_loaded('javascript.jquery')) {
00028 $result[$compressed_name][] = 'js/ckeditor/adapters/jquery.js';
00029 }
00030 $result[$compressed_name][] = $config->init_file;
00031 }
00032 break;
00033 }
00034 }
00035 }
00036 }