dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15233
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5422: Change the property Program.anonymousEvent to anonymous.
------------------------------------------------------------
revno: 5422
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-12-15 09:50:32 +0700
message:
Change the property Program.anonymousEvent to anonymous.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStore.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramService.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStore.java
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.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/program.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.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-api/src/main/java/org/hisp/dhis/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2011-12-15 02:50:32 +0000
@@ -79,7 +79,7 @@
private Boolean singleEvent;
- private Boolean anonymousEvent;
+ private Boolean anonymous;
// -------------------------------------------------------------------------
// Constructors
@@ -252,14 +252,14 @@
this.patientValidationCriteria = patientValidationCriteria;
}
- public Boolean getAnonymousEvent()
+ public Boolean getAnonymous()
{
- return anonymousEvent;
+ return anonymous;
}
- public void setAnonymousEvent( Boolean anonymousEvent )
+ public void setAnonymous( Boolean anonymous )
{
- this.anonymousEvent = anonymousEvent;
+ this.anonymous = anonymous;
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramService.java 2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramService.java 2011-12-15 02:50:32 +0000
@@ -58,8 +58,8 @@
Collection<Program> getPrograms( boolean singleEvent );
- Collection<Program> getPrograms( boolean singleEvent, boolean anonymousEvent );
+ Collection<Program> getPrograms( boolean singleEvent, boolean anonymous );
- Collection<Program> getPrograms( boolean singleEvent, boolean anonymousEvent, OrganisationUnit orgunit );
+ Collection<Program> getPrograms( boolean singleEvent, boolean anonymous, OrganisationUnit orgunit );
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStore.java 2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStore.java 2011-12-15 02:50:32 +0000
@@ -43,7 +43,7 @@
Collection<Program> get( boolean singleEvent );
- Collection<Program> get( boolean singleEvent, boolean anonymousEvent );
+ Collection<Program> get( boolean singleEvent, boolean anonymous );
- Collection<Program> get( boolean singleEvent, boolean anonymousEvent, OrganisationUnit orgunit );
+ Collection<Program> get( boolean singleEvent, boolean anonymous, OrganisationUnit orgunit );
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramService.java 2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramService.java 2011-12-15 02:50:32 +0000
@@ -123,14 +123,14 @@
return programStore.get( singleEvent );
}
- public Collection<Program> getPrograms( boolean singleEvent, boolean anonymousEvent )
+ public Collection<Program> getPrograms( boolean singleEvent, boolean anonymous )
{
- return programStore.get( singleEvent, anonymousEvent );
+ return programStore.get( singleEvent, anonymous );
}
- public Collection<Program> getPrograms( boolean singleEvent, boolean anonymousEvent, OrganisationUnit orgunit )
+ public Collection<Program> getPrograms( boolean singleEvent, boolean anonymous, OrganisationUnit orgunit )
{
- return programStore.get( singleEvent, anonymousEvent, orgunit );
+ return programStore.get( singleEvent, anonymous, orgunit );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStore.java 2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStore.java 2011-12-15 02:50:32 +0000
@@ -56,18 +56,18 @@
@SuppressWarnings( "unchecked" )
@Override
- public Collection<Program> get( boolean singleEvent, boolean anonymousEvent )
+ public Collection<Program> get( boolean singleEvent, boolean anonymous )
{
return getCriteria( Restrictions.eq( "singleEvent", singleEvent ),
- Restrictions.eq( "anonymousEvent", anonymousEvent ) ).list();
+ Restrictions.eq( "anonymous", anonymous ) ).list();
}
@SuppressWarnings( "unchecked" )
@Override
- public Collection<Program> get( boolean singleEvent, boolean anonymousEvent, OrganisationUnit orgunit )
+ public Collection<Program> get( boolean singleEvent, boolean anonymous, OrganisationUnit orgunit )
{
return getCriteria( Restrictions.eq( "singleEvent", singleEvent ),
- Restrictions.eq( "anonymousEvent", anonymousEvent ) ).createAlias( "organisationUnits", "orgunit" ).add(
+ Restrictions.eq( "anonymous", anonymous ) ).createAlias( "organisationUnits", "orgunit" ).add(
Restrictions.eq( "orgunit.id", orgunit.getId() ) ).list();
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml 2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml 2011-12-15 02:50:32 +0000
@@ -39,7 +39,7 @@
<property name="singleEvent" />
- <property name="anonymousEvent" />
+ <property name="anonymous" />
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm 2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm 2011-12-15 02:50:32 +0000
@@ -4,7 +4,7 @@
"name": "$!encoder.jsEncode( ${program.name} )",
"description": "$!encoder.jsEncode( ${program.description} )",
"singleEvent": "$!program.singleEvent",
- "anonymousEvent": "$!program.anonymousEvent",
+ "anonymous": "$!program.anonymous",
"dateOfEnrollmentDescription": "$!encoder.jsEncode( ${program.dateOfEnrollmentDescription} )",
"dateOfIncidentDescription": "$!encoder.jsEncode( ${program.dateOfIncidentDescription} )",
"programStageCount": "${program.programStages.size()}",
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java 2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java 2011-12-15 02:50:32 +0000
@@ -107,11 +107,11 @@
this.singleEvent = singleEvent;
}
- private Boolean anonymousEvent;
+ private Boolean anonymous;
- public void setAnonymousEvent( Boolean anonymousEvent )
+ public void setAnonymous( Boolean anonymous )
{
- this.anonymousEvent = anonymousEvent;
+ this.anonymous = anonymous;
}
// -------------------------------------------------------------------------
@@ -122,7 +122,7 @@
throws Exception
{
singleEvent = (singleEvent == null) ? false : singleEvent;
- anonymousEvent = (anonymousEvent == null) ? false : anonymousEvent;
+ anonymous = (anonymous == null) ? false : anonymous;
Program program = new Program();
@@ -133,7 +133,7 @@
program.setDateOfIncidentDescription( dateOfIncidentDescription );
program.setMaxDaysAllowedInputData( maxDaysAllowedInputData );
program.setSingleEvent( singleEvent );
- program.setAnonymousEvent( anonymousEvent );
+ program.setAnonymous( anonymous );
programService.saveProgram( program );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java 2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java 2011-12-15 02:50:32 +0000
@@ -124,11 +124,11 @@
this.singleEvent = singleEvent;
}
- private Boolean anonymousEvent;
+ private Boolean anonymous;
- public void setAnonymousEvent( Boolean anonymousEvent )
+ public void setAnonymous( Boolean anonymous )
{
- this.anonymousEvent = anonymousEvent;
+ this.anonymous = anonymous;
}
// -------------------------------------------------------------------------
@@ -139,7 +139,7 @@
throws Exception
{
singleEvent = (singleEvent == null) ? false : singleEvent;
- anonymousEvent = (anonymousEvent == null) ? false : anonymousEvent;
+ anonymous = (anonymous == null) ? false : anonymous;
Program program = programService.getProgram( id );
program.setName( name );
@@ -149,7 +149,7 @@
program.setDateOfIncidentDescription( dateOfIncidentDescription );
program.setMaxDaysAllowedInputData( maxDaysAllowedInputData );
program.setSingleEvent( singleEvent );
- program.setAnonymousEvent( anonymousEvent );
+ program.setAnonymous( anonymous );
programService.updateProgram( program );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2011-12-14 15:28:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2011-12-15 02:50:32 +0000
@@ -385,4 +385,4 @@
patients_registered=Registered Beneficiaries No
irregular_encounter=Irregular encounter
date_of_birth=Date of Birth
-anonymous_event=Anonymous Event
\ No newline at end of file
+anonymous=Anonymous
\ 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/addProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2011-12-15 02:50:32 +0000
@@ -40,8 +40,8 @@
</tr>
<tr>
- <td><label>$i18n.getString( "anonymous_event" )</label></td>
- <td><input type="checkbox" id="anonymousEvent" name="anonymousEvent" value='true' ></td>
+ <td><label>$i18n.getString( "anonymous" )</label></td>
+ <td><input type="checkbox" id="anonymous" name="anonymous" value='true' disabled='disabled'></td>
<td></td>
</tr>
=== 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-12-13 07:46:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/caseAggregation.vm 2011-12-15 02:50:32 +0000
@@ -35,7 +35,7 @@
</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>
+ <a href="javascript:showCaseAggregationDetails( $aggregationCondition.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a>
</td>
</tr>
@@ -49,7 +49,7 @@
<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>
+ <a href="javascript:hideDetails()" title="$i18n.getString( "hide_details" )"><img src="../images/close.png" alt="$i18n.getString( "hide_details" )"></a>
</div>
<p><label class="bold">$i18n.getString( "id" ):</label><br><span id="idField"></span></p>
<p><label class="bold">$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js 2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js 2011-12-15 02:50:32 +0000
@@ -14,8 +14,8 @@
var singleEvent = ( json.program.singleEvent == 'true') ? i18n_yes : i18n_no;
setInnerHTML( 'singleEventField', singleEvent );
- var anonymousEvent = ( json.program.anonymousEvent == 'true') ? i18n_yes : i18n_no;
- setInnerHTML( 'anonymousEventField', anonymousEvent );
+ var anonymous = ( json.program.anonymous == 'true') ? i18n_yes : i18n_no;
+ setInnerHTML( 'anonymousField', anonymous );
setInnerHTML( 'dateOfEnrollmentDescriptionField', json.program.dateOfEnrollmentDescription );
setInnerHTML( 'dateOfIncidentDescriptionField', json.program.dateOfIncidentDescription );
@@ -82,10 +82,13 @@
if(checked)
{
disable('dateOfEnrollmentDescription');
+ enable('anonymous');
}
else
{
enable('dateOfEnrollmentDescription');
+ byId('anonymous').checked = false;
+ disable('anonymous');
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm 2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm 2011-12-15 02:50:32 +0000
@@ -48,7 +48,7 @@
<p><label class="bold">$i18n.getString( "name" ):</label><br><span id="nameField"></span></p>
<p><label class="bold">$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
<p><label class="bold">$i18n.getString( "single_event" ):</label><br><span id="singleEventField"></span></p>
- <p><label class="bold">$i18n.getString( "anonymous_event" ):</label><br><span id="anonymousEventField"></span></p>
+ <p><label class="bold">$i18n.getString( "anonymous" ):</label><br><span id="anonymousField"></span></p>
<p><label class="bold">$i18n.getString( "date_of_enrollment_description" ):</label><br><span id="dateOfEnrollmentDescriptionField"></span></p>
<p><label class="bold">$i18n.getString( "date_of_incident_description" ):</label><br><span id="dateOfIncidentDescriptionField"></span></p>
<p><label class="bold">$i18n.getString( "stage_in_program" ):</label><br><span id="programStageCountField"></span></p>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2011-12-14 07:33:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2011-12-15 02:50:32 +0000
@@ -44,8 +44,8 @@
</tr>
<tr>
- <td><label>$i18n.getString( "anonymous_event" )</label></td>
- <td><input type="checkbox" id="anonymousEvent" name="anonymousEvent" value='true' #if( $program.anonymousEvent=='true' ) checked #end ></td>
+ <td><label>$i18n.getString( "anonymous" )</label></td>
+ <td><input type="checkbox" id="anonymous" name="anonymous" value='true' #if( $program.anonymous=='true' ) checked #end #if( $program.singleEvent=='false' ) disabled='disabled' #end #></td>
<td></td>
</tr>