keep analysis options button visible after row click
Tara L Andrews [Wed, 19 Sep 2012 17:44:57 +0000 (19:44 +0200)]
root/js/stexaminer.js
root/src/stexaminer.tt

index be48368..dced82d 100644 (file)
@@ -90,8 +90,9 @@ function color_nodes( column_index, arr_node_ids, arr_greynode_ids ) {
 }
 
 function show_stats( rs ) {
+       // Update the title
+       $('#stats_title').empty().text('Statistics for reading at ' + rs.id + ':' );
        var rshtml = $('#stats_template').clone();
-       rshtml.find('#statrank').append( rs.id );
        if( "unsolved" in rs ) {
                var nocalcmsg;
                if( rs.unsolved == 'IDP error' ) {
@@ -125,8 +126,7 @@ function show_stats( rs ) {
                        rshtml.append( rdgstats.contents() );
                });
        }
-       $('#row_statistics').empty();
-       $('#row_statistics').append( rshtml.contents() );
+       $('#stats_container').empty().append( rshtml.contents() );
        
 };
 
@@ -166,7 +166,7 @@ $(document).ready(function () {
        }); 
        $('#options').dialog({
                autoOpen: false,
-               height: 200,
+               // height: 'auto',
                width: 300,
                modal: true,
                buttons: {
index a3308bb..155c31f 100644 (file)
@@ -38,24 +38,25 @@ var graphdot = '[% graphdot %]';
         <div id="stemma_graph">
         </div>
         <div id="row_statistics">
-          <h3>Aggregate text statistics</h3>
+          <h3 id="stats_title">Aggregate text statistics</h3>
           <div id="options_button_container">
             <div id="options_button" class="button" onClick="$('#options').dialog('open')">
                   <span>Analysis options</span>
             </div>
           </div>
-          <ul id="aggregates">
-            <li>Total number of variant locations analyzed: [% total %]</li>
-            <li>Number of fully genealogical locations: [% genealogical %]</li>
-            <li>Number of readings that conflict with the stemma: [% conflict %]</li>
-            <li>Genealogical reading transitions by relationship type: [% todo %]</li>
-          </ul>
-          <p>(Choose a row in the table to display statistics about individual readings.)</p>
+          <div id="stats_container">
+                         <ul id="aggregates">
+                               <li>Total number of variant locations analyzed: [% total %]</li>
+                               <li>Number of fully genealogical locations: [% genealogical %]</li>
+                               <li>Number of readings that conflict with the stemma: [% conflict %]</li>
+                               <li>Genealogical reading transitions by relationship type: [% todo %]</li>
+                         </ul>
+                         <p>(Choose a row in the table to display statistics about individual readings.)</p>
+                 </div>
         </div>
     </div>
     
     <div id="stats_template" class="template">
-        <h3>Statistics for readings at <span id="statrank"></span>:</h3>
         <!-- reading_template will be appended here for each reading -->
         <span class="solutionstatus"></span>
     </div>
@@ -86,7 +87,7 @@ var graphdot = '[% graphdot %]';
     <div id="options" title="Analysis options...">
         <form id="use_variants_form" name="use_variants_form">
             <fieldset>
-                <input type="radio" name="ignore_variant" value="none" [% 'checked="true"' IF ignore_variant == 'none' %]>Analyze all variation</input><br/>
+                <input type="radio" name="ignore_variant" value="none" [% 'checked="true"' IF !ignore_variant %]>Analyze all variation</input><br/>
                 <input type="radio" name="ignore_variant" value="orthographic" [% 'checked="true"' IF ignore_variant == 'orthographic' %]>Ignore orthographic variation</input><br/>
                 <input type="radio" name="ignore_variant" value="spelling" [% 'checked="true"' IF ignore_variant == 'spelling' %]>Ignore orthographic and spelling variation</input>
             </fieldset>