summaryrefslogtreecommitdiff
path: root/doc/html/_static/doctools.js
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/_static/doctools.js')
-rw-r--r--doc/html/_static/doctools.js59
1 files changed, 22 insertions, 37 deletions
diff --git a/doc/html/_static/doctools.js b/doc/html/_static/doctools.js
index d4619fd..9447678 100644
--- a/doc/html/_static/doctools.js
+++ b/doc/html/_static/doctools.js
@@ -1,31 +1,16 @@
-/*
- * doctools.js
- * ~~~~~~~~~~~
- *
- * Sphinx JavaScript utilities for all documentation.
- *
- * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-/**
- * select a different prefix for underscore
- */
-$u = _.noConflict();
+/// XXX: make it cross browser
/**
* make the code below compatible with browsers without
* an installed firebug like debugger
+ */
if (!window.console || !console.firebug) {
- var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
- "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
- "profile", "profileEnd"];
+ var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
+ "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
window.console = {};
for (var i = 0; i < names.length; ++i)
- window.console[names[i]] = function() {};
+ window.console[names[i]] = function() {}
}
- */
/**
* small helper function to urldecode strings
@@ -59,7 +44,7 @@ jQuery.getQueryParameters = function(s) {
result[key] = [value];
}
return result;
-};
+}
/**
* small function to check if an array contains
@@ -71,7 +56,7 @@ jQuery.contains = function(arr, item) {
return true;
}
return false;
-};
+}
/**
* highlight a given string on a jquery object by wrapping it in
@@ -82,7 +67,7 @@ jQuery.fn.highlightText = function(text, className) {
if (node.nodeType == 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
- if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
+ if (pos >= 0 && !jQuery.className.has(node.parentNode, className)) {
var span = document.createElement("span");
span.className = className;
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
@@ -94,14 +79,14 @@ jQuery.fn.highlightText = function(text, className) {
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
- highlight(this);
+ highlight(this)
});
}
}
return this.each(function() {
highlight(this);
});
-};
+}
/**
* Small JavaScript module for the documentation.
@@ -111,7 +96,7 @@ var Documentation = {
init : function() {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
- this.initIndexTable();
+ this.initModIndex();
},
/**
@@ -122,7 +107,7 @@ var Documentation = {
LOCALE : 'unknown',
// gettext and ngettext don't access this so that the functions
- // can safely bound to a different name (_ = Documentation.gettext)
+ // can savely bound to a different name (_ = Documentation.gettext)
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated == 'undefined')
@@ -182,29 +167,29 @@ var Documentation = {
var body = $('div.body');
window.setTimeout(function() {
$.each(terms, function() {
- body.highlightText(this.toLowerCase(), 'highlighted');
+ body.highlightText(this.toLowerCase(), 'highlight');
});
}, 10);
- $('<p class="highlight-link"><a href="javascript:Documentation.' +
- 'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
- .appendTo($('#searchbox'));
+ $('<li class="highlight-link"><a href="javascript:Documentation.' +
+ 'hideSearchWords()">' + _('Hide Search Matches') + '</a></li>')
+ .appendTo($('.sidebar .this-page-menu'));
}
},
/**
- * init the domain index toggle buttons
+ * init the modindex toggle buttons
*/
- initIndexTable : function() {
+ initModIndex : function() {
var togglers = $('img.toggler').click(function() {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
- $('tr.cg-' + idnum).toggle();
+ console.log($('tr.cg-' + idnum).toggle());
if (src.substr(-9) == 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
}).css('display', '');
- if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
+ if (DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX) {
togglers.click();
}
},
@@ -213,8 +198,8 @@ var Documentation = {
* helper function to hide the search marks again
*/
hideSearchWords : function() {
- $('#searchbox .highlight-link').fadeOut(300);
- $('span.highlighted').removeClass('highlighted');
+ $('.sidebar .this-page-menu li.highlight-link').fadeOut(300);
+ $('span.highlight').removeClass('highlight');
},
/**