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
|
'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
|
'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
|
\param toolbarstartexpanded visible ou non au démarrage
|
||||||
*/
|
\param modulepart modulepart pour protection wrapper download viewimage
|
||||||
function DolEditor($htmlname,$content,$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false)
|
*/
|
||||||
|
function DolEditor($htmlname,$content,$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false,$modulepart='fckeditor')
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
dolibarr_syslog("DolEditor::DolEditor");
|
dolibarr_syslog("DolEditor::DolEditor modulepart=".$modulepart);
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/includes/fckeditor/fckeditor.php");
|
require_once(DOL_DOCUMENT_ROOT."/includes/fckeditor/fckeditor.php");
|
||||||
$this->editor = new FCKeditor($htmlname);
|
$this->editor = new FCKeditor($htmlname);
|
||||||
@ -66,8 +67,11 @@ class DolEditor
|
|||||||
$this->editor->Config['ToolbarLocation'] = $toolbarlocation ? $toolbarlocation : 'In';
|
$this->editor->Config['ToolbarLocation'] = $toolbarlocation ? $toolbarlocation : 'In';
|
||||||
$this->editor->Config['ToolbarStartExpanded'] = $toolbarstartexpanded;
|
$this->editor->Config['ToolbarStartExpanded'] = $toolbarstartexpanded;
|
||||||
|
|
||||||
$this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart=fckeditor&file=';
|
// \TODO Le forcage de ces 2 parametres ne semble pas fonctionner.
|
||||||
$this->editor->Config['UserFilesAbsolutePath'] = DOL_DOCUMENT_ROOT.'/fckeditor/' ;
|
// 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'))
|
if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/fckeditor/fckconfig.js'))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -97,6 +97,7 @@ FCKConfig.TemplateReplaceCheckbox = true ;
|
|||||||
|
|
||||||
FCKConfig.ToolbarLocation = 'In' ;
|
FCKConfig.ToolbarLocation = 'In' ;
|
||||||
|
|
||||||
|
/* Ne pas mettre le lien sur objets internes (Image,Smiley) sur le type mailing */
|
||||||
FCKConfig.ToolbarSets["dolibarr_mailings"] = [
|
FCKConfig.ToolbarSets["dolibarr_mailings"] = [
|
||||||
['FitWindow','Source'],
|
['FitWindow','Source'],
|
||||||
['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'],
|
['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'],
|
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'],
|
||||||
['OrderedList','UnorderedList','-','Outdent','Indent'],
|
['OrderedList','UnorderedList','-','Outdent','Indent'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
|
||||||
['Link','Unlink','Anchor','Image','Table','Rule','Smiley','SpecialChar'],
|
['Link','Unlink','Anchor','Table','Rule','SpecialChar'],
|
||||||
['FontName','FontSize']
|
['FontName','FontSize']
|
||||||
] ;
|
] ;
|
||||||
|
|
||||||
|
|||||||
@ -97,6 +97,7 @@ FCKConfig.TemplateReplaceCheckbox = true ;
|
|||||||
|
|
||||||
FCKConfig.ToolbarLocation = 'In' ;
|
FCKConfig.ToolbarLocation = 'In' ;
|
||||||
|
|
||||||
|
/* Ne pas mettre le lien sur objets internes (Image,Smiley) sur le type mailing */
|
||||||
FCKConfig.ToolbarSets["dolibarr_mailings"] = [
|
FCKConfig.ToolbarSets["dolibarr_mailings"] = [
|
||||||
['FitWindow','Source'],
|
['FitWindow','Source'],
|
||||||
['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'],
|
['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'],
|
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'],
|
||||||
['OrderedList','UnorderedList','-','Outdent','Indent'],
|
['OrderedList','UnorderedList','-','Outdent','Indent'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
|
||||||
['Link','Unlink','Anchor','Image','Table','Rule','Smiley','SpecialChar'],
|
['Link','Unlink','Anchor','Table','Rule','SpecialChar'],
|
||||||
['FontName','FontSize']
|
['FontName','FontSize']
|
||||||
] ;
|
] ;
|
||||||
|
|
||||||
|
|||||||
@ -97,6 +97,7 @@ FCKConfig.TemplateReplaceCheckbox = true ;
|
|||||||
|
|
||||||
FCKConfig.ToolbarLocation = 'In' ;
|
FCKConfig.ToolbarLocation = 'In' ;
|
||||||
|
|
||||||
|
/* Ne pas mettre le lien sur objets internes (Image,Smiley) sur le type mailing */
|
||||||
FCKConfig.ToolbarSets["dolibarr_mailings"] = [
|
FCKConfig.ToolbarSets["dolibarr_mailings"] = [
|
||||||
['FitWindow','Source'],
|
['FitWindow','Source'],
|
||||||
['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'],
|
['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'],
|
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'],
|
||||||
['OrderedList','UnorderedList','-','Outdent','Indent'],
|
['OrderedList','UnorderedList','-','Outdent','Indent'],
|
||||||
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
|
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
|
||||||
['Link','Unlink','Anchor','Image','Table','Rule','Smiley','SpecialChar'],
|
['Link','Unlink','Anchor','Table','Rule','SpecialChar'],
|
||||||
['FontName','FontSize']
|
['FontName','FontSize']
|
||||||
] ;
|
] ;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user