diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 7bef029ef88..26cdf1ceee4 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -406,12 +406,12 @@ class Form { print ''; } - print ''; + print ''; print ''; print ''; print '
'; print ''; } else @@ -821,13 +821,12 @@ class Form global $langs,$conf,$user; if ($conf->global->PRODUIT_USE_SEARCH_TO_SELECT) { - print $langs->trans("Ref").':   '; - print $langs->trans("Label").':'; + print $langs->trans("RefOrLabel").' : '; + print ''; print ''; print ''; print '
'; } @@ -844,7 +843,7 @@ class Form \param filtretype Pour filtre sur type de produit \param limit Limite sur le nombre de lignes retournées */ - function select_produits_do($selected='',$htmlname='productid',$filtretype='',$limit=20,$price_level=0,$ajaxkeyref='',$ajaxkeylabel='') + function select_produits_do($selected='',$htmlname='productid',$filtretype='',$limit=20,$price_level=0,$ajaxkeysearch='') { global $langs,$conf,$user; $user->getrights("categorie"); @@ -867,8 +866,7 @@ class Form $sql.= ' AND IFNULL(c.visible,1)=1'; } if ($filtretype && $filtretype != '') $sql.=" AND p.fk_product_type=".$filtretype; - if ($ajaxkeyref && $ajaxkeyref != '') $sql.=" AND p.ref like '%".$ajaxkeyref."%'"; - if ($ajaxkeylabel && $ajaxkeylabel != '') $sql.=" AND p.label like '%".$ajaxkeylabel."%'"; + if ($ajaxkeysearch && $ajaxkeysearch != '') $sql.=" AND p.ref like '%".$ajaxkeysearch."%' OR p.label like '%".$ajaxkeysearch."%'"; $sql.= " ORDER BY p.nbvente DESC"; if ($limit) $sql.= " LIMIT $limit"; diff --git a/htdocs/includes/scriptaculous/dolibarr_changes.txt b/htdocs/includes/scriptaculous/dolibarr_changes.txt new file mode 100644 index 00000000000..77759e9cbd0 --- /dev/null +++ b/htdocs/includes/scriptaculous/dolibarr_changes.txt @@ -0,0 +1,15 @@ +If scriptaculous files are replaced by new version, following changes must be done: + +* Edit prototype.js to set: +*************************** + +Ajax.Responders.register({ + onCreate: function() { + $('indicator').show( ); + Ajax.activeRequestCount++; + }, + onComplete: function() { + $('indicator').hide( ); + Ajax.activeRequestCount--; + } +}); \ No newline at end of file diff --git a/htdocs/includes/scriptaculous/lib/prototype.js b/htdocs/includes/scriptaculous/lib/prototype.js index 0476b8fdccc..5ccac892133 100644 --- a/htdocs/includes/scriptaculous/lib/prototype.js +++ b/htdocs/includes/scriptaculous/lib/prototype.js @@ -793,9 +793,11 @@ Object.extend(Ajax.Responders, Enumerable); Ajax.Responders.register({ onCreate: function() { + $('indicator').show( ); Ajax.activeRequestCount++; }, onComplete: function() { + $('indicator').hide( ); Ajax.activeRequestCount--; } }); diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 6eb7268d95e..d1b646e9192 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -110,6 +110,7 @@ Note=Note CurrentNote=Current note Title=Title Label=Label +RefOrLabel=Ref. or label Info=Log Family=Family Description=Description diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 9ac514b7ef5..36985f16ef8 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -111,6 +111,7 @@ Note=Note CurrentNote=Note actuelle Title=Titre Label=Libellé +RefOrLabel=Réf. ou libellé Info=Suivi Family=Famille Description=Description diff --git a/htdocs/product/ajaxproducts.php b/htdocs/product/ajaxproducts.php index fb3f9609758..aaedbef8c56 100644 --- a/htdocs/product/ajaxproducts.php +++ b/htdocs/product/ajaxproducts.php @@ -39,10 +39,10 @@ print "\n"; // Generation liste de produits -if(isset($_GET['keyref']) && !empty($_GET['keyref']) || isset($_GET['keylabel']) && !empty($_GET['keylabel'])) +if(isset($_GET['keysearch']) && !empty($_GET['keysearch'])) { $form = new Form($db); - $form->select_produits_do("",$_GET["htmlname"],"","",$_GET["price_level"],$_GET["keyref"],$_GET["keylabel"]); + $form->select_produits_do("",$_GET["htmlname"],"","",$_GET["price_level"],$_GET["keysearch"]); } print ""; diff --git a/htdocs/theme/auguria/img/ajaxworking.gif b/htdocs/theme/auguria/img/ajaxworking.gif new file mode 100644 index 00000000000..1e421c3113f Binary files /dev/null and b/htdocs/theme/auguria/img/ajaxworking.gif differ