Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function validateDependencies(module){
- var moduleId = module.parentNode.parentNode.id;
- var path = "${pageContext.request.contextPath}/admin/modules/manage/checkdependencies.form";
- var result = false;
- path = path + "?moduleId=" + moduleId;
- alert(path);
- $j.ajax({
- type : "GET",
- url : path,
- dataType : "text",
- success : function(data) {
- if(data != ""){ //If conflicting dependencies found, then display confirmation message
- var message = '<openmrs:message code="Module.dependencyShutdownNotice" javaScriptEscape="true"/>';
- message += '<br/><br/>' + data;
- document.getElementById('dependency-confirmation-message').innerHTML = message;
- $j( "#dialog-confirm" ).dialog({
- resizable: false,
- width: '50%',
- modal: true,
- buttons: {
- "Stop module": function() {
- $j( this ).dialog( "close" );
- },
- Cancel: function() {
- $j( this ).dialog( "close" );
- return false;
- }
- }
- });
- }else{
- //Directly shutdown module if It has no conflicting dependencies
- result = true;
- }
- }
- });
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement