To allow module to use ckeditor/config.js
This commit is contained in:
parent
979ea42d3f
commit
c9a6da610d
@ -912,13 +912,15 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
print '<!-- Includes for Dolibarr, modules or specific pages-->'."\n";
|
||||
// Output style sheets (optioncss='print' or ''). Note: $conf->css looks like '/theme/eldy/style.css.php'
|
||||
$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
|
||||
$themesubdir='';
|
||||
if (! empty($conf->modules_parts['theme'])) // This slow down
|
||||
{
|
||||
foreach($conf->modules_parts['theme'] as $reldir)
|
||||
{
|
||||
if (file_exists(dol_buildpath($reldir.$conf->css, 0)))
|
||||
if (file_exists(dol_buildpath($reldir.$conf->css, 0)))
|
||||
{
|
||||
$themepath=dol_buildpath($reldir.$conf->css, 1);
|
||||
$themesubdir=$reldir;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1063,7 +1065,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
if (constant('JS_CKEDITOR')) $pathckeditor=JS_CKEDITOR; // To use external ckeditor js lib
|
||||
print '<script type="text/javascript">';
|
||||
print 'var CKEDITOR_BASEPATH = \''.$pathckeditor.'\';'."\n";
|
||||
print 'var ckeditorConfig = \''.dol_buildpath('/theme/'.$conf->theme.'/ckeditor/config.js',1).'\';'."\n";
|
||||
print 'var ckeditorConfig = \''.dol_buildpath($themesubdir.'/theme/'.$conf->theme.'/ckeditor/config.js',1).'\';'."\n"; // $themesubdir='' in standard usage
|
||||
print 'var ckeditorFilebrowserBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n";
|
||||
print 'var ckeditorFilebrowserImageBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Type=Image&Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n";
|
||||
print '</script>'."\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user