From c5e48a40bccad2c1ea3ba0f51c16842564717e27 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 23 Jul 2006 20:28:16 +0000 Subject: [PATCH] partage de la barre d'outils pour la charger qu'une fois --- htdocs/lib/doleditor.class.php | 3 ++- htdocs/product/fiche.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/lib/doleditor.class.php b/htdocs/lib/doleditor.class.php index 6cb961e465a..72b00fe0eba 100644 --- a/htdocs/lib/doleditor.class.php +++ b/htdocs/lib/doleditor.class.php @@ -49,7 +49,7 @@ 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 */ - function DolEditor($htmlname,$content,$height=200,$toolbarname='Basic',$toolbarlocation='In') + function DolEditor($htmlname,$content,$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false) { global $conf; @@ -64,6 +64,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['ToolbarStartExpanded'] = $toolbarstartexpanded; $this->editor->Config['SkinPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/'; } } diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 640d6a45104..ec0eba6c611 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -786,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','Out:xToolbar'); + $doleditor=new DolEditor('desc',$product->description,200,'dolibarr_notes','Out:xToolbar',true); $doleditor->Create(); } else @@ -818,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','Out:xToolbar'); + $doleditor=new DolEditor('note',$product->note,200,'dolibarr_notes','Out:xToolbar',true); $doleditor->Create(); } else