Display description/help text received from Stemweb
tla [Wed, 11 Jun 2014 13:48:26 +0000 (15:48 +0200)]
root/css/dashboard.css
root/js/componentload.js
root/src/index.tt

index 1386ee0..fcfa7c3 100644 (file)
 #root_tree_dialog img {
     vertical-align: middle;
 }
+#stemweb_algorithm_desc_text {
+       overflow: auto;
+       height: 150px;
+       margin-top: 5px;
+       padding: 10px;
+       border: 1px solid #ddd;
+}
\ No newline at end of file
index 3abf1a2..37b4f12 100644 (file)
@@ -548,8 +548,8 @@ $(document).ready( function() {
 
        $('#stemweb-ui-dialog').dialog({
                autoOpen: false,
-               height: 160,
-               width: 240,
+               height: 425,
+               width: 400,
                modal: true,
                buttons: {
                        Run: function (evt) {
@@ -607,6 +607,14 @@ $(document).ready( function() {
                                        // "name" -> form label
                                        $('#stemweb_algorithm').change( function() {
                                                var pk = $(this).val();
+                                               // Display a link to the popup description, and fill in
+                                               // the description itself, if we have one.
+                                               if( 'desc' in algorithmTypes[pk] ) {
+                                                       $('#stemweb_algorithm_desc_text').empty().append( algorithmTypes[pk].desc );
+                                                       $('#stemweb_algorithm_desc').show();
+                                               } else {
+                                                       $('#stemweb_algorithm_desc').hide();
+                                               }
                                                $('#stemweb_runtime_options').empty();
                                                $.each( algorithmTypes[pk].args, function( i, apk ) {
                                                        var argInfo = algorithmArgs[apk];
index 0a5437e..6901bb2 100644 (file)
@@ -168,8 +168,13 @@ var textOnLoad = "[% withtradition %]";
       <div id="stemweb_ui_container">
        <form id="call_stemweb">
                <input id="stemweb_tradition" type="hidden" name="tradition"/>
+               <h5>Choose an algorithm</h5>
                <label for="algorithm">Run algorithm: </label>
-               <select id="stemweb_algorithm" name="algorithm"></select><br/>
+               <select id="stemweb_algorithm" name="algorithm"></select>
+               <!-- span id="stemweb_algorithm_help">What is this?</span><br/ -->
+                       <div id="stemweb_algorithm_desc_text"></div>
+                       <br/>
+                       <h5>Select the options</h5>
                <!-- Algorithm-specific options, if any, will be added within this div -->
                <div id="stemweb_runtime_options"></div>
                <br/>