summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Serbinski2007-05-06 00:53:45 (GMT)
committer Ted Serbinski2007-05-06 00:53:45 (GMT)
commitf075aa3b3bcd56fa331a226333a31f569af26292 (patch)
tree841425929d3f94ebb5ab56caaefa2a08132f4ac9
parent3f92e64ffa85d7cfafdd0b71e486eb7aa9e340c4 (diff)
#110761, get JS GZIP compression working with new TinyMCE versions, patch by JohnAlbin
-rw-r--r--INSTALL.txt2
-rw-r--r--tinymce.module17
2 files changed, 16 insertions, 3 deletions
diff --git a/INSTALL.txt b/INSTALL.txt
index 8c30185..3e83de3 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -52,7 +52,7 @@ NOTE: During this installation process you'll be asked to also
http://tinymce.moxiecode.com/download.php
- Place the tiny_mce_gzip.php file in
+ Place the tiny_mce_gzip.js and tiny_mce_gzip.php files in
modules/tinymce/tinymce/jscripts/tiny_mce
diff --git a/tinymce.module b/tinymce.module
index efabc47..b64e4c8 100644
--- a/tinymce.module
+++ b/tinymce.module
@@ -124,6 +124,14 @@ $tinymce_invoke = <<<EOD
EOD;
+$tinymce_gz_invoke = <<<EOD
+
+ tinyMCE_GZ.init({
+ $tinymce_settings
+ });
+
+EOD;
+
$js_toggle = <<<EOD
function mceToggle(id, linkid) {
@@ -196,8 +204,13 @@ EOD;
drupal_add_js($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/plugins/filemanager/jscripts/mcfilemanager.js');
}
- // TinyMCE Compressor
- if (file_exists($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/tiny_mce_gzip.php')) {
+ // TinyMCE Compressor 1.0.9 and greater
+ if (file_exists($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/tiny_mce_gzip.js')) {
+ drupal_add_js($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/tiny_mce_gzip.js');
+ drupal_add_js($tinymce_gz_invoke, 'inline');
+ }
+ // TinyMCE Compressor (versions < 1.0.9)
+ elseif (file_exists($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/tiny_mce_gzip.php')) {
drupal_add_js($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/tiny_mce_gzip.php');
}
else {