www/js/inv_yeasts.js

changeset 727
08f91a68e757
parent 725
30346e5b9e12
child 729
eabc100b3d6b
--- 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