Added styling for clicked row.
Joris van Zundert [Mon, 3 Oct 2011 22:48:44 +0000 (00:48 +0200)]
TreeOfTexts/root/src/index.tt

index 2217937..3b926c7 100644 (file)
@@ -29,7 +29,7 @@
         <tr [% rowclass %]>
           <th><span class="rowid">[% row.id %]</span></th>
 [% FOREACH reading IN row.readings -%]
-          <td class="clickable"><span onclick="color_nodes($(this).parent().index(), [% reading.group %], [% reading.missing %]);">[% reading.text %]</span></td>
+          <td class="clickable"><span onclick="$('tr.active_variant_row').removeClass('active_variant_row');$(this).parents('tr').addClass('active_variant_row');color_nodes($(this).parent().index(), [% reading.group %], [% reading.missing %]);">[% reading.text %]</span></td>
 [% END -%]
 [% FILTER repeat( row.empty ) -%]
           <td/>