dhis-mobile-devs team mailing list archive
-
dhis-mobile-devs team
-
Mailing list archive
-
Message #00389
[Branch ~dhis-mobile-devs/dhis-mobile/lwuit-tracking] Rev 212: https://blueprints.launchpad.net/dhis-mobile/+spec/enhance-tracker-client
------------------------------------------------------------
revno: 212
committer: sherylyn.marie
branch nick: lwuit-tracking
timestamp: Tue 2014-05-06 14:54:53 +0800
message:
https://blueprints.launchpad.net/dhis-mobile/+spec/enhance-tracker-client
#1 ALL TRACKED ENTITY SUPPORT
In Add Instance screen, implement "<tracked entity name> REGISTRATION" for the form title
modified:
src/org/hisp/dhis/mobile/model/Program.java
src/org/hisp/dhis/mobile/ui/Text.java
src/org/hisp/dhis/mobile/view/PersonRegistrationView.java
--
lp:~dhis-mobile-devs/dhis-mobile/lwuit-tracking
https://code.launchpad.net/~dhis-mobile-devs/dhis-mobile/lwuit-tracking
Your team DHIS mobile developers is subscribed to branch lp:~dhis-mobile-devs/dhis-mobile/lwuit-tracking.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis-mobile-devs/dhis-mobile/lwuit-tracking/+edit-subscription
=== modified file 'src/org/hisp/dhis/mobile/model/Program.java'
--- src/org/hisp/dhis/mobile/model/Program.java 2014-02-07 11:02:56 +0000
+++ src/org/hisp/dhis/mobile/model/Program.java 2014-05-06 06:54:53 +0000
@@ -37,6 +37,8 @@
private String dateOfEnrollmentDescription = "Date of Enrollment";
private String dateOfIncidentDescription = "Date of Incident";
+
+ private String trackedEntityName = "Tracked Entity";
private Vector programStages = new Vector();
@@ -91,6 +93,16 @@
{
this.dateOfIncidentDescription = dateOfIncidentDescription;
}
+
+ public String getTrackedEntityName()
+ {
+ return trackedEntityName;
+ }
+
+ public void setTrackedEntityName( String trackedEntityName )
+ {
+ this.trackedEntityName = trackedEntityName;
+ }
public Vector getProgramAttributes()
{
@@ -110,6 +122,7 @@
dout.writeInt( getType() );
dout.writeUTF( getDateOfEnrollmentDescription() );
dout.writeUTF( getDateOfIncidentDescription() );
+ dout.writeUTF( getTrackedEntityName() );
dout.writeInt( programStages.size() );
for ( int i = 0; i < programStages.size(); i++ )
@@ -134,6 +147,7 @@
this.setType( din.readInt() );
this.setDateOfEnrollmentDescription( din.readUTF() );
this.setDateOfIncidentDescription( din.readUTF() );
+ this.setTrackedEntityName( din.readUTF() );
int size = din.readInt();
for ( int i = 0; i < size; i++ )
=== modified file 'src/org/hisp/dhis/mobile/ui/Text.java'
--- src/org/hisp/dhis/mobile/ui/Text.java 2014-05-05 09:07:12 +0000
+++ src/org/hisp/dhis/mobile/ui/Text.java 2014-05-06 06:54:53 +0000
@@ -652,9 +652,9 @@
return get( (short) 118, "Are you sure you want to close the form?" );
}
- public static String PERSON_REGISTRATION()
+ public static String REGISTRATION()
{
- return get( (short) 119, "PERSON REGISTRATON" );
+ return get( (short) 119, " REGISTRATION" );
}
public static String FULL_NAME()
=== modified file 'src/org/hisp/dhis/mobile/view/PersonRegistrationView.java'
--- src/org/hisp/dhis/mobile/view/PersonRegistrationView.java 2014-04-21 09:49:10 +0000
+++ src/org/hisp/dhis/mobile/view/PersonRegistrationView.java 2014-05-06 06:54:53 +0000
@@ -172,7 +172,7 @@
{
if ( mainForm == null )
{
- mainForm = new Form( Text.PERSON_REGISTRATION() );
+ mainForm = new Form( program.getTrackedEntityName().toUpperCase() + Text.REGISTRATION() );
mainForm.setLayout( new BoxLayout( BoxLayout.Y_AXIS ) );
mainForm.setTransitionOutAnimator( CommonTransitions.createSlide( CommonTransitions.SLIDE_HORIZONTAL, true,
200 ) );
@@ -182,6 +182,10 @@
mainForm.addCommandListener( this );
}
+ else
+ {
+ mainForm.setTitle( program.getTrackedEntityName().toUpperCase() + Text.REGISTRATION() );
+ }
return mainForm;
}