[mapserver-commits] r10399 - trunk/docs/_static

svn at osgeo.org svn at osgeo.org
Tue Jul 27 10:29:22 EDT 2010


Author: jmckenna
Date: 2010-07-27 14:29:22 +0000 (Tue, 27 Jul 2010)
New Revision: 10399

Modified:
   trunk/docs/_static/searchtools.js
Log:
update theme files for Sphinx 1.0

Modified: trunk/docs/_static/searchtools.js
===================================================================
--- trunk/docs/_static/searchtools.js	2010-07-27 05:08:52 UTC (rev 10398)
+++ trunk/docs/_static/searchtools.js	2010-07-27 14:29:22 UTC (rev 10399)
@@ -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