[mapserver-commits] r10401 - branches/branch-5-6/docs/_static
svn at osgeo.org
svn at osgeo.org
Tue Jul 27 13:23:12 EDT 2010
Author: jmckenna
Date: 2010-07-27 17:23:12 +0000 (Tue, 27 Jul 2010)
New Revision: 10401
Modified:
branches/branch-5-6/docs/_static/searchtools.js
Log:
update theme files for Sphinx 1.0
Modified: branches/branch-5-6/docs/_static/searchtools.js
===================================================================
--- branches/branch-5-6/docs/_static/searchtools.js 2010-07-27 16:33:51 UTC (rev 10400)
+++ branches/branch-5-6/docs/_static/searchtools.js 2010-07-27 17:23:12 UTC (rev 10401)
@@ -456,10 +456,23 @@
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
- listItem.append($('<a/>').attr(
- 'href',
- item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
- highlightstring + item[2]).html(item[1]));
+ if (DOCUMENTATION_OPTIONS.FILE_SUFFIX == '') {
+ // dirhtml builder
+ var dirname = item[0] + '/';
+ if (dirname.match(/\/index\/$/)) {
+ dirname = dirname.substring(0, dirname.length-6);
+ } else if (dirname == 'index/') {
+ dirname = '';
+ }
+ listItem.append($('<a/>').attr('href',
+ DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
+ highlightstring + item[2]).html(item[1]));
+ } else {
+ // normal html builders
+ listItem.append($('<a/>').attr('href',
+ item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
+ highlightstring + item[2]).html(item[1]));
+ }
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));
Search.output.append(listItem);
@@ -472,10 +485,10 @@
if (data != '') {
listItem.append($.makeSearchSummary(data, searchterms, hlterms));
Search.output.append(listItem);
- listItem.slideDown(5, function() {
- displayNextItem();
- });
}
+ listItem.slideDown(5, function() {
+ displayNextItem();
+ });
});
} else {
// no source available, just display title
More information about the mapserver-commits
mailing list