Show or suppress the dry yeast specific data in the inventory editor.

Sat, 10 Apr 2021 16:36:05 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 10 Apr 2021 16:36:05 +0200
changeset 727
08f91a68e757
parent 726
872a3635e4ef
child 728
6bb819bf919b

Show or suppress the dry yeast specific data in the inventory editor.

www/inv_yeasts.php file | annotate | diff | comparison | revisions
www/js/inv_yeasts.js file | annotate | diff | comparison | revisions
--- a/www/inv_yeasts.php	Sat Apr 10 14:46:06 2021 +0200
+++ b/www/inv_yeasts.php	Sat Apr 10 16:36:05 2021 +0200
@@ -29,16 +29,20 @@
       <tr>
        <td align="right" style="vertical-align: top;">Type:</td>
        <td align="left"><div id="type"></div></td>
-       <td align="right" style="vertical-align: top;">Ent van g/hl:</td>
-       <td align="left" style="vertical-align: top;"><input id="pitch_lo" readonly /></div><input type="button" id="but_pitch_lo" value="?" style="margin-left: 10px" /></td>
+       <td align="right" class="yeast_dry" style="vertical-align: top;">Ent van g/hl:</td>
+       <td align="left" class="yeast_dry" style="vertical-align: top;"><input id="pitch_lo" readonly /><input type="button" id="but_pitch_lo" value="?" style="margin-left: 10px" /></td>
+       <td class="yeast_wet"></td>
+       <td class="yeast_wet"></td>
        <td align="right" style="vertical-align: top;">Min temperatuur &deg;C:</td>
        <td align="left"><div id="min_temperature"></div></td>
       </tr>
       <tr>
        <td align="right" style="vertical-align: top;">Gist vorm:</td>
        <td align="left"><div id="form"></div></td>
-       <td align="right" style="vertical-align: top;">Ent tot g/hl:</td>
-       <td align="left" style="vertical-align: top;"><input id="pitch_hi" readonly /><input type="button" id="but_pitch_hi" value="?" style="margin-left: 10px" /></td>
+       <td align="right" class="yeast_dry" style="vertical-align: top;">Ent tot g/hl:</td>
+       <td align="left" class="yeast_dry" style="vertical-align: top;"><input id="pitch_hi" readonly /><input type="button" id="but_pitch_hi" value="?" style="margin-left: 10px" /></td>
+       <td class="yeast_wet"></td>
+       <td class="yeast_wet"></td>
        <td align="right" style="vertical-align: top;">Max temperatuur &deg;C:</td>
        <td align="left"><div id="max_temperature"></div></td>
       </tr>
--- a/www/js/inv_yeasts.js	Sat Apr 10 14:46:06 2021 +0200
+++ b/www/js/inv_yeasts.js	Sat Apr 10 16:36:05 2021 +0200
@@ -396,6 +396,13 @@
      $('#sg_hi').val(parseFloat(dataRecord.sg_hi));
      $('#pitch_hi').val(dataRecord.gr_hl_hi + '@' + parseFloat(dataRecord.sg_hi).toFixed(3));
      $('#short_desc').val(dataRecord.short_desc);
+     if (dataRecord.form == 'Droog') {
+      $('.yeast_wet').hide();
+      $('.yeast_dry').show();
+     } else {
+      $('.yeast_wet').show();
+      $('.yeast_dry').hide();
+     }
      calcTotal();
      // show the popup window.
      $('#popupWindow').jqxWindow('open');
@@ -419,6 +426,13 @@
  $('#form').on('select', function(event) {
   dataRecord.form = $('#form').val();
   calcTotal();
+  if (dataRecord.form == 'Droog') {
+   $('.yeast_wet').hide();
+   $('.yeast_dry').show();
+  } else {
+   $('.yeast_wet').show();
+   $('.yeast_dry').hide();
+  }
  });
 
  // initialize the popup window and buttons.

mercurial