//fixed bug autocomplete category tree
This commit is contained in:
+21
-18
@@ -261,24 +261,27 @@ function updateNbSubCategorySelected(category, add)
|
|||||||
|
|
||||||
$(document).ready( function() {
|
$(document).ready( function() {
|
||||||
var category_to_check;
|
var category_to_check;
|
||||||
$('#search_cat').autocomplete('ajax.php?searchCategory=1', {
|
if ($('#search_cat').length)
|
||||||
delay: 100,
|
{
|
||||||
minChars: 3,
|
$('#search_cat').autocomplete('ajax.php?searchCategory=1', {
|
||||||
autoFill: true,
|
delay: 100,
|
||||||
max:20,
|
minChars: 3,
|
||||||
matchContains: true,
|
autoFill: true,
|
||||||
mustMatch:true,
|
max:20,
|
||||||
scroll:false,
|
matchContains: true,
|
||||||
cacheLength:0,
|
mustMatch:true,
|
||||||
multipleSeparator:'||',
|
scroll:false,
|
||||||
formatItem: function(item)
|
cacheLength:0,
|
||||||
{
|
multipleSeparator:'||',
|
||||||
return item[1]+' - '+item[0];
|
formatItem: function(item)
|
||||||
}
|
{
|
||||||
}).result(function(event, item)
|
return item[1]+' - '+item[0];
|
||||||
{
|
}
|
||||||
parent_ids = getParentCategoriesIdAndOpen(item[1]);
|
}).result(function(event, item)
|
||||||
});
|
{
|
||||||
|
parent_ids = getParentCategoriesIdAndOpen(item[1]);
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function getParentCategoriesIdAndOpen(id_category)
|
function getParentCategoriesIdAndOpen(id_category)
|
||||||
|
|||||||
Reference in New Issue
Block a user