update relation mapper to use base stemmatology lib as of commit 9e9b754
Tara L Andrews [Sun, 30 Sep 2012 03:13:21 +0000 (05:13 +0200)]
lib/stemmaweb/Controller/Relation.pm
root/js/relationship-full.js

index 7e537d9..8187847 100644 (file)
@@ -224,8 +224,8 @@ sub relationships :Chained('text') :PathPart :Args(0) {
                        my $note = $c->request->param('note');
                        my $scope = $c->request->param('scope');
                
-                       my $opts = { 'type' => $relation,
-                                                'scope' => $scope };
+                       my $opts = { 'type' => $relation, 'propagate' => 1 };
+                       $opts->{'scope'} = $scope if $scope;
                        $opts->{'annotation'} = $note if $note;
                        
                        try {
index 7847571..20424db 100644 (file)
@@ -638,7 +638,8 @@ $(document).ready(function () {
             $.each( data, function(item, source_target) { 
                var source_found = get_ellipse( source_target[0] );
                var target_found = get_ellipse( source_target[1] );
-               if( source_found.size() && target_found.size() ) {
+               var relation_found = $.inArray( source_target[2], rel_types );
+               if( source_found.size() && target_found.size() && relation_found > -1 ) {
                     var relation = relation_manager.create( source_target[0], source_target[1], $('#rel_type')[0].selectedIndex-1 );
                                        relation.data( 'type', $('#rel_type :selected').text()  );
                                        relation.data( 'scope', $('#scope :selected').text()  );