height: 450px;
border: 1px #c6dcf1 solid;
}
+.traditionname {
+ text-decoration: underline;
+}
+.selected {
+ font-style: italic;
+}
#variant_graph {
clear: both;
width: 900px;
height: 400px;
border: 1px #c6dcf1 solid;
overflow: auto;
+ text-align: center;
+}
+#variant_graph img {
+ margin-top: expression(( 400 - this.height ) / 2);
}
#stemma_graph {
float: left;
width: 500px;
height: 450px;
border: 1px #c6dcf1 solid;
+ text-align: center;
+}
+#stemma_graph img {
+ margin-top: expression(( 450 - this.height ) / 2);
}
/* Additional components for the stexaminer */
#variants_table {
function loadTradition( textid ) {
-
+ // First insert the placeholder image
+ var imghtml = '<img src="/images/ajax-loader.gif" alt="Loading SVG..."/>'
+ $('#stemma_graph').empty();
+ $('#variant_graph').empty();
+ $('#stemma_graph').append( imghtml );
+ $('#variant_graph').append( imghtml );
+ // Then get and load the actual content.
// TODO: scale #stemma_grpah both horizontally and vertically
// TODO: load svgs from SVG.Jquery (to make scaling react in Safari)
$('#stemma_graph').load( "stemma/" + textid , function() {
<ul>
[% SET i = 0 -%]
[% FOREACH t IN texts -%]
- <li><span class="traditionname" onClick="loadTradition('[% t.id %]')">[% t.name %]</span></li>
+ <li><span class="traditionname" onClick="$('.traditionname').removeClass('selected');$(this).addClass('selected');loadTradition('[% t.id %]')">[% t.name %]</span></li>
[% i = i + 1 -%]
[% END -%]
</table>