From 703c0f4c206079601cb68a7d3559341f11b0097d Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 23 Jul 2006 20:21:20 +0000 Subject: [PATCH] partage de la barre d'outils pour la charger qu'une fois --- htdocs/lib/doleditor.class.php | 14 +++++++++----- htdocs/product/fiche.php | 11 +++++++++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/htdocs/lib/doleditor.class.php b/htdocs/lib/doleditor.class.php index 011437c9456..6cb961e465a 100644 --- a/htdocs/lib/doleditor.class.php +++ b/htdocs/lib/doleditor.class.php @@ -41,12 +41,15 @@ class DolEditor /** \brief DolEditor - \param htmlname Nom formulaire html WYSIWIG - \param content Contenu édition WYSIWIG - \param height Hauteur en pixel de la zone édition - \param toolbarname Nom barre de menu éditeur + \param htmlname Nom formulaire html WYSIWIG + \param content Contenu édition WYSIWIG + \param height Hauteur en pixel de la zone édition + \param toolbarname Nom barre de menu éditeur + \param toolbarlocation Emplacement de la barre de menu : + '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 */ - function DolEditor($htmlname,$content,$height=200,$toolbarname='Basic') + function DolEditor($htmlname,$content,$height=200,$toolbarname='Basic',$toolbarlocation='In') { global $conf; @@ -60,6 +63,7 @@ class DolEditor { $this->editor->Config["CustomConfigurationsPath"] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/fckconfig.js'; $this->editor->ToolbarSet = $toolbarname; + $this->editor->Config[ 'ToolbarLocation' ] = $toolbarlocation ; $this->editor->Config['SkinPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/'; } } diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 8a5937178ff..640d6a45104 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -772,6 +772,13 @@ if ($_GET["id"] || $_GET["ref"]) { print ''; } + + if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC) + { + print ' '; + print '
'; + print ''; + } // Description print ''.$langs->trans("Description").''; @@ -779,7 +786,7 @@ if ($_GET["id"] || $_GET["ref"]) if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('desc',$product->description,200,'dolibarr_notes'); + $doleditor=new DolEditor('desc',$product->description,200,'dolibarr_notes','Out:xToolbar'); $doleditor->Create(); } else @@ -811,7 +818,7 @@ if ($_GET["id"] || $_GET["ref"]) if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note',$product->note,200,'dolibarr_notes'); + $doleditor=new DolEditor('note',$product->note,200,'dolibarr_notes','Out:xToolbar'); $doleditor->Create(); } else