diff --git a/public/src/forum/admin/footer.js b/public/src/forum/admin/footer.js index 1b6c204760..2057af138c 100644 --- a/public/src/forum/admin/footer.js +++ b/public/src/forum/admin/footer.js @@ -9,10 +9,14 @@ define('forum/admin/footer', ['forum/admin/settings'], function(Settings) { acpIndex = data; for (var file in acpIndex) { if (acpIndex.hasOwnProperty(file)) { + acpIndex[file] = acpIndex[file].replace(//g, ''); acpIndex[file] = $(acpIndex[file]).text().toLowerCase(); } } + delete acpIndex['/admin/header.tpl']; + delete acpIndex['/admin/footer.tpl']; + setupACPSearch(); }); }); @@ -25,7 +29,7 @@ define('forum/admin/footer', ['forum/admin/settings'], function(Settings) { value = $input.val().toLowerCase(), menuItems = $('#acp-search .dropdown-menu').html(''); - if (value.length > 3) { + if (value.length >= 3) { for (var file in acpIndex) { if (acpIndex.hasOwnProperty(file)) { var position = acpIndex[file].indexOf(value); @@ -56,7 +60,11 @@ define('forum/admin/footer', ['forum/admin/settings'], function(Settings) { } } - menuItems.append('
  • Search the forum for "' + value + '"
  • '); + if (value.length > 0) { + menuItems.append('
  • Search the forum for ' + value + '
  • '); + } else { + menuItems.append('
  • Click here for forum-wide search
  • '); + } }); } }); \ No newline at end of file