From: Tara L Andrews Date: Wed, 15 Jan 2014 18:52:42 +0000 (+0000) Subject: Merge branch 'master' of https://github.com/tla/stemmaweb X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c599ad4307cca3d42523b1eb7848941bfb45aca0;hp=f60227e23c6222e1ddcc9755845bb7f803616574;p=scpubgit%2Fstemmaweb.git Merge branch 'master' of https://github.com/tla/stemmaweb --- diff --git a/Makefile.PL b/Makefile.PL index a87978f..6dd80af 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -12,7 +12,7 @@ all_from 'lib/stemmaweb.pm'; # Tradition libraries requires 'Text::Tradition' => '1.2'; requires 'Text::Tradition::Directory'; -requires 'Text::Tradition::Analysis'; +requires 'Text::Tradition::Analysis' => '1.3'; requires 'Text::Tradition::StemmaUtil'; # Catalyst libraries requires 'Catalyst::Runtime' => '5.90002'; diff --git a/lib/stemmaweb/Controller/Root.pm b/lib/stemmaweb/Controller/Root.pm index 8fa2489..bc86c30 100644 --- a/lib/stemmaweb/Controller/Root.pm +++ b/lib/stemmaweb/Controller/Root.pm @@ -396,21 +396,6 @@ sub stemma :Local :Args(2) { if( $c->req->method eq 'POST' ) { if( $ok eq 'full' ) { my $dot = $c->request->body_params->{'dot'}; - # Graph::Reader::Dot does not handle bare unicode. We get around this - # by wrapping all words in double quotes, as long as they aren't already - # wrapped, and as long as they aren't the initial '(di)?graph .*'. - # Horrible HACK. - my @dlines = split( "\n", $dot ); - my $wdot = ''; - foreach( @dlines ) { - unless( /^(di)?graph/ ) { # Skip the first line - s/(? ( + is => 'ro', + isa => 'Str', + predicate => 'has_idp_solver_url', + ); + +has idp_calcdsn => ( + is => 'ro', + isa => 'Str', + predicate => 'has_idp_calcdsn', + ); =head1 NAME @@ -72,8 +83,12 @@ sub index :Path :Args(2) { } elsif( $ignore_sort eq 'orthographic' ) { $analysis_options{'merge_types'} = 'orthographic'; } + if( $self->has_idp_solver_url ) { + $analysis_options{'solver_url'} = $self->idp_solver_url; + } elsif( $self->has_idp_calcdsn ) { + $analysis_options{'calcdsn'} = $self->idp_calcdsn; + } - # Do the deed my $t = run_analysis( $tradition, %analysis_options ); # Stringify the reading groups foreach my $loc ( @{$t->{'variants'}} ) { diff --git a/root/js/relationship.js b/root/js/relationship.js index c98077b..0f5ae09 100644 --- a/root/js/relationship.js +++ b/root/js/relationship.js @@ -800,8 +800,8 @@ function merge_nodes( source_node_id, target_node_id, consequences ) { parent_g = svg.group( $('#svgenlargement svg g') ); var ids_text = node_ids[0] + '-' + node_ids[1]; var merge_id = 'merge-' + ids_text; - svg.image( parent_g, xC, (yC-8), 16, 16, '/images/tick_circle_frame.png', { id: merge_id } ); - svg.image( parent_g, (xC+20), (yC-8), 16, 16, '/images/no_entry.png', { id: 'no' + merge_id } ); + svg.image( parent_g, xC, (yC-8), 16, 16, merge_button_yes, { id: merge_id } ); + svg.image( parent_g, (xC+20), (yC-8), 16, 16, merge_button_no, { id: 'no' + merge_id } ); $( '#' + merge_id ).hover( function(){ $(this).addClass( 'draggable' ) }, function(){ $(this).removeClass( 'draggable' ) } ); $( '#no' + merge_id ).hover( function(){ $(this).addClass( 'draggable' ) }, function(){ $(this).removeClass( 'draggable' ) } ); $( '#' + merge_id ).click( function( evt ){ diff --git a/root/src/relate.tt b/root/src/relate.tt index 15ae28d..b01ab41 100644 --- a/root/src/relate.tt +++ b/root/src/relate.tt @@ -9,6 +9,9 @@ var basepath = "[% c.uri_for( '/relation/' ) %]"; var textid = "[% textid %]"; var can_morphologize = "[% can_morphologize %]"; var editable = "[% permission %]" === "full"; +// URLs for images referenced in Javascript +var merge_button_yes = "[% c.uri_for( '/images/tick_circle_frame.png' ) %]"; +var merge_button_no = "[% c.uri_for( '/images/no_entry.png' ) %]"; [% IF error -%] var relationship_types = []; var relationship_scopes = []; diff --git a/stemmaweb.conf b/stemmaweb.conf index 14dc998..b856c61 100644 --- a/stemmaweb.conf +++ b/stemmaweb.conf @@ -1,6 +1,9 @@ # rename this file to stemmaweb.yml and put a ':' after 'name' if # you want to use YAML like in old versions of Catalyst name = stemmaweb + + idp_solver_url http://perf.byzantini.st/cgi-bin/graphcalc.cgi + dsn dbi:SQLite:dbname=db/traditions.db