summaryrefslogtreecommitdiff
path: root/zenxml/doc/search/search.js
diff options
context:
space:
mode:
Diffstat (limited to 'zenxml/doc/search/search.js')
-rw-r--r--zenxml/doc/search/search.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/zenxml/doc/search/search.js b/zenxml/doc/search/search.js
index e2269bf9..281d08b7 100644
--- a/zenxml/doc/search/search.js
+++ b/zenxml/doc/search/search.js
@@ -7,11 +7,12 @@
var indexSectionsWithContent =
{
- 0: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010100001011101100011010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- 1: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- 2: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- 3: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010100001011101100011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- 4: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000001000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ 0: "aceglnoprswxz",
+ 1: "x",
+ 2: "z",
+ 3: "aeglnoprswx",
+ 4: "clr",
+ 5: "o"
};
var indexSectionNames =
@@ -20,7 +21,8 @@ var indexSectionNames =
1: "classes",
2: "namespaces",
3: "functions",
- 4: "variables"
+ 4: "variables",
+ 5: "pages"
};
function convertToId(search)
@@ -30,7 +32,7 @@ function convertToId(search)
{
var c = search.charAt(i);
var cn = c.charCodeAt(0);
- if (c.match(/[a-z0-9]/))
+ if (c.match(/[a-z0-9\u0080-\uFFFF]/))
{
result+=c;
}
@@ -335,22 +337,20 @@ function SearchBox(name, resultsPath, inFrame, label)
var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
var code = searchValue.toLowerCase().charCodeAt(0);
- var hexCode;
- if (code<16)
+ var idxChar = searchValue.substr(0, 1).toLowerCase();
+ if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair
{
- hexCode="0"+code.toString(16);
- }
- else
- {
- hexCode=code.toString(16);
+ idxChar = searchValue.substr(0, 2);
}
var resultsPage;
var resultsPageWithSearch;
var hasResultsPage;
- if (indexSectionsWithContent[this.searchIndex].charAt(code) == '1')
+ var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar);
+ if (idx!=-1)
{
+ var hexCode=idx.toString(16);
resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html';
resultsPageWithSearch = resultsPage+'?'+escape(searchValue);
hasResultsPage = true;
bgstack15