aboutsummaryrefslogtreecommitdiffstats
path: root/doc/phpdoc/js/sidebar.js
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2016-05-08 20:45:40 +0200
committerpiernov <piernov@piernov.org>2016-05-08 20:45:40 +0200
commit9f28616dfd1cc425c5013937bab729217b7be2e6 (patch)
treec08a53708a6f59374d56b872c4047cbf80c81e27 /doc/phpdoc/js/sidebar.js
parent07f9658d2fecc5f88cc27fba8502246a30d8fdc0 (diff)
downloadcandybox-9f28616dfd1cc425c5013937bab729217b7be2e6.tar.gz
candybox-9f28616dfd1cc425c5013937bab729217b7be2e6.tar.bz2
candybox-9f28616dfd1cc425c5013937bab729217b7be2e6.tar.xz
candybox-9f28616dfd1cc425c5013937bab729217b7be2e6.zip
Add build_doc.sh script + generated phpdoc
Diffstat (limited to 'doc/phpdoc/js/sidebar.js')
-rw-r--r--doc/phpdoc/js/sidebar.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/phpdoc/js/sidebar.js b/doc/phpdoc/js/sidebar.js
new file mode 100644
index 0000000..e9096ff
--- /dev/null
+++ b/doc/phpdoc/js/sidebar.js
@@ -0,0 +1,45 @@
+jQuery.expr[':'].Contains = function(a, i, m) {
+ return jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0;
+};
+
+$(function() {
+ $("#sidebar-nav").accordion({
+ autoHeight: false,
+ navigation: true,
+ collapsible: true
+ }).accordion("activate", false)
+ .find('a.link').unbind('click').click(
+ function(ev) {
+ ev.cancelBubble = true; // IE
+ if (ev.stopPropagation) {
+ ev.stopPropagation(); // the rest
+ }
+
+ return true;
+ }).prev().prev().remove();
+
+ $("#sidebar-nav>h3").click(function() {
+ if ($(this).attr('initialized') == 'true') return;
+
+ $(this).next().find(".sidebar-nav-tree").treeview({
+ collapsed: true,
+ persist: "cookie"
+ });
+ $(this).attr('initialized', true);
+ });
+});
+
+function tree_search(input) {
+ treeview = $(input).parent().parent().next();
+
+ // Expand all items
+ treeview.find('.expandable-hitarea').click();
+
+ // make all items visible again
+ treeview.find('li:hidden').show();
+
+ // hide all items that do not match the given search criteria
+ if ($(input).val()) {
+ treeview.find('li').not(':has(a:Contains(' + $(input).val() + '))').hide();
+ }
+}