project.ui.js 926 B

123456789101112131415161718192021222324252627
  1. window.onRenderProjectNameCell = function(result, info)
  2. {
  3. if(info.col.name === 'name' && info.row.data.delay > 0)
  4. {
  5. result[0].props.className = 'overflow-hidden';
  6. result[result.length] = {html:'<span class="label danger-pale ml-1 flex-none nowrap">' + delayInfo.replace('%s', info.row.data.delay) + '</span>', className:'flex items-end', style:{flexDirection:"column"}};
  7. }
  8. return result;
  9. }
  10. /**
  11. * 提示并删除项目。
  12. * Delete project with tips.
  13. *
  14. * @param int projectID
  15. * @param string projectName
  16. * @access public
  17. * @return void
  18. */
  19. window.confirmDelete = function(projectID, projectName)
  20. {
  21. zui.Modal.confirm({message: confirmDeleteTip.replace('%s', projectName), icon:'icon-exclamation-sign', iconClass: 'warning-pale rounded-full icon-2x'}).then((res) =>
  22. {
  23. if(res) $.ajaxSubmit({url: $.createLink('project', 'delete', 'projectID=' + projectID)});
  24. });
  25. }