update the docs
This commit is contained in:
@@ -80,9 +80,10 @@ function getYPos(item)
|
||||
storing this instance. Is needed to be able to set timeouts.
|
||||
resultPath - path to use for external files
|
||||
*/
|
||||
function SearchBox(name, resultsPath, inFrame, label)
|
||||
function SearchBox(name, resultsPath, inFrame, label, extension)
|
||||
{
|
||||
if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); }
|
||||
if (!extension || extension == "") { extension = ".html"; }
|
||||
|
||||
// ---------- Instance variables
|
||||
this.name = name;
|
||||
@@ -97,6 +98,7 @@ function SearchBox(name, resultsPath, inFrame, label)
|
||||
this.searchActive = false;
|
||||
this.insideFrame = inFrame;
|
||||
this.searchLabel = label;
|
||||
this.extension = extension;
|
||||
|
||||
// ----------- DOM Elements
|
||||
|
||||
@@ -347,13 +349,13 @@ function SearchBox(name, resultsPath, inFrame, label)
|
||||
if (idx!=-1)
|
||||
{
|
||||
var hexCode=idx.toString(16);
|
||||
resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html';
|
||||
resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + this.extension;
|
||||
resultsPageWithSearch = resultsPage+'?'+escape(searchValue);
|
||||
hasResultsPage = true;
|
||||
}
|
||||
else // nothing available for this search term
|
||||
{
|
||||
resultsPage = this.resultsPath + '/nomatches.html';
|
||||
resultsPage = this.resultsPath + '/nomatches' + this.extension;
|
||||
resultsPageWithSearch = resultsPage;
|
||||
hasResultsPage = false;
|
||||
}
|
||||
@@ -364,7 +366,7 @@ function SearchBox(name, resultsPath, inFrame, label)
|
||||
if (domPopupSearchResultsWindow.style.display!='block')
|
||||
{
|
||||
var domSearchBox = this.DOMSearchBox();
|
||||
this.DOMSearchClose().style.display = 'inline';
|
||||
this.DOMSearchClose().style.display = 'inline-block';
|
||||
if (this.insideFrame)
|
||||
{
|
||||
var domPopupSearchResults = this.DOMPopupSearchResults();
|
||||
@@ -439,12 +441,12 @@ function SearchResults(name)
|
||||
|
||||
while (element && element!=parentElement)
|
||||
{
|
||||
if (element.nodeName == 'DIV' && element.className == 'SRChildren')
|
||||
if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren')
|
||||
{
|
||||
return element;
|
||||
}
|
||||
|
||||
if (element.nodeName == 'DIV' && element.hasChildNodes())
|
||||
if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes())
|
||||
{
|
||||
element = element.firstChild;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user