From 761c5a5d1c968c47a3d6361703912c8aedad93e2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 10 Feb 2007 01:49:49 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20La=20d=E9sactivation=20de=20l'ajax=20n'?= =?UTF-8?q?=E9tait=20pas=20compl=E8te.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/admin/produit.php | 2 +- htdocs/comm/propal.php | 2 +- htdocs/commande/fiche.php | 2 +- htdocs/compta/facture.php | 2 +- htdocs/conf/conf.class.php | 5 +++++ htdocs/contrat/fiche.php | 2 +- htdocs/html.form.class.php | 2 +- htdocs/main.inc.php | 4 ---- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/htdocs/admin/produit.php b/htdocs/admin/produit.php index 4332bb80508..4fb55892173 100644 --- a/htdocs/admin/produit.php +++ b/htdocs/admin/produit.php @@ -248,7 +248,7 @@ print ""; print ''.$langs->trans("UseSearchToSelectProduct").''; if (! $conf->use_ajax) { - print ''; + print ''; print $langs->trans("NotAvailableWhenAjaxDisabled"); print ""; } diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index b23a6613721..e24a4a7dcd0 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1479,7 +1479,7 @@ if ($_GET['propalid'] > 0) { $html->select_produits('','idprod','',$conf->produit->limit_size); } - if (! $conf->use_ajax) print '
'; + if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '
'; print ''; print ''; print ' '; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index ab8f01d8176..6ea90dd6938 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -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 '
'; + if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '
'; print ''; print ''; print ' '; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index ebc52e5bf3f..2e006b3caa2 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -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 '
'; + if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '
'; print ''; print ' '; print ''; diff --git a/htdocs/conf/conf.class.php b/htdocs/conf/conf.class.php index 45a7978278a..1a047e90a2a 100644 --- a/htdocs/conf/conf.class.php +++ b/htdocs/conf/conf.class.php @@ -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 diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 51c5dc9fd41..43277ecdcd3 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -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 '
'; + if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '
'; print ''; print ''; diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 9ca11af2a01..797e98245ab 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -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").':   '; print $langs->trans("Label").':'; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 93537235684..8a9d8edd596 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -515,10 +515,6 @@ function top_htmlhead($head, $title="", $target="") if ($conf->use_javascript || $conf->use_ajax) { print ''."\n"; - if (file_exists(DOL_DOCUMENT_ROOT.'/lib/lib_head_perso.js')) - { - print ''; - } } if ($conf->use_ajax) {