From: Tara L Andrews Date: Mon, 20 Feb 2012 12:55:23 +0000 (+0100) Subject: save created relationships; fix relative paths in css X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7c2808434f951894c238679d457c40b846019aad;p=scpubgit%2Fstemmatology.git save created relationships; fix relative paths in css --- diff --git a/stemmaweb/lib/stemmaweb/Controller/Relation.pm b/stemmaweb/lib/stemmaweb/Controller/Relation.pm index 00c97eb..690f44e 100644 --- a/stemmaweb/lib/stemmaweb/Controller/Relation.pm +++ b/stemmaweb/lib/stemmaweb/Controller/Relation.pm @@ -91,6 +91,7 @@ sub relationships :Chained('text') :PathPart :Args(0) { my( $self, $c ) = @_; my $tradition = delete $c->stash->{'tradition'}; my $collation = $tradition->collation; + my $m = $c->model('Directory'); if( $c->request->method eq 'GET' ) { my @pairs = $collation->relationships; # returns the edges my @all_relations; @@ -114,6 +115,7 @@ sub relationships :Chained('text') :PathPart :Args(0) { try { my @vectors = $collation->add_relationship( $node, $target, $opts ); $c->stash->{'result'} = \@vectors; + $m->save( $tradition ); } catch( Text::Tradition::Error $e ) { $c->response->status( '403' ); $c->stash->{'result'} = { 'error' => $e->message }; @@ -124,6 +126,7 @@ sub relationships :Chained('text') :PathPart :Args(0) { try { my @vectors = $collation->del_relationship( $node, $target ); + $m->save( $tradition ); $c->stash->{'result'} = \@vectors; } catch( Text::Tradition::Error $e ) { $c->response->status( '403' ); diff --git a/stemmaweb/root/css/relationship.css b/stemmaweb/root/css/relationship.css index a260414..c0d1d8b 100644 --- a/stemmaweb/root/css/relationship.css +++ b/stemmaweb/root/css/relationship.css @@ -68,7 +68,7 @@ span.apimore { #dialog_overlay { display: none; position: absolute; - background-image: url("/css/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png"); + background-image: url("cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png"); background-repeat: repeat; background-attachment: scroll; background-position: 50% 50%; @@ -86,7 +86,7 @@ span.apimore { width: 46px; margin-top: 17px; border: none; - background-image: url('/images/act_icons.png'); + background-image: url('../images/act_icons.png'); background-position: 0px 44px; background-color: none; background-repeat: none; @@ -143,7 +143,7 @@ span.apimore { top: 140px; border: 2px solid #B0C6F7; background: #fff; - background: url("/css/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png"); + background: url("cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png"); background-repeat: repeat-x; background-scroll: scroll; background-position: 50% top;