forked from Wavyzz/dolibarr
Fix: mutualize ckeditor parameters
This commit is contained in:
@@ -176,7 +176,7 @@ class DolEditor
|
||||
/* should be editor=CKEDITOR.replace but what if serveral editors ? */
|
||||
CKEDITOR.replace(\''.$this->htmlname.'\',
|
||||
{
|
||||
customConfig : \''.dol_buildpath('/theme/'.$conf->theme.'/ckeditor/config.js',1).'\',
|
||||
customConfig : ckeditorConfig,
|
||||
toolbar: \''.$this->toolbarname.'\',
|
||||
toolbarStartupExpanded: '.($this->toolbarstartexpanded ? 'true' : 'false').',
|
||||
width: '.($this->width ? '\''.$this->width.'\'' : '\'\'').',
|
||||
@@ -201,8 +201,8 @@ class DolEditor
|
||||
{
|
||||
$out.= ','."\n";
|
||||
// To use filemanager with old fckeditor (GPL)
|
||||
$out.= ' filebrowserBrowseUrl : \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\',';
|
||||
$out.= ' filebrowserImageBrowseUrl : \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Type=Image&Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\',';
|
||||
$out.= ' filebrowserBrowseUrl : ckeditorFilebrowserBrowseUrl,';
|
||||
$out.= ' filebrowserImageBrowseUrl : ckeditorFilebrowserImageBrowseUrl,';
|
||||
//$out.= ' filebrowserUploadUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/connectors/php/upload.php?Type=File\',';
|
||||
//$out.= ' filebrowserImageUploadUrl : \''.DOL_URL_ROOT.'/includes/fckeditor/editor/filemanagerdol/connectors/php/upload.php?Type=Image\',';
|
||||
$out.= "\n";
|
||||
|
||||
@@ -80,7 +80,13 @@ $(document).ready(function() {
|
||||
indicator : indicatorInPlace,
|
||||
ckeditor : {
|
||||
customConfig: ckeditorConfig,
|
||||
toolbar: $('#ckeditor_toolbar').val()
|
||||
toolbar: $('#ckeditor_toolbar').val(),
|
||||
filebrowserBrowseUrl : ckeditorFilebrowserBrowseUrl,
|
||||
filebrowserImageBrowseUrl : ckeditorFilebrowserImageBrowseUrl,
|
||||
filebrowserWindowWidth : '900',
|
||||
filebrowserWindowHeight : '500',
|
||||
filebrowserImageWindowWidth : '900',
|
||||
filebrowserImageWindowHeight : '500'
|
||||
},
|
||||
submitdata : function(result, settings) {
|
||||
return getParameters(this, 'ckeditor');
|
||||
|
||||
@@ -968,7 +968,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
print 'var cancelInPlace = \''.$langs->trans('Cancel').'\';'."\n";
|
||||
print 'var submitInPlace = \''.$langs->trans('Ok').'\';'."\n";
|
||||
print 'var indicatorInPlace = \'<img src="'.DOL_URL_ROOT."/theme/".$conf->theme."/img/working.gif".'">\';'."\n";
|
||||
print 'var ckeditorConfig = \''.dol_buildpath('/theme/'.$conf->theme.'/ckeditor/config.js',1).'\';'."\n";
|
||||
print '</script>'."\n";
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/editinplace.js"></script>'."\n";
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ckeditor.js"></script>'."\n";
|
||||
@@ -1009,7 +1008,12 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<script type="text/javascript">var CKEDITOR_BASEPATH = \''.DOL_URL_ROOT.'/includes/ckeditor/\';</script>'."\n";
|
||||
print '<script type="text/javascript">';
|
||||
print 'var CKEDITOR_BASEPATH = \''.DOL_URL_ROOT.'/includes/ckeditor/\';'."\n";
|
||||
print 'var ckeditorConfig = \''.dol_buildpath('/theme/'.$conf->theme.'/ckeditor/config.js',1).'\';'."\n";
|
||||
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";
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/ckeditor/ckeditor_basic.js"></script>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user