Fix: uniformize json with search company
Fix: search product with jQuery
This commit is contained in:
parent
c1b8055538
commit
e3a1f317a8
@ -1147,11 +1147,11 @@ class Form
|
|||||||
if ($conf->global->MAIN_USE_NEW_JQUERY)
|
if ($conf->global->MAIN_USE_NEW_JQUERY)
|
||||||
{
|
{
|
||||||
// mode=2 means suppliers products
|
// mode=2 means suppliers products
|
||||||
print ajax_autocompleter2('',$htmlname,DOL_URL_ROOT.'/product/ajaxproducts.php','outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=2&status='.$status.'&finished='.$finished,'');
|
print ajax_autocompleter('',$htmlname,DOL_URL_ROOT.'/product/ajaxproducts.php','outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=2&status='.$status.'&finished='.$finished,'');
|
||||||
|
|
||||||
print '<div class="ui-widget">';
|
print '<div class="ui-widget">';
|
||||||
print '<label for="'.$htmlname.'free">'.$langs->trans("RefOrLabel").':</label>';
|
print '<label for="search_'.$htmlname.'">'.$langs->trans("RefOrLabel").':</label>';
|
||||||
print '<input id="'.$htmlname.'free" />';
|
print '<input id="search_'.$htmlname.'" />';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -56,10 +56,10 @@ top_httphead();
|
|||||||
|
|
||||||
dol_syslog(join(',',$_POST));
|
dol_syslog(join(',',$_POST));
|
||||||
|
|
||||||
if (! isset($_GET['keysearch']) && ! isset($_GET['idprod'])) return;
|
if (! isset($_GET['keysearch']) && ! isset($_GET['idprod']) && ! isset($_GET['idprodfournprice'])) return;
|
||||||
|
|
||||||
// When used from jQuery, the search term is added as GET param "term".
|
// When used from jQuery, the search term is added as GET param "term".
|
||||||
$searchkey=isset($_GET['keysearch'])?$_GET['keysearch']:$_GET['idprod'];
|
$searchkey=isset($_GET['keysearch'])?$_GET['keysearch']:($_GET['idprod']?$_GET['idprod']:$_GET['idprodfournprice']);
|
||||||
$outjson=isset($_GET['outjson'])?$_GET['outjson']:0;
|
$outjson=isset($_GET['outjson'])?$_GET['outjson']:0;
|
||||||
|
|
||||||
// Get list of product.
|
// Get list of product.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user