//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:
+21
-18
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user