TOC html
Jump to navigation
Jump to search
| Line 35: | Line 35: | ||
--> | --> | ||
| − | <input type="hidden" name="Form TOC[contents]" /> | + | <input id="TOC_contents" type="hidden" name="Form TOC[contents]" /> |
</div> | </div> | ||
| Line 54: | Line 54: | ||
<script> | <script> | ||
| − | |||
| − | |||
| + | $ci(function() { | ||
| − | $ci( | + | var contents = $ci('#TOC_contents').val(); |
| + | |||
| + | if(contents) { | ||
| − | + | Frontend_Index.translate_index_rec(contents,'from'); | |
| − | + | var tree = $ci.ui.fancytree.createTree('#TOC_tree', { | |
| − | + | extensions: ['edit', 'filter',"dnd5"], | |
| − | + | checkbox: true, | |
| − | + | source: contents, | |
| − | + | checkbox: function(event, data) { | |
| − | + | // Hide checkboxes for folders | |
| − | + | return data.node.isFolder() ? false : true; | |
| − | + | }, | |
| − | + | dnd5: Frontend_Index.fancytree_dnd5_conf | |
| − | + | }); | |
| + | } | ||
Revision as of 20:52, 13 July 2020