dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07284
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2059: changes made in india dashboard for group wise tabular analyis and added jquery
------------------------------------------------------------
revno: 2059
committer: Namrata
branch nick: trunk
timestamp: Sat 2010-09-04 18:37:00 +0530
message:
changes made in india dashboard for group wise tabular analyis and added jquery
modified:
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataCompleteness.js
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm
local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/action/GetDataElementsAction.java
local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ta/action/GenerateTabularAnalysisFormAction.java
local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ta/action/GenerateTabularAnalysisResultAction.java
local/in/dhis-web-dashboard/src/main/resources/META-INF/dhis/beans.xml
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisFront.vm
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/aa.js
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/nr.js
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ta.js
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menuWithTreeForGA.vm
local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/tabularAnalysisFront.vm
--
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 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataCompleteness.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataCompleteness.js 2010-07-25 09:58:51 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataCompleteness.js 2010-09-04 13:07:00 +0000
@@ -15,7 +15,7 @@
function displayCompleteness()
{
- var criteria = $( "input[name='criteria']:checked" ).val();
+ var criteria = $( "input[name='criteria']:checked" ).val();
var dataSetList = document.getElementById( "dataSetId" );
var dataSetId = dataSetList.options[ dataSetList.selectedIndex ].value;
var periodList = document.getElementById( "periodId" );
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm 2010-08-27 07:07:57 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataCompletenessForm.vm 2010-09-04 13:07:00 +0000
@@ -24,7 +24,7 @@
type="button" value="$i18n.getString( 'generate_workbook' )" style="width:150px"
onclick="window.location.href='getDataCompletenessWorkbook.action'"><br><br>
- <input type="radio" name="criteria" id="registrationRadio" value="registration" checked="checked" onclick="displayCompleteness()">
+ <input type="radio" name="criteria" id="registrationRadio" value="registration" checked="checked" onclick="displayCompleteness()">
<label for="registrationRadio">$i18n.getString( 'based_on_registration' )</label><br>
<input type="radio" name="criteria" id="compulsoryRadio" value="compulsory" onclick="displayCompleteness()">
<label for="compulsoryRadio">$i18n.getString( 'based_on_compulsory' )</label><br>
=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/action/GetDataElementsAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/action/GetDataElementsAction.java 2010-06-08 08:11:39 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/action/GetDataElementsAction.java 2010-09-04 13:07:00 +0000
@@ -145,6 +145,7 @@
if ( id == null || id == ALL )
{
dataElements = new ArrayList<DataElement>( dataElementService.getAllDataElements() );
+ System.out.println("id = "+id + " dataElements size = "+dataElements.size());
}
else
{
@@ -153,11 +154,13 @@
if ( dataElementGroup != null )
{
dataElements = new ArrayList<DataElement>( dataElementGroup.getMembers() );
+ System.out.println("dataElementGroup id = "+id + " dataElements size = "+dataElements.size());
} else
{
dataElements = new ArrayList<DataElement>();
}
}
+ System.out.println(" dataElements size = "+dataElements.size());
Iterator<DataElement> alldeIterator = dataElements.iterator();
while ( alldeIterator.hasNext() )
{
@@ -167,6 +170,7 @@
alldeIterator.remove();
}
}
+ System.out.println(" dataElements size = "+dataElements.size());
Collections.sort( dataElements, dataElementComparator );
displayPropertyHandler.handle( dataElements );
=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ta/action/GenerateTabularAnalysisFormAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ta/action/GenerateTabularAnalysisFormAction.java 2010-06-29 13:33:33 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ta/action/GenerateTabularAnalysisFormAction.java 2010-09-04 13:07:00 +0000
@@ -59,6 +59,8 @@
import org.hisp.dhis.period.comparator.PeriodComparator;
import com.opensymphony.xwork2.Action;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
public class GenerateTabularAnalysisFormAction
implements Action
@@ -96,6 +98,13 @@
this.organisationUnitService = organisationUnitService;
}
+ private OrganisationUnitGroupService organisationUnitGroupService;
+
+ public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
+ {
+ this.organisationUnitGroupService = organisationUnitGroupService;
+ }
+
// -------------------------------------------------------------------------
// Input & Output
// -------------------------------------------------------------------------
@@ -198,6 +207,13 @@
return periodNameList;
}
+ private List<OrganisationUnitGroup> orgUnitGroups;
+
+ public List<OrganisationUnitGroup> getOrgUnitGroups()
+ {
+ return orgUnitGroups;
+ }
+
public String execute()
throws Exception
{
@@ -262,6 +278,8 @@
/* Organisationunit Levels */
maxOrgUnitLevels = organisationUnitService.getNumberOfOrganisationalLevels();
+ orgUnitGroups = new ArrayList<OrganisationUnitGroup>( organisationUnitGroupService.getAllOrganisationUnitGroups() );
+
return SUCCESS;
}
=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ta/action/GenerateTabularAnalysisResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ta/action/GenerateTabularAnalysisResultAction.java 2010-08-31 11:27:36 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ta/action/GenerateTabularAnalysisResultAction.java 2010-09-04 13:07:00 +0000
@@ -310,27 +310,59 @@
else
{
selOrgUnit = organisationUnitService.getOrganisationUnit( Integer.parseInt( orgUnitListCB.get( 0 ) ) );
-
- selOUList = getChildOrgUnitTree( selOrgUnit );
-
- Iterator<OrganisationUnit> ouIterator = selOUList.iterator();
- while( ouIterator.hasNext() )
- {
- OrganisationUnit orgU = ouIterator.next();
- if( organisationUnitService.getLevelOfOrganisationUnit( orgU ) > orgUnitLevelCB )
+
+ System.out.println("slected group : "+ouRadio );
+
+ if( ouRadio.equalsIgnoreCase( "orgUnitGroupRadio" ) )
+ {
+ List<OrganisationUnit> orgUnitList1 = new ArrayList<OrganisationUnit>( organisationUnitService.getOrganisationUnitWithChildren( selOrgUnit.getId() ) );
+ System.out.println("ordunitlevelcb = "+orgUnitLevelCB);
+ OrganisationUnitGroup selOrgUnitGroup = organisationUnitGroupService.getOrganisationUnitGroup( orgUnitLevelCB );
+ selOUList = new ArrayList<OrganisationUnit>( selOrgUnitGroup.getMembers() );
+
+ selOUList.retainAll( orgUnitList1 );
+ List<OrganisationUnit> ouList = new ArrayList<OrganisationUnit>(selOUList);
+ int minLevel = organisationUnitService.getLevelOfOrganisationUnit( selOrgUnit );
+ //int maxLevel = organisationUnitService.getLevelOfOrganisationUnit( ouList.get( 0 ) );
+
+ Collections.sort( selOUList, new OrganisationUnitNameComparator() );
+ //displayPropertyHandler.handle( selOUList );
+ }
+ else
+ {
+ selOUList = getChildOrgUnitTree( selOrgUnit );
+
+ Iterator<OrganisationUnit> ouIterator = selOUList.iterator();
+ while( ouIterator.hasNext() )
{
- ouIterator.remove();
+ OrganisationUnit orgU = ouIterator.next();
+ if( organisationUnitService.getLevelOfOrganisationUnit( orgU ) > orgUnitLevelCB )
+ {
+ ouIterator.remove();
+ }
}
}
}
-
+ System.out.println("selectedoulebel = "+organisationUnitService.getLevelOfOrganisationUnit( selOrgUnit ));
int minOULevel = 1;
- minOULevel = organisationUnitService.getLevelOfOrganisationUnit( selOUList.get( 0 ) );
-
int maxOuLevel = 1;
- if( orgUnitLevelCB != null ) maxOuLevel = orgUnitLevelCB;
+ if( selOUList != null && selOUList.size() > 0 )
+ {
+ if(orgUnitLevelCB != null && ouRadio.equalsIgnoreCase("orgUnitGroupRadio") )
+ {
+ maxOuLevel = organisationUnitService.getLevelOfOrganisationUnit( selOUList.get( 0 ) );
+ }
+ else if(orgUnitLevelCB != null && ouRadio.equalsIgnoreCase("orgUnitLevelRadio") )
+ {
+ minOULevel = organisationUnitService.getLevelOfOrganisationUnit( selOUList.get( 0 ) );
+ }
+ }
+
+ if(orgUnitLevelCB != null && ouRadio.equalsIgnoreCase("orgUnitLevelRadio") ) maxOuLevel = orgUnitLevelCB;
+ else if(orgUnitLevelCB != null && ouRadio.equalsIgnoreCase("orgUnitGroupRadio") ) minOULevel = organisationUnitService.getLevelOfOrganisationUnit( selOrgUnit );
else maxOuLevel = minOULevel;
-
+
+ System.out.println("maxlevelou = "+maxOuLevel + " minoulevel = "+minOULevel);
int c1 = headerCol+1;
if( ouSelCB != null )
@@ -481,16 +513,18 @@
}
else
{
- for(int i = 1; i <= maxOuLevel-minOULevel+1; i++ )
- {
+ OrganisationUnit parentOu = ou;
+ for(int i = maxOuLevel-minOULevel+1; i >= minOULevel-1; i-- )
+ {
if( i == colCount )
{
sheet0.addCell( new Label( colCount, headerRow+1+rowCount, ou.getName(), getCellFormat2() ) );
}
else
{
- sheet0.addCell( new Label( i, headerRow+1+rowCount, " ", getCellFormat2() ) );
- }
+ parentOu = parentOu.getParent();
+ sheet0.addCell( new Label( i, headerRow+1+rowCount, parentOu.getName(), getCellFormat2() ) );
+ }
}
}
=== modified file 'local/in/dhis-web-dashboard/src/main/resources/META-INF/dhis/beans.xml'
--- local/in/dhis-web-dashboard/src/main/resources/META-INF/dhis/beans.xml 2010-08-31 11:27:36 +0000
+++ local/in/dhis-web-dashboard/src/main/resources/META-INF/dhis/beans.xml 2010-09-04 13:07:00 +0000
@@ -577,6 +577,9 @@
<property name="organisationUnitService">
<ref bean="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
</property>
+ <property name="organisationUnitGroupService">
+ <ref bean="org.hisp.dhis.organisationunit.OrganisationUnitGroupService"/>
+ </property>
</bean>
@@ -610,6 +613,9 @@
<property name="dataValueService">
<ref bean="org.hisp.dhis.datavalue.DataValueService"/>
</property>
+ <property name="organisationUnitGroupService">
+ <ref bean="org.hisp.dhis.organisationunit.OrganisationUnitGroupService"/>
+ </property>
</bean>
<!-- OrganisationUnit Profile -->
=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisFront.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisFront.vm 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisFront.vm 2010-09-04 13:07:00 +0000
@@ -1,206 +1,202 @@
-
<html>
- <head>
- <title>Graphical Analyser</title>
-
-
- <script>
+<head>
+<title>Graphical Analyser</title>
+<script>
// Global Variables
var selriRadioButton = "indicatorsRadio";
var selCategory = "";
var selFacility = "";
-
+
</script>
- </head>
- <body>
- <h1>$i18n.getString( "ga_graphical_analyser" )</h1>
- <hr />
- <form id="ChartGenerationForm" name="ChartGenerationForm" action="generateChartData.action" method="post" onsubmit="return formValidations()" target="chartWindow1">
- <table align="center" style=" border-collapse: collapse; margin-top: 0;" cellpadding="0" cellspacing="0" width="730" border=0>
- <colgroup>
- <col width="325">
- <col width="80">
- <col width="325">
- </colgroup>
- <tr>
- <td class="NormalB">
- <input type="radio" id="riRadio" name="riRadio" value="dataElementsRadio" onclick="riradioSelection(event)"> $i18n.getString( "ga_data_elements" )
-
- <input type="radio" id="riRadio" name="riRadio" value="indicatorsRadio" onclick="riradioSelection(event)" checked> $i18n.getString( "ga_indicators" )
- </td>
- <td class="NormalB"> </td>
- <td class="NormalB">
- <input type="checkbox" id="ougSetCB" name="ougSetCB" onchange="orgUnitGroupSetCB()"> OrgunitGroupwise Analysis
-
- <input type="checkbox" id="aggDataCB" name="aggDataCB" checked="true" disabled="true"> AggregatedData
- </td>
- </tr>
- <tr>
- <td class="NormalB"> </td>
- <td class="NormalB"> </td>
- <td class="NormalB"> </td>
- </tr>
- <tr>
- <td class="NormalB">$i18n.getString( "ga_filter_by_degroup" )<br>
- <select id="dataElementGroupId" name="dataElementGroupId" style="width:325px" onchange="getDataElements()" disabled>
- <option value="$ALL">[ Select DataElementGroup / All ]</option>
- #foreach ( $group in $dataElementGroups )
- <option value="$group.id" title="$group.name">$group.name</option>
- #end
- </select>
- </td>
- <td class="NormalB"> </td>
- <td class="NormalB">$i18n.getString( "compare_view" )<br>
- <select id="deSelection" name="deSelection" style="width:325px" onchange="deSelectionChangeFuntion(event)" disabled>
- <option value="dataelement" selected>DataElements</option>
- <option value="optioncombo">Options in DataElements</option>
- </select>
- </td>
- </tr>
- <tr>
- <td class="NormalB"> </td>
- <td class="NormalB"> </td>
- <td class="NormalB"> </td>
- </tr>
- <tr>
- <td class="NormalB">$i18n.getString( "ga_available_delist" )<br>
- <select multiple size="5" id="availableDataElements" name="availableDataElements" disabled style="width:325px; height:80px" ondblclick="moveSelectedById( 'availableDataElements', 'selectedDataElements' )">
- #foreach ( $element in $dataElements )
- <option value="$element.id" title="$element.name">$element.name</option>
- #end
- </select>
- </td>
- <td class="NormalB" align="center">
- <br />
- <input type="button" value=">" style="width:40px" onclick="moveSelectedById( 'availableDataElements', 'selectedDataElements' )"><br>
- <input type="button" value="<" style="width:40px" onclick="moveSelectedById( 'selectedDataElements', 'availableDataElements' )"><br>
- <input type="button" value=">>" style="width:40px" onclick="moveAllById( 'availableDataElements', 'selectedDataElements' )"><br>
- <input type="button" value="<<" style="width:40px" onclick="moveAllById( 'selectedDataElements', 'availableDataElements' )">
- </td>
- <td class="NormalB">
- $i18n.getString( "ga_selected_delist" )<br />
- <select multiple id="selectedDataElements" name="selectedDataElements" disabled style="width:325px; height:80px" ondblclick="moveSelectedById( 'selectedDataElements', 'availableDataElements' )">
- </select>
- </td>
- </tr>
- <tr>
- <td class="NormalB"> <br/></td>
- <td class="NormalB"> <br/></td>
- <td class="NormalB"> <br/></td>
- </tr>
- <tr>
- <td class="NormalB">$i18n.getString( "ga_filter_by_indicatorgroup" )<br>
- <select id="indicatorGroupId" name="indicatorGroupId" style="width:325px" onchange="getIndicators()">
- <option value="$ALL">[ Select IndicatorGroup / All ]</option>
- #foreach ( $group in $indicatorGroups )
- <option value="$group.id">$group.name</option>
- #end
- </select>
- </td>
- <td class="NormalB"> </td>
- <td class="NormalB"> </td>
- </tr>
- <tr>
- <td class="NormalB"> </td>
- <td class="NormalB"> </td>
- <td class="NormalB"> </td>
- </tr>
- <tr>
- <td class="NormalB">$i18n.getString( "ga_available_indicatorlist" )<br>
- <select multiple size="5" id="availableIndicators" name="availableIndicators" style="width:325px; height:80px" ondblclick="moveSelectedById( 'availableIndicators', 'selectedIndicators' )">
- #foreach ( $indicator in $indicators )
- <option value="$indicator.id">$indicator.name</option>
- #end
- </select>
- </td>
- <td class="NormalB" align="center">
- <br />
- <input type="button" value=">" style="width:40px" onclick="moveSelectedById( 'availableIndicators', 'selectedIndicators' )"><br>
- <input type="button" value="<" style="width:40px" onclick="moveSelectedById( 'selectedIndicators', 'availableIndicators' )"><br>
- <input type="button" value=">>" style="width:40px" onclick="moveAllById( 'availableIndicators', 'selectedIndicators' )"><br>
- <input type="button" value="<<" style="width:40px" onclick="moveAllById( 'selectedIndicators', 'availableIndicators' )">
- </td>
- <td class="NormalB">
- $i18n.getString( "ga_selected_indicatorlist" )<br />
- <select multiple id="selectedIndicators" name="selectedIndicators" style="width:325px; height:80px" ondblclick="moveSelectedById( 'selectedIndicators', 'availableIndicators' )">
- </select>
- </td>
- </tr>
- <tr>
- <td class="NormalB"> </td>
- <td class="NormalB"> </td>
- <td class="NormalB"> </td>
- </tr>
- <tr>
- <td class="NormalB">
- $i18n.getString( "ga_orgunitgroupset" )<br>
- <select name="orgUnitGroupSetListCB" id="orgUnitGroupSetListCB" style="width: 325px;" onchange="getOrgUnitGroups()" disabled>
- #foreach($organisationUnitGroupSet in $organisationUnitGroupSets)
- <option value="$organisationUnitGroupSet.id">$organisationUnitGroupSet.name</option>
- #end
- </select>
- <br>
- $i18n.getString( "ga_orgunit" )<br>
- <select name="orgUnitListCB" id="orgUnitListCB" multiple style="width: 325px;height: 100px" onchange="selectSingleOption()" ondblclick="remOUFunction()">
- </select>
- </td>
- <td class="NormalB" align="center"><input type="button" name="remOUButton" id="remOUButton" value=" Remove " onclick="remOUFunction()" /></td>
- <td class="NormalB" align="center">
- <table>
- <tr>
- <td class="NormalB">
- $i18n.getString( "ga_viewby" )<br>
- <select id="categoryLB" name="categoryLB" onchange="categoryChangeFunction(event)">
- <option value="period">Period</option>
- <option value="facility">OrganisationUnit</option>
- </select>
- <br /><br />
- </td>
- <td> </td>
- <td align="right" class="NormalB">
- $i18n.getString( "ga_facilityby" )<br>
- <select id="facilityLB" name="facilityLB" onchange="facilityChangeFunction(event)" disabled>
- <option value="children">Children</option>
- <option value="random">Selected</option>
- </select>
- <br /><br />
- </td>
- </tr>
- <tr>
- <td class="NormalB">
- $i18n.getString( "ga_from" )<br>
- <select id="sDateLB" name="sDateLB">
- #foreach($period in $monthlyPeriods)
- <option value="$period.id">$simpleDateFormat.format($period.startDate)</option>
- #end
- </select>
- <br /><br />
- </td>
- <td> </td>
- <td align="right" class="NormalB">
- $i18n.getString( "ga_to" )<br>
- <select id="eDateLB" name="eDateLB">
- #foreach($period in $monthlyPeriods)
- <option value="$period.id">$simpleDateFormat.format($period.endDate)</option>
- #end
- </select>
- <br /><br />
- </td>
- </tr>
- <tr>
- <td>
- <input type="submit" name="ViewChart" value="$i18n.getString( 'ga_viewchart' )" style="width: 120; height: 25; font-family:Arial; font-weight:bold; color:#000000" onclick="javascript:selButtonFunction('ViewChart')">
- </td>
- <td> </td>
- <td align="right">
- <input type="submit" name="ViewSummary" value="$i18n.getString( 'ga_viewsummary' )" style="width: 120; height: 25; font-family:Arial; font-weight:bold; color:#000000" onclick="javascript:selButtonFunction('ViewSummary')">
- </td>
- </tr>
- <input type="hidden" name="selectedButton" id="selectedButton">
- </table>
- </td>
- </tr>
- </table>
- </form>
- </body>
-</html>
\ No newline at end of file
+</head>
+<body>
+<h1>$i18n.getString( "ga_graphical_analyser" )</h1>
+<hr />
+<form id="ChartGenerationForm" name="ChartGenerationForm" action="generateChartData.action" method="post" onSubmit="return formValidations()" target="chartWindow1">
+ <table align="center" style=" border-collapse: collapse; margin-top: 0;" cellpadding="0" cellspacing="0" width="730" border=0>
+ <colgroup>
+ <col width="325">
+ <col width="80">
+ <col width="325">
+ </colgroup>
+ <tr>
+ <td class="NormalB"><input type="radio" id="riRadio" name="riRadio" value="dataElementsRadio" onclick="riradioSelection(event)">
+ $i18n.getString( "ga_data_elements" )
+
+
+ <input type="radio" id="riRadio" name="riRadio" value="indicatorsRadio" onClick="riradioSelection(event)" checked>
+ $i18n.getString( "ga_indicators" ) </td>
+ <td class="NormalB"> </td>
+ <td class="NormalB"><input type="checkbox" id="ougSetCB" name="ougSetCB" onChange="orgUnitGroupSetCB()">
+ OrgunitGroupwise Analysis
+
+ <input type="checkbox" id="aggDataCB" name="aggDataCB" checked="true" disabled="true">
+ AggregatedData </td>
+ </tr>
+ <tr>
+ <td class="NormalB"> </td>
+ <td class="NormalB"> </td>
+ <td class="NormalB"> </td>
+ </tr>
+ <tr>
+ <td class="NormalB">$i18n.getString( "ga_filter_by_degroup" )<br>
+ <select id="dataElementGroupId" name="dataElementGroupId" style="width:325px" onChange="getDataElements()" disabled>
+ <option value="$ALL">[ Select DataElementGroup / All ]</option>
+ #foreach ( $group in $dataElementGroups )
+ <option value="$group.id" title="$group.name">$group.name</option>
+ #end
+ </select>
+ </td>
+ <td class="NormalB"> </td>
+ <td class="NormalB">$i18n.getString( "compare_view" )<br>
+ <select id="deSelection" name="deSelection" style="width:325px" onChange="deSelectionChangeFuntion(event)" disabled>
+ <option value="dataelement" selected>DataElements</option>
+ <option value="optioncombo">Options in DataElements</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="NormalB"> </td>
+ <td class="NormalB"> </td>
+ <td class="NormalB"> </td>
+ </tr>
+ <tr>
+ <td class="NormalB">$i18n.getString( "ga_available_delist" )<br>
+ <select multiple size="5" id="availableDataElements" name="availableDataElements" disabled style="width:325px; height:80px" ondblclick="moveSelectedById( 'availableDataElements', 'selectedDataElements' )">
+ #foreach ( $element in $dataElements )
+ <option value="$element.id" title="$element.name">$element.name</option>
+ #end
+ </select>
+ </td>
+ <td class="NormalB" align="center"><br />
+ <input type="button" value=">" style="width:40px" onClick="moveSelectedById( 'availableDataElements', 'selectedDataElements' )">
+ <br>
+ <input type="button" value="<" style="width:40px" onClick="moveSelectedById( 'selectedDataElements', 'availableDataElements' )">
+ <br>
+ <input type="button" value=">>" style="width:40px" onClick="moveAllById( 'availableDataElements', 'selectedDataElements' )">
+ <br>
+ <input type="button" value="<<" style="width:40px" onClick="moveAllById( 'selectedDataElements', 'availableDataElements' )">
+ </td>
+ <td class="NormalB"> $i18n.getString( "ga_selected_delist" )<br />
+ <select multiple id="selectedDataElements" name="selectedDataElements" disabled style="width:325px; height:80px" ondblclick="moveSelectedById( 'selectedDataElements', 'availableDataElements' )">
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="NormalB"> <br/></td>
+ <td class="NormalB"> <br/></td>
+ <td class="NormalB"> <br/></td>
+ </tr>
+ <tr>
+ <td class="NormalB">$i18n.getString( "ga_filter_by_indicatorgroup" )<br>
+ <select id="indicatorGroupId" name="indicatorGroupId" style="width:325px" onChange="getIndicators()">
+ <option value="$ALL">[ Select IndicatorGroup / All ]</option>
+ #foreach ( $group in $indicatorGroups )
+ <option value="$group.id">$group.name</option>
+ #end
+
+ </select>
+ </td>
+ <td class="NormalB"> </td>
+ <td class="NormalB"> </td>
+ </tr>
+ <tr>
+ <td class="NormalB"> </td>
+ <td class="NormalB"> </td>
+ <td class="NormalB"> </td>
+ </tr>
+ <tr>
+ <td class="NormalB">$i18n.getString( "ga_available_indicatorlist" )<br>
+ <select multiple size="5" id="availableIndicators" name="availableIndicators" style="width:325px; height:80px" ondblclick="moveSelectedById( 'availableIndicators', 'selectedIndicators' )">
+ #foreach ( $indicator in $indicators )
+ <option value="$indicator.id">$indicator.name</option>
+ #end
+ </select>
+ </td>
+ <td class="NormalB" align="center"><br />
+ <input type="button" value=">" style="width:40px" onClick="moveSelectedById( 'availableIndicators', 'selectedIndicators' )">
+ <br>
+ <input type="button" value="<" style="width:40px" onClick="moveSelectedById( 'selectedIndicators', 'availableIndicators' )">
+ <br>
+ <input type="button" value=">>" style="width:40px" onClick="moveAllById( 'availableIndicators', 'selectedIndicators' )">
+ <br>
+ <input type="button" value="<<" style="width:40px" onClick="moveAllById( 'selectedIndicators', 'availableIndicators' )">
+ </td>
+ <td class="NormalB"> $i18n.getString( "ga_selected_indicatorlist" )<br />
+ <select multiple id="selectedIndicators" name="selectedIndicators" style="width:325px; height:80px" ondblclick="moveSelectedById( 'selectedIndicators', 'availableIndicators' )">
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="NormalB"> </td>
+ <td class="NormalB"> </td>
+ <td class="NormalB"> </td>
+ </tr>
+ <tr>
+ <td class="NormalB"> $i18n.getString( "ga_orgunitgroupset" )<br>
+ <select name="orgUnitGroupSetListCB" id="orgUnitGroupSetListCB" style="width: 325px;" onChange="getOrgUnitGroups()" disabled>
+ #foreach($organisationUnitGroupSet in $organisationUnitGroupSets)
+ <option value="$organisationUnitGroupSet.id">$organisationUnitGroupSet.name</option>
+ #end
+ </select>
+ <br>
+ $i18n.getString( "ga_orgunit" )<br>
+ <select name="orgUnitListCB" id="orgUnitListCB" multiple style="width: 325px;height: 100px" onChange="selectSingleOption()" ondblclick="remOUFunction()">
+ </select>
+ </td>
+ <td class="NormalB" align="center"><input type="button" name="remOUButton" id="remOUButton" value=" Remove " onClick="remOUFunction()" /></td>
+ <td class="NormalB" align="center"><table>
+ <tr>
+ <td class="NormalB"> $i18n.getString( "ga_viewby" )<br>
+ <select id="categoryLB" name="categoryLB" onChange="categoryChangeFunction(event)">
+ <option value="period">Period</option>
+ <option value="facility">OrganisationUnit</option>
+ </select>
+ <br />
+ <br />
+ </td>
+ <td> </td>
+ <td align="right" class="NormalB"> $i18n.getString( "ga_facilityby" )<br>
+ <select id="facilityLB" name="facilityLB" onChange="facilityChangeFunction(event)" disabled>
+ <option value="children">Children</option>
+ <option value="random">Selected</option>
+ </select>
+ <br />
+ <br />
+ </td>
+ </tr>
+ <tr>
+ <td class="NormalB"> $i18n.getString( "ga_from" )<br>
+ <select id="sDateLB" name="sDateLB">
+ #foreach($period in $monthlyPeriods)
+ <option value="$period.id">$simpleDateFormat.format($period.startDate)</option>
+ #end
+ </select>
+ <br />
+ <br />
+ </td>
+ <td> </td>
+ <td align="right" class="NormalB"> $i18n.getString( "ga_to" )<br>
+ <select id="eDateLB" name="eDateLB">
+ #foreach($period in $monthlyPeriods)
+ <option value="$period.id">$simpleDateFormat.format($period.endDate)</option>
+ #end
+ </select>
+ <br />
+ <br />
+ </td>
+ </tr>
+ <tr>
+ <td><input type="submit" name="ViewChart" value="$i18n.getString( 'ga_viewchart' )" style="width: 120; height: 25; font-family:Arial; font-weight:bold; color:#000000" onClick="javascript:selButtonFunction('ViewChart')">
+ </td>
+ <td> </td>
+ <td align="right"><input type="submit" name="ViewSummary" value="$i18n.getString( 'ga_viewsummary' )" style="width: 120; height: 25; font-family:Arial; font-weight:bold; color:#000000" onClick="javascript:selButtonFunction('ViewSummary')">
+ </td>
+ </tr>
+ <input type="hidden" name="selectedButton" id="selectedButton">
+ </table></td>
+ </tr>
+ </table>
+</form>
+</body>
+</html>
=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/aa.js'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/aa.js 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/aa.js 2010-09-04 13:07:00 +0000
@@ -2,7 +2,8 @@
// Indicator or Dataelement radio button changed function
function riradioSelection(evt)
{
- selriRadioButton = evt.target.value;
+ var selriRadioButton = $( "input[name='riRadio']:checked" ).val();
+
if(selriRadioButton == "dataElementsRadio")
{
document.ChartGenerationForm.indicatorGroupId.disabled = true;
=== 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 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/db.js 2010-09-04 13:07:00 +0000
@@ -167,9 +167,7 @@
var orgUnitGroupSetId = orgUnitGroupSetList.options[ orgUnitGroupSetList.selectedIndex ].value;
if ( orgUnitGroupSetId != null )
- {
- //var url = "getOrgUnitGroups.action?orgUnitGroupSetId=" + orgUnitGroupSetId;
-
+ {
var request = new Request();
request.setResponseTypeXML( 'orgunitgroup' );
request.setCallbackSuccess( getOrgUnitGroupsReceived );
=== 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 2010-08-31 11:27:36 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ds.js 2010-09-04 13:07:00 +0000
@@ -36,10 +36,11 @@
// Category ListBox Change function
function categoryChangeFunction(evt)
{
- selCategory = evt.target.value;
+ //selCategory = evt.target.value;
+ selCategory = $("select#categoryLB").val();
if(selCategory == "period")
{
- document.ChartGenerationForm.facilityLB.disabled = true;
+ $("#facilityLB").attr("disabled", "disabled");
var index = document.ChartGenerationForm.orgUnitListCB.options.length;
for(i=0;i<index;i++)
{
@@ -48,14 +49,14 @@
}
else
{
- document.ChartGenerationForm.facilityLB.disabled = false;
+ $('#facilityLB').removeAttr('disabled');
}
}// categoryChangeFunction end
//Facility ListBox Change Function
function facilityChangeFunction(evt)
{
- selFacility = evt.target.value;
+ selFacility = $("select#facilityLB").val();
if(selFacility == "children" || selFacility == "immChildren")
{
var index = document.ChartGenerationForm.orgUnitListCB.options.length;
=== 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 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ga.js 2010-09-04 13:07:00 +0000
@@ -6,12 +6,13 @@
var orgUnitList = document.getElementById( 'orgUnitListCB' );
if(document.getElementById( 'ougSetCB' ).checked)
{
- orgUnitGroupSetList.disabled = false;
+ $('#orgUnitGroupSetListCB').removeAttr('disabled');
+
getOrgUnitGroups();
}
else
{
- orgUnitGroupSetList.disabled = true;
+ $("#orgUnitGroupSetListCB").attr("disabled", "disabled");
}
clearList(orgUnitList);
}
@@ -43,26 +44,27 @@
// Category ListBox Change function
function categoryChangeFunction(evt)
{
- selCategory = evt.target.value;
+ selCategory = $("select#categoryLB").val();
+
if(selCategory == "period")
{
- document.ChartGenerationForm.facilityLB.disabled = true;
+ $("#facilityLB").attr("disabled", "disabled");
var index = document.ChartGenerationForm.orgUnitListCB.options.length;
- for(i=0;i<index;i++)
- {
+ for(i=0;i<index;i++)
+ {
document.ChartGenerationForm.orgUnitListCB.options[0] = null;
- }
+ }
}
else
{
- document.ChartGenerationForm.facilityLB.disabled = false;
+ $('#facilityLB').removeAttr('disabled');
}
}// categoryChangeFunction end
//Facility ListBox Change Function
function facilityChangeFunction(evt)
{
- selFacility = evt.target.value;
+ selFacility = $("select#facilityLB").val();
if(selFacility == "children")
{
var index = document.ChartGenerationForm.orgUnitListCB.options.length;
@@ -76,8 +78,10 @@
// Indicator or Dataelement radio button changed function
function riradioSelection(evt)
{
- selriRadioButton = evt.target.value;
- if(selriRadioButton == "dataElementsRadio")
+
+ //selriRadioButton = evt.toElement.value;
+ var criteria = $( "input[name='riRadio']:checked" ).val();
+ if(criteria == 'dataElementsRadio')
{
document.ChartGenerationForm.indicatorGroupId.disabled = true;
document.ChartGenerationForm.availableIndicators.disabled = true;
=== 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 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/nr.js 2010-09-04 13:07:00 +0000
@@ -6,17 +6,15 @@
if( ouSelCBId.checked )
{
- ouListCDId.disabled = false;
-
- clearList( ouLevelId );
- ouLevelId.disabled = true;
+ $('#orgUnitListCB').removeAttr('disabled');
+ clearList( ouLevelId );
+ $("#orgUnitLevelCB").attr("disabled", "disabled");
}
else
{
- ouLevelId.disabled = false;
-
- clearList( ouListCDId );
- ouListCDId.disabled = true;
+ $('#orgUnitLevelCB').removeAttr('disabled');
+ clearList( ouListCDId );
+ $("#orgUnitListCB").attr("disabled", "disabled");
}
if( selOrgUnitId != null && selOrgUnitId != "NONE" && selOrgUnitId != "")
=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ta.js'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ta.js 2010-08-31 11:27:36 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ta.js 2010-09-04 13:07:00 +0000
@@ -1,3 +1,39 @@
+function getOrgUnitGroups()
+{
+ var ouLevelId = document.getElementById( "orgUnitLevelCB" );
+
+ clearList( ouLevelId );
+
+ for(var i=0; i < orgUnitGroupIds.length; i++)
+ {
+
+ var option = document.createElement("option");
+ option.value = orgUnitGroupIds[i];
+ option.text = orgUnitGroupNames[i];
+ option.title = orgUnitGroupNames[i];
+ ouLevelId.add(option, null);
+ }
+}
+
+function ouradioSelection( evt )
+{
+ var selouRadioButton = evt.target.value;
+
+ var ouSelCBId = document.getElementById( "ouSelCB" );
+ if( ouSelCBId.checked )
+ {
+ return;
+ }
+
+ if( selouRadioButton == "orgUnitGroupRadio" )
+ {
+ getOrgUnitGroups();
+ }
+ else
+ {
+ ouSelCBChange();
+ }
+}
function ouSelCBChange()
{
@@ -7,20 +43,18 @@
if( ouSelCBId.checked )
{
- //alert("ouSelCBId.checked = "+ouSelCBId.checked);
- ouListCDId.disabled = false;
+ $('#orgUnitListCB').removeAttr('disabled');
clearList( ouLevelId );
- ouLevelId.disabled = true;
- document.getElementById("ViewReport").disabled = false;
+ $("#orgUnitLevelCB").attr("disabled", "disabled");
+ $('#ViewReport').removeAttr('disabled');
}
else
{
- //alert("ouSelCBId.checked = "+ouSelCBId.checked);
- ouLevelId.disabled = false;
-
+ $('#orgUnitLevelCB').removeAttr('disabled');
clearList( ouListCDId );
- ouListCDId.disabled = true;
+ $("#orgUnitListCB").attr("disabled", "disabled");
+
}
if( selOrgUnitId != null && selOrgUnitId != "NONE" && selOrgUnitId != "")
@@ -411,8 +445,16 @@
clearList( ouListCDId );
ouListCDId.options[ouListCDId.options.length] = new Option(orgUnitName,id,false,false);
-
- getorgUnitLevels( ouLevel, maxOULevel );
+ var selouRadioButton = $( "input[name='ouRadio']:checked" ).val();
+ if( selouRadioButton == "orgUnitGroupRadio" )
+ {
+ getOrgUnitGroups();
+ }
+ else
+ {
+ getorgUnitLevels( ouLevel, maxOULevel );
+ }
+
}
}
}
@@ -474,33 +516,33 @@
var periodTypeId = periodTypeList.options[ periodTypeList.selectedIndex ].value;
if( selectedServices.options.length <= 0 ) {
- alert("Please select DataElement/Indicator(s)"); return false;
+ alert("Please select DataElement/Indicator(s)");return false;
}
if( periodTypeId == yearlyPeriodTypeName )
{
if( yearLB.selectedIndex < 0 ) {
- alert("Please select Year(s)"); return false;
+ alert("Please select Year(s)");return false;
}
}
else
{
if( yearLB.selectedIndex < 0 ) {
- alert("Please select Year(s)"); return false;
+ alert("Please select Year(s)");return false;
}
if( periodLB.selectedIndex < 0 ) {
- alert("Please select Period(s)"); return false;
+ alert("Please select Period(s)");return false;
}
}
if( ouSelCB.checked)
{
if(orgUnitListCB.options.length <=0 ) {
- alert( "Please select OrgUnit(s)" ); return false;
+ alert( "Please select OrgUnit(s)" );return false;
}
}
else if( orgUnitLevelCB.selectedIndex < 0 ) {
- alert( "Please select OrgUnitLevel" ); return false;
+ alert( "Please select OrgUnitLevel" );return false;
}
orgUnitListCB.disabled = false;
=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menuWithTreeForGA.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menuWithTreeForGA.vm 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menuWithTreeForGA.vm 2010-09-04 13:07:00 +0000
@@ -15,8 +15,11 @@
<!-- The script that registeres selctions in the orgunit tree -->
<script type="text/javascript">
+selection.setListenerFunction( orgUnitHasBeenSelected );
+
function orgUnitHasBeenSelected( orgUnitIds )
-{
+{
+alert("inside orgUnitHasBeenSelected orgUnitIds = "+orgUnitIds + " document.getElementById( 'ougSetCB' ).checked = "+document.getElementById( 'ougSetCB' ).checked);
if(document.getElementById( 'ougSetCB' ).checked)
{
return;
@@ -31,8 +34,6 @@
}
}
-selection.setListenerFunction( orgUnitHasBeenSelected );
-
</script>
=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/tabularAnalysisFront.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/tabularAnalysisFront.vm 2010-06-04 11:50:05 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/tabularAnalysisFront.vm 2010-09-04 13:07:00 +0000
@@ -14,6 +14,16 @@
var monthNames = new Array("Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","Jan","Feb","Mar");
var quarterNames = new Array("Q1","Q2","Q3","Q4");
var halfYearNames = new Array("HY1","HY2");
+
+ var orgUnitGroupIds = new Array();
+ var orgUnitGroupNames = new Array();
+
+ #set( $count1 = 0 );
+ #foreach( $orgUnitGroup in $orgUnitGroups )
+ orgUnitGroupIds[$count1] = $orgUnitGroup.id;
+ orgUnitGroupNames[$count1] = '$orgUnitGroup.name';
+ #set( $count1 = $count1 + 1 );
+ #end
@@ -138,10 +148,13 @@
</td>
<td class="NormalB"> </td>
<td class="NormalB">
+
+ <input type="radio" id="ouRadio" name="ouRadio" value="orgUnitGroupRadio" onclick="ouradioSelection(event)"> OrgUnitGroups
+ <br>
+ <input type="radio" id="ouRadio" name="ouRadio" value="orgUnitLevelRadio" onclick="ouradioSelection(event)" checked> OrgUnit Levels
<br>
- OrgUnit Levels:<br>
<select name="orgUnitLevelCB" id="orgUnitLevelCB" size="7" style="width: 150px;">
- </select>
+ </select>
</td>
</tr>
</table>