fixed acp search

This commit is contained in:
psychobunny
2015-08-21 10:11:19 -04:00
parent e4c9b379b2
commit cdc351bc02
2 changed files with 5 additions and 6 deletions

View File

@@ -50,7 +50,7 @@ define(function() {
return false;
});
$('.sidebar-nav a').each(function(idx, link) {
$('#main-menu a').each(function(idx, link) {
routes.push($(link).attr('href'));
});
@@ -95,15 +95,14 @@ define(function() {
}
}
if (menuItems.html() !== '') {
menuItems.append('<li role="presentation" class="divider"></li>');
} else {
if (menuItems.html() === '') {
menuItems.append('<li role="presentation"><a role="menuitem" href="#">No results...</a></li>');
}
}
if (value.length > 0) {
if (config.searchEnabled) {
menuItems.append('<li role="presentation" class="divider"></li>');
menuItems.append('<li role="presentation"><a role="menuitem" target="_top" href="' + RELATIVE_PATH + '/search/' + value + '">Search the forum for <strong>' + value + '</strong></a></li>');
} else if (value.length < 3) {
menuItems.append('<li role="presentation"><a role="menuitem" href="#">Type more to see results...</a></li>');