summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWiktor Walc2008-08-28 10:18:37 (GMT)
committer Wiktor Walc2008-08-28 10:18:37 (GMT)
commit6d875fa3f552940570b08821694fff0c67200d7c (patch)
tree3d32450868ffe325276e2b20f1b5dcbcb143de6d
parent6339f4095475b4ea259480b2e3ff4dfcc1a9a65e (diff)
moved drupal_add_js to the right place
-rw-r--r--fckeditor.module5
1 files changed, 2 insertions, 3 deletions
diff --git a/fckeditor.module b/fckeditor.module
index 1f93729..63d8796 100644
--- a/fckeditor.module
+++ b/fckeditor.module
@@ -770,8 +770,6 @@ function fckeditor_process_textarea($element) {
$js .= $js_id .".Config['DrupalPath'] = '". base_path() ."';\n";
}
- drupal_add_js('var '. $js_id .';if (Drupal.jsEnabled) {$(document).ready(function() {'. $js .'});}', 'inline');
-
// integrate IMCE if it exists and is prefered
if (function_exists('imce_integrate') && variable_get('imce_settings_fck', 0)) {
imce_integrate('fck');
@@ -859,7 +857,8 @@ function fckeditor_process_textarea($element) {
$conf['css_path'] = str_replace("%h%t", "%t", $conf['css_path']);
$js .= $js_id .".Config['EditorAreaCSS'] = \"". str_replace(array('%h', '%t'), array($host, $host . $themepath), $conf['css_path']) .",". $module_full_path ."/fckeditor.css\";";
}
- $js .= "</script>\n";
+
+ drupal_add_js('var '. $js_id .';if (Drupal.jsEnabled) {$(document).ready(function() {'. $js .'});}', 'inline');
if ($conf['popup']=="t") {
// Add the script file with the popup open function.