edit.ui.js 999 B

123456789101112131415161718192021222324252627282930313233
  1. $(function()
  2. {
  3. if($('#typeHover').length) new zui.Tooltip('#typeHover', {title: typeTip, trigger: 'hover', placement: 'right', type: 'white', 'className': 'text-gray border border-light'});
  4. if(isWaterfall) hidePlanBox(executionAttr);
  5. });
  6. /**
  7. * Change project interaction.
  8. *
  9. * @access public
  10. * @return void
  11. */
  12. window.changeProject = function()
  13. {
  14. let projectID = $('#form-execution-edit [name=project]').val();
  15. if($('#syncStories').length == 0) $('button[type=submit]').after("<input type='hidden' id='syncStories' name='syncStories' value='no' />");
  16. if(lastProjectID != 'undefined' && projectID == lastProjectID) return;
  17. zui.Modal.confirm(confirmSync).then((res) =>
  18. {
  19. if(res)
  20. {
  21. $("#syncStories").val('yes');
  22. lastProjectID = projectID;
  23. }
  24. else
  25. {
  26. $("#syncStories").val('no');
  27. $('#form-execution-edit [name=project]').zui('picker').$.setValue(lastProjectID);
  28. }
  29. });
  30. };