create.ui.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. window.clickCopyCard = function(event)
  2. {
  3. setCopyKanban($(event.target).closest('.copy-card').data('id'));
  4. $('#copyKanbanModal').modal('hide');
  5. }
  6. window.setCopyKanban = function(kanbanID)
  7. {
  8. const copyRegion = $('[name=copyRegionInfo]').prop('checked');
  9. const spaceType = $('[name=type]:checked').val();
  10. const url = $.createLink('kanban', 'create', 'spaceID=' + spaceID + '&type=' + spaceType + '&copyKanbanID=' + kanbanID + '&exyra=copyRegion=' + (copyRegion ? '1' : '0'));
  11. loadPartial(url, '#WIPCountBox, #spaceBox, #nameBox, #ownerBox, #teamBox, #fixedColBox, #autoColBox, #archiveBox, #manageProgressBox, #alignmentBox, #descBox, #whitelistBox', {success: function()
  12. {
  13. waitDom('#spaceBox [name=space]', function()
  14. {
  15. const copySpaceID = $('#spaceBox input[name=space]').val();
  16. $('#spaceBox input[name=space]').zui('picker').$.setValue(copySpaceID);
  17. });
  18. }});
  19. }
  20. window.toggleImportObjectBox = function(e)
  21. {
  22. let isImport = $(e.target).val() == 'on';
  23. if(!isImport)
  24. {
  25. $("input[name^='importObjectList']").attr('disabled', 'disabled');
  26. $('#objectBox').hide();
  27. }
  28. else
  29. {
  30. $("input[name^='importObjectList']").removeAttr('disabled');
  31. $('#objectBox').show();
  32. }
  33. }
  34. window.waitDom('input[name=fluidBoard]', function()
  35. {
  36. handleKanbanWidthAttr();
  37. });