forked from extern/egroupware
update and fix htmlarea when having more then on textbox in a form
This commit is contained in:
parent
46e3408ce4
commit
e9ff05661c
@ -1233,6 +1233,14 @@
|
|||||||
function get_java_script()
|
function get_java_script()
|
||||||
{
|
{
|
||||||
$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))
|
if(@is_object($GLOBALS['phpgw']->js))
|
||||||
{
|
{
|
||||||
$java_script .= $GLOBALS['phpgw']->js->get_script_links();
|
$java_script .= $GLOBALS['phpgw']->js->get_script_links();
|
||||||
|
@ -145,6 +145,8 @@
|
|||||||
}
|
}
|
||||||
if (!strstr($GLOBALS['phpgw_info']['flags']['java_script'],'htmlarea'))
|
if (!strstr($GLOBALS['phpgw_info']['flags']['java_script'],'htmlarea'))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$GLOBALS['phpgw']->js->validate_file('htmlarea','htmlarea');
|
$GLOBALS['phpgw']->js->validate_file('htmlarea','htmlarea');
|
||||||
$GLOBALS['phpgw']->js->validate_file('htmlarea','dialog');
|
$GLOBALS['phpgw']->js->validate_file('htmlarea','dialog');
|
||||||
$lang = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
|
$lang = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
|
||||||
@ -157,13 +159,18 @@
|
|||||||
$GLOBALS['phpgw_info']['flags']['java_script'] .=
|
$GLOBALS['phpgw_info']['flags']['java_script'] .=
|
||||||
'<script type="text/javascript" src="'.ereg_replace('[?&]*click_history=[0-9a-f]*','',$GLOBALS['phpgw']->link('/phpgwapi/inc/htmlarea-lang.php',array('lang'=>$lang))).'"></script>'."\n";
|
'<script type="text/javascript" src="'.ereg_replace('[?&]*click_history=[0-9a-f]*','',$GLOBALS['phpgw']->link('/phpgwapi/inc/htmlarea-lang.php',array('lang'=>$lang))).'"></script>'."\n";
|
||||||
}
|
}
|
||||||
$GLOBALS['phpgw_info']['flags']['java_script'] .=
|
|
||||||
'<style type="text/css">@import url(/egroupware/phpgwapi/js/htmlarea/htmlarea.css);</style>
|
$GLOBALS['phpgw_info']['flags']['java_script_thirst'] .=
|
||||||
<script type="text/javascript">
|
'<style type="text/css">@import url(/egroupware/phpgwapi/js/htmlarea/htmlarea.css);</style>
|
||||||
var htmlareaConfig = new HTMLArea.Config();
|
<script type="text/javascript">
|
||||||
htmlareaConfig.editorURL = '."'$this->phpgwapi_js_url/htmlarea/';
|
var _editor_url = "'."$this->phpgwapi_js_url/htmlarea/".'";
|
||||||
</script>\n";
|
var htmlareaConfig = new HTMLArea.Config();
|
||||||
|
htmlareaConfig.editorURL = '."'$this->phpgwapi_js_url/htmlarea/';
|
||||||
|
</script>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// echo $GLOBALS['phpgw_info']['flags']['java_script'];
|
||||||
|
// die('test');
|
||||||
$id = str_replace(array('[',']'),array('_',''),$name); // no brakets in the id allowed by js
|
$id = str_replace(array('[',']'),array('_',''),$name); // no brakets in the id allowed by js
|
||||||
|
|
||||||
$GLOBALS['phpgw']->js->set_onload("HTMLArea.replace('$id',htmlareaConfig);");
|
$GLOBALS['phpgw']->js->set_onload("HTMLArea.replace('$id',htmlareaConfig);");
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user