dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15862
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5859: local/in/ Data Analyser Module -- Update
------------------------------------------------------------
revno: 5859
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-02-03 17:41:18 +0530
message:
local/in/ Data Analyser Module -- Update
modified:
local/in/dhis-web-dashboard/src/main/resources/struts.xml
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisDataElementResult.vm
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisIndicatorResult.vm
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisResult.vm
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/ds.js
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/gadataelement.js
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/nr.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== 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 @@
<action name="graphicalAnalyserDataElement"
class="org.hisp.dhis.dataanalyser.ga.action.GenerateGraphicalAnalyserDataElementsFormAction">
<result name="success" type="velocity">/main.vm</result>
- <param name="page">
- /dhis-web-dashboard/graphicalAnalysisDataElementFront.vm</param>
- <param name="menu">
- /dhis-web-dashboard/menuWithTreeForGADataElement.vm</param>
- <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,
- javascript/db.js, javascript/ga.js, javascript/hashtable.js,
- javascript/date.js, javascript/gadataelement.js</param>
+ <param name="page">/dhis-web-dashboard/graphicalAnalysisDataElementFront.vm</param>
+ <param name="menu">/dhis-web-dashboard/menuWithTreeForGADataElement.vm</param>
+ <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/db.js,javascript/ga.js,javascript/hashtable.js,javascript/date.js,javascript/gadataelement.js</param>
<param name="stylesheets">css/StylesForTags.css</param>
<interceptor-ref name="organisationUnitTreeStack"/>
</action>
<action name="generateChartDataElement"
class="org.hisp.dhis.dataanalyser.ga.action.charts.GenerateChartDataElementAction">
- <!--<result name="success" type="velocity">/popup.vm</result>-->
- <result name="success" type="velocity">/content.vm</result>
+ <result name="success" type="velocity">/popup.vm</result>
+ <!--<result name="success" type="velocity">/content.vm</result>-->
<param name="page">/dhis-web-dashboard/graphicalAnalysisDataElementResult.vm</param>
<!--<result name="success" type="velocity">/dhis-web-dashboard/graphicalAnalysisDataElementResult.vm</result>-->
@@ -136,8 +132,7 @@
<action name="generateChartIndicator"
class="org.hisp.dhis.dataanalyser.ga.action.charts.GenerateChartIndicatorAction">
<result name="success" type="velocity">/popup.vm</result>
- <param name="page">
- /dhis-web-dashboard/graphicalAnalysisIndicatorResult.vm</param>
+ <param name="page">/dhis-web-dashboard/graphicalAnalysisIndicatorResult.vm</param>
<!--<result name="success" type="velocity">/dhis-web-dashboard/graphicalAnalysisDataElementResult.vm</result>-->
<param name="javascripts">
=== 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)