diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index 1a88743bcd..c628cc8d4f 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -1233,6 +1233,14 @@ function get_java_script() { $java_script = ''; + + /* this flag is for all javascript code that has to be put before other jscode. + Think of conf vars etc... (pim@lingewoud.nl) */ + if (isset($GLOBALS['phpgw_info']['flags']['java_script_thirst'])) + { + $java_script .= $GLOBALS['phpgw_info']['flags']['java_script_thirst'] . "\n"; + } + if(@is_object($GLOBALS['phpgw']->js)) { $java_script .= $GLOBALS['phpgw']->js->get_script_links(); diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index eb29c43dec..d8a30503ef 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -145,6 +145,8 @@ } if (!strstr($GLOBALS['phpgw_info']['flags']['java_script'],'htmlarea')) { + + $GLOBALS['phpgw']->js->validate_file('htmlarea','htmlarea'); $GLOBALS['phpgw']->js->validate_file('htmlarea','dialog'); $lang = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang']; @@ -157,13 +159,18 @@ $GLOBALS['phpgw_info']['flags']['java_script'] .= ''."\n"; } - $GLOBALS['phpgw_info']['flags']['java_script'] .= -' -\n"; + + $GLOBALS['phpgw_info']['flags']['java_script_thirst'] .= + ' + \n"; + } +// echo $GLOBALS['phpgw_info']['flags']['java_script']; +// die('test'); $id = str_replace(array('[',']'),array('_',''),$name); // no brakets in the id allowed by js $GLOBALS['phpgw']->js->set_onload("HTMLArea.replace('$id',htmlareaConfig);"); diff --git a/phpgwapi/js/htmlarea/htmlarea.js b/phpgwapi/js/htmlarea/htmlarea.js index 0299e5c5ab..5417cd5e3c 100644 --- a/phpgwapi/js/htmlarea/htmlarea.js +++ b/phpgwapi/js/htmlarea/htmlarea.js @@ -1,15 +1,31 @@ -// -// htmlArea v3.0 - Copyright (c) 2002 interactivetools.com, inc. +// htmlArea v3.0 - Copyright (c) 2002-2004 interactivetools.com, inc. // This copyright notice MUST stay intact for use (see license.txt). // +// Portions (c) dynarch.com, 2003-2004 +// // A free WYSIWYG editor replacement for