X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=doc%2Fbindings%2Fpython%2Fsource%2F_themes%2Fsphinx_rtd_theme%2Fstatic%2Fjs%2Ftheme.js;fp=doc%2Fbindings%2Fpython%2Fsource%2F_themes%2Fsphinx_rtd_theme%2Fstatic%2Fjs%2Ftheme.js;h=0000000000000000000000000000000000000000;hp=af661a92365ad3372f06255b49ebea173a643c56;hb=48ba910c442105da68c0f9bb703213517409f863;hpb=5cea295bfb45e7e7b495a5d9812b9a0522c3f743 diff --git a/doc/bindings/python/source/_themes/sphinx_rtd_theme/static/js/theme.js b/doc/bindings/python/source/_themes/sphinx_rtd_theme/static/js/theme.js deleted file mode 100644 index af661a92..00000000 --- a/doc/bindings/python/source/_themes/sphinx_rtd_theme/static/js/theme.js +++ /dev/null @@ -1,169 +0,0 @@ -require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o"); - - // Add expand links to all parents of nested ul - $('.wy-menu-vertical ul').not('.simple').siblings('a').each(function () { - var link = $(this); - expand = $(''); - expand.on('click', function (ev) { - self.toggleCurrent(link); - ev.stopPropagation(); - return false; - }); - link.prepend(expand); - }); - }; - - nav.reset = function () { - // Get anchor from URL and open up nested nav - var anchor = encodeURI(window.location.hash); - if (anchor) { - try { - var link = $('.wy-menu-vertical') - .find('[href="' + anchor + '"]'); - // If we didn't find a link, it may be because we clicked on - // something that is not in the sidebar (eg: when using - // sphinxcontrib.httpdomain it generates headerlinks but those - // aren't picked up and placed in the toctree). So let's find - // the closest header in the document and try with that one. - if (link.length === 0) { - var doc_link = $('.document a[href="' + anchor + '"]'); - var closest_section = doc_link.closest('div.section'); - // Try again with the closest section entry. - link = $('.wy-menu-vertical') - .find('[href="#' + closest_section.attr("id") + '"]'); - - } - $('.wy-menu-vertical li.toctree-l1 li.current') - .removeClass('current'); - link.closest('li.toctree-l2').addClass('current'); - link.closest('li.toctree-l3').addClass('current'); - link.closest('li.toctree-l4').addClass('current'); - } - catch (err) { - console.log("Error expanding nav for anchor", err); - } - } - }; - - nav.onScroll = function () { - this.winScroll = false; - var newWinPosition = this.win.scrollTop(), - winBottom = newWinPosition + this.winHeight, - navPosition = this.navBar.scrollTop(), - newNavPosition = navPosition + (newWinPosition - this.winPosition); - if (newWinPosition < 0 || winBottom > this.docHeight) { - return; - } - this.navBar.scrollTop(newNavPosition); - this.winPosition = newWinPosition; - }; - - nav.onResize = function () { - this.winResize = false; - this.winHeight = this.win.height(); - this.docHeight = $(document).height(); - }; - - nav.hashChange = function () { - this.linkScroll = true; - this.win.one('hashchange', function () { - this.linkScroll = false; - }); - }; - - nav.toggleCurrent = function (elem) { - var parent_li = elem.closest('li'); - parent_li.siblings('li.current').removeClass('current'); - parent_li.siblings().find('li.current').removeClass('current'); - parent_li.find('> ul li.current').removeClass('current'); - parent_li.toggleClass('current'); - } - - return nav; -}; - -module.exports.ThemeNav = ThemeNav(); - -if (typeof(window) != 'undefined') { - window.SphinxRtdTheme = { StickyNav: module.exports.ThemeNav }; -} - -},{"jquery":"jquery"}]},{},["sphinx-rtd-theme"]);