diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php
index 4b48cea0829..2000e89f7e9 100644
--- a/htdocs/fichinter/fiche.php
+++ b/htdocs/fichinter/fiche.php
@@ -764,16 +764,9 @@ elseif ($fichinterid)
print ''; // ancre pour retourner sur la ligne
// Editeur wysiwyg
- if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
- {
- require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
- $doleditor=new DolEditor('np_desc',$objp->description,164,'dolibarr_details');
- $doleditor->Create();
- }
- else
- {
- print '';
- }
+ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
+ $doleditor=new DolEditor('np_desc',$objp->description,164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,ROWS_2,70);
+ $doleditor->Create();
print '';
// Date d'intervention
@@ -826,16 +819,9 @@ elseif ($fichinterid)
print '
\n";
print '| ';
// editeur wysiwyg
- if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
- {
- require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
- $doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details');
- $doleditor->Create();
- }
- else
- {
- print '';
- }
+ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
+ $doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,ROWS_2,70);
+ $doleditor->Create();
print ' | ';
// Date intervention
diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php
index d874e30f313..eb612ed928a 100644
--- a/htdocs/fourn/commande/fiche.php
+++ b/htdocs/fourn/commande/fiche.php
@@ -1105,19 +1105,13 @@ if ($id > 0 || ! empty($ref))
}
// Description - Editor wysiwyg
- if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
- {
- require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
- $doleditor=new DolEditor('eldesc',$commandline->description,200,'dolibarr_details');
- $doleditor->Create();
- }
- else
- {
- $nbrows=ROWS_2;
- if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
- print '';
- }
- print '';
+ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
+ $nbrows=ROWS_2;
+ if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
+ $doleditor=new DolEditor('eldesc',$commandline->description,200,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,70,$nbrows);
+ $doleditor->Create();
+
+ print '';
print '';
$html->select_tva('tva_tx',$commandline->tva_tx);
print ' | ';
@@ -1164,18 +1158,12 @@ if ($id > 0 || ! empty($ref))
|| (empty($conf->product->enabled) && empty($conf->service->enabled))) print '
';
// Editor wysiwyg
- if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
- {
- require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
- $doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],100,'dolibarr_details');
- $doleditor->Create();
- }
- else
- {
- $nbrows=ROWS_2;
- if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
- print '';
- }
+ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
+ $nbrows=ROWS_2;
+ if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
+ $doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
+ $doleditor->Create();
+
print '';
print '';
//if($soc->tva_assuj == "0")
@@ -1224,18 +1212,11 @@ if ($id > 0 || ! empty($ref))
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print ' ';
// Editor wysiwyg
- if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
- {
- require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
- $doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details');
- $doleditor->Create();
- }
- else
- {
- $nbrows=ROWS_2;
- if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
- print '';
- }
+ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
+ $nbrows=ROWS_2;
+ if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
+ $doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
+ $doleditor->Create();
print ' | ';
print ' | ';
diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php
index 62ed49d75c4..0f6d669266f 100644
--- a/htdocs/fourn/facture/fiche.php
+++ b/htdocs/fourn/facture/fiche.php
@@ -984,18 +984,11 @@ else
}
// Description - Editor wysiwyg
- if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
- {
- require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
- $doleditor=new DolEditor('label',$fac->lignes[$i]->description,200,'dolibarr_details');
- $doleditor->Create();
- }
- else
- {
- $nbrows=ROWS_2;
- if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
- print '';
- }
+ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
+ $nbrows=ROWS_2;
+ if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
+ $doleditor=new DolEditor('label',$fac->lignes[$i]->description,200,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
+ $doleditor->Create();
print '';
// VAT
@@ -1121,18 +1114,12 @@ else
|| (empty($conf->product->enabled) && empty($conf->service->enabled))) print '
';
// Editor wysiwyg
- if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
- {
- require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
- $doleditor=new DolEditor('label',$_POST["label"],100,'dolibarr_details');
- $doleditor->Create();
- }
- else
- {
- $nbrows=ROWS_2;
- if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
- print '';
- }
+ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
+ $nbrows=ROWS_2;
+ if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
+ $doleditor=new DolEditor('label',$_POST["label"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
+ $doleditor->Create();
+
print '';
print '';
print $html->select_tva('tauxtva',$conf->defaulttx,$societe,$mysoc);
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 075aec68bbd..ce5e9bb980e 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -2772,6 +2772,8 @@ class Product extends CommonObject
}
}
+
+
/**
* \brief Affecte les valeurs communes
*/
@@ -2838,13 +2840,16 @@ class Product extends CommonObject
$this->tpl['hidden'] = $html->selectyesno('hidden',$this->hidden);
}
- // TODO creer fonction
+ $this->tpl['description'] = $this->description;
+ $this->tpl['note'] = $this->note;
+
+ /* Fix: La presentation ne doit pas etre gérée dans une classe métier
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
{
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
$doleditor=new DolEditor('desc',$this->description,160,'dolibarr_notes','',false);
- $this->tpl['doleditor_description'] = $doleditor;
+ $this->tpl['doleditor_description'] = $doleditor;
$doleditor=new DolEditor('note',$this->note,180,'dolibarr_notes','',false);
$this->tpl['doleditor_note'] = $doleditor;
@@ -2854,13 +2859,14 @@ class Product extends CommonObject
$textarea = '';
- $this->tpl['textarea_description'] = $textarea;
+ $this->tpl['description'] = $this->description
$textarea = '';
$this->tpl['textarea_note'] = $textarea;
}
+ */
}
if ($action == 'view')
diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php
index 2814a08afe8..8e1639aa52d 100644
--- a/htdocs/product/fiche.php
+++ b/htdocs/product/fiche.php
@@ -694,18 +694,9 @@ if ($_GET["action"] == 'create' && ($user->rights->produit->creer || $user->righ
// Description (used in invoice, propal...)
print ' |
| '.$langs->trans("Description").' | ';
- if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
- {
- require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
- $doleditor=new DolEditor('desc',$_POST["desc"],160,'dolibarr_notes','',false);
- $doleditor->Create();
- }
- else
- {
- print '';
- }
+ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
+ $doleditor=new DolEditor('desc',$_POST["desc"],160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,4,90);
+ $doleditor->Create();
print " |
";
@@ -771,18 +762,10 @@ if ($_GET["action"] == 'create' && ($user->rights->produit->creer || $user->righ
// Note (invisible sur facture, propales...)
print '| '.$langs->trans("NoteNotVisibleOnBill").' | ';
- if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
- {
- require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
- $doleditor=new DolEditor('note',$_POST["note"],180,'dolibarr_notes','',false);
- $doleditor->Create();
- }
- else
- {
- print '';
- }
+ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
+ $doleditor=new DolEditor('note',$_POST["note"],180,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70);
+ $doleditor->Create();
+
print " |
";
print '';
@@ -923,19 +906,9 @@ if ($_GET["id"] || $_GET["ref"])
// Description (used in invoice, propal...)
print '| '.$langs->trans("Description").' | ';
- print "\n";
- if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
- {
- require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
- $doleditor=new DolEditor('desc',$product->description,160,'dolibarr_notes','',false);
- $doleditor->Create();
- }
- else
- {
- print '";
- }
+ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
+ $doleditor=new DolEditor('desc',$product->description,160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,4,90);
+ $doleditor->Create();
print " |
";
print "\n";
@@ -1017,18 +990,9 @@ if ($_GET["id"] || $_GET["ref"])
// Note
print '| '.$langs->trans("NoteNotVisibleOnBill").' | ';
- 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','',false);
- $doleditor->Create();
- }
- else
- {
- print '";
- }
+ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
+ $doleditor=new DolEditor('note',$product->note,200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70);
+ $doleditor->Create();
print " |
";
print '';
diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php
index e63360b268d..87513f4b7c3 100644
--- a/htdocs/product/stock/fiche.php
+++ b/htdocs/product/stock/fiche.php
@@ -177,17 +177,10 @@ if ($_GET["action"] == 'create')
// Description
print '| '.$langs->trans("Description").' | ';
- if ($conf->fckeditor->enabled)
- {
- // Editeur wysiwyg
- require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
- $doleditor=new DolEditor('desc',$entrepot->description,180,'dolibarr_notes','In',false);
- $doleditor->Create();
- }
- else
- {
- print '';
- }
+ // Editeur wysiwyg
+ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
+ $doleditor=new DolEditor('desc',$entrepot->description,180,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,5,70);
+ $doleditor->Create();
print ' |
';
print '| '.$langs->trans('Address').' | |
';
print '';
diff --git a/htdocs/societe/socnote.php b/htdocs/societe/socnote.php
index 896cb3d9b23..97fee1feadd 100644
--- a/htdocs/societe/socnote.php
+++ b/htdocs/societe/socnote.php
@@ -69,7 +69,7 @@ if ($socid > 0)
* Affichage onglets
*/
if ($conf->notification->enabled) $langs->load("mails");
-
+
$head = societe_prepare_head($societe);
dol_fiche_head($head, 'note', $langs->trans("ThirdParty"),0,'company');
@@ -112,17 +112,10 @@ if ($socid > 0)
print "";
print "id."\">";
- if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE)
- {
- // Editeur wysiwyg
- require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
- $doleditor=new DolEditor('note',$societe->note,280,'dolibarr_notes','In',true);
- $doleditor->Create();
- }
- else
- {
- print '';
- }
+ // Editeur wysiwyg
+ require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
+ $doleditor=new DolEditor('note',$societe->note,280,'dolibarr_notes','In',true,false,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70);
+ $doleditor->Create();
}
else
{