com web/php: Show 30results, and allow scrolling: js/common.js js/search.js styles/theme-base.css
| From: | Hannes Magnusson | Date: | Mon, 23 Dec 2013 19:29:28 +0000 |
| Subject: | com web/php: Show 30results, and allow scrolling: js/common.js js/search.js styles/theme-base.css | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-17781@lists.php.net to get a copy of this message | ||
Commit: 291c54bcb96ed23ee2b49d27ee1a18649432512d
Author: Hannes Magnusson <bjori@mongodb.com> Mon, 23 Dec 2013 11:26:53 -0800
Parents: 905f4bdecc42ac636ba7d74114c7e5a66090b267
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=291c54bcb96ed23ee2b49d27ee1a18649432512d
Log:
Show 30results, and allow scrolling
Also hacked the matcher a bit, allow matching without underscore
e..g. "strpad" now matches "str_pad"
Changed paths:
M js/common.js
M js/search.js
M styles/theme-base.css
Diff:
diff --git a/js/common.js b/js/common.js
index 65427da..6a254f1 100755
--- a/js/common.js
+++ b/js/common.js
@@ -273,7 +273,7 @@ $(document).ready(function() {
// Search box autocomplete.
jQuery("#topsearch .search-query").search({
language: getLanguage(),
- limit: 3
+ limit: 30
});
/* {{{ Negative user notes fade-out */
diff --git a/js/search.js b/js/search.js
index 3b805e9..53b6619 100644
--- a/js/search.js
+++ b/js/search.js
@@ -118,7 +118,7 @@
var element = this;
options.language = options.language || "en";
- options.limit = options.limit || 10;
+ options.limit = options.limit || 30;
/**
* Utility function to check if the user's browser supports local
@@ -177,6 +177,10 @@
var tokens = [item[0]];
var type = null;
+ if (item[0].indexOf("_") != -1) {
+ tokens.push(item[0].replace("_", ""));
+ }
+
if (item[1].match(/^function\./)) {
type = "function";
} else if (item[0].indexOf("::") != -1) {
diff --git a/styles/theme-base.css b/styles/theme-base.css
index 84a8c36..e99155d 100755
--- a/styles/theme-base.css
+++ b/styles/theme-base.css
@@ -1104,6 +1104,8 @@ fieldset {
.tt-suggestions {
color: #ccc;
+ overflow: scroll;
+ max-height: 210px;
}
.tt-dropdown-menu .search {