dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21406
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10124: Remove unused files.
------------------------------------------------------------
revno: 10124
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-03-11 10:26:57 +0700
message:
Remove unused files.
removed:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/StatisticalProgramDetailsReportAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramDetailsReport.vm
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/statisticalReport.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
=== removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/StatisticalProgramDetailsReportAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/StatisticalProgramDetailsReportAction.java 2012-12-17 02:46:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/StatisticalProgramDetailsReportAction.java 1970-01-01 00:00:00 +0000
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 2004-2009, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.hisp.dhis.caseentry.action.report;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-
-import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
-import org.hisp.dhis.paging.ActionPagingSupport;
-import org.hisp.dhis.patient.Patient;
-import org.hisp.dhis.program.ProgramStage;
-import org.hisp.dhis.program.ProgramStageInstance;
-import org.hisp.dhis.program.ProgramStageInstanceService;
-import org.hisp.dhis.program.ProgramStageService;
-
-/**
- * @author Chau Thu Tran
- *
- * @version StatisticalProgramDetailsReportAction.java 12:37:43 PM Dec 16, 2012
- * $
- */
-public class StatisticalProgramDetailsReportAction
- extends ActionPagingSupport<Patient>
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private ProgramStageService programStageService;
-
- public void setProgramStageService( ProgramStageService programStageService )
- {
- this.programStageService = programStageService;
- }
-
- private ProgramStageInstanceService programStageInstanceService;
-
- public void setProgramStageInstanceService( ProgramStageInstanceService programStageInstanceService )
- {
- this.programStageInstanceService = programStageInstanceService;
- }
-
- private OrganisationUnitService organisationUnitService;
-
- public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
- {
- this.organisationUnitService = organisationUnitService;
- }
-
- private OrganisationUnitSelectionManager selectionManager;
-
- public void setSelectionManager( OrganisationUnitSelectionManager selectionManager )
- {
- this.selectionManager = selectionManager;
- }
-
- private I18nFormat format;
-
- public void setFormat( I18nFormat format )
- {
- this.format = format;
- }
-
- // -------------------------------------------------------------------------
- // Input/output
- // -------------------------------------------------------------------------
-
- private Integer programStageId;
-
- public void setProgramStageId( Integer programStageId )
- {
- this.programStageId = programStageId;
- }
-
- private String startDate;
-
- public void setStartDate( String startDate )
- {
- this.startDate = startDate;
- }
-
- private String endDate;
-
- public void setEndDate( String endDate )
- {
- this.endDate = endDate;
- }
-
- private Integer status;
-
- public void setStatus( Integer status )
- {
- this.status = status;
- }
-
- private String facilityLB;
-
- public void setFacilityLB( String facilityLB )
- {
- this.facilityLB = facilityLB;
- }
-
- private Integer total;
-
- public void setTotal( Integer total )
- {
- this.total = total;
- }
-
- private ProgramStage programStage;
-
- public ProgramStage getProgramStage()
- {
- return programStage;
- }
-
- private List<ProgramStageInstance> programStageInstances = new ArrayList<ProgramStageInstance>();
-
- public List<ProgramStageInstance> getProgramStageInstances()
- {
- return programStageInstances;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- public String execute()
- throws Exception
- {
- OrganisationUnit organisationUnit = selectionManager.getSelectedOrganisationUnit();
-
- programStage = programStageService.getProgramStage( programStageId );
-
- Date sDate = format.parseDate( startDate );
-
- Date eDate = format.parseDate( endDate );
-
- // ---------------------------------------------------------------------
- // Get orgunitIds
- // ---------------------------------------------------------------------
-
- Collection<Integer> orgunitIds = new HashSet<Integer>();
-
- if ( facilityLB.equals( "selected" ) )
- {
- orgunitIds.add( organisationUnit.getId() );
- }
- else if ( facilityLB.equals( "childrenOnly" ) )
- {
- orgunitIds.addAll( organisationUnitService.getOrganisationUnitHierarchy().getChildren(
- organisationUnit.getId() ) );
- orgunitIds.remove( organisationUnit.getId() );
- }
- else
- {
- orgunitIds.addAll( organisationUnitService.getOrganisationUnitHierarchy().getChildren(
- organisationUnit.getId() ) );
- }
-
- this.paging = createPaging( total );
-
- programStageInstances = programStageInstanceService.getStatisticalProgramStageDetailsReport( programStage,
- orgunitIds, sDate, eDate, status, paging.getStartPos(), paging.getPageSize() );
-
- return SUCCESS;
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-03-08 09:15:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-03-11 03:26:57 +0000
@@ -275,19 +275,6 @@
ref="org.hisp.dhis.program.ProgramStageInstanceService" />
</bean>
- <bean
- id="org.hisp.dhis.caseentry.action.report.StatisticalProgramDetailsReportAction"
- class="org.hisp.dhis.caseentry.action.report.StatisticalProgramDetailsReportAction"
- scope="prototype">
- <property name="programStageService" ref="org.hisp.dhis.program.ProgramStageService" />
- <property name="programStageInstanceService"
- ref="org.hisp.dhis.program.ProgramStageInstanceService" />
- <property name="organisationUnitService"
- ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
- <property name="selectionManager"
- ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
- </bean>
-
<!-- Case Aggregation -->
<bean
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2013-03-05 08:35:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2013-03-11 03:26:57 +0000
@@ -374,14 +374,7 @@
<result name="xls" type="gridXlsResult" />
<param name="requiredAuthorities">F_GENERATE_STATISTICAL_PROGRAM_REPORT</param>
</action>
-
- <action name="statisticalProgramDetailsReport"
- class="org.hisp.dhis.caseentry.action.report.StatisticalProgramDetailsReportAction">
- <result name="success" type="velocity">/content.vm</result>
- <param name="page">/dhis-web-caseentry/statisticalProgramDetailsReport.vm</param>
- <param name="requiredAuthorities">F_GENERATE_STATISTICAL_PROGRAM_REPORT</param>
- </action>
-
+
<!-- i18n -->
<action name="i18n" class="org.hisp.dhis.caseentry.action.NoAction">
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/statisticalReport.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/statisticalReport.js 2013-03-08 09:22:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/statisticalReport.js 2013-03-11 03:26:57 +0000
@@ -36,80 +36,6 @@
}
-function statisticalProgramDetailsReport( programStageId, status, total )
-{
- showLoader();
- hideById( 'reportTbl' );
- hideById( 'detailsDiv' );
- contentDiv = 'detailsDiv';
- jQuery( "#detailsDiv" ).load( "statisticalProgramDetailsReport.action",
- {
- programStageId: programStageId,
- startDate: getFieldValue( 'startDate' ),
- endDate: getFieldValue( 'endDate' ),
- status:status,
- total: total,
- facilityLB: $('input[name=facilityLB]:checked').val()
- }, function()
- {
- setFieldValue('status',status);
- setFieldValue('total',total);
- var programStageTitle = "» " + getStatusString( status )
- + " - " + getFieldValue("programStageName");
- setInnerHTML('programStageTitleLbl', programStageTitle );
- setInnerHTML('totalLbl', i18n_total_result + ": " + total );
- showById('totalLbl');
- showById('programStageTitleLbl');
- showById( 'detailsDiv');
- hideLoader();
- });
-}
-
-function getStatusString( status )
-{
- switch(status){
- case 1: return i18n_completed;
- case 2: return i18n_incomplete;
- case 3: return i18n_scheduled;
- case 4: return i18n_overdue;
- default: return "";
- }
-}
-
-function loadDataEntry( programStageInstanceId )
-{
- hideById("detailsDiv");
- jQuery('#viewRecordsDiv' )
- .load( 'viewProgramStageRecords.action?programStageInstanceId=' + programStageInstanceId
- ,function(){
- showById('reportTitle');
- jQuery("#viewRecordsDiv :input" ).attr("disabled", true);
- jQuery("#viewRecordsDiv :input" ).datepicker("destroy");
- jQuery(".ui-combobox" ).hide();
- showById("viewRecordsDiv");
- hideById('inputCriteriaDiv');
- hideById('totalLbl');
- });
-}
-
-function entryFormContainerOnReady(){}
-
-function showCriteriaForm()
-{
- showById('reportForm');
-}
-
-function showStatisticalReport()
-{
- showById('reportTbl');
- hideById('detailsDiv');
- hideById('totalLbl');
- hideById('viewRecordsDiv');
- hideById('programStageTitleLbl');
- hideById('patientNameLbl');
- hideById('totalLbl');
-}
-
function detailsReport()
{
hideById('viewRecordsDiv');
=== removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramDetailsReport.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramDetailsReport.vm 2013-01-23 10:27:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/statisticalProgramDetailsReport.vm 1970-01-01 00:00:00 +0000
@@ -1,67 +0,0 @@
-<input type="hidden" id="programStageName" name="programStageName" value="$!encoder.jsEncode($programStage.displayName)">
-<table width="100%">
- <tr>
- <td>
- <table class="listTable gridTable">
- <col width="30"/>
- <col/>
- <col/>
- <col/>
- <col/>
- <col/>
- <col/>
-
- <thead>
- <tr>
- <th>#</th>
- <th>$i18n.getString( "orgunit" )</th>
- <th>$i18n.getString('full_name')</th>
- <th>$i18n.getString( "gender" )</th>
- <th>$i18n.getString( "date_of_birth" )</th>
- <th>$i18n.getString( "age" )</th>
- <th>$i18n.getString( "phone_number" )</th>
- <th>$i18n.getString( "due_date" )</th>
- <th>$i18n.getString( "report_date" )</th>
- </tr>
- </thead>
- <tbody>
- #foreach( $programStageInstance in $programStageInstances )
- #set( $patient = $programStageInstance.programInstance.patient )
- <tr>
- <td>
- #set( $nr = ( ( $paging.getCurrentPage() - 1 ) * $paging.pageSize ) + $velocityCount )
- $nr
- </td>
- <td>$!encoder.htmlEncode($!patient.organisationUnit.name)</td>
- <td>$!encoder.htmlEncode($patient.getFullName())</td>
- <td>$i18n.getString($!patient.gender)</td>
- <td>$format.formatDate( $!patient.birthDate)</td>
- <td>$!patient.getAge()</td>
- <td>$!patient.phoneNumber</td>
- <td>$format.formatDate($!programStageInstance.dueDate)</td>
- <td>
- #if($programStageInstance.executionDate)
- <a href="javascript:loadDataEntry($programStageInstance.id)">$format.formatDate($programStageInstance.executionDate)</a>
- #end
- </td>
- </tr>
- #end
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <td colspan="7">
- <p></p>
- <div class="paging-container">
- #parse( "/dhis-web-commons/paging/paging.vm" )
- </div>
- </td>
- </tr>
-</table>
-
-<script>
- jQuery(document).ready(function(){
- setTableStyles();
- });
-</script>
\ No newline at end of file