From a9f4e5302362ccc6299be72387796bd1e9b9b566 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 20 May 2007 23:25:50 +0000 Subject: [PATCH] Fix: Sur fckeditor de mailing, on ne permet pas insertion de liens internes --- htdocs/lib/doleditor.class.php | 14 +++++++++----- htdocs/theme/auguria/fckeditor/fckconfig.js | 3 ++- htdocs/theme/eldy/fckeditor/fckconfig.js | 3 ++- htdocs/theme/freelug/fckeditor/fckconfig.js | 3 ++- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/htdocs/lib/doleditor.class.php b/htdocs/lib/doleditor.class.php index b4675de7a6b..4188076975a 100644 --- a/htdocs/lib/doleditor.class.php +++ b/htdocs/lib/doleditor.class.php @@ -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')) { diff --git a/htdocs/theme/auguria/fckeditor/fckconfig.js b/htdocs/theme/auguria/fckeditor/fckconfig.js index 8f50989ef62..d7fff917f4b 100644 --- a/htdocs/theme/auguria/fckeditor/fckconfig.js +++ b/htdocs/theme/auguria/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'] ] ; diff --git a/htdocs/theme/eldy/fckeditor/fckconfig.js b/htdocs/theme/eldy/fckeditor/fckconfig.js index 8f50989ef62..d7fff917f4b 100644 --- a/htdocs/theme/eldy/fckeditor/fckconfig.js +++ b/htdocs/theme/eldy/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'] ] ; diff --git a/htdocs/theme/freelug/fckeditor/fckconfig.js b/htdocs/theme/freelug/fckeditor/fckconfig.js index 8f50989ef62..d7fff917f4b 100644 --- a/htdocs/theme/freelug/fckeditor/fckconfig.js +++ b/htdocs/theme/freelug/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'] ] ;