managemodule.ui.js 599 B

123456789101112131415161718
  1. window.handleRenderRow = function($row, index, row)
  2. {
  3. if(typeof row != 'undefined' && row.count > 0)
  4. {
  5. $row.find('[data-type="delete"]').attr('disabled', true);
  6. $row.find('[data-type="delete"]').attr('title', cannotDelete);
  7. $row.find("input[name^=name]").on('keyup', function()
  8. {
  9. const name = moduleProcesses[row.id]?.name || '';
  10. if(this.value == '' && name != '')
  11. {
  12. zui.Modal.alert(cannotDeleteWithName.replace('{name}', `[${name}]`));
  13. $(this).val(name);
  14. }
  15. });
  16. }
  17. };