Fix: Sur fckeditor de mailing, on ne permet pas insertion de liens internes
This commit is contained in:
parent
0d9802a9ac
commit
a9f4e53023
@ -49,12 +49,13 @@ class DolEditor
|
||||
'In' chaque fenêtre d'édition a ça propre barre d'outils
|
||||
'Out:nom' partage de la barre d'outils où 'nom' est le nom du DIV qui affiche la barre
|
||||
\param toolbarstartexpanded visible ou non au démarrage
|
||||
*/
|
||||
function DolEditor($htmlname,$content,$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false)
|
||||
\param modulepart modulepart pour protection wrapper download viewimage
|
||||
*/
|
||||
function DolEditor($htmlname,$content,$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false,$modulepart='fckeditor')
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
dolibarr_syslog("DolEditor::DolEditor");
|
||||
dolibarr_syslog("DolEditor::DolEditor modulepart=".$modulepart);
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/fckeditor/fckeditor.php");
|
||||
$this->editor = new FCKeditor($htmlname);
|
||||
@ -66,8 +67,11 @@ class DolEditor
|
||||
$this->editor->Config['ToolbarLocation'] = $toolbarlocation ? $toolbarlocation : 'In';
|
||||
$this->editor->Config['ToolbarStartExpanded'] = $toolbarstartexpanded;
|
||||
|
||||
$this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart=fckeditor&file=';
|
||||
$this->editor->Config['UserFilesAbsolutePath'] = DOL_DOCUMENT_ROOT.'/fckeditor/' ;
|
||||
// \TODO Le forcage de ces 2 parametres ne semble pas fonctionner.
|
||||
// Dolibarr utilise toujours liens avec modulepart='fckeditor' quelque soit modulepart.
|
||||
// Ou se trouve donc cette valeur /viewimage.php?modulepart=fckeditor&file=' ?
|
||||
$this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&file=';
|
||||
$this->editor->Config['UserFilesAbsolutePath'] = DOL_DOCUMENT_ROOT.'/'.$modulepart.'/' ;
|
||||
|
||||
if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/fckeditor/fckconfig.js'))
|
||||
{
|
||||
|
||||
@ -97,6 +97,7 @@ FCKConfig.TemplateReplaceCheckbox = true ;
|
||||
|
||||
FCKConfig.ToolbarLocation = 'In' ;
|
||||
|
||||
/* Ne pas mettre le lien sur objets internes (Image,Smiley) sur le type mailing */
|
||||
FCKConfig.ToolbarSets["dolibarr_mailings"] = [
|
||||
['FitWindow','Source'],
|
||||
['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'],
|
||||
@ -104,7 +105,7 @@ FCKConfig.ToolbarSets["dolibarr_mailings"] = [
|
||||
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'],
|
||||
['OrderedList','UnorderedList','-','Outdent','Indent'],
|
||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
|
||||
['Link','Unlink','Anchor','Image','Table','Rule','Smiley','SpecialChar'],
|
||||
['Link','Unlink','Anchor','Table','Rule','SpecialChar'],
|
||||
['FontName','FontSize']
|
||||
] ;
|
||||
|
||||
|
||||
@ -97,6 +97,7 @@ FCKConfig.TemplateReplaceCheckbox = true ;
|
||||
|
||||
FCKConfig.ToolbarLocation = 'In' ;
|
||||
|
||||
/* Ne pas mettre le lien sur objets internes (Image,Smiley) sur le type mailing */
|
||||
FCKConfig.ToolbarSets["dolibarr_mailings"] = [
|
||||
['FitWindow','Source'],
|
||||
['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'],
|
||||
@ -104,7 +105,7 @@ FCKConfig.ToolbarSets["dolibarr_mailings"] = [
|
||||
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'],
|
||||
['OrderedList','UnorderedList','-','Outdent','Indent'],
|
||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
|
||||
['Link','Unlink','Anchor','Image','Table','Rule','Smiley','SpecialChar'],
|
||||
['Link','Unlink','Anchor','Table','Rule','SpecialChar'],
|
||||
['FontName','FontSize']
|
||||
] ;
|
||||
|
||||
|
||||
@ -97,6 +97,7 @@ FCKConfig.TemplateReplaceCheckbox = true ;
|
||||
|
||||
FCKConfig.ToolbarLocation = 'In' ;
|
||||
|
||||
/* Ne pas mettre le lien sur objets internes (Image,Smiley) sur le type mailing */
|
||||
FCKConfig.ToolbarSets["dolibarr_mailings"] = [
|
||||
['FitWindow','Source'],
|
||||
['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'],
|
||||
@ -104,7 +105,7 @@ FCKConfig.ToolbarSets["dolibarr_mailings"] = [
|
||||
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'],
|
||||
['OrderedList','UnorderedList','-','Outdent','Indent'],
|
||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
|
||||
['Link','Unlink','Anchor','Image','Table','Rule','Smiley','SpecialChar'],
|
||||
['Link','Unlink','Anchor','Table','Rule','SpecialChar'],
|
||||
['FontName','FontSize']
|
||||
] ;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user