From: Tara L Andrews Date: Thu, 2 Feb 2012 23:41:12 +0000 (+0100) Subject: fixes for stemma retrieval and for relative paths in JS X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a86eba5d41d5e0f7243dd3d97332fe3d1c112724;p=scpubgit%2Fstemmaweb.git fixes for stemma retrieval and for relative paths in JS --- diff --git a/lib/stemmaweb/Controller/Root.pm b/lib/stemmaweb/Controller/Root.pm index 4b4e5e8..de51958 100644 --- a/lib/stemmaweb/Controller/Root.pm +++ b/lib/stemmaweb/Controller/Root.pm @@ -128,8 +128,8 @@ sub stemma :Local :Args(1) { $m->store( $tradition ); } - $c->stash->{'result'} = $tradition->stemma - ? $tradition->stemma->as_svg + $c->stash->{'result'} = $tradition->stemma_count + ? $tradition->stemma(0)->as_svg : ''; $c->forward('View::SVG'); } diff --git a/root/js/componentload.js b/root/js/componentload.js index c233b15..8db28dd 100644 --- a/root/js/componentload.js +++ b/root/js/componentload.js @@ -1,6 +1,9 @@ function loadTradition( textid ) { // First insert the placeholder image var basepath = window.location.pathname + if( basepath.lastIndexOf('/') == basepath.length - 1 ) { + basepath = basepath.slice( 0, basepath.length - 1) + }; var imghtml = 'Loading SVG...' $('#stemma_graph').empty(); $('#variant_graph').empty();