batchedit.ui.js 640 B

123456789101112131415161718192021222324252627
  1. function setTailorNorm(e)
  2. {
  3. const $optional = $(e.target);
  4. const $currentRow = $optional.closest('tr');
  5. const optionalVal = $optional.val();
  6. if(optionalVal == 'no')
  7. {
  8. $currentRow.find('[name*=tailorNorm]').val('').attr('disabled', 'disabled');
  9. }
  10. else
  11. {
  12. $currentRow.find('[name*=tailorNorm]').removeAttr('disabled');
  13. }
  14. }
  15. window.renderActivityRow = function($row, index, row)
  16. {
  17. if(row.optional == 'no')
  18. {
  19. $row.find('[name*=tailorNorm]').val('').attr('disabled', 'disabled');
  20. }
  21. else
  22. {
  23. $row.find('[name*=tailorNorm]').removeAttr('disabled');
  24. }
  25. }