initial attempt at providing stemma title/label
tla [Sun, 27 Oct 2013 13:33:19 +0000 (14:33 +0100)]
.gitignore
lib/stemmaweb/Controller/Root.pm
root/css/style.css
root/js/componentload.js
root/src/index.tt
t/data/florilegium.dot

index 19e0180..2879777 100644 (file)
@@ -1 +1,2 @@
 db/
+.DS_Store
index f66dcd5..e62c924 100644 (file)
@@ -322,7 +322,8 @@ sub textinfo :Local :Args(1) {
        if( $tradition->can('language') ) {
                $textinfo->{'language'} = $tradition->language;
        }
-       my @stemmasvg = map { $_->as_svg() } $tradition->stemmata;
+       my @stemmasvg = map { { name => $_->identifier, svg => $_->as_svg() } } 
+               $tradition->stemmata;
        map { $_ =~ s/\n/ /mg } @stemmasvg;
        $textinfo->{stemmata} = \@stemmasvg;
        $c->stash->{'result'} = $textinfo;
index 912400c..f20d337 100644 (file)
@@ -172,6 +172,14 @@ div.pager_left_button.greyed_out, div.pager_left_button.greyed_out:hover {
 }
 #stemma_graph svg {
 }
+#stemma_graph_title {
+       bottom: 0px;
+}
+#stemma_identifier {
+       color: #488dd2;
+       font-size: 12px;
+       font-weight: bold;
+}      
 #textinfo_container_buttons {
     z-index: 100;
     width: 224px;
@@ -211,6 +219,10 @@ div.pager_left_button.greyed_out, div.pager_left_button.greyed_out:hover {
     font-weight: bold;
     color: #ff3333;
 }
+.notification {
+       font-weight: bold;
+       color: #33ff33;
+}
 #new_file {
     position: absolute;
     top: -50px;
index 9c10c96..2a26927 100644 (file)
@@ -134,7 +134,10 @@ function load_stemma( idx ) {
        selectedStemmaID = idx;
        show_stemmapager();
        if( idx > -1 ) {
-               loadSVG( stemmata[idx] );
+               // Load the SVG and identifier of the stemma
+               var stemmadata = stemmata[idx];
+               loadSVG( stemmadata['svg'] );
+               $('#stemma_identifier').empty().text( stemmadata['name'] );
                // Stexaminer submit action
                var stexpath = _get_url([ "stexaminer", selectedTextID, idx ]);
                $('#run_stexaminer').attr( 'action', stexpath );
index 41bd149..6dc7ad2 100644 (file)
@@ -83,6 +83,7 @@ var textOnLoad = "[% withtradition %]";
           </a>
       </div>
       <div id="stemma_graph"></div>
+      <div id="stemma_graph_title"><span id="stemma_identifier"></span></div>
     </div>
 
     <!-- Interim 'loading' message for directory box -->
index f41b8d6..e5c10a0 100644 (file)
@@ -1,4 +1,4 @@
-digraph Stemma {
+digraph "stemma of Tomas" {
     "α" [ class=hypothetical ];
     "γ" [ class=hypothetical ];
     "δ" [ class=hypothetical ];