diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-15 15:07:11 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-15 15:07:11 -0300 |
commit | eef8dc3c35a4d6339fae7d942388009afe1f78c1 (patch) | |
tree | f0b8927c27691bb52ef59332f62ea09e1e7fcea4 /views/default/js | |
download | elgg-eef8dc3c35a4d6339fae7d942388009afe1f78c1.tar.gz elgg-eef8dc3c35a4d6339fae7d942388009afe1f78c1.tar.bz2 |
Squashed 'mod/faq/' content from commit b3a038c
git-subtree-dir: mod/faq
git-subtree-split: b3a038c8ac7db28d5cd47a7ae870f722c24e5921
Diffstat (limited to 'views/default/js')
-rw-r--r-- | views/default/js/simple_faq/toc.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/views/default/js/simple_faq/toc.php b/views/default/js/simple_faq/toc.php new file mode 100644 index 000000000..2b1621f88 --- /dev/null +++ b/views/default/js/simple_faq/toc.php @@ -0,0 +1,24 @@ +<?php +/** + * Show the FAQs' Table of Contents + * + * @package SimpleFAQ + */ + +include(elgg_get_plugins_path() . 'simple_faq/vendors/jquery-stoc/jquery.stoc.js'); + +?> + +elgg.provide('elgg.simple_faq'); + +elgg.simple_faq.init = function() { + $(function(){ + $("<div class="elgg-simplefaq-toc"></div>").prependTo(".elgg-main .elgg-output").stoc({ + search: ".elgg-main .elgg-output", + stocTitle: "", + listType: "ol", + }); + }); +}; + +elgg.register_hook_handler('init', 'system', elgg.simple_faq.init); |