common.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. $(function()
  2. {
  3. $('#objectType').change(function()
  4. {
  5. var objectType = $(this).val();
  6. var link = createLink('meeting', 'ajaxGetObjects' , 'projectID=' + projectID + '&objectType=' + objectType);
  7. $('#objectBox').load(link, function()
  8. {
  9. $('#objectID').chosen();
  10. });
  11. })
  12. })
  13. /**
  14. * Load executions of project.
  15. *
  16. * @param int $projectID
  17. * @access public
  18. * @return void
  19. */
  20. function loadProjectExecutions(projectID = 0)
  21. {
  22. var link = createLink('execution', 'ajaxGetProjectExecutions', "projectID=" + projectID + "&multiple=1");
  23. $.post(link, function(data)
  24. {
  25. $('#execution').replaceWith(data);
  26. $('#execution_chosen').remove();
  27. $('#execution').next('.picker').remove();
  28. $('#execution').chosen();
  29. })
  30. if(typeof noSprintPairs != 'undefined') $('#execution').closest('tr').toggleClass('hidden', noSprintPairs[projectID] != undefined);
  31. loadTeamMembers(projectID)
  32. }
  33. /**
  34. * Load team.
  35. *
  36. * @param int $objectID
  37. * @access public
  38. * @return void
  39. */
  40. function loadTeamMembers(objectID = 0)
  41. {
  42. var projectID = $("#project").val();
  43. if(objectID == 0 && projectID) objectID = projectID;
  44. var participant = $('#participant').val();
  45. var link = createLink('meeting', 'ajaxGetTeamMembers', "objectID=" + objectID + '&selected=' + participant);
  46. $.post(link, function(data)
  47. {
  48. $('#contactListGroup .picker-multi').remove();
  49. $('#participant').replaceWith(data);
  50. $('#participant').picker();
  51. })
  52. }