Fix: La dsactivation de l'ajax n'tait pas complte.
This commit is contained in:
parent
e848ac51bd
commit
761c5a5d1c
@ -248,7 +248,7 @@ print "<tr ".$bc[$var].">";
|
||||
print '<td width="80%">'.$langs->trans("UseSearchToSelectProduct").'</td>';
|
||||
if (! $conf->use_ajax)
|
||||
{
|
||||
print '<td width="60" align="right" colspan="2">';
|
||||
print '<td nowrap="nowrap" align="right" colspan="2">';
|
||||
print $langs->trans("NotAvailableWhenAjaxDisabled");
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@ -1479,7 +1479,7 @@ if ($_GET['propalid'] > 0)
|
||||
{
|
||||
$html->select_produits('','idprod','',$conf->produit->limit_size);
|
||||
}
|
||||
if (! $conf->use_ajax) print '<br>';
|
||||
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
|
||||
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'"></textarea>';
|
||||
print '</td>';
|
||||
print '<td> </td>';
|
||||
|
||||
@ -1617,7 +1617,7 @@ else
|
||||
$html->select_produits('','idprod','',$conf->produit->limit_size,$soc->price_level);
|
||||
else
|
||||
$html->select_produits('','idprod','',$conf->produit->limit_size);
|
||||
if (! $conf->use_ajax) print '<br>';
|
||||
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
|
||||
print '<textarea cols="70" name="np_desc" rows="1"></textarea>';
|
||||
print '</td>';
|
||||
print '<td> </td>';
|
||||
|
||||
@ -2361,7 +2361,7 @@ else
|
||||
$html->select_produits('','idprod','',$conf->produit->limit_size,$soc->price_level);
|
||||
else
|
||||
$html->select_produits('','idprod','',$conf->produit->limit_size);
|
||||
if (! $conf->use_ajax) print '<br>';
|
||||
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
|
||||
print '<textarea name="desc" cols="70" rows="'.ROWS_2.'"></textarea></td>';
|
||||
print '<td> </td>';
|
||||
print '<td align="right"><input type="text" name="qty" value="1" size="2"></td>';
|
||||
|
||||
@ -340,6 +340,11 @@ class Conf
|
||||
// conf->use_ajax
|
||||
$this->use_ajax=0; // Pas d' Ajax par defaut
|
||||
if (isset($this->global->MAIN_DISABLE_AJAX)) $this->use_ajax=! $this->global->MAIN_DISABLE_AJAX;
|
||||
if ($this->global->MAIN_DISABLE_AJAX)
|
||||
{
|
||||
// If no Ajax, Ajax features are disabled.
|
||||
$this->global->PRODUIT_USE_SEARCH_TO_SELECT=0;
|
||||
}
|
||||
|
||||
// conf->use_popup_calendar
|
||||
$this->use_popup_calendar=""; // Pas de date popup par defaut
|
||||
|
||||
@ -902,7 +902,7 @@ else
|
||||
$html->select_produits('','p_idprod','',$conf->produit->limit_size,$contrat->societe->price_level);
|
||||
else
|
||||
$html->select_produits('','p_idprod','',$conf->produit->limit_size);
|
||||
if (! $conf->use_ajax) print '<br>';
|
||||
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
|
||||
print '<textarea name="desc" cols="70" rows="'.ROWS_2.'"></textarea>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -730,7 +730,7 @@ class Form
|
||||
function select_produits($selected='',$htmlname='productid',$filtretype='',$limit=20,$price_level=0)
|
||||
{
|
||||
global $langs,$conf,$user;
|
||||
if ($conf->use_ajax && $conf->global->PRODUIT_USE_SEARCH_TO_SELECT)
|
||||
if ($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)
|
||||
{
|
||||
print $langs->trans("Ref").':<input type="text" size="8" name="ajkeyref'.$htmlname.'" id="ajkeyref'.$htmlname.'"> ';
|
||||
print $langs->trans("Label").':<input type="text" size="16" name="ajkeylabel'.$htmlname.'" id="ajkeylabel'.$htmlname.'">';
|
||||
|
||||
@ -515,10 +515,6 @@ function top_htmlhead($head, $title="", $target="")
|
||||
if ($conf->use_javascript || $conf->use_ajax)
|
||||
{
|
||||
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/lib/lib_head.js"></script>'."\n";
|
||||
if (file_exists(DOL_DOCUMENT_ROOT.'/lib/lib_head_perso.js'))
|
||||
{
|
||||
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/lib/lib_head_perso.js"></script>';
|
||||
}
|
||||
}
|
||||
if ($conf->use_ajax)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user