partage de la barre d'outils pour la charger qu'une fois
This commit is contained in:
parent
4c98a91d34
commit
703c0f4c20
@ -41,12 +41,15 @@ class DolEditor
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
\brief DolEditor
|
\brief DolEditor
|
||||||
\param htmlname Nom formulaire html WYSIWIG
|
\param htmlname Nom formulaire html WYSIWIG
|
||||||
\param content Contenu édition WYSIWIG
|
\param content Contenu édition WYSIWIG
|
||||||
\param height Hauteur en pixel de la zone édition
|
\param height Hauteur en pixel de la zone édition
|
||||||
\param toolbarname Nom barre de menu éditeur
|
\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;
|
global $conf;
|
||||||
|
|
||||||
@ -60,6 +63,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['SkinPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/';
|
$this->editor->Config['SkinPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -772,6 +772,13 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
{
|
{
|
||||||
print '<input name="seuil_stock_alerte" type="hidden" value="0">';
|
print '<input name="seuil_stock_alerte" type="hidden" value="0">';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
|
||||||
|
{
|
||||||
|
print '<tr><td> </td><td colspan="2">';
|
||||||
|
print '<div id="xToolbar"></div>';
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="2">';
|
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="2">';
|
||||||
@ -779,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');
|
$doleditor=new DolEditor('desc',$product->description,200,'dolibarr_notes','Out:xToolbar');
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -811,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');
|
$doleditor=new DolEditor('note',$product->note,200,'dolibarr_notes','Out:xToolbar');
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user