=== modified file 'local/in/dhis-web-dashboard/src/main/resources/struts.xml' --- local/in/dhis-web-dashboard/src/main/resources/struts.xml 2011-12-26 07:49:43 +0000 +++ local/in/dhis-web-dashboard/src/main/resources/struts.xml 2012-02-03 12:11:18 +0000 @@ -45,21 +45,17 @@ /main.vm - - /dhis-web-dashboard/graphicalAnalysisDataElementFront.vm - - /dhis-web-dashboard/menuWithTreeForGADataElement.vm - ../dhis-web-commons/ouwt/ouwt.js, - javascript/db.js, javascript/ga.js, javascript/hashtable.js, - javascript/date.js, javascript/gadataelement.js + /dhis-web-dashboard/graphicalAnalysisDataElementFront.vm + /dhis-web-dashboard/menuWithTreeForGADataElement.vm + ../dhis-web-commons/ouwt/ouwt.js,javascript/db.js,javascript/ga.js,javascript/hashtable.js,javascript/date.js,javascript/gadataelement.js css/StylesForTags.css - - /content.vm + /popup.vm + /dhis-web-dashboard/graphicalAnalysisDataElementResult.vm @@ -136,8 +132,7 @@ /popup.vm - - /dhis-web-dashboard/graphicalAnalysisIndicatorResult.vm + /dhis-web-dashboard/graphicalAnalysisIndicatorResult.vm === modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisDataElementResult.vm' --- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisDataElementResult.vm 2011-12-03 07:44:11 +0000 +++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisDataElementResult.vm 2012-02-03 12:11:18 +0000 @@ -189,7 +189,8 @@ iframeForChart.location.href = "generateChart1.action?currentChart="+chartTypeOptionValue+"&chartDisplayOption="+chartDisplayOptionValue; - getSortedList(chartDisplayOptionValue); + //getSortedList(chartDisplayOptionValue); + getSortedListDataElement(chartDisplayOptionValue); } function getSortedListForSummary() @@ -197,9 +198,10 @@ var chartDisplayOptionList = document.getElementById("chartDisplayOption"); var chartDisplayOptionValue = chartDisplayOptionList.options[ chartDisplayOptionList.selectedIndex ].value; - getSortedList(chartDisplayOptionValue); + //getSortedList(chartDisplayOptionValue); + getSortedListDataElement(chartDisplayOptionValue); } - +/* function getSortedList(chartDisplayOptionValue) { //var url = "getSortedData.action?chartDisplayOption=" + chartDisplayOptionValue; @@ -214,7 +216,8 @@ request.sendAsPost( params ); request.send( requestString ); } - +*/ +/* function getSortedListReceived(xmlObject) { var messages = xmlObject.getElementsByTagName("message"); @@ -230,7 +233,7 @@ document.getElementById("headingInfoId").innerHTML = document.getElementById("testId").value; } - +*/ //fucction for selected Button is ViewChart function exportToExcelFunction1( summaryOption ) === modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisIndicatorResult.vm' --- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisIndicatorResult.vm 2011-01-11 08:04:51 +0000 +++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisIndicatorResult.vm 2012-02-03 12:11:18 +0000 @@ -135,7 +135,8 @@ iframeForChart.location.href = "generateChart1.action?currentChart="+chartTypeOptionValue+"&chartDisplayOption="+chartDisplayOptionValue; - getSortedList(chartDisplayOptionValue); + //getSortedList(chartDisplayOptionValue); + getSortedListIndicator(chartDisplayOptionValue); } function getSortedListForSummary() @@ -143,10 +144,11 @@ var chartDisplayOptionList = document.getElementById("chartDisplayOption"); var chartDisplayOptionValue = chartDisplayOptionList.options[ chartDisplayOptionList.selectedIndex ].value; - getSortedList(chartDisplayOptionValue); + //getSortedList(chartDisplayOptionValue); + getSortedListIndicator(chartDisplayOptionValue); } - -function getSortedList(chartDisplayOptionValue) +/* +function getSortedListIndicator(chartDisplayOptionValue) { //var url = "getSortedData.action?chartDisplayOption=" + chartDisplayOptionValue; @@ -177,7 +179,7 @@ document.getElementById("headingInfoId").innerHTML = document.getElementById("testId").value; } - +*/ //fucction for selected Button is ViewChart function exportToExcelFunction1( summaryOption ) === modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisResult.vm' --- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisResult.vm 2010-09-28 11:08:55 +0000 +++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisResult.vm 2012-02-03 12:11:18 +0000 @@ -78,7 +78,7 @@ getSortedList(chartDisplayOptionValue); } - +/* function getSortedList(chartDisplayOptionValue) { //var url = "getSortedData.action?chartDisplayOption=" + chartDisplayOptionValue; @@ -109,7 +109,7 @@ document.getElementById("headingInfoId").innerHTML = document.getElementById("testId").value; } - +*/ //fucction for selected Button is ViewChart function exportToExcelFunction1( summaryOption ) === modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/db.js' --- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/db.js 2012-01-10 10:35:10 +0000 +++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/db.js 2012-02-03 12:11:18 +0000 @@ -11,11 +11,22 @@ function getOUDeatilsForAA(orgUnitIds) { + /* var url = "getOrgUnitDetails.action?orgUnitId=" + orgUnitIds; var request = new Request(); request.setResponseTypeXML( 'orgunit' ); request.setCallbackSuccess( getOUDetailsForAARecevied ); - request.send( url ); + request.send( url ); + */ + $.post("getOrgUnitDetails.action", + { + orgUnitId : orgUnitIds[0] + }, + function (data) + { + getOUDetailsForAARecevied(data); + },'xml'); + } function getOUDetailsForAARecevied(xmlObject) @@ -127,7 +138,18 @@ function getOUDetails(orgUnitIds) { - var request = new Request(); + + $.post("getOrgUnitDetails.action", + { + orgUnitId : orgUnitIds[0] + }, + function (data) + { + getOUDetailsRecevied(data); + },'xml'); + + /* + var request = new Request(); request.setResponseTypeXML( 'orgunit' ); request.setCallbackSuccess( getOUDetailsRecevied ); @@ -135,6 +157,7 @@ var params = "orgUnitId=" + orgUnitIds; request.sendAsPost( params ); request.send( requestString ); + */ } function getOUDetailsRecevied(xmlObject) @@ -508,11 +531,20 @@ function showPatientDetails( patientId ) { - + /* var request = new Request(); request.setResponseTypeXML( 'patient' ); request.setCallbackSuccess( patientReceived ); request.send( 'getPatientDetails.action?id=' + patientId ); + */ + $.post("getPatientDetails.action", + { + id : patientId + }, + function (data) + { + patientReceived(data); + },'xml'); } === modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ds.js' --- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ds.js 2011-11-22 07:20:09 +0000 +++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ds.js 2012-02-03 12:11:18 +0000 @@ -351,7 +351,7 @@ function getOrgUDetails(orgUnitIds) { - + /* var request = new Request(); request.setResponseTypeXML( 'orgunit' ); request.setCallbackSuccess( getOrgUDetailsRecevied ); @@ -360,17 +360,17 @@ var params = "orgUnitId=" + orgUnitIds; request.sendAsPost( params ); request.send( requestString ); - - /* + */ + $.post("getOrgUnitDetails.action", { - orgUnitId:orgUnitIds + orgUnitId:orgUnitIds[0] }, function (data) { getOrgUDetailsRecevied(data); },'xml'); - */ + //getReports(); === modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ga.js' --- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ga.js 2011-09-03 09:46:15 +0000 +++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ga.js 2012-02-03 12:11:18 +0000 @@ -185,3 +185,44 @@ return true; } // formValidations Function End + +function getSortedList(chartDisplayOptionValue) +{ + //var url = "getSortedData.action?chartDisplayOption=" + chartDisplayOptionValue; + /* + var request = new Request(); + request.setResponseTypeXML( 'messages' ); + request.setCallbackSuccess( getSortedListReceived ); + //request.send( url ); + + var requestString = "getSortedData.action"; + var params = "chartDisplayOption=" + chartDisplayOptionValue; + request.sendAsPost( params ); + request.send( requestString ); + */ + $.post("getSortedData.action", + { + chartDisplayOption : chartDisplayOptionValue + }, + function (data) + { + getSortedListReceived(data); + },'xml'); +} + +function getSortedListReceived(xmlObject) +{ + var messages = xmlObject.getElementsByTagName("message"); + document.getElementById("headingInfoId").innerHTML = ""; + document.getElementById("testId").value = ""; + + for ( var i = 0; i < messages.length; i++ ) + { + var hinfo = messages[ i ].firstChild.nodeValue; + //document.getElementById("headingInfoId").innerHTML += hinfo; + document.getElementById("testId").value += hinfo; + } + + document.getElementById("headingInfoId").innerHTML = document.getElementById("testId").value; +} + === modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/gadataelement.js' --- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/gadataelement.js 2012-01-10 10:35:10 +0000 +++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/gadataelement.js 2012-02-03 12:11:18 +0000 @@ -210,7 +210,7 @@ $.post("getWeeklyPeriod.action", { - //periodTypeName:weeklyPeriodTypeName, + //periodTypeName:weeklyPeriodTypeName, yearList:yearList }, function (data) @@ -663,3 +663,92 @@ } } } + +//Chart Display Option change for sorting +function getSortedListIndicator(chartDisplayOptionValue) +{ + //var url = "getSortedData.action?chartDisplayOption=" + chartDisplayOptionValue; + /* + var request = new Request(); + request.setResponseTypeXML( 'messages' ); + request.setCallbackSuccess( getSortedListIndicatorReceived ); + //request.send( url ); + + alert("inside sorting function"); + var requestString = "getSortedIndicatorData.action"; + var params = "chartDisplayOption=" + chartDisplayOptionValue; + request.sendAsPost( params ); + request.send( requestString ); + */ + //alert("inside sorting function"); + $.post("getSortedIndicatorData.action", + { + chartDisplayOption : chartDisplayOptionValue + }, + function (data) + { + getSortedListIndicatorReceived(data); + },'xml'); + + +} + +function getSortedListIndicatorReceived(xmlObject) +{ + var messages = xmlObject.getElementsByTagName("message"); + document.getElementById("headingInfoId").innerHTML = ""; + document.getElementById("testId").value = ""; + + for ( var i = 0; i < messages.length; i++ ) + { + var hinfo = messages[ i ].firstChild.nodeValue; + //document.getElementById("headingInfoId").innerHTML += hinfo; + document.getElementById("testId").value += hinfo; + } + + document.getElementById("headingInfoId").innerHTML = document.getElementById("testId").value; +} + +function getSortedListDataElement(chartDisplayOptionValue) +{ + //var url = "getSortedData.action?chartDisplayOption=" + chartDisplayOptionValue; + /* + var request = new Request(); + request.setResponseTypeXML( 'messages' ); + request.setCallbackSuccess( getSortedListReceived ); + //request.send( url ); + + var requestString = "getSortedDataElement.action"; + var params = "chartDisplayOption=" + chartDisplayOptionValue; + request.sendAsPost( params ); + request.send( requestString ); + */ + //alert("inside sorting function"); + $.post("getSortedDataElement.action", + { + chartDisplayOption : chartDisplayOptionValue + }, + function (data) + { + getSortedListDataElementReceived(data); + },'xml'); + +} + +function getSortedListDataElementReceived(xmlObject) +{ + var messages = xmlObject.getElementsByTagName("message"); + document.getElementById("headingInfoId").innerHTML = ""; + document.getElementById("testId").value = ""; + + for ( var i = 0; i < messages.length; i++ ) + { + var hinfo = messages[ i ].firstChild.nodeValue; + //document.getElementById("headingInfoId").innerHTML += hinfo; + document.getElementById("testId").value += hinfo; + } + + document.getElementById("headingInfoId").innerHTML = document.getElementById("testId").value; +} + + === modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/nr.js' --- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/nr.js 2011-05-18 11:12:17 +0000 +++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/nr.js 2012-02-03 12:11:18 +0000 @@ -26,7 +26,7 @@ function getOUDeatilsForNR( orgUnitIds ) { - + /* var request = new Request(); request.setResponseTypeXML( 'orgunit' ); request.setCallbackSuccess( getOUDetailsForNRRecevied ); @@ -36,19 +36,18 @@ var params = "orgUnitId=" + orgUnitIds+"&type=ta"; request.sendAsPost( params ); request.send( requestString ); - - - /* + */ + $.post("getOrgUnitDetails.action", { - orgUnitId:orgUnitIds, + orgUnitId:orgUnitIds[0], type:"ta" }, function (data) { getOUDetailsForNRRecevied(data); },'xml'); - */ + } function getOUDetailsForNRRecevied(xmlObject)