// Select next result on "Down"\r
case 40:\r
if(currentIndex < currentTable.find("tr").length - 1) {\r
+ if($(currentTable.find("tr")[currentIndex + 1]).hasClass("overflow")) {\r
+ break;\r
+ }\r
$(currentTable.find("tr")[currentIndex]).removeClass("activeSearchResult");\r
currentIndex++;\r
$(currentTable.find("tr")[currentIndex]).addClass("activeSearchResult");\r
if($("#search").val().length == 0)\r
return false\r
\r
- window.location = "full-index.html#q=" + $("#search").val();\r
- if(window.location.href.indexOf("full-index.html") > -1) {\r
+ window.location = "search.html#q=" + $("#search").val();\r
+ if(window.location.href.indexOf("search.html") > -1) {\r
location.reload();\r
} \r
return false;\r
\r
var index = 0;\r
var regexp = new RegExp("^" + query, "i");\r
+ var overflow = 0;\r
for(var entry in entries) {\r
- if(index > 10) {\r
- break;\r
- }\r
var result = entry.match(regexp);\r
if(result != null) {\r
for(var i = 0; i < entries[entry].length; i++) {\r
if(index > 10) {\r
+ overflow++;\r
break;\r
}\r
currentTable.append(\r
}\r
}\r
}\r
+ if(overflow > 0) {\r
+ currentTable.append(\r
+ $("<tr class='overflow'>")\r
+ .append(\r
+ $("<td colspan='2'>")\r
+ .append(\r
+ $("<a href='#' title='Show all results' data-query='"+ query +"'>" + overflow + " more results for '" + query + "'</a>")\r
+ .click(function() {\r
+ window.location = "search.html#q=" + $(this).attr("data-query");\r
+ if(window.location.href.indexOf("search.html") > -1) {\r
+ location.reload();\r
+ }\r
+ })\r
+ )\r
+ )\r
+ );\r
+ }\r
\r
// Initialize table properties\r
currentTable.attr("id", "searchTable");\r