//fixed bug autocomplete category tree

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9624 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vAugagneur
2011-10-25 12:04:16 +00:00
parent cf176f57a0
commit c971fd21cc
+21 -18
View File
@@ -261,24 +261,27 @@ function updateNbSubCategorySelected(category, add)
$(document).ready( function() {
var category_to_check;
$('#search_cat').autocomplete('ajax.php?searchCategory=1', {
delay: 100,
minChars: 3,
autoFill: true,
max:20,
matchContains: true,
mustMatch:true,
scroll:false,
cacheLength:0,
multipleSeparator:'||',
formatItem: function(item)
{
return item[1]+' - '+item[0];
}
}).result(function(event, item)
{
parent_ids = getParentCategoriesIdAndOpen(item[1]);
});
if ($('#search_cat').length)
{
$('#search_cat').autocomplete('ajax.php?searchCategory=1', {
delay: 100,
minChars: 3,
autoFill: true,
max:20,
matchContains: true,
mustMatch:true,
scroll:false,
cacheLength:0,
multipleSeparator:'||',
formatItem: function(item)
{
return item[1]+' - '+item[0];
}
}).result(function(event, item)
{
parent_ids = getParentCategoriesIdAndOpen(item[1]);
});
}
});
function getParentCategoriesIdAndOpen(id_category)