dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12139
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3656: Reverted r 3648
------------------------------------------------------------
revno: 3656
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-05-19 10:12:45 +0200
message:
Reverted r 3648
removed:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowUpdateCaseAggregationFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggregationList.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/validationCriteriaList.vm
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowCaseAggregationConditionFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/DefineProgramListForValidationCriteriaAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramAttributeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addValidationCriteria.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggregation.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/commons.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/validationcriteria.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programsForValidationCriteriaAssociations.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramAttributeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateValidationCriteria.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/validationCriteria.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-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowCaseAggregationConditionFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowCaseAggregationConditionFormAction.java 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowCaseAggregationConditionFormAction.java 2011-05-19 08:12:45 +0000
@@ -65,6 +65,8 @@
// -------------------------------------------------------------------------
// Output
// -------------------------------------------------------------------------
+
+ private Integer id;
private List<PatientAttribute> patientAttributes;
@@ -78,6 +80,16 @@
// Getters && Setters
// -------------------------------------------------------------------------
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId( Integer id )
+ {
+ this.id = id;
+ }
+
public List<DataElementGroup> getDataElementGroups()
{
return dataElementGroups;
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowUpdateCaseAggregationFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowUpdateCaseAggregationFormAction.java 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/ShowUpdateCaseAggregationFormAction.java 1970-01-01 00:00:00 +0000
@@ -1,168 +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.patient.action.caseaggregation;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.hisp.dhis.caseaggregation.CaseAggregationCondition;
-import org.hisp.dhis.caseaggregation.CaseAggregationConditionService;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementGroup;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.dataelement.comparator.DataElementGroupNameComparator;
-import org.hisp.dhis.patient.PatientAttribute;
-import org.hisp.dhis.patient.PatientAttributeService;
-import org.hisp.dhis.patient.comparator.PatientAttributeComparator;
-import org.hisp.dhis.program.Program;
-import org.hisp.dhis.program.ProgramService;
-import org.hisp.dhis.program.comparator.ProgramNameComparator;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- * @version $ ShowUpdateCaseAggregationFormAction.java May 18, 2011 10:24:21 AM $
- *
- */
-public class ShowUpdateCaseAggregationFormAction
-implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- public DataElementService dataElementService;
-
- public ProgramService programService;
-
- private PatientAttributeService patientAttributeService;
-
- private CaseAggregationConditionService aggregationConditionService;
-
- // -------------------------------------------------------------------------
- // Input/Output
- // -------------------------------------------------------------------------
- private Integer id;
-
- private CaseAggregationCondition caseAggregation;
-
- private String description;
-
- private List<PatientAttribute> patientAttributes;
-
- private List<DataElementGroup> dataElementGroups;
-
- private List<DataElement> dataElements;
-
- private List<Program> programs;
-
- // -------------------------------------------------------------------------
- // Getters && Setters
- // -------------------------------------------------------------------------
-
- public List<DataElementGroup> getDataElementGroups()
- {
- return dataElementGroups;
- }
-
- public void setAggregationConditionService( CaseAggregationConditionService aggregationConditionService )
- {
- this.aggregationConditionService = aggregationConditionService;
- }
-
- public CaseAggregationCondition getCaseAggregation()
- {
- return caseAggregation;
- }
-
- public String getDescription()
- {
- return description;
- }
-
- public void setId( Integer id )
- {
- this.id = id;
- }
-
- public List<Program> getPrograms()
- {
- return programs;
- }
-
- public List<DataElement> getDataElements()
- {
- return dataElements;
- }
-
- public void setDataElementService( DataElementService dataElementService )
- {
- this.dataElementService = dataElementService;
- }
-
- public void setProgramService( ProgramService programService )
- {
- this.programService = programService;
- }
-
- public void setPatientAttributeService( PatientAttributeService patientAttributeService )
- {
- this.patientAttributeService = patientAttributeService;
- }
-
- public List<PatientAttribute> getPatientAttributes()
- {
- return patientAttributes;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- throws Exception
- {
- dataElementGroups = new ArrayList<DataElementGroup>( dataElementService.getAllDataElementGroups() );
- Collections.sort( dataElementGroups, new DataElementGroupNameComparator() );
-
- programs = new ArrayList<Program>( programService.getAllPrograms() );
- Collections.sort( programs, new ProgramNameComparator() );
-
- patientAttributes = new ArrayList<PatientAttribute>( patientAttributeService.getAllPatientAttributes() );
- Collections.sort( patientAttributes, new PatientAttributeComparator() );
-
- caseAggregation = aggregationConditionService.getCaseAggregationCondition( id );
- description = aggregationConditionService.getConditionDescription( caseAggregation.getAggregationExpression() );
-
-
- return SUCCESS;
- }
-}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/DefineProgramListForValidationCriteriaAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/DefineProgramListForValidationCriteriaAction.java 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/validation/DefineProgramListForValidationCriteriaAction.java 2011-05-19 08:12:45 +0000
@@ -55,7 +55,6 @@
// -------------------------------------------------------------------------
// Input && Output
// -------------------------------------------------------------------------
-
private Integer criteriaId;
private Integer[] programIds;
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2011-05-19 08:12:45 +0000
@@ -1074,24 +1074,6 @@
<ref bean="org.hisp.dhis.patient.PatientAttributeService" />
</property>
</bean>
-
- <bean
- id="org.hisp.dhis.patient.action.caseaggregation.ShowUpdateCaseAggregationFormAction"
- class="org.hisp.dhis.patient.action.caseaggregation.ShowUpdateCaseAggregationFormAction"
- scope="prototype">
- <property name="dataElementService">
- <ref bean="org.hisp.dhis.dataelement.DataElementService" />
- </property>
- <property name="programService">
- <ref bean="org.hisp.dhis.program.ProgramService" />
- </property>
- <property name="patientAttributeService">
- <ref bean="org.hisp.dhis.patient.PatientAttributeService" />
- </property>
- <property name="aggregationConditionService">
- <ref bean="org.hisp.dhis.caseaggregation.CaseAggregationConditionService" />
- </property>
- </bean>
<bean
id="org.hisp.dhis.patient.action.caseaggregation.UpdateCaseAggregationConditionAction"
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2011-05-19 08:12:45 +0000
@@ -974,23 +974,32 @@
<result name="success" type="velocity">/content.vm</result>
<param name="page">/dhis-web-maintenance-patient/addCaseAggregation.vm</param>
</action>
-
+
<action name="showUpdateCaseAggregationForm"
- class="org.hisp.dhis.patient.action.caseaggregation.ShowUpdateCaseAggregationFormAction">
+ class="org.hisp.dhis.patient.action.caseaggregation.ShowCaseAggregationConditionFormAction">
+ <result name="success" type="chain">updateCaseAggregationFormChain
+ </result>
+ </action>
+
+ <action name="updateCaseAggregationFormChain"
+ class="org.hisp.dhis.patient.action.caseaggregation.GetCaseAggregationConditionAction">
<result name="success" type="velocity">/content.vm</result>
<param name="page">/dhis-web-maintenance-patient/updateCaseAggregation.vm</param>
+ <param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
+ <param name="javascripts">javascript/commons.js,
+ javascript/caseaggregation.js</param>
</action>
<action name="addCaseAggregation"
class="org.hisp.dhis.patient.action.caseaggregation.AddCaseAggregationConditionAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="success" type="redirect">caseAggregation.action
+ </result>
</action>
<action name="updateCaseAggregation"
class="org.hisp.dhis.patient.action.caseaggregation.UpdateCaseAggregationConditionAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="success" type="redirect">caseAggregation.action
+ </result>
</action>
<action name="removeCaseAggregation"
@@ -1041,32 +1050,30 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-patient/validationCriteria.vm</param>
<param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
- <param name="javascripts">javascript/commons.js,javascript/validationcriteria.js</param>
- </action>
-
- <action name="validationCriteriaList"
- class="org.hisp.dhis.patient.action.validation.GetValidationCriteriaListAction">
- <result name="success" type="velocity">/content.vm</result>
- <param name="page">/dhis-web-maintenance-patient/validationCriteriaList.vm</param>
+ <param name="javascripts">javascript/validationcriteria.js</param>
</action>
<action name="showAddValidationCriteriaForm" class="org.hisp.dhis.patient.action.NoAction">
- <result name="success" type="velocity">/content.vm</result>
+ <result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-patient/addValidationCriteria.vm</param>
+ <param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
+ <param name="javascripts">javascript/validationcriteria.js</param>
<param name="requiredAuthorities">F_VALIDATIONCRITERIA_ADD</param>
</action>
<action name="addValidationCriteria"
class="org.hisp.dhis.patient.action.validation.AddValidationCriteriaAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="success" type="redirect">validationCriteria.action
+ </result>
<param name="requiredAuthorities">F_VALIDATIONCRITERIA_ADD</param>
</action>
<action name="showUpdateValidationCriteriaForm"
class="org.hisp.dhis.patient.action.validation.GetValidationCriteriaAction">
- <result name="success" type="velocity">/content.vm</result>
+ <result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-patient/updateValidationCriteria.vm</param>
+ <param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
+ <param name="javascripts">javascript/validationcriteria.js</param>
<param name="requiredAuthorities">F_VALIDATIONCRITERIA_UPDATE</param>
</action>
@@ -1078,8 +1085,8 @@
<action name="updateValidationCriteria"
class="org.hisp.dhis.patient.action.validation.UpdateValidationCriteriaAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="success" type="redirect">validationCriteria.action
+ </result>
<param name="requiredAuthorities">F_VALIDATIONCRITERIA_UPDATE</param>
</action>
@@ -1100,15 +1107,17 @@
<action name="showProgramsForValidationCriteriaForm"
class="org.hisp.dhis.patient.action.validation.GetProgramListForValidationCriteriaAction">
- <result name="success" type="velocity">/content.vm</result>
+ <result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-patient/programsForValidationCriteriaAssociations.vm</param>
+ <param name="javascripts">
+ ,javascript/program.js</param>
<param name="requiredAuthorities">F_PROGRAM_UPDATE</param>
</action>
<action name="defineProgramsForValidationCriteria"
class="org.hisp.dhis.patient.action.validation.DefineProgramListForValidationCriteriaAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="success" type="redirect">
+ validationCriteria.action</result>
<param name="requiredAuthorities">F_PROGRAM_UPDATE</param>
</action>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm 2011-05-19 08:12:45 +0000
@@ -1,17 +1,11 @@
<script>
jQuery(document).ready( function(){
-
- jQuery('#description').focus();
-
validation( 'addCaseAggregationForm', function(form){
- addCaseAggregation();
+ form.submit();
});
});
</script>
-
-<input type="button" value="$i18n.getString( 'back' )" onclick="javascript:onClickBackBtn();" style="width:10em">
-<p></p>
-
+
<h3>$i18n.getString( "add_case_aggregation_condition" )</h3>
<form id="addCaseAggregationForm" action="addCaseAggregation.action" method="post" >
@@ -211,3 +205,9 @@
</table>
</form>
+
+<script>
+ byId('description').focus();
+ getAggDataElements();
+ getProgramStages();
+</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramAttributeForm.vm 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramAttributeForm.vm 2011-05-19 08:12:45 +0000
@@ -85,6 +85,7 @@
<p>
<input type="submit" value="$i18n.getString( 'add' )" style="width:10em"/>
+ <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='programAttribute.action'" style="width:10em"/>
</p>
</form>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addValidationCriteria.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addValidationCriteria.vm 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addValidationCriteria.vm 2011-05-19 08:12:45 +0000
@@ -1,19 +1,16 @@
<script>
- jQuery('#validationCriteriaForm').ready(
+ jQuery(document).ready(
function()
{
validation( 'validationCriteriaForm', function( form ){
- addValidationCriteria();
+ form.submit();
});
checkValueIsExist( "name", "validateValidationCriteria.action");
}
);
</script>
-
-<input type="button" value="$i18n.getString( 'back' )" onclick="javascript:onClickBackToCriteriaBtn();" style="width:10em">
-<p></p>
-
+
<h3>$i18n.getString( "add_validation_criteria" )</h3>
<form id="validationCriteriaForm" action="addValidationCriteria.action" method="post" >
<table>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggregation.vm 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggregation.vm 2011-05-19 08:12:45 +0000
@@ -1,10 +1,65 @@
-<div id='caseAggregationList'>
- #parse( "/dhis-web-maintenance-patient/caseAggregationList.vm" )
-</div>
-
-#parse( "/dhis-web-commons/loader/loader.vm" )
-
-<div id='editCaseAggregationForm'></div>
+<h3>$i18n.getString( 'beneficiary_aggregation_query_builder' )</h3>
+
+<table class="mainPageTable">
+ <tr>
+ <td style="vertical-align:top">
+
+ <table class="listTable">
+ <col>
+ <col width="20">
+ <col width="20">
+ <col width="20">
+ <tr>
+ <td></td>
+ <td colspan="3" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddCaseAggregationForm.action'" style="width:70px"></td>
+ </tr>
+ <tr>
+ <th>$i18n.getString( "name" )</th>
+ <th colspan="3">$i18n.getString( "operations" )</th>
+ </tr>
+
+ <tbody id="list">
+ #foreach( $aggregationCondition in $aggregationConditions )
+ <tr id="tr${aggregationCondition.id}">
+
+ <td>$encoder.htmlEncode( $aggregationCondition.description )</td>
+
+ <td style="text-align:center">
+ <a href="showUpdateCaseAggregationForm.action?id=$aggregationCondition.id" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a>
+ </td>
+
+ <td style="text-align:center">
+ <a href="javascript:removeCaseAggregation( '$aggregationCondition.id', '$encoder.jsEncode( $aggregationCondition.description )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a>
+ </td>
+
+ <td style="text-align:center">
+ <a href="javascript:showCaseAggregationDetails( $aggregationCondition.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a>
+ </td>
+
+ </tr>
+ #end
+
+ </tbody>
+
+ </table>
+ </td>
+ <td style="width:20em; padding-left:2em; vertical-align:top">
+
+ <div id="detailsArea" style="display:none">
+ <div style="float:right">
+ <a href="javascript:hideDetails()" title="$i18n.getString( "hide_details" )"><img src="../images/close.png" alt="$i18n.getString( "hide_details" )"></a>
+ </div>
+ <p><label>$i18n.getString( "id" ):</label><br><span id="idField"></span></p>
+ <p><label>$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
+ <p><label>$i18n.getString( "operator" ):</label><br><span id="operatorField"></span></p>
+ <p><label>$i18n.getString( "aggregationDataElement" ):</label><br><span id="aggregationDataElementField"></span></p>
+ <p><label>$i18n.getString( "optionCombo" ):</label><br><span id="optionComboField"></span></p>
+ <p><label>$i18n.getString( "aggregationExpression" ):</label><br><span id="aggregationExpressionField"></span></p>
+ </div>
+
+ </td>
+ </tr>
+</table>
<script type="text/javascript">
var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_patient_attribute" ) , "'" )';
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggregationList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggregationList.vm 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggregationList.vm 1970-01-01 00:00:00 +0000
@@ -1,80 +0,0 @@
-<h3>$i18n.getString( 'beneficiary_aggregation_query_builder' )</h3>
-
-<table class="mainPageTable">
- <tr>
- <td style="vertical-align:top">
-
- <table class="listTable">
- <col>
- <col width="20">
- <col width="20">
- <col width="20">
- <tr>
- <td></td>
- <td colspan="3" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="javascript:showAddCaseAggregationForm()" style="width:70px"></td>
- </tr>
- <tr>
- <th>$i18n.getString( "name" )</th>
- <th colspan="3">$i18n.getString( "operations" )</th>
- </tr>
-
- <tbody id="list">
- #foreach( $aggregationCondition in $aggregationConditions )
- #set( $mark = false )
- <tr id="tr${aggregationCondition.id}" #alternate( $mark )>
-
- <td>$encoder.htmlEncode( $aggregationCondition.description )</td>
-
- <td style="text-align:center">
- <a href="javascript:showUpdateCaseAggregationForm('$aggregationCondition.id')" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a>
- </td>
-
- <td style="text-align:center">
- <a href="javascript:removeCaseAggregation( '$aggregationCondition.id', '$encoder.jsEncode( $aggregationCondition.description )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a>
- </td>
-
- <td style="text-align:center">
- <a href="javascript:showCaseAggregationDetails( $aggregationCondition.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a>
- </td>
-
- </tr>
- #set( $mark = !$mark)
- #end
-
- </tbody>
-
- </table>
- </td>
- <td style="width:20em; padding-left:2em; vertical-align:top">
-
- <div id="detailsArea" style="display:none">
- <div style="float:right">
- <a href="javascript:hideDetails()" title="$i18n.getString( "hide_details" )"><img src="../images/close.png" alt="$i18n.getString( "hide_details" )"></a>
- </div>
- <p><label>$i18n.getString( "id" ):</label><br><span id="idField"></span></p>
- <p><label>$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
- <p><label>$i18n.getString( "operator" ):</label><br><span id="operatorField"></span></p>
- <p><label>$i18n.getString( "aggregationDataElement" ):</label><br><span id="aggregationDataElementField"></span></p>
- <p><label>$i18n.getString( "optionCombo" ):</label><br><span id="optionComboField"></span></p>
- <p><label>$i18n.getString( "aggregationExpression" ):</label><br><span id="aggregationExpressionField"></span></p>
- </div>
-
- </td>
- </tr>
-</table>
-
-<script type="text/javascript">
- var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_patient_attribute" ) , "'" )';
- var i18n_adding_patient_atttibute_failed = '$encoder.jsEscape( $i18n.getString( "adding_patient_attribute_failed" ), "'")';
- var i18n_updating_house_hold_failed = '$encoder.jsEscape( $i18n.getString( "updating_patient_attribute_failed" ), "'")';
- var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
- var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
- var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
- var i18n_number = '$encoder.jsEscape( $i18n.getString( "number" ) , "'")';
- var i18n_yes_no = '$encoder.jsEscape( $i18n.getString( "yes_no" ) , "'")';
- var i18n_text = '$encoder.jsEscape( $i18n.getString( "text" ) , "'")';
- var i18n_date = '$encoder.jsEscape( $i18n.getString( "date" ) , "'")';
- var i18n_combo = '$encoder.jsEscape( $i18n.getString( "combo" ) , "'")';
- var i18n_processing = '$encoder.jsEscape( $i18n.getString( "processing" ) , "'")';
- var i18n_done = '$encoder.jsEscape( $i18n.getString( "done" ) , "'")';
-</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js 2011-05-19 08:12:45 +0000
@@ -206,91 +206,4 @@
{
byId('aggregationDescription').innerHTML = data;
},'html');
-}
-
-// -----------------------------------------------------------------------------
-// Add Case Aggregation
-// -----------------------------------------------------------------------------
-
-function showAddCaseAggregationForm()
-{
- hideById('caseAggregationList');
- jQuery('#loaderDiv').show();
- jQuery('#editCaseAggregationForm').load('showAddCaseAggregationForm.action',
- {
- }, function()
- {
- showById('editCaseAggregationForm');
- jQuery('#loaderDiv').hide();
- });
-}
-
-function addCaseAggregation()
-{
- $.ajax({
- type: "POST",
- url: 'addCaseAggregation.action',
- data: getParamsForDiv('addCaseAggregationForm'),
- success: function( json ) {
- if( json.response == 'success')
- {
- onClickBackBtn();
- }
- }
- });
-
- return false;
-}
-
-// -----------------------------------------------------------------------------
-// Update Case Aggregation
-// -----------------------------------------------------------------------------
-
-function showUpdateCaseAggregationForm( caseAggregationId )
-{
- hideById('caseAggregationList');
- jQuery('#loaderDiv').show();
- jQuery('#editCaseAggregationForm').load('showUpdateCaseAggregationForm.action',
- {
- id:caseAggregationId
- }, function()
- {
- showById('editCaseAggregationForm');
- jQuery('#loaderDiv').hide();
- });
-}
-
-function updateCaseAggregation()
-{
- $.ajax({
- type: "POST",
- url: 'updateCaseAggregation.action',
- data: getParamsForDiv('updateCaseAggregationForm'),
- success: function( json ) {
- if( json.response == 'success')
- {
- onClickBackBtn();
- }
- }
- });
-
- return false;
-}
-
-// ------------------------------------------------------------------
-// Click Back button
-// ------------------------------------------------------------------
-
-function onClickBackBtn()
-{
- hideById('editCaseAggregationForm');
- jQuery('#loaderDiv').show();
- jQuery('#caseAggregationList').load('caseAggregationList.action',
- {
- }, function()
- {
- showById('caseAggregationList');
- jQuery('#loaderDiv').hide();
- });
-}
-
+}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/commons.js 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/commons.js 2011-05-19 08:12:45 +0000
@@ -106,17 +106,11 @@
{
for ( var i in jQuery(this).val() )
{
- if( jQuery(this).val()[i] != null )
- {
- params += elementId + "="+ htmlEncode(jQuery(this).val()[i]) + "&";
- }
+ params += elementId + "="+ jQuery(this).val()[i] + "&";
}
}else
{
- if( jQuery(this).val() != null )
- {
- params += elementId + "="+ htmlEncode(jQuery(this).val()) + "&";
- }
+ params += elementId + "="+ jQuery(this).val() + "&";
}
}
});
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/validationcriteria.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/validationcriteria.js 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/validationcriteria.js 2011-05-19 08:12:45 +0000
@@ -44,7 +44,6 @@
// ----------------------------------------------------------------------------------------
// Show div to Add or Update Validation-Criteria
// ----------------------------------------------------------------------------------------
-
function showDivValue(){
var propertyName = byId('property').value;
hideDiv();
@@ -74,126 +73,4 @@
function fillValue( value ){
byId('value').value = value;
-}
-
-// -----------------------------------------------------------------------------
-// Add Validation Criteria
-// -----------------------------------------------------------------------------
-
-function showAddValidationCriteriaForm()
-{
- hideById('validationCriteriaList');
- jQuery('#loaderDiv').show();
- jQuery('#editValidationCriteriaForm').load('showAddValidationCriteriaForm.action',
- {
- }, function()
- {
- showById('editValidationCriteriaForm');
- jQuery('#loaderDiv').hide();
- });
-}
-
-function addValidationCriteria()
-{
- $.ajax({
- type: "POST",
- url: 'addValidationCriteria.action',
- data: getParamsForDiv('validationCriteriaForm'),
- success: function( json ) {
- if( json.response == 'success')
- {
- onClickBackToCriteriaBtn();
- }
- }
- });
-
- return false;
-}
-
-// -----------------------------------------------------------------------------
-// Update Validation Criteria
-// -----------------------------------------------------------------------------
-
-function showUpdateValidationCriteriaForm( criteriaId )
-{
- hideById('validationCriteriaList');
- jQuery('#loaderDiv').show();
- jQuery('#editValidationCriteriaForm').load('showUpdateValidationCriteriaForm.action',
- {
- id:criteriaId
- }, function()
- {
- showById('editValidationCriteriaForm');
- jQuery('#loaderDiv').hide();
- });
-}
-
-function updateValidationCriteria()
-{
- $.ajax({
- type: "POST",
- url: 'updateValidationCriteria.action',
- data: getParamsForDiv('validationCriteriaForm'),
- success: function( json ) {
- if( json.response == 'success')
- {
- onClickBackToCriteriaBtn();
- }
- }
- });
-
- return false;
-}
-
-// ------------------------------------------------------------------
-// Assign Validation Criteria for programs
-// ------------------------------------------------------------------
-
-function showProgramsForValidationCriteriaForm( validationId )
-{
- hideById('validationCriteriaList');
- jQuery('#loaderDiv').show();
- jQuery('#editValidationCriteriaForm').load('showProgramsForValidationCriteriaForm.action',
- {
- criteriaId:validationId
- }, function()
- {
- showById('editValidationCriteriaForm');
- jQuery('#loaderDiv').hide();
- });
-}
-
-function defineProgramsForValidationCriteria()
-{
- $.ajax({
- type: "POST",
- url: 'defineProgramsForValidationCriteria.action',
- data: getParamsForDiv('assignValidationCriteriaForm'),
- success: function( json ) {
- if( json.response == 'success')
- {
- onClickBackToCriteriaBtn();
- }
- }
- });
-
- return false;
-}
-
-
-// ------------------------------------------------------------------
-// Click Back button
-// ------------------------------------------------------------------
-
-function onClickBackToCriteriaBtn()
-{
- hideById('editValidationCriteriaForm');
- jQuery('#loaderDiv').show();
- jQuery('#validationCriteriaList').load('validationCriteriaList.action',
- {
- }, function()
- {
- showById('validationCriteriaList');
- jQuery('#loaderDiv').hide();
- });
-}
+}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programsForValidationCriteriaAssociations.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programsForValidationCriteriaAssociations.vm 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programsForValidationCriteriaAssociations.vm 2011-05-19 08:12:45 +0000
@@ -1,64 +1,50 @@
+
+<h3>$i18n.getString( "define_program_associations" ) </h3>
+
+<form action='defineProgramsForValidationCriteria.action' method='post' onsubmit="selectAllById('programIds');">
+<table>
+<input type='hidden' id='criteriaId' name='criteriaId' value="$validationCriteria.id">
+<tr>
+ <th colspan="3">$i18n.getString('program')</th>
+</tr>
+<tr>
+ <td><label>$i18n.getString('available_program')</label></td>
+ <td> </td>
+ <td><label>$i18n.getString('selected_program')</label></td>
+</tr>
+<tr>
+ <td>
+ <select multiple id='avalableProgramIds' name='avalableProgramIds' size="8" style="width:30em " ondblclick="moveSelectedById('avalableProgramIds', 'programIds');">
+ #foreach($p in $availablePrograms)
+ <option value='$p.id'>$p.name</option>
+ #end
+ </select>
+ </td>
+ <td width="42" align='center'>
+ <input type="button" value=">" onclick="moveSelectedById('avalableProgramIds', 'programIds');" style="width:42px">
+ <input type="button" value="<" onclick="moveSelectedById('programIds', 'avalableProgramIds');" style="width:42px"><br>
+ <input type="button" value=">>" onclick="moveAllById('avalableProgramIds', 'programIds');" style="width:42px"><br>
+ <input type="button" value="<<" onclick="moveAllById('programIds', 'avalableProgramIds');" style="width:42px">
+ </td>
+ <td>
+ <select multiple id='programIds' name='programIds' size="8" style="width:30em " ondblClick="moveSelectedById('programIds', 'avalableProgramIds');">
+ #foreach($p in $selectedPrograms)
+ <option value='$p.id'>$p.name</option>
+ #end
+ </select>
+ </td>
+</tr>
+
+<tr>
+ <td>
+ <input type="submit"value="$i18n.getString('save')" style="width:10em">
+ <input type="button" onClick="window.location.href = 'validationCriteria.action';" value="$i18n.getString('cancel')" style="width:10em">
+ </td>
+ <td></td>
+ <td></td>
+</tr>
+</table>
+
<script>
- jQuery('#assignValidationCriteriaForm').ready(
- function()
- {
- validation( 'assignValidationCriteriaForm', function( form ){
- defineProgramsForValidationCriteria();
- }, function(){
- selectAllById('programIds');
- });
-
- });
-</script>
-
-<input type="button" value="$i18n.getString( 'back' )" onclick="javascript:onClickBackToCriteriaBtn();" style="width:10em">
-<p></p>
-
-<h3>$i18n.getString( "define_program_associations" ) </h3>
-
-<form id='assignValidationCriteriaForm' name='assignValidationCriteriaForm' action='defineProgramsForValidationCriteria.action' method='post' >
-
- <input type='hidden' id='criteriaId' name='criteriaId' value="$validationCriteria.id">
-
- <table>
- <tr>
- <th colspan="3">$i18n.getString('program')</th>
- </tr>
- <tr>
- <td><label>$i18n.getString('available_program')</label></td>
- <td> </td>
- <td><label>$i18n.getString('selected_program')</label></td>
- </tr>
- <tr>
- <td>
- <select multiple id='avalableProgramIds' name='avalableProgramIds' size="8" style="width:30em " ondblclick="moveSelectedById('avalableProgramIds', 'programIds');">
- #foreach($p in $availablePrograms)
- <option value='$p.id'>$p.name</option>
- #end
- </select>
- </td>
- <td width="42" align='center'>
- <input type="button" value=">" onclick="moveSelectedById('avalableProgramIds', 'programIds');" style="width:42px">
- <input type="button" value="<" onclick="moveSelectedById('programIds', 'avalableProgramIds');" style="width:42px"><br>
- <input type="button" value=">>" onclick="moveAllById('avalableProgramIds', 'programIds');" style="width:42px"><br>
- <input type="button" value="<<" onclick="moveAllById('programIds', 'avalableProgramIds');" style="width:42px">
- </td>
- <td>
- <select multiple id='programIds' name='programIds' size="8" style="width:30em " ondblClick="moveSelectedById('programIds', 'avalableProgramIds');">
- #foreach($p in $selectedPrograms)
- <option value='$p.id'>$p.name</option>
- #end
- </select>
- </td>
- </tr>
-
- <tr>
- <td>
- <input type="submit"value="$i18n.getString('save')" style="width:10em">
- <input type="button" onClick="window.location.href = 'validationCriteria.action';" value="$i18n.getString('cancel')" style="width:10em">
- </td>
- <td></td>
- <td></td>
- </tr>
- </table>
-</form>
\ No newline at end of file
+ var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_patient" ) , "'" )';
+</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm 2011-05-19 08:12:45 +0000
@@ -1,18 +1,12 @@
<script>
- jQuery("#updateCaseAggregationForm").ready( function(){
-
- jQuery('#description').focus();
-
+ jQuery(document).ready( function(){
validation( 'updateCaseAggregationForm', function(form){
- updateCaseAggregation();
+ form.submit();
});
});
</script>
-
-<input type="button" value="$i18n.getString( 'back' )" onclick="javascript:onClickBackBtn();" style="width:10em">
-<p></p>
-
+
<h3>$i18n.getString( "update_case_aggregation_condition" )</h3>
<form id="updateCaseAggregationForm" action="updateCaseAggregation.action" method="post" >
@@ -132,7 +126,9 @@
<td>
<fieldset style="border: 1px solid #3f5d8e; ">
<legend>$i18n.getString( "case_attributes" )</legend>
+
<table>
+
<tr>
<td>
<select id="caseProperty" name="caseProperty" size="5" ondblclick="insertInfo(this);" style="width:20em; height:14.5em" >
@@ -151,7 +147,9 @@
<td>
<fieldset style="border: 1px solid #3f5d8e; ">
<legend>$i18n.getString( "program_properties" )</legend>
+
<table>
+
<tr>
<td>
<select id="caseProperty" name="caseProperty" size="5" ondblclick="insertInfo(this);" style="width:15em; height:14.5em" >
@@ -211,3 +209,6 @@
</form>
+<script>
+ byId('description').focus();
+</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramAttributeForm.vm 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramAttributeForm.vm 2011-05-19 08:12:45 +0000
@@ -91,6 +91,7 @@
<p>
<input type="submit" value="$i18n.getString( 'update' )" style="width:10em"/>
+ <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='programAttribute.action'" style="width:10em"/>
</p>
</form>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateValidationCriteria.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateValidationCriteria.vm 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateValidationCriteria.vm 2011-05-19 08:12:45 +0000
@@ -1,10 +1,10 @@
<script>
- jQuery("#validationCriteriaForm").ready(
+ jQuery(document).ready(
function()
{
validation( 'validationCriteriaForm', function( form ){
- updateValidationCriteria();
+ form.submit();
});
checkValueIsExist( "name", "validateValidationCriteria.action", {id:getFieldValue('id')});
@@ -12,16 +12,12 @@
);
</script>
-
-<input type="button" value="$i18n.getString( 'back' )" onclick="javascript:onClickBackToCriteriaBtn();" style="width:10em">
-<p></p>
-
+
<h3>$i18n.getString( "update_validation_criteria" )</h3>
<form id="validationCriteriaForm" action="updateValidationCriteria.action" method="post" >
- <input type='hidden' id='id' name='id' value='$validationCriteria.id'/>
-
<table>
+ <input type='hidden' id='id' name='id' value='$validationCriteria.id'/>
<tr>
<th colspan="3">$i18n.getString('criteria_details')</th>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/validationCriteria.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/validationCriteria.vm 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/validationCriteria.vm 2011-05-19 08:12:45 +0000
@@ -1,14 +1,64 @@
-<div id='validationCriteriaList'>
- #parse( "/dhis-web-maintenance-patient/validationCriteriaList.vm" )
-</div>
-
-#parse( "/dhis-web-commons/loader/loader.vm" )
-
-<div id='editValidationCriteriaForm'></div>
+<h3>$i18n.getString( "validation_criteria" )</h3>
+
+<table class="mainPageTable">
+ <tr>
+ <td style="vertical-align:top">
+ <table width="100%">
+ <tr>
+ <td>
+ $i18n.getString( "filter_by_name" ): <input type="text" onkeyup="filterValues( this.value , 1)" style="width:250px"/>
+ </td>
+
+ <td style="text-align:right" >
+ <input style="text-align:right" type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddValidationCriteriaForm.action'" style="width:70px">
+ </td>
+ </tr>
+ </table>
+ <table class="listTable" id="listTable">
+ <thead>
+ <tr>
+ <th>$i18n.getString('name')</th>
+ <th style="width:10em " class="{sorter: false}">$i18n.getString('operator')</th>
+ </tr>
+ </thead>
+ <tbody id="list">
+ #foreach($criteria in $criterias)
+ <tr id="tr${criteria.id}">
+ <td>$criteria.name</td>
+ <td>
+ <a href="showProgramsForValidationCriteriaForm.action?criteriaId=$criteria.id" title="$i18n.getString( "define_associations" )"><img src="../images/assign.png" alt="$i18n.getString( 'assign_program' )"></a>
+ <a href="showUpdateValidationCriteriaForm.action?id=$criteria.id" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
+ <a href="javascript:removeCriteria( '$criteria.id', '$encoder.jsEncode( $criteria.getName() )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
+ <a href="javascript:showValidationCriteriaDetails( '$criteria.id' )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"></a>
+ </td>
+ </tr>
+ #end
+ </tbody>
+ </table>
+ </td>
+ <td style="width:20em; padding-left:2em; vertical-align:top">
+ <div id="detailsArea" style="display:none;">
+ <div style="float:right">
+ <a href="javascript:hideDetails()" title="$i18n.getString( "hide_details" )"><img src="../images/close.png" alt="$i18n.getString( "hide_details" )"></a>
+ </div>
+ <p><label>$i18n.getString( "name" ):</label><br><span id='nameField'></span></p>
+ <p><label>$i18n.getString( "description" ):</label><br><span id='descriptionField'></span></p>
+ <p><label>$i18n.getString( "criteria" ):</label><br><span id='criteriaField'></span></p>
+ </div>
+
+ <div id="warningArea" style="position:fixed;right:10px;top:200px;display:none">
+ <div style="float:right">
+ <a href="javascript:hideWarning()" title="$i18n.getString( "hide_warning" )"><img src="../images/close.png" alt="$i18n.getString( "hide_warning" )"></a>
+ </div>
+ <p><span id="warningField"></span></p>
+ </div>
+ </td>
+ </tr>
+
+</table>
<script>
var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_validation_criteria" ) , "'" )';
-
jQuery(document).ready(function(){
tableSorter( 'listTable' );
});
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/validationCriteriaList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/validationCriteriaList.vm 2011-05-18 04:52:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/validationCriteriaList.vm 1970-01-01 00:00:00 +0000
@@ -1,60 +0,0 @@
-<h3>$i18n.getString( "validation_criteria" )</h3>
-
-<table class="mainPageTable">
- <tr>
- <td style="vertical-align:top">
- <table width="100%">
- <tr>
- <td>
- $i18n.getString( "filter_by_name" ): <input type="text" onkeyup="filterValues( this.value , 1)" style="width:250px"/>
- </td>
-
- <td style="text-align:right" >
- <input style="text-align:right" type="button" value="$i18n.getString( "add_new" )" onclick="javascript:showAddValidationCriteriaForm();" style="width:70px">
- </td>
- </tr>
- </table>
- <table class="listTable" id="listTable">
- <thead>
- <tr>
- <th>$i18n.getString('name')</th>
- <th style="width:10em " class="{sorter: false}">$i18n.getString('operator')</th>
- </tr>
- </thead>
- <tbody id="list">
- #set( $mark = false )
- #foreach($criteria in $criterias)
- <tr id="tr${criteria.id}" #alternate( $mark )>
- <td>$criteria.name</td>
- <td>
- <a href="javascript:showProgramsForValidationCriteriaForm('$criteria.id')" title="$i18n.getString( "define_associations" )"><img src="../images/assign.png" alt="$i18n.getString( 'assign_program' )"></a>
- <a href="javascript:showUpdateValidationCriteriaForm('$criteria.id')" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
- <a href="javascript:removeCriteria( '$criteria.id','$encoder.jsEncode( $criteria.getName() )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
- <a href="javascript:showValidationCriteriaDetails( '$criteria.id' )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"></a>
- </td>
- </tr>
- #set( $mark = !$mark)
- #end
- </tbody>
- </table>
- </td>
- <td style="width:20em; padding-left:2em; vertical-align:top">
- <div id="detailsArea" style="display:none;">
- <div style="float:right">
- <a href="javascript:hideDetails()" title="$i18n.getString( "hide_details" )"><img src="../images/close.png" alt="$i18n.getString( "hide_details" )"></a>
- </div>
- <p><label>$i18n.getString( "name" ):</label><br><span id='nameField'></span></p>
- <p><label>$i18n.getString( "description" ):</label><br><span id='descriptionField'></span></p>
- <p><label>$i18n.getString( "criteria" ):</label><br><span id='criteriaField'></span></p>
- </div>
-
- <div id="warningArea" style="position:fixed;right:10px;top:200px;display:none">
- <div style="float:right">
- <a href="javascript:hideWarning()" title="$i18n.getString( "hide_warning" )"><img src="../images/close.png" alt="$i18n.getString( "hide_warning" )"></a>
- </div>
- <p><span id="warningField"></span></p>
- </div>
- </td>
- </tr>
-
-</table>
\ No newline at end of file