[Fixes issue #23] Changes the way the tree shows items when searched. Doesn't hide them in the template.

This commit is contained in:
Corey Oordt 2011-08-01 09:15:55 -04:00
parent d3cbb62b5d
commit d48be41dd3

View file

@ -5,7 +5,11 @@
<script type="text/javascript">
(function($) {
$(document).ready(function() {
treeTable = $("#result_list").treeTable({initialState : "{{ EDITOR_TREE_INITIAL_STATE }}"});
var srchString = document.getElementById('searchbar').value;
if (srchString == '')
treeTable = $("#result_list").treeTable({initialState : "{{ EDITOR_TREE_INITIAL_STATE }}"});
else:
treeTable = $("#result_list").treeTable({initialState : "expanded"});
function toggleChildren(index, value) {
var row = value.parentNode.parentNode;
if (row.className.match(/child-of-node-\d+/)) {