diff options
author | Andrew <browner12@gmail.com> | 2014-02-11 09:55:48 +0100 |
---|---|---|
committer | Andrew <browner12@gmail.com> | 2014-02-11 09:55:48 +0100 |
commit | b6d8b962e44202a74c9b9321a4a53f61a753fccf (patch) | |
tree | 2d3c533a55964a0d124f7cd6bb1d3d98c7b84056 /user_guide_src/source/_themes/eldocs/static/asset/js/method-toc.js | |
parent | 41713aaa665189dd0a191c333c73c4a7b9f37c78 (diff) | |
parent | 29e12641a1bb952f493462db6757ae12c7da1f2c (diff) |
Merge branch 'develop' into patch-1
Conflicts:
system/libraries/Calendar.php
Diffstat (limited to 'user_guide_src/source/_themes/eldocs/static/asset/js/method-toc.js')
-rw-r--r-- | user_guide_src/source/_themes/eldocs/static/asset/js/method-toc.js | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/user_guide_src/source/_themes/eldocs/static/asset/js/method-toc.js b/user_guide_src/source/_themes/eldocs/static/asset/js/method-toc.js new file mode 100644 index 000000000..a926b3da9 --- /dev/null +++ b/user_guide_src/source/_themes/eldocs/static/asset/js/method-toc.js @@ -0,0 +1,44 @@ +/* modified from http://stackoverflow.com/a/12459801 */ +$(function (){ + var createList = function(selector){ + + var ul = $('<ul>'); + var selected = $(selector); + + if (selected.length === 0){ + return; + } + + selected.clone().each(function (i,e){ + + var p = $(e).children('.descclassname'); + var n = $(e).children('.descname'); + var l = $(e).children('.headerlink'); + + var a = $('<a>'); + a.attr('href',l.attr('href')).attr('title', 'jump to ' + n + '()'); + + a.append(p).append(n); + + var entry = $('<li>').append(a); + ul.append(entry); + }); + return ul; + } + + var c = $('<div>'); + + var ul0 = c.clone().append($('.submodule-index')) + + customIndex = $('.custom-index'); + customIndex.empty(); + customIndex.append(ul0); + + var l = createList('dl.method > dt, dl.function > dt'); + if (l) { + var ul = c.clone() + .append('<h3>Methods / Functions</h3>') + .append(l); + } + customIndex.append(ul); +});
\ No newline at end of file |