Only use expander indicators to drill down in tree
Only use expander indicators to drill down in tree

file:a/js/tree.js -> file:b/js/tree.js
--- a/js/tree.js
+++ b/js/tree.js
@@ -29,7 +29,7 @@
 	var expanded = '[–]';
 	var indent = '—';
 
-	$('a.jsTree').each(function() {
+	$('a.treeLink').each(function() {
 		$(this).parent().parent().find('td.expander').append(expanderLink($(this).attr('href'), collapsed));
 	});
 
@@ -95,7 +95,7 @@
 					$(this).data('depth', depth);
 
 					var fileCell = $(this).find('td.fileName');
-					var treeLink = $(this).find('a.jsTree');
+					var treeLink = $(this).find('a.treeLink');
 					if (treeLink && (treeLink.size() > 0)) {
 						fileCell.prepend(expanderLink(treeLink.attr('href'), collapsed));
 					} else {

--- a/templates/treelist.tpl
+++ b/templates/treelist.tpl
@@ -29,7 +29,7 @@
       <td class="filesize"></td>
       <td class="expander"></td>
       <td class="list fileName">
-        <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=tree&amp;h={$treeitem->GetHash()}&amp;hb={$commit->GetHash()}&amp;f={$treeitem->GetPath()}" class="jsTree">{$treeitem->GetName()}</a>
+        <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=tree&amp;h={$treeitem->GetHash()}&amp;hb={$commit->GetHash()}&amp;f={$treeitem->GetPath()}" class="treeLink">{$treeitem->GetName()}</a>
       </td>
       <td class="link">
         <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=tree&amp;h={$treeitem->GetHash()}&amp;hb={$commit->GetHash()}&amp;f={$treeitem->GetPath()}">{t}tree{/t}</a>

comments