=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportParams.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportParams.java 2012-03-27 17:38:48 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportParams.java 2012-11-07 13:38:42 +0000 @@ -56,8 +56,6 @@ private Boolean paramReportingMonth; - private Boolean paramLeafParentOrganisationUnit; - private Boolean paramGrandParentOrganisationUnit; private Boolean paramParentOrganisationUnit; @@ -72,11 +70,10 @@ { } - public ReportParams( boolean paramReportingMonth, boolean paramLeafParentOrganisationUnit, - boolean paramGrandParentOrganisationUnit, boolean paramParentOrganisationUnit, boolean paramOrganisationUnit ) + public ReportParams( boolean paramReportingMonth, boolean paramGrandParentOrganisationUnit, + boolean paramParentOrganisationUnit, boolean paramOrganisationUnit ) { this.paramReportingMonth = paramReportingMonth; - this.paramLeafParentOrganisationUnit = paramLeafParentOrganisationUnit; this.paramGrandParentOrganisationUnit = paramGrandParentOrganisationUnit; this.paramParentOrganisationUnit = paramParentOrganisationUnit; this.paramOrganisationUnit = paramOrganisationUnit; @@ -91,11 +88,6 @@ return paramReportingMonth != null && paramReportingMonth; } - public boolean isParamLeafParentOrganisationUnit() - { - return paramLeafParentOrganisationUnit != null && paramLeafParentOrganisationUnit; - } - public boolean isParamGrandParentOrganisationUnit() { return paramGrandParentOrganisationUnit != null && paramGrandParentOrganisationUnit; @@ -118,7 +110,7 @@ public boolean isOrganisationUnitSet() { - return isParamLeafParentOrganisationUnit() || isParamGrandParentOrganisationUnit() || + return isParamGrandParentOrganisationUnit() || isParamParentOrganisationUnit() || isParamOrganisationUnit(); } @@ -142,19 +134,6 @@ @JsonProperty @JsonView( {DetailedView.class, ExportView.class} ) @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE ) - public Boolean getParamLeafParentOrganisationUnit() - { - return paramLeafParentOrganisationUnit; - } - - public void setParamLeafParentOrganisationUnit( Boolean paramLeafParentOrganisationUnit ) - { - this.paramLeafParentOrganisationUnit = paramLeafParentOrganisationUnit; - } - - @JsonProperty - @JsonView( {DetailedView.class, ExportView.class} ) - @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE ) public Boolean getParamGrandParentOrganisationUnit() { return paramGrandParentOrganisationUnit; === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2012-11-07 11:17:41 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2012-11-07 13:38:42 +0000 @@ -109,6 +109,7 @@ executeSql( "DROP TABLE maplegendsetindicator" ); executeSql( "DROP TABLE maplegendsetdataelement" ); executeSql( "ALTER TABLE dataelementcategoryoption drop column categoryid" ); + executeSql( "ALTER TABLE reporttable DROP column paramleafparentorganisationunit" ); executeSql( "ALTER TABLE reporttable DROP column dimension_type" ); executeSql( "ALTER TABLE reporttable DROP column dimensiontype" ); executeSql( "ALTER TABLE reporttable DROP column tablename" ); === modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java' --- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java 2012-09-24 12:52:15 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java 2012-11-07 13:38:42 +0000 @@ -283,21 +283,6 @@ } // --------------------------------------------------------------------- - // Leaf parent organisation unit report parameter - // --------------------------------------------------------------------- - - if ( reportTable.getReportParams() != null && - reportTable.getReportParams().isParamLeafParentOrganisationUnit() ) - { - OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId ); - reportTable.getRelativeUnits().addAll( - new ArrayList( organisationUnitService.getLeafOrganisationUnits( organisationUnitId ) ) ); - reportTable.setParentOrganisationUnit( organisationUnit ); - - log.info( "Leaf parent organisation unit: " + organisationUnit.getName() ); - } - - // --------------------------------------------------------------------- // Grand parent organisation unit report parameter // --------------------------------------------------------------------- === modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml' --- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml 2012-07-24 04:04:14 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml 2012-11-07 13:38:42 +0000 @@ -100,7 +100,6 @@ - === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/AddReportAction.java' --- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/AddReportAction.java 2012-09-24 05:42:39 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/AddReportAction.java 2012-11-07 13:38:42 +0000 @@ -196,7 +196,7 @@ ReportTable reportTable = reportTableService.getReportTable( reportTableId ); - ReportParams reportParams = new ReportParams( paramReportingMonth, false, false, false, paramOrganisationUnit ); + ReportParams reportParams = new ReportParams( paramReportingMonth, false, false, paramOrganisationUnit ); report.setName( name ); report.setReportTable( reportTable ); === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java' --- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java 2012-09-23 14:24:14 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java 2012-11-07 13:38:42 +0000 @@ -235,13 +235,6 @@ this.paramReportingMonth = paramReportingMonth; } - private boolean paramLeafParentOrganisationUnit; - - public void setParamLeafParentOrganisationUnit( boolean paramLeafParentOrganisationUnit ) - { - this.paramLeafParentOrganisationUnit = paramLeafParentOrganisationUnit; - } - private boolean paramGrandParentOrganisationUnit; public void setParamGrandParentOrganisationUnit( boolean paramGrandParentOrganisationUnit ) @@ -319,7 +312,6 @@ ReportParams reportParams = new ReportParams(); reportParams.setParamReportingMonth( paramReportingMonth ); - reportParams.setParamLeafParentOrganisationUnit( paramLeafParentOrganisationUnit ); reportParams.setParamGrandParentOrganisationUnit( paramGrandParentOrganisationUnit ); reportParams.setParamParentOrganisationUnit( paramParentOrganisationUnit ); reportParams.setParamOrganisationUnit( paramOrganisationUnit ); === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.vm' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.vm 2012-09-23 14:24:14 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.vm 2012-11-07 13:38:42 +0000 @@ -451,13 +451,10 @@   - -   -

- +   -   +

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.js' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.js 2012-06-10 15:27:52 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.js 2012-11-07 13:38:42 +0000 @@ -10,7 +10,7 @@ { if ( json.response == "input" ) { - setMessage( json.message ); + setHeaderDelayMessage( json.message ); return false; } else if ( json.response == "success" ) @@ -62,7 +62,7 @@ { if ( isChecked( "regression" ) && selectionTreeSelection.getSelected().length > 1 ) { - setMessage( i18n_cannot_include_more_organisation_unit_regression ); + setHeaderDelayMessage( i18n_cannot_include_more_organisation_unit_regression ); return false; } @@ -70,28 +70,28 @@ if ( !hasElements( "selectedDataElements" ) && !hasElements( "selectedIndicators" ) && !hasElements( "selectedDataSets" ) ) { - setMessage( i18n_must_select_at_least_one_indictor_data_element_data_set ); + setHeaderDelayMessage( i18n_must_select_at_least_one_indictor_data_element_data_set ); return false; } if ( !selectionTreeSelection.isSelected() && !hasElements( "selectedOrganisationUnitGroups" ) && !organisationUnitReportParamsChecked() ) { - setMessage( i18n_must_select_at_least_one_unit ); + setHeaderDelayMessage( i18n_must_select_at_least_one_unit ); return false; } if ( bothOrganisationUnitReportParamsChecked() ) { - setMessage( i18n_cannot_select_orgunit_and_parent_orgunit_param ); + setHeaderDelayMessage( i18n_cannot_select_orgunit_and_parent_orgunit_param ); return false; } if ( !hasElements( "selectedPeriods" ) && !relativePeriodsChecked() ) { - setMessage( i18n_must_select_at_least_one_period ); + setHeaderDelayMessage( i18n_must_select_at_least_one_period ); return false; } @@ -108,7 +108,7 @@ function organisationUnitReportParamsChecked() { - return ( isChecked( "paramLeafParentOrganisationUnit" ) || isChecked( "paramGrandParentOrganisationUnit" ) + return ( isChecked( "paramGrandParentOrganisationUnit" ) || isChecked( "paramParentOrganisationUnit" ) || isChecked( "paramOrganisationUnit" ) ); } @@ -116,10 +116,6 @@ { var count = 0; - if ( isChecked( "paramLeafParentOrganisationUnit" ) ) - { - count++; - } if ( isChecked( "paramGrandParentOrganisationUnit" ) ) { count++;