From: Tara L Andrews Date: Tue, 4 Oct 2011 00:46:35 +0000 (+0200) Subject: some more look and feel tweaks X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0a8f09a9a3eb1cb6861db715c2b6ed43e1e11402;p=scpubgit%2Fstemmatology.git some more look and feel tweaks --- diff --git a/TreeOfTexts/lib/TreeOfTexts/Controller/Root.pm b/TreeOfTexts/lib/TreeOfTexts/Controller/Root.pm index e519288..00dc0fd 100644 --- a/TreeOfTexts/lib/TreeOfTexts/Controller/Root.pm +++ b/TreeOfTexts/lib/TreeOfTexts/Controller/Root.pm @@ -33,6 +33,7 @@ sub index :Path :Args(0) { my $m = $c->model('Analysis'); $c->stash->{svg} = $m->{'svg'}; $c->stash->{variants} = $m->{'variants'}; + $c->stash->{text_title} = $m->{'title'}; $c->stash->{template} = 'index.tt'; } diff --git a/TreeOfTexts/root/js/interaction.js b/TreeOfTexts/root/js/interaction.js index 604d5db..68ccd34 100644 --- a/TreeOfTexts/root/js/interaction.js +++ b/TreeOfTexts/root/js/interaction.js @@ -17,7 +17,7 @@ function color_nodes( column_index, arr_node_ids, arr_greynode_ids ) { $('.node').children('title').filter( function(index) { return $(this).text() == value; }).siblings('ellipse').each( function( index ) { - $(this).attr( {stroke:'black', fill:'#eee'} ); + $(this).attr( {stroke:'black', fill:'#444'} ); }); }); jQuery.each( arr_node_ids, function(index,value) { diff --git a/TreeOfTexts/root/src/index.tt b/TreeOfTexts/root/src/index.tt index e6e133d..dec9bb8 100644 --- a/TreeOfTexts/root/src/index.tt +++ b/TreeOfTexts/root/src/index.tt @@ -10,6 +10,7 @@

Stexaminer

+

[% text_title %]

[% svg %]
@@ -30,7 +31,7 @@ [% row.id %] [% FOREACH reading IN row.readings -%] [% SET cellclass = 'clickable conflict' IF reading.conflict -%] -[% SET cellclass = 'clickable' IF reading.conflict -%] +[% SET cellclass = 'clickable' IF !reading.conflict -%] [% reading.text %] [% END -%] [% FILTER repeat( row.empty ) -%] diff --git a/TreeOfTexts/root/src/style.tt2 b/TreeOfTexts/root/src/style.tt2 index 5fc1945..4e0a85d 100644 --- a/TreeOfTexts/root/src/style.tt2 +++ b/TreeOfTexts/root/src/style.tt2 @@ -30,7 +30,7 @@ h1 { width: 280px; } .genealogical { - background: #eafff5; + background: #88ffaa; } .coincidental { background: #fff; diff --git a/lib/Text/Tradition/Analysis.pm b/lib/Text/Tradition/Analysis.pm index c74b96d..a9b3318 100644 --- a/lib/Text/Tradition/Analysis.pm +++ b/lib/Text/Tradition/Analysis.pm @@ -9,8 +9,9 @@ sub new { my( $class, $args ) = @_; my $self = {}; # Our object needs to have a stemma graph and a variant table. - my( $svg, $variants ) = run_analysis( $args->{'file'}, $args->{'stemmadot'} ); + my( $title, $svg, $variants ) = run_analysis( $args->{'file'}, $args->{'stemmadot'} ); $self->{'svg'} = $svg; + $self->{'title'} = $title; $self->{'variants'} = $variants; bless( $self, $class ); @@ -104,12 +105,11 @@ sub run_analysis { # For all the groups with more than one member, collect the list of all # contiguous vertices needed to connect them. # TODO: deal with a.c. reading logic - my $conflict = analyze_variant_location( - $group_readings, $groups, $stemma->apsp ); + my $conflict = analyze_variant_location( $group_readings, $groups, $stemma->apsp ); $variant_row->{'genealogical'} = keys %$conflict ? undef : 1; foreach my $grp ( sort keys %$group_readings ) { my $rdg = $group_readings->{$grp}; - my $in_conflict = exists $conflict->{$grp}; + my $in_conflict = exists $conflict->{$rdg}; push( @{$variant_row->{'readings'}}, { 'text' => $rdg, 'group' => $grp, 'conflict' => $in_conflict, 'missing' => wit_stringify( $lacunose ) } ); @@ -134,7 +134,7 @@ sub run_analysis { $row->{'empty'} = $empty; } - return( $svg, $variants ); + return( $tradition->name, $svg, $variants ); } sub analyze_variant_location {