Advertisement
Guest User

Untitled

a guest
Jul 1st, 2013
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. function validateDependencies(module){
  2.  
  3. var moduleId = module.parentNode.parentNode.id;
  4. var path = "${pageContext.request.contextPath}/admin/modules/manage/checkdependencies.form";
  5. var result = false;
  6. path = path + "?moduleId=" + moduleId;
  7. alert(path);
  8.  
  9. $j.ajax({
  10. type : "GET",
  11. url : path,
  12. dataType : "text",
  13. success : function(data) {
  14. if(data != ""){ //If conflicting dependencies found, then display confirmation message
  15. var message = '<openmrs:message code="Module.dependencyShutdownNotice" javaScriptEscape="true"/>';
  16. message += '<br/><br/>' + data;
  17.  
  18.  
  19. document.getElementById('dependency-confirmation-message').innerHTML = message;
  20. $j( "#dialog-confirm" ).dialog({
  21. resizable: false,
  22. width: '50%',
  23. modal: true,
  24. buttons: {
  25. "Stop module": function() {
  26. $j( this ).dialog( "close" );
  27. },
  28. Cancel: function() {
  29. $j( this ).dialog( "close" );
  30. return false;
  31. }
  32. }
  33. });
  34. }else{
  35. //Directly shutdown module if It has no conflicting dependencies
  36. result = true;
  37. }
  38. }
  39. });
  40.  
  41. return result;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement