forked from Wavyzz/dolibarr
Fix: problme d'affichage de la description si fckeditor est actif mais dsactiv sur les descriptions produits
This commit is contained in:
@@ -2278,19 +2278,19 @@ class Form
|
|||||||
// Calendrier popup version eldy
|
// Calendrier popup version eldy
|
||||||
if ("$conf->use_popup_calendar" == "eldy") // Laisser conf->use_popup_calendar entre quote
|
if ("$conf->use_popup_calendar" == "eldy") // Laisser conf->use_popup_calendar entre quote
|
||||||
{
|
{
|
||||||
// Zone de saisie manuelle de la date
|
// Zone de saisie manuelle de la date
|
||||||
print '<input id="'.$prefix.'" name="'.$prefix.'" type="text" size="9" maxlength="11" value="'.$formated_date.'"';
|
print '<input id="'.$prefix.'" name="'.$prefix.'" type="text" size="9" maxlength="11" value="'.$formated_date.'"';
|
||||||
print ' onChange="dpChangeDay(\''.$prefix.'\',\''.$conf->format_date_short_java.'\')"';
|
print ' onChange="dpChangeDay(\''.$prefix.'\',\''.$conf->format_date_short_java.'\')"';
|
||||||
print '>';
|
print '>';
|
||||||
|
|
||||||
// Icone calendrier
|
// Icone calendrier
|
||||||
print '<button id="'.$prefix.'Button" type="button" class="dpInvisibleButtons"';
|
print '<button id="'.$prefix.'Button" type="button" class="dpInvisibleButtons"';
|
||||||
$base=DOL_URL_ROOT.'/lib/';
|
$base=DOL_URL_ROOT.'/lib/';
|
||||||
print ' onClick="showDP(\''.$base.'\',\''.$prefix.'\',\''.$conf->format_date_short_java.'\');">'.img_object($langs->trans("SelectDate"),'calendar').'</button>';
|
print ' onClick="showDP(\''.$base.'\',\''.$prefix.'\',\''.$conf->format_date_short_java.'\');">'.img_object($langs->trans("SelectDate"),'calendar').'</button>';
|
||||||
|
|
||||||
print '<input type="hidden" id="'.$prefix.'day" name="'.$prefix.'day" value="'.$sday.'">'."\n";
|
print '<input type="hidden" id="'.$prefix.'day" name="'.$prefix.'day" value="'.$sday.'">'."\n";
|
||||||
print '<input type="hidden" id="'.$prefix.'month" name="'.$prefix.'month" value="'.$smonth.'">'."\n";
|
print '<input type="hidden" id="'.$prefix.'month" name="'.$prefix.'month" value="'.$smonth.'">'."\n";
|
||||||
print '<input type="hidden" id="'.$prefix.'year" name="'.$prefix.'year" value="'.$syear.'">'."\n";
|
print '<input type="hidden" id="'.$prefix.'year" name="'.$prefix.'year" value="'.$syear.'">'."\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2304,16 +2304,16 @@ class Form
|
|||||||
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/lib/lib_calendar.js"></script>';
|
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/lib/lib_calendar.js"></script>';
|
||||||
print '<input id="'.$prefix.'" type="text" name="'.$prefix.'" size="10" value="'.$formated_date.'"';
|
print '<input id="'.$prefix.'" type="text" name="'.$prefix.'" size="10" value="'.$formated_date.'"';
|
||||||
print ' onChange="dpChangeDay(\''.$prefix.'\',\''.$conf->format_date_short_java.'\')"';
|
print ' onChange="dpChangeDay(\''.$prefix.'\',\''.$conf->format_date_short_java.'\')"';
|
||||||
print '> ';
|
print '> ';
|
||||||
print '<input type="hidden" id="'.$prefix.'day" name="'.$prefix.'day" value="'.$sday.'">'."\n";
|
print '<input type="hidden" id="'.$prefix.'day" name="'.$prefix.'day" value="'.$sday.'">'."\n";
|
||||||
print '<input type="hidden" id="'.$prefix.'month" name="'.$prefix.'month" value="'.$smonth.'">'."\n";
|
print '<input type="hidden" id="'.$prefix.'month" name="'.$prefix.'month" value="'.$smonth.'">'."\n";
|
||||||
print '<input type="hidden" id="'.$prefix.'year" name="'.$prefix.'year" value="'.$syear.'">'."\n";
|
print '<input type="hidden" id="'.$prefix.'year" name="'.$prefix.'year" value="'.$syear.'">'."\n";
|
||||||
if($form_name =="")
|
if($form_name =="")
|
||||||
print '<A HREF="javascript:showCalendar(document.forms[3].'.$prefix.')">'.img_cal().'</a>';
|
print '<A HREF="javascript:showCalendar(document.forms[3].'.$prefix.')">'.img_cal().'</a>';
|
||||||
else
|
else
|
||||||
print '<A HREF="javascript:showCalendar(document.forms[\''.$form_name.'\'].'.$prefix.')">'.img_cal().'</a>';
|
print '<A HREF="javascript:showCalendar(document.forms[\''.$form_name.'\'].'.$prefix.')">'.img_cal().'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Affiche date en select
|
* Affiche date en select
|
||||||
|
|||||||
@@ -257,14 +257,14 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
|
|
||||||
$pdf->SetFont('Arial','', 9); // Dans boucle pour g<>rer multi-page
|
$pdf->SetFont('Arial','', 9); // Dans boucle pour g<>rer multi-page
|
||||||
|
|
||||||
if ($conf->fckeditor->enabled)
|
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
|
||||||
{
|
{
|
||||||
$pdf->writeHTMLCell(108, 4, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
$pdf->writeHTMLCell(108, 4, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pdf->SetXY ($this->posxdesc-1, $curY);
|
$pdf->SetXY ($this->posxdesc-1, $curY);
|
||||||
$pdf->MultiCell(108, 4, $libelleproduitservice, 0, 'J');
|
$pdf->MultiCell(108, 4, dol_entity_decode($libelleproduitservice), 0, 'J');
|
||||||
}
|
}
|
||||||
|
|
||||||
$nexY = $pdf->GetY();
|
$nexY = $pdf->GetY();
|
||||||
|
|||||||
@@ -259,14 +259,14 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
$pdf->SetFont('Arial','', 9); // Dans boucle pour g<>rer multi-page
|
$pdf->SetFont('Arial','', 9); // Dans boucle pour g<>rer multi-page
|
||||||
|
|
||||||
if ($conf->fckeditor->enabled)
|
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
|
||||||
{
|
{
|
||||||
$pdf->writeHTMLCell(108, 4, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
$pdf->writeHTMLCell(108, 4, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pdf->SetXY ($this->posxdesc-1, $curY);
|
$pdf->SetXY ($this->posxdesc-1, $curY);
|
||||||
$pdf->MultiCell(108, 4, $libelleproduitservice, 0, 'J');
|
$pdf->MultiCell(108, 4, dol_entity_decode($libelleproduitservice), 0, 'J');
|
||||||
}
|
}
|
||||||
|
|
||||||
$nexY = $pdf->GetY();
|
$nexY = $pdf->GetY();
|
||||||
|
|||||||
@@ -256,14 +256,14 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
$pdf->SetFont('Arial','', 9); // Dans boucle pour g<>rer multi-page
|
$pdf->SetFont('Arial','', 9); // Dans boucle pour g<>rer multi-page
|
||||||
|
|
||||||
if ($conf->fckeditor->enabled)
|
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
|
||||||
{
|
{
|
||||||
$pdf->writeHTMLCell(108, 4, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
$pdf->writeHTMLCell(108, 4, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pdf->SetXY ($this->posxdesc-1, $curY);
|
$pdf->SetXY ($this->posxdesc-1, $curY);
|
||||||
$pdf->MultiCell(108, 4, $libelleproduitservice, 0, 'J');
|
$pdf->MultiCell(108, 4, dol_entity_decode($libelleproduitservice), 0, 'J');
|
||||||
}
|
}
|
||||||
|
|
||||||
$nexY = $pdf->GetY();
|
$nexY = $pdf->GetY();
|
||||||
|
|||||||
@@ -2298,14 +2298,25 @@ function weight_units_string($unit)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Nettoie le code HTML
|
\brief Decode le code html
|
||||||
|
\param string StringHtml
|
||||||
|
\return string DecodeString
|
||||||
|
*/
|
||||||
|
function dol_entity_decode($StringHtml)
|
||||||
|
{
|
||||||
|
$DecodeString = html_entity_decode($StringHtml);
|
||||||
|
return $DecodeString;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Supprime le code html
|
||||||
\param string StringHtml
|
\param string StringHtml
|
||||||
\return string CleanString
|
\return string CleanString
|
||||||
*/
|
*/
|
||||||
function clean_html($StringHtml)
|
function clean_html($StringHtml)
|
||||||
{
|
{
|
||||||
$pattern = "<[^>]+>";
|
$pattern = "<[^>]+>";
|
||||||
$temp = html_entity_decode($StringHtml);
|
$temp = dol_entity_decode($StringHtml);
|
||||||
$temp = ereg_replace($pattern,"",$temp);
|
$temp = ereg_replace($pattern,"",$temp);
|
||||||
// Supprime aussi les retours
|
// Supprime aussi les retours
|
||||||
$temp=str_replace("\n"," ",$temp);
|
$temp=str_replace("\n"," ",$temp);
|
||||||
|
|||||||
Reference in New Issue
Block a user