partage de la barre d'outils pour la charger qu'une fois

This commit is contained in:
Regis Houssin 2006-07-23 20:28:16 +00:00
parent 703c0f4c20
commit c5e48a40bc
2 changed files with 4 additions and 3 deletions

View File

@ -49,7 +49,7 @@ 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
*/ */
function DolEditor($htmlname,$content,$height=200,$toolbarname='Basic',$toolbarlocation='In') function DolEditor($htmlname,$content,$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false)
{ {
global $conf; global $conf;
@ -64,6 +64,7 @@ class DolEditor
$this->editor->Config["CustomConfigurationsPath"] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/fckconfig.js'; $this->editor->Config["CustomConfigurationsPath"] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/fckconfig.js';
$this->editor->ToolbarSet = $toolbarname; $this->editor->ToolbarSet = $toolbarname;
$this->editor->Config[ 'ToolbarLocation' ] = $toolbarlocation ; $this->editor->Config[ 'ToolbarLocation' ] = $toolbarlocation ;
$this->editor->Config['ToolbarStartExpanded'] = $toolbarstartexpanded;
$this->editor->Config['SkinPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/'; $this->editor->Config['SkinPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/';
} }
} }

View File

@ -786,7 +786,7 @@ if ($_GET["id"] || $_GET["ref"])
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC) if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
{ {
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); 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(); $doleditor->Create();
} }
else else
@ -818,7 +818,7 @@ if ($_GET["id"] || $_GET["ref"])
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC) if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
{ {
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); 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(); $doleditor->Create();
} }
else else