+$(document).ready(function() {
+ $('.rowid').click( function() {
+ $(this).parent().nextAll('.clickable').children('span').click();
+ });
+})
function color_nodes( arr_node_ids ) {
- $('ellipse').attr( {stroke:'black', fill:'#fff'} );
+ $('ellipse').attr( {stroke:'black', fill:'#999'} );
jQuery.each( arr_node_ids, function(index,value) {
$('.node').children('title').filter( function(index) {
return $(this).text() == value;
[% svg %]
</div>
<div style="float:left;width:450px;height:600px;border:1px blue solid;overflow:auto;">
- <table>
- [% FOREACH row IN variants -%]
- [% INCLUDE variantrow %]
- [% END -%]
+ <table>
+[% FOREACH row IN variants -%]
+[% INCLUDE variantrow %]
+[% END -%]
</table>
</div>
</body>
</html>
-[% BLOCK variantrow %]
-<tr>
- <th>[% row.id %]</th>
- [% FOREACH reading IN row.readings -%]
- <td><span onclick="color_nodes([% reading.group %]);">[% reading.text %]</span></td>
- [% END -%]
- [% FILTER repeat( row.empty ) -%]
- <td/>
- [% END -%]
-</tr>
-[% END %]
\ No newline at end of file
+[% BLOCK variantrow -%]
+[% SET rowclass = 'class="genealogical"' IF row.genealogical -%]
+[% SET rowclass = 'class="coincidental"' UNLESS row.genealogical -%]
+ <tr [% rowclass %]>
+ <th><span class="rowid">[% row.id %]</span></th>
+[% FOREACH reading IN row.readings -%]
+ <td class="clickable"><span onclick="color_nodes([% reading.group %]);">[% reading.text %]</span></td>
+[% END -%]
+[% FILTER repeat( row.empty ) -%]
+ <td/>
+[% END -%]
+ </tr>
+[% END -%]
\ No newline at end of file