X-Git-Url: https://git.exim.org/exim-website.git/blobdiff_plain/02d640e51bbff6a3f48f07fc7b8c788e990e1fda..b0968890317ffaab0352f6278340d310aacfdc54:/templates/web/doc/chapter.js diff --git a/templates/web/doc/chapter.js b/templates/web/doc/chapter.js deleted file mode 100644 index add4bd3..0000000 --- a/templates/web/doc/chapter.js +++ /dev/null @@ -1,69 +0,0 @@ -// Warnings about reading old version of documentation -(function ($) { - if( $.grep( document.cookie.split(/\s*;\s*/), function(a){return a === 'old_version_warning_removed=true' ? true : false }).length === 0 ){ - $('#old_version_warning') - .show() - .find('span.closebar a') - .click(function(e){ - $('#old_version_warning').remove(); - document.cookie="old_version_warning_removed=true"; - e.preventDefault(); - }); - } -})(jQuery); - -// Sidebar table of contents -(function ($) { - - var click_func = function (e) { - e.stopPropagation(); - if ($('#toc').data('opened')) { - $('#toc > *').animate({ - left: '-=' + $('#toc > ul').width() + 'px' - }, 'fast'); - $('#toc').removeData('opened'); - } else { - $('#toc > *').animate({ - left: '+=' + $('#toc > ul').width() + 'px' - }, 'fast'); - $('#toc').data('opened', 1); - } - }; - - $('body').click(function () { - if( $('#toc').data('opened') ) $('#toc > img').mousedown(); - }); - - var type = document.location.pathname.match(/\/doc\/html\/spec_html\/filter/) ? 'filter' : 'spec'; - - // Get the relevant table of contents - $.get(type === 'spec' ? 'index_toc.xml' : 'filter_toc.xml', function (xml) { - - // Remove the main list from the DOM for performance - var $ul = $('#toc > ul').remove(); - - // Traverse chapters - var chapter_id = 0; - $(xml).find('c').each(function () { - ++chapter_id; - var chapter_title = $(this).children('t').text(); - var chapter_url = $(this).children('u').text(); - - var chapter_li = $('
  • ').append( - $('').attr({ - href: chapter_url, - title: chapter_title - }).text(chapter_id + '. ' + chapter_title), $('