From b079ae972d1bd9f2f854e07ea43f4d700b2e487c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 2 Oct 2015 16:50:04 +0300 Subject: Merge pull request #4148 from zhanghongyi/generate-pulldown [ci skip] Generate docs pulldown menu using sphinx toctree --- .../_themes/sphinx_rtd_theme/static/js/theme.js | 85 +++++----------------- 1 file changed, 20 insertions(+), 65 deletions(-) (limited to 'user_guide_src/source/_themes/sphinx_rtd_theme/static/js') diff --git a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js index 8aee6ca29..b77789d06 100644 --- a/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js +++ b/user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js @@ -18,76 +18,31 @@ $(document).ready(function () { // START DOC MODIFICATION BY RUFNEX // v1.0 04.02.2015 // Add ToogleButton to get FullWidth-View by Johannes Gamperl codeigniter.de - // JLP - reformatted to make additions or corrections easier. Still hard-coded :(( - var ciNav = '\ -\ -
\ -'; - $('body').prepend(ciNav); - // - var a = ['Index', 'CodeIgniter User Guide¶', 'Change Log¶', 'Developer’s Certificate of Origin 1.1¶', 'The MIT License (MIT)¶']; - if ($.inArray($('h1').text(), a) > 0 || $('#search-results').length) - { - $('table.ciNav a').each(function () { - $(this).attr('href', $(this).attr("href").replace('../', '')); - }); - } - // $('#openToc').click(function () { $('#nav').slideToggle(); }); - $('.wy-breadcrumbs').append('
toc
'); $('#closeMe').toggle( - function () - { - setCookie('ciNav', true, 365); - $('#nav2').show(); - $('#topMenu').remove(); - $('body').css({background: 'none'}); - $('.wy-nav-content-wrap').css({background: 'none', 'margin-left': 0}); - $('.wy-breadcrumbs').append('
' + $('.wy-form').parent().html() + '
'); - $('.wy-nav-side').toggle(); - }, - function () - { - setCookie('ciNav', false, 365); - $('#topMenu').remove(); - $('#nav').hide(); - $('#nav2').hide(); - $('body').css({background: '#edf0f2;'}); - $('.wy-nav-content-wrap').css({background: 'none repeat scroll 0 0 #fcfcfc;', 'margin-left': '300px'}); - $('.wy-nav-side').show(); - } + function () + { + setCookie('ciNav', true, 365); + $('#nav2').show(); + $('#topMenu').remove(); + $('body').css({background: 'none'}); + $('.wy-nav-content-wrap').css({background: 'none', 'margin-left': 0}); + $('.wy-breadcrumbs').append('
' + $('.wy-form').parent().html() + '
'); + $('.wy-nav-side').toggle(); + }, + function () + { + setCookie('ciNav', false, 365); + $('#topMenu').remove(); + $('#nav').hide(); + $('#nav2').hide(); + $('body').css({background: '#edf0f2;'}); + $('.wy-nav-content-wrap').css({background: 'none repeat scroll 0 0 #fcfcfc;', 'margin-left': '300px'}); + $('.wy-nav-side').show(); + } ); if (getCookie('ciNav') == 'true') { -- cgit v1.2.3-24-g4f1b