gantt.ui.js 810 B

1234567891011121314151617181920212223242526
  1. window.renderCell = function(result, {row, col})
  2. {
  3. if(col.name == 'type' && result) result[1]['attrs']['title'] = typeHintList[row.data.type];
  4. return result;
  5. }
  6. window.handleBatchBtnClick = function(btn)
  7. {
  8. const $btn = $(btn);
  9. const dtable = zui.DTable.query($btn);
  10. const checkedList = dtable.$.getChecks();
  11. if(!checkedList.length) return;
  12. const url = $btn.data('url');
  13. const form = new FormData();
  14. checkedList.forEach((id) => form.append('relationIdList[]', id));
  15. if($btn.hasClass('batchDeleteBtn'))
  16. {
  17. zui.Modal.confirm({message: confirmBatchDelete, icon: 'icon-exclamation-sign', iconClass: 'warning-pale rounded-full icon-2x'}).then((res) => {if(res) $.ajaxSubmit({url, data:form});});
  18. }
  19. else
  20. {
  21. postAndLoadPage(url, form);
  22. }
  23. };