dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19949
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8922: Remove unused init-params in tabular report.
------------------------------------------------------------
revno: 8922
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-11-07 11:00:25 +0700
message:
Remove unused init-params in tabular report.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/TabularInitializeAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularInitialize.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-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/TabularInitializeAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/TabularInitializeAction.java 2012-09-03 19:53:34 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/TabularInitializeAction.java 2012-11-07 04:00:25 +0000
@@ -33,7 +33,6 @@
import java.util.List;
import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
@@ -80,13 +79,6 @@
// Output
// -------------------------------------------------------------------------
- private OrganisationUnit rootNode;
-
- public OrganisationUnit getRootNode()
- {
- return rootNode;
- }
-
private Collection<Program> programs;
public Collection<Program> getPrograms()
@@ -115,11 +107,6 @@
public String execute()
throws Exception
{
- Collection<OrganisationUnit> rootUnits = new ArrayList<OrganisationUnit>( organisationUnitService
- .getOrganisationUnitsAtLevel( 1 ) );
-
- rootNode = rootUnits.size() > 0 ? rootUnits.iterator().next() : new OrganisationUnit();
-
orgunitGroups = new ArrayList<OrganisationUnitGroup>( organisationUnitGroupService.getAllOrganisationUnitGroups() );
Collections.sort( orgunitGroups, IdentifiableObjectNameComparator.INSTANCE );
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularInitialize.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularInitialize.vm 2012-11-07 03:53:08 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularInitialize.vm 2012-11-07 04:00:25 +0000
@@ -8,7 +8,7 @@
{
"id": "${orgunit.id}" ,
"name": "$!encoder.jsonEncode( ${orgunit.name} )",
- "leaf": #if($orgunit.hasChild()) "false" #else "true" #end
+ "leaf": !$orgunit.hasChild()
}#if( $velocityCount < $programs.size() ),#end
#end
]