dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14204
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4731: (wip) Showed details - Users and Beneficiaries & Programs module.
------------------------------------------------------------
revno: 4731
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-09-28 14:11:18 +0700
message:
(wip) Showed details - Users and Beneficiaries & Programs module.
removed:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseCaseAggregation.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientAttribute.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientAttributeGroup.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientIdentifierType.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgram.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramAttribute.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramStage.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramValidation.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePrograms.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseRelationshipType.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/responseRole.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/responseUser.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/responseUserGroup.vm
added:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonCaseAggregation.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttributeGroup.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientIdentifierType.vm
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/jsonProgramAttribute.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStage.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramValidation.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPrograms.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonRelationshipType.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonUserGroup.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonUserRole.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonValidationCriteria.vm
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonUser.vm
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/javascript/caseaggregation.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttributeGroup.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js
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/programAttribute.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationship.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-user/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/role.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/user.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
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonCaseAggregation.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonCaseAggregation.vm 2011-09-28 07:11:18 +0000
@@ -0,0 +1,10 @@
+{ "caseAggregation":
+ {
+ "id": "${caseAggregation.id}",
+ "description": "$!encoder.jsonEncode( ${caseAggregation.description} )",
+ "operator": "${caseAggregation.operator}",
+ "aggregationDataElement": "$!encoder.jsonEncode( ${caseAggregation.aggregationDataElement.name} )",
+ "optionCombo": "$!encoder.jsonEncode( ${caseAggregation.optionCombo.name} )",
+ "aggregationExpression": "$!encoder.jsonEncode( ${caseAggregation.aggregationExpression} )"
+ }
+}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm 2011-09-28 07:11:18 +0000
@@ -0,0 +1,8 @@
+{ "patientAttribute":
+ {
+ "id": "${patientAttribute.id}",
+ "name": "$!encoder.jsonEncode( ${patientAttribute.name} )",
+ "description": "$!encoder.jsonEncode( ${patientAttribute.description} )",
+ "valueType": "$!encoder.jsonEncode( ${patientAttribute.valueType} )"
+ }
+}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttributeGroup.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttributeGroup.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttributeGroup.vm 2011-09-28 07:11:18 +0000
@@ -0,0 +1,8 @@
+{ "patientAttributeGroup":
+ {
+ "id": "${patientAttributeGroup.id}",
+ "name": "$!encoder.jsonEncode( ${patientAttributeGroup.name} )",
+ "description": "$!encoder.jsonEncode( ${patientAttributeGroup.description} )",
+ "noAttribute": "${patientAttributeGroup.attributes.size()}"
+ }
+}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientIdentifierType.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientIdentifierType.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientIdentifierType.vm 2011-09-28 07:11:18 +0000
@@ -0,0 +1,11 @@
+{ "patientIdentifierType":
+ {
+ "id": "${patientIdentifierType.id}",
+ "name": "$!encoder.jsonEncode( ${patientIdentifierType.name} )",
+ "description": "$!encoder.jsonEncode( ${patientIdentifierType.description} )",
+ "mandatory": "$!{patientIdentifierType.mandatory}",
+ "related": "$!{patientIdentifierType.related}",
+ "noChars": "$!{patientIdentifierType.noChars}",
+ "type": $!{patientIdentifierType.type}"
+ }
+}
\ No newline at end of file
=== added 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 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm 2011-09-28 07:11:18 +0000
@@ -0,0 +1,9 @@
+{ "program":
+ {
+ "id": "$program.id",
+ "name": "$!encoder.jsEncode( ${program.name} )",
+ "description": "$!encoder.jsEncode( ${program.description} )",
+ "programStageCount": "${program.programStages.size()}",
+ "maxDay": "${program.maxDaysAllowedInputData}"
+ }
+}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramAttribute.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramAttribute.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramAttribute.vm 2011-09-28 07:11:18 +0000
@@ -0,0 +1,8 @@
+{ "programAttribute":
+ {
+ "id": "${programAttribute.id}",
+ "name": "$!encoder.jsonEncode( ${programAttribute.name} )",
+ "description": "$!encoder.jsonEncode( ${programAttribute.description} )",
+ "valueType": "$!encoder.jsonEncode( ${programAttribute.valueType} )"
+ }
+}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStage.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStage.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramStage.vm 2011-09-28 07:11:18 +0000
@@ -0,0 +1,20 @@
+{ "programStage":
+ {
+ "id": "${programStage.id}",
+ "name": "$!encoder.jsonEncode( ${programStage.name} )",
+ "description": "$!encoder.jsonEncode( ${programStage.description} )",
+ "stageInProgram": "${programStage.stageInProgram}",
+ "minDaysFromStart": "${programStage.minDaysFromStart}",
+ "dataElementCount": "${programStageDataElements.size()}",
+
+ #set( $size = ${programStageDataElements.size()} )
+ "dataElement": [
+ #foreach($d in $programStageDataElements)
+ {
+ "id": "${d.dataElement.id}",
+ "name": "$!encoder.jsonEncode( ${d.dataElement.name} )"
+ }#if( $velocityCount < $size ),#end
+ #end
+ ]
+ }
+}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramValidation.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramValidation.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgramValidation.vm 2011-09-28 07:11:18 +0000
@@ -0,0 +1,9 @@
+{ "validation":
+ {
+ "id": "${validation.id}",
+ "description": "$!encoder.htmlEncode( ${validation.description} )",
+ "leftSide": "$!encoder.htmlEncode( ${validation.leftSide} )",
+ "rightSide": "$!encoder.htmlEncode( ${validation.rightSide} )",
+ "program": "$!encoder.htmlEncode( ${validation.program.name} )"
+ }
+}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPrograms.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPrograms.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPrograms.vm 2011-09-28 07:11:18 +0000
@@ -0,0 +1,12 @@
+#set( $size = $programs.size() )
+{
+ "organisationUnit": "$!encoder.jsonEncode( $!{organisationUnit.name} )",
+ "organisationUnitId": "$!{organisationUnit.id}",
+ "programs": [
+ #foreach( $program in $programs )
+ {
+ "id": ${program.id} ,
+ "name": "$!encoder.jsonEncode( ${program.name} )"
+ }#if( $velocityCount < $size ),#end
+ #end]
+}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonRelationshipType.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonRelationshipType.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonRelationshipType.vm 2011-09-28 07:11:18 +0000
@@ -0,0 +1,8 @@
+{ "relationshipType":
+ {
+ "id": "${relationshipType.id}",
+ "aIsToB": "$!encoder.jsonEncode( ${relationshipType.aIsToB} )",
+ "bIsToA": "$!encoder.jsonEncode( ${relationshipType.bIsToA} )",
+ "description": "$!encoder.jsonEncode( ${relationshipType.description} )"
+ }
+}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonUser.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonUser.vm 2011-08-29 21:12:03 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonUser.vm 2011-09-28 07:11:18 +0000
@@ -1,11 +1,25 @@
{ "user":
{
- "id": ${user.id},
- "surname": "$!encoder.jsonEncode( ${user.surname} )",
- "firstName": "$!encoder.jsonEncode( ${user.firstName} )",
- "username": "$!encoder.jsonEncode( ${user.username} )",
- "email": "$!encoder.jsonEncode( ${user.email} )",
- "phoneNumber": "$!encoder.jsonEncode( ${user.phoneNumber} )",
- "organisationUnits": "$!encoder.jsonEncode( ${user.organisationUnitsName} )"
+ "id": ${userCredentials.id},
+ "surname": "$!encoder.jsonEncode( ${userCredentials.user.surname} )",
+ "firstName": "$!encoder.jsonEncode( ${userCredentials.user.firstName} )",
+ "username": "$!encoder.jsonEncode( ${userCredentials.username} )",
+ "email": "$!encoder.jsonEncode( ${userCredentials.email} )",
+ "phoneNumber": "$!encoder.jsonEncode( ${userCredentials.phoneNumber} )",
+ "lastLogin": "$!format.formatDate( ${userCredentials.lastLogin} )",
+
+ #set( $size = ${userCredentials.user.organisationUnits.size()} )
+ "orgunits": [
+ #foreach( $unit in $userCredentials.user.organisationUnits )
+ { "name": "$!{unit}" }#if( $velocityCount < $size ),#end
+ #end
+ ],
+
+ #set( $size = ${userCredentials.userAuthorityGroups.size()} )
+ "roles": [
+ #foreach( $role in $userCredentials.userAuthorityGroups )
+ { "name": "$!{role.name}" }#if( $velocityCount < $size ),#end
+ #end
+ ]
}
}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonUserGroup.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonUserGroup.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonUserGroup.vm 2011-09-28 07:11:18 +0000
@@ -0,0 +1,7 @@
+{ "userGroup":
+ {
+ "id": $!{group.id},
+ "name": "$!encoder.jsonEncode( ${group.name} )",
+ "noOfUsers": "${memberCount}"
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonUserRole.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonUserRole.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonUserRole.vm 2011-09-28 07:11:18 +0000
@@ -0,0 +1,8 @@
+{ "userRole":
+ {
+ "name": "$!encoder.jsonEncode( ${userAuthorityGroup.name} )",
+ "members": "$!{userAuthorityGroup.members.size()}",
+ "dataSets": "$!{userAuthorityGroup.dataSets.size()}",
+ "reports": "$!{userAuthorityGroup.reports.size()}"
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonValidationCriteria.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonValidationCriteria.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonValidationCriteria.vm 2011-09-28 07:11:18 +0000
@@ -0,0 +1,15 @@
+{ "validationCriteria":
+ {
+ "id": "$!validationCriteria.id}",
+ "name": "$!encoder.xmlEncode( $validationCriteria.name )",
+ "description": "$!encoder.xmlEncode($validationCriteria.description )",
+ "property": "$!i18n.getString($validationCriteria.property)",
+ "operator": "$!validationCriteria.operator}",
+ "value":
+ #if( ${validationCriteria.property} == 'birthDate' )
+ "$!format.formatDate( ${validationCriteria.value} )"
+ #else
+ "$!{validationCriteria.value}"
+ #end
+ }
+}
\ No newline at end of file
=== 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-09-14 06:36:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2011-09-28 07:11:18 +0000
@@ -26,8 +26,8 @@
<action name="getRelationshipType"
class="org.hisp.dhis.patient.action.relationship.GetRelationshipTypeAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-patient/responseRelationshipType.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonRelationshipType.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
@@ -93,8 +93,8 @@
<action name="getPatientAttribute"
class="org.hisp.dhis.patient.action.patientattribute.GetPatientAttributeAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-patient/responsePatientAttribute.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonPatientAttribute.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
@@ -188,7 +188,7 @@
<action name="getProgram"
class="org.hisp.dhis.patient.action.program.GetProgramAction">
<result name="success" type="velocity-json">
- /dhis-web-maintenance-patient/responseProgram.vm</result>
+ /dhis-web-commons/ajax/jsonProgram.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
@@ -254,8 +254,8 @@
<action name="getProgramAttribute"
class="org.hisp.dhis.patient.action.program.GetProgramAttributeAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-patient/responseProgramAttribute.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonProgramAttribute.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
@@ -358,8 +358,8 @@
<action name="getProgramStage"
class="org.hisp.dhis.patient.action.programstage.GetProgramStageAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-patient/responseProgramStage.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonProgramStage.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
@@ -491,8 +491,8 @@
<action name="getPatientAttributeGroup"
class="org.hisp.dhis.patient.action.patientattributegroup.GetPatientAttributeGroupAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-patient/responsePatientAttributeGroup.vm
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonPatientAttributeGroup.vm
</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
@@ -607,8 +607,8 @@
<action name="getPatientIdentifierType"
class="org.hisp.dhis.patient.action.patientidentifiertype.GetPatientIdentifierTypeAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-patient/responsePatientIdentifierType.vm
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonPatientIdentifierType.vm
</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
@@ -703,8 +703,8 @@
<action name="getCaseAggregation"
class="org.hisp.dhis.patient.action.caseaggregation.GetCaseAggregationConditionAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-patient/responseCaseAggregation.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonCaseAggregation.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
@@ -760,8 +760,8 @@
<action name="getValidationCriteria"
class="org.hisp.dhis.patient.action.validation.GetValidationCriteriaAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-patient/responseValidationCriteria.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonValidationCriteria.vm</result>
</action>
<action name="updateValidationCriteria"
@@ -872,8 +872,8 @@
<action name="getProgramValidation"
class="org.hisp.dhis.patient.action.validation.GetProgramValidationAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-patient/responseProgramValidation.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonProgramValidation.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
=== 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-07-28 06:36:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/caseaggregation.js 2011-09-28 07:11:18 +0000
@@ -146,19 +146,17 @@
function showCaseAggregationDetails( caseAggregationId )
{
- $.post( 'getCaseAggregation.action', { id:caseAggregationId }, caseAggregationReceived );
-}
-
-function caseAggregationReceived( caseAggregationElement )
-{
- setInnerHTML( 'idField', $( caseAggregationElement).find('id' ).text() );
- setInnerHTML( 'descriptionField', $( caseAggregationElement).find('description' ).text() );
- setInnerHTML( 'operatorField', $( caseAggregationElement).find('operator' ).text() );
- setInnerHTML( 'aggregationDataElementField', $( caseAggregationElement).find('aggregationDataElement' ).text() );
- setInnerHTML( 'optionComboField', $( caseAggregationElement).find('optionCombo' ).text() );
- setInnerHTML( 'aggregationExpressionField', $( caseAggregationElement).find('aggregationExpression' ).text() );
-
- showDetails();
+ jQuery.post( 'getCaseAggregation.action', { id:caseAggregationId }, function ( json )
+ {
+ setInnerHTML( 'idField', json.caseAggregation.id );
+ setInnerHTML( 'descriptionField', json.caseAggregation.description );
+ setInnerHTML( 'operatorField', json.caseAggregation.operator );
+ setInnerHTML( 'aggregationDataElementField', json.caseAggregation.aggregationDataElement );
+ setInnerHTML( 'optionComboField', json.caseAggregation.optionCombo );
+ setInnerHTML( 'aggregationExpressionField', json.caseAggregation.aggregationExpression );
+
+ showDetails();
+ });
}
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js 2011-07-21 06:26:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js 2011-09-28 07:11:18 +0000
@@ -4,28 +4,21 @@
function showPatientAttributeDetails( patientAttributeId )
{
- $.ajax({
- url: 'getPatientAttribute.action?id=' + patientAttributeId,
- cache: false,
- dataType: "xml",
- success: patientAttributeReceived
+ jQuery.post( 'getPatientAttribute.action', { id: patientAttributeId },
+ function ( json ) {
+ setInnerHTML( 'idField', json.patientAttribute.id );
+ setInnerHTML( 'nameField', json.patientAttribute.name );
+ setInnerHTML( 'descriptionField', json.patientAttribute.description );
+
+ var valueTypeMap = { 'NUMBER':i18n_number, 'BOOL':i18n_yes_no, 'TEXT':i18n_text, 'DATE':i18n_date, 'COMBO':i18n_combo };
+ var valueType = json.patientAttribute.valueType;
+
+ setInnerHTML( 'valueTypeField', valueTypeMap[valueType] );
+
+ showDetails();
});
}
-function patientAttributeReceived( patientAttributeElement )
-{
- setInnerHTML( 'idField', $( patientAttributeElement).find('id' ).text() );
- setInnerHTML( 'nameField', $( patientAttributeElement).find('name' ).text() );
- setInnerHTML( 'descriptionField', $( patientAttributeElement).find('description' ).text() );
-
- var valueTypeMap = { 'NUMBER':i18n_number, 'BOOL':i18n_yes_no, 'TEXT':i18n_text, 'DATE':i18n_date, 'COMBO':i18n_combo };
- var valueType = $( patientAttributeElement ).find('valueType' ).text();
-
- setInnerHTML( 'valueTypeField', valueTypeMap[valueType] );
-
- showDetails();
-}
-
// -----------------------------------------------------------------------------
// Remove Patient Attribute
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttributeGroup.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttributeGroup.js 2011-07-21 06:26:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttributeGroup.js 2011-09-28 07:11:18 +0000
@@ -14,23 +14,18 @@
function showPatientAttributeGroupDetails( patientAttributeGroupId )
{
- $.ajax({
- url: 'getPatientAttributeGroup.action?id=' + patientAttributeGroupId,
- cache: false,
- success: patientAttributeGroupReceived
+ jQuery.post( 'getPatientAttributeGroup.action', { id: patientAttributeGroupId },
+ function ( json ) {
+
+ setInnerHTML( 'idField', json.patientAttributeGroup.id );
+ setInnerHTML( 'nameField', json.patientAttributeGroup.name );
+ setInnerHTML( 'descriptionField', json.patientAttributeGroup.description );
+ setInnerHTML( 'noAttributeField', json.patientAttributeGroup.noAttribute );
+
+ showDetails();
});
}
-function patientAttributeGroupReceived( patientAttributeGroupElement )
-{
- setInnerHTML( 'idField', getElementValue( patientAttributeGroupElement, 'id' ) );
- setInnerHTML( 'nameField', getElementValue( patientAttributeGroupElement, 'name' ) );
- setInnerHTML( 'descriptionField', getElementValue( patientAttributeGroupElement, 'description' ) );
- setInnerHTML( 'noAttributeField', getElementValue( patientAttributeGroupElement, 'noAttribute' ) );
-
- showDetails();
-}
-
// -----------------------------------------------------------------------------
// Remove Patient Attribute
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js 2011-07-21 06:26:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js 2011-09-28 07:11:18 +0000
@@ -4,35 +4,28 @@
function showPatientIdentifierTypeDetails( patientIdentifierTypeId )
{
- $.ajax({
- url: 'getPatientIdentifierType.action?id=' + patientIdentifierTypeId,
- cache: false,
- dataType: "xml",
- success: patientIdentifierTypeReceived
+ jQuery.post( 'getPatientIdentifierType.action', { id: patientIdentifierTypeId },
+ function ( json ) {
+ setInnerHTML( 'idField', json.patientAttributeType.id );
+ setInnerHTML( 'nameField', json.patientAttributeType.name );
+ setInnerHTML( 'descriptionField', json.patientAttributeType.description );
+
+ var boolValueMap = { 'true':i18n_yes, 'false':i18n_no };
+ var boolType = json.patientAttributeType.mandatory;
+ setInnerHTML( 'mandatoryField', boolValueMap[boolType] );
+
+ boolType = json.patientAttributeType.related;
+ setInnerHTML( 'relatedField', boolValueMap[boolType] );
+ setInnerHTML( 'noCharsField', json.patientAttributeType.noChars );
+
+ var valueTypeMap = { 'text':i18n_string, 'number':i18n_number, 'letter':i18n_alphabet };
+ var valueType = json.patientAttributeType.type;
+ setInnerHTML( 'typeField', valueTypeMap[valueType] );
+
+ showDetails();
});
}
-function patientIdentifierTypeReceived( patientIdentifierTypeElement )
-{
- setInnerHTML( 'idField', $( patientIdentifierTypeElement).find('id' ).text() );
- setInnerHTML( 'nameField', $( patientIdentifierTypeElement).find('name' ).text() );
- setInnerHTML( 'descriptionField', $( patientIdentifierTypeElement).find('description' ).text() );
-
- var boolValueMap = { 'true':i18n_yes, 'false':i18n_no };
- var boolType = $( patientIdentifierTypeElement ).find('mandatory').text();
- setInnerHTML( 'mandatoryField', boolValueMap[boolType] );
-
- boolType = $( patientIdentifierTypeElement ).find('related').text();
- setInnerHTML( 'relatedField', boolValueMap[boolType] );
- setInnerHTML( 'noCharsField', $( patientIdentifierTypeElement).find('noChars' ).text() );
-
- var valueTypeMap = { 'text':i18n_string, 'number':i18n_number, 'letter':i18n_alphabet };
- var valueType = $( patientIdentifierTypeElement ).find('type' ).text();
- setInnerHTML( 'typeField', valueTypeMap[valueType] );
-
- showDetails();
-}
-
// -----------------------------------------------------------------------------
// Remove Patient Identifier Type
// -----------------------------------------------------------------------------
=== 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-08-19 21:33:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js 2011-09-28 07:11:18 +0000
@@ -4,14 +4,14 @@
function showProgramDetails( programId )
{
- jQuery.postJSON( "getProgram.action", {
+ jQuery.post( "getProgram.action", {
id:programId
}, function(json){
- setInnerHTML( 'idField', json.id );
- setInnerHTML( 'nameField', json.name );
- setInnerHTML( 'descriptionField', json.description );
- setInnerHTML( 'programStageCountField', json.programStageCount );
- setInnerHTML( 'maxDaysFromStartField', json.maxDay );
+ setInnerHTML( 'idField', json.program.id );
+ setInnerHTML( 'nameField', json.program.name );
+ setInnerHTML( 'descriptionField', json.program.description );
+ setInnerHTML( 'programStageCountField', json.program.programStageCount );
+ setInnerHTML( 'maxDaysFromStartField', json.program.maxDay );
showDetails();
});
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programAttribute.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programAttribute.js 2011-07-21 09:03:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programAttribute.js 2011-09-28 07:11:18 +0000
@@ -4,28 +4,20 @@
function showProgramAttributeDetails( programAttributeId )
{
- $.ajax({
- url: 'getProgramAttribute.action?id=' + programAttributeId,
- cache: false,
- dataType: "xml",
- success: programAttributeReceived
+ jQuery.post( 'getProgramAttribute.action', { id: programAttributeId }, function ( json ) {
+ setInnerHTML( 'idField', json.programAttribute.id );
+ setInnerHTML( 'nameField', json.programAttribute.name );
+ setInnerHTML( 'descriptionField', json.programAttribute.description );
+
+ var valueTypeMap = { 'NUMBER':i18n_number, 'BOOL':i18n_yes_no, 'TEXT':i18n_text, 'DATE':i18n_date, 'COMBO':i18n_combo };
+ var valueType = json.programAttribute.valueType;
+
+ setInnerHTML( 'valueTypeField', valueTypeMap[valueType] );
+
+ showDetails();
});
}
-function programAttributeReceived( programAttributeElement )
-{
- setInnerHTML( 'idField', $( programAttributeElement).find('id' ).text() );
- setInnerHTML( 'nameField', $( programAttributeElement).find('name').text() );
- setInnerHTML( 'descriptionField', $( programAttributeElement).find('description').text() );
-
- var valueTypeMap = { 'NUMBER':i18n_number, 'BOOL':i18n_yes_no, 'TEXT':i18n_text, 'DATE':i18n_date, 'COMBO':i18n_combo };
- var valueType = $( programAttributeElement).find('valueType' ).text();
-
- setInnerHTML( 'valueTypeField', valueTypeMap[valueType] );
-
- showDetails();
-}
-
// -----------------------------------------------------------------------------
// Remove Program Attribute
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js 2011-08-19 21:33:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js 2011-09-28 07:11:18 +0000
@@ -38,26 +38,18 @@
function showProgramStageDetails( programStageId )
{
- $.ajax({
- url: 'getProgramStage.action?id=' + programStageId,
- cache: false,
- dataType: "xml",
- success: programStageReceived
+ jQuery.post( 'getProgramStage.action', { id: programStageId }, function ( json ) {
+ setInnerHTML( 'idField', json.programStage.id );
+ setInnerHTML( 'nameField', json.programStage.name );
+ setInnerHTML( 'descriptionField', json.programStage.description );
+ setInnerHTML( 'stageInProgramField', json.programStage.stageInProgram );
+ setInnerHTML( 'minDaysFromStartField', json.programStage.minDaysFromStart );
+ setInnerHTML( 'dataElementCountField', json.programStage.dataElementCount );
+
+ showDetails();
});
}
-function programStageReceived( programStageElement )
-{
- setInnerHTML( 'idField', getElementValue( programStageElement, 'id' ) );
- setInnerHTML( 'nameField', getElementValue( programStageElement, 'name' ) );
- setInnerHTML( 'descriptionField', getElementValue( programStageElement, 'description' ) );
- setInnerHTML( 'stageInProgramField', getElementValue( programStageElement, 'stageInProgram' ) );
- setInnerHTML( 'minDaysFromStartField', getElementValue( programStageElement, 'minDaysFromStart' ) );
- setInnerHTML( 'dataElementCountField', getElementValue( programStageElement, 'dataElementCount' ) );
-
- showDetails();
-}
-
// -----------------------------------------------------------------------------
// select data-elements
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js 2011-08-24 08:57:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js 2011-09-28 07:11:18 +0000
@@ -11,25 +11,17 @@
function showProgramValidationDetails ( programValidationId )
{
- $.ajax({
- url: 'getProgramValidation.action?validationId=' + programValidationId,
- cache: false,
- dataType: "xml",
- success: programValdiationReceived
+ jQuery.post( 'getProgramValidation.action', { validationId: programValidationId }, function ( json ) {
+ setInnerHTML( 'idField', json.validation.id );
+ setInnerHTML( 'descriptionField', json.validation.description );
+ setInnerHTML( 'leftSideField', json.validation.leftSide );
+ setInnerHTML( 'rightSideField', json.validation.rightSide );
+ setInnerHTML( 'programField', json.validation.program );
+
+ showDetails();
});
}
-function programValdiationReceived( programValidationElement )
-{
- setInnerHTML( 'idField', $( programValidationElement).find('id').text() );
- setInnerHTML( 'descriptionField', $( programValidationElement).find('description' ).text() );
- setInnerHTML( 'leftSideField', $( programValidationElement).find('leftSide').text() );
- setInnerHTML( 'rightSideField', $( programValidationElement).find('rightSide').text() );
- setInnerHTML( 'programField', $( programValidationElement).find('program').text() );
-
- showDetails();
-}
-
// -----------------------------------------------------------------------------
// Remove ProgramValidation
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationship.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationship.js 2011-09-14 06:36:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationship.js 2011-09-28 07:11:18 +0000
@@ -4,24 +4,16 @@
function showRelationshipTypeDetails( relationshipTypeId )
{
- $.ajax({
- url: 'getRelationshipType.action?id=' + relationshipTypeId,
- cache: false,
- dataType: "xml",
- success: relationshipTypeReceived
+ jQuery.post( 'getRelationshipType.action', { id: relationshipTypeId }, function ( json ) {
+ setInnerHTML( 'idField', json.relationshipType.id );
+ setInnerHTML( 'aIsToBField', json.relationshipType.aIsToB );
+ setInnerHTML( 'bIsToAField', json.relationshipType.bIsToA );
+ setInnerHTML( 'descriptionField', json.relationshipType.description );
+
+ showDetails();
});
}
-function relationshipTypeReceived( relationshipTypeElement )
-{
- setInnerHTML( 'idField', getElementValue( relationshipTypeElement, 'id' ) );
- setInnerHTML( 'aIsToBField', getElementValue( relationshipTypeElement, 'aIsToB' ) );
- setInnerHTML( 'bIsToAField', getElementValue( relationshipTypeElement, 'bIsToA' ) );
- setInnerHTML( 'descriptionField', getElementValue( relationshipTypeElement, 'description' ) );
-
- showDetails();
-}
-
// -----------------------------------------------------------------------------
// Add RelationshipType
// -----------------------------------------------------------------------------
=== 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-08-19 21:33:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/validationcriteria.js 2011-09-28 07:11:18 +0000
@@ -13,36 +13,28 @@
function showValidationCriteriaDetails( criteriaId )
{
- $.ajax({
- url: 'getValidationCriteria.action?id=' + criteriaId,
- cache: false,
- dataType: "xml",
- success: validationCriteriaReceived
+ jQuery.post( 'getValidationCriteria.action', { id: criteriaId }, function ( json ) {
+ setInnerHTML( 'nameField', json.validationCriteria.name );
+ setInnerHTML( 'descriptionField', json.validationCriteria.description );
+
+ var property = json.validationCriteria.property;
+ var operator = json.validationCriteria.operator;
+ var value = json.validationCriteria.value;
+
+ // get operator
+ if(operator == 0 ){
+ operator = '=';
+ }else if(operator == -1 ){
+ operator = '<';
+ }else {
+ operator = '>';
+ }
+
+ setInnerHTML('criteriaField', property + " " + operator + " " + value );
+ showDetails();
});
}
-function validationCriteriaReceived( validationCriteria )
-{
- setInnerHTML( 'nameField', $(validationCriteria).find('name').text() );
- setInnerHTML( 'descriptionField', $(validationCriteria).find('description' ).text() );
-
- var property = $(validationCriteria).find('property').text();
- var operator = $(validationCriteria).find('operator').text();
- var value = $(validationCriteria).find('value').text();
-
- // get operator
- if(operator == 0 ){
- operator = '=';
- }else if(operator == -1 ){
- operator = '<';
- }else {
- operator = '>';
- }
-
- setInnerHTML('criteriaField', property + " " + operator + " " + value );
- showDetails();
-}
-
// ----------------------------------------------------------------------------------------
// Show div to Add or Update Validation-Criteria
// ----------------------------------------------------------------------------------------
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseCaseAggregation.vm 2010-11-25 22:22:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseCaseAggregation.vm 1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<caseAggregation>
- <id>$caseAggregation.id</id>
- <description>$encoder.xmlEncode( $caseAggregation.description )</description>
- <operator>$caseAggregation.operator</operator>
- <aggregationDataElement>$encoder.xmlEncode( $caseAggregation.aggregationDataElement.name)</aggregationDataElement>
- <optionCombo>$encoder.xmlEncode( $caseAggregation.optionCombo.name )</optionCombo>
- <aggregationExpression>$encoder.xmlEncode( $caseAggregation.aggregationExpression )</aggregationExpression>
-</caseAggregation>
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientAttribute.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientAttribute.vm 2009-10-22 07:41:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientAttribute.vm 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<patientAttribute>
- <id>$patientAttribute.id</id>
- <name>$encoder.xmlEncode( $patientAttribute.name )</name>
- <description>$encoder.xmlEncode( $patientAttribute.description )</description>
- <valueType>$encoder.xmlEncode( $patientAttribute.valueType )</valueType>
-</patientAttribute>
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientAttributeGroup.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientAttributeGroup.vm 2010-09-26 11:49:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientAttributeGroup.vm 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<patientAttributeGroup>
- <id>$patientAttributeGroup.id</id>
- <name>$encoder.xmlEncode( $patientAttributeGroup.name )</name>
- <description>$encoder.xmlEncode( $patientAttributeGroup.description )</description>
- <noAttribute>$patientAttributeGroup.attributes.size()</noAttribute>
-</patientAttributeGroup>
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientIdentifierType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientIdentifierType.vm 2011-07-21 06:26:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientIdentifierType.vm 1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
-<patientIdentifierType>
- <id>$patientIdentifierType.id</id>
- <name>$encoder.xmlEncode( $patientIdentifierType.name )</name>
- <description>$encoder.xmlEncode( $patientIdentifierType.description )</description>
- <mandatory>$patientIdentifierType.mandatory</mandatory>
- <related>$patientIdentifierType.related</related>
- <noChars>$!patientIdentifierType.noChars</noChars>
- <type>$patientIdentifierType.type</type>
-</patientIdentifierType>
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgram.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgram.vm 2011-05-25 05:27:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgram.vm 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-{
- "id":"$program.id",
- "name":"$!encoder.jsEncode( ${program.name} )",
- "description": "$!encoder.jsEncode( ${program.description} )",
- "programStageCount": "$program.programStages.size()",
- "maxDay": "$program.maxDaysAllowedInputData"
-}
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramAttribute.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramAttribute.vm 2010-11-09 02:09:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramAttribute.vm 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<programAttribute>
- <id>$programAttribute.id</id>
- <name>$encoder.xmlEncode( $programAttribute.name )</name>
- <description>$encoder.xmlEncode( $programAttribute.description )</description>
- <valueType>$encoder.xmlEncode( $programAttribute.valueType )</valueType>
-</programAttribute>
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramStage.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramStage.vm 2010-05-17 02:59:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramStage.vm 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<programStage>
- <id>$programStage.id</id>
- <name>$encoder.xmlEncode( $programStage.name )</name>
- <description>$encoder.xmlEncode( $programStage.description )</description>
- <stageInProgram>$programStage.stageInProgram</stageInProgram>
- <minDaysFromStart>$programStage.minDaysFromStart</minDaysFromStart>
- <dataElementCount>$programStageDataElements.size()</dataElementCount>
- <dataElements>
- #foreach($d in $programStageDataElements)
- <dataElement>
- <id>$d.dataElement.id</id>
- <name>$encoder.xmlEncode( $d.dataElement.name )</name>
- </dataElement>
- #end
- </dataElements>
-</programStage>
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramValidation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramValidation.vm 2011-07-07 08:03:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseProgramValidation.vm 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<validation>
- <id>$validation.id</id>
- <description>$encoder.htmlEncode($validation.description)</description>
- <leftSide>$encoder.htmlEncode($validation.leftSide)</leftSide>
- <rightSide>$encoder.htmlEncode($validation.rightSide)</rightSide>
- <program>$encoder.htmlEncode($validation.program.name)</program>
-</validation>
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePrograms.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePrograms.vm 2011-05-13 09:11:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePrograms.vm 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
-#set( $size = $programs.size() )
-{
- "programs": [
- #foreach( $program in $programs )
- {
- "id": ${program.id} ,
- "name": "$!encoder.jsonEncode( ${program.name} )"
- }#if( $velocityCount < $size ),#end
- #end]
-}
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseRelationshipType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseRelationshipType.vm 2009-11-24 15:39:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responseRelationshipType.vm 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<relationshipType>
- <id>$relationshipType.id</id>
- <aIsToB>$encoder.xmlEncode( $relationshipType.aIsToB )</aIsToB>
- <bIsToA>$encoder.xmlEncode( $relationshipType.bIsToA )</bIsToA>
- <description>$encoder.xmlEncode( $relationshipType.description )</description>
-</relationshipType>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/struts.xml 2011-09-06 05:37:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/struts.xml 2011-09-28 07:11:18 +0000
@@ -34,7 +34,8 @@
</action>
<action name="getUser" class="org.hisp.dhis.user.action.GetUserAction">
- <result name="success" type="velocity-xml">/dhis-web-maintenance-user/responseUser.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonUser.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
@@ -111,7 +112,8 @@
</action>
<action name="getRole" class="org.hisp.dhis.user.action.GetRoleAction">
- <result name="success" type="velocity-xml">/dhis-web-maintenance-user/responseRole.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonUserRole.vm</result>
<param name="onExceptionReturn">plainTextError</param>
<param name="requiredAuthorities">F_USERROLE_LIST</param>
</action>
@@ -178,8 +180,8 @@
</action>
<action name="getUserGroup" class="org.hisp.dhis.user.action.GetUserGroupAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-user/responseUserGroup.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonUserGroup.vm</result>
</action>
<action name="addUserGroupForm" class="org.hisp.dhis.user.action.NoAction">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/role.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/role.js 2010-09-23 09:32:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/role.js 2011-09-28 07:11:18 +0000
@@ -5,19 +5,13 @@
function showRoleDetails( roleId )
{
- var request = new Request();
- request.setResponseTypeXML( 'role' );
- request.setCallbackSuccess( roleReceived );
- request.send( 'getRole.action?id=' + roleId );
-}
-
-function roleReceived( xmlObject )
-{
- setInnerHTML( 'nameField', getElementValue( xmlObject, 'name' ) );
- setInnerHTML( 'membersField', getElementValue( xmlObject, 'members' ) );
- setInnerHTML( 'dataSetsField', getElementValue( xmlObject, 'dataSets' ) );
-
- showDetails();
+ jQuery.post( 'getRole.action', { id: roleId }, function ( json ) {
+ setInnerHTML( 'nameField', json.userRole.name );
+ setInnerHTML( 'membersField', json.userRole.members );
+ setInnerHTML( 'dataSetsField', json.userRole.dataSets );
+
+ showDetails();
+ });
}
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/user.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/user.js 2011-09-26 09:31:56 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/user.js 2011-09-28 07:11:18 +0000
@@ -43,45 +43,39 @@
function showUserDetails( userId )
{
- var request = new Request();
- request.setResponseTypeXML( 'user' );
- request.setCallbackSuccess( userReceived );
- request.send( 'getUser.action?id=' + userId );
-}
-
-function userReceived( userElement )
-{
- setInnerHTML( 'usernameField', getElementValue( userElement, 'username' ) );
-
- var fullName = getElementValue( userElement, 'firstName' ) + ", " + getElementValue( userElement, 'surname' );
- setInnerHTML( 'fullNameField', fullName );
-
- var email = getElementValue( userElement, 'email' );
- setInnerHTML( 'emailField', email ? email : '[' + i18n_none + ']' );
-
- var phoneNumber = getElementValue( userElement, 'phoneNumber' );
- setInnerHTML( 'phoneNumberField', phoneNumber ? phoneNumber : '[' + i18n_none + ']' );
-
- var lastLogin = getElementValue( userElement, 'lastLogin' );;
- setInnerHTML( 'lastLoginField', lastLogin ? lastLogin : '[' + i18n_none + ']' );
-
- var temp = '';
- var orgunits = userElement.getElementsByTagName( 'orgunit' );
- for( var i = 0 ; i < orgunits.length ; i ++ )
- {
- temp += orgunits[i].firstChild.nodeValue + "<br/>";
- }
- setInnerHTML( 'assignedOrgunitField', temp ? temp : '[' + i18n_none + ']' );
-
- temp = '';
- var roles = userElement.getElementsByTagName( 'role' );
- for( var i = 0 ; i < roles.length ; i ++ )
- {
- temp += roles[i].firstChild.nodeValue + "<br/>";
- }
- setInnerHTML( 'roleField', temp ? temp : '[' + i18n_none + ']' );
-
- showDetails();
+ jQuery.post( 'getUser.action', { id: userId }, function ( json ) {
+ setInnerHTML( 'usernameField', json.user.username );
+
+ var fullName = json.user.firstName + ", " + json.user.surname;
+ setInnerHTML( 'fullNameField', fullName );
+
+ var email = json.user.email;
+ setInnerHTML( 'emailField', email ? email : '[' + i18n_none + ']' );
+
+ var phoneNumber = json.user.phoneNumber;
+ setInnerHTML( 'phoneNumberField', phoneNumber ? phoneNumber : '[' + i18n_none + ']' );
+
+ var lastLogin = json.user.lastLogin;
+ setInnerHTML( 'lastLoginField', lastLogin ? lastLogin : '[' + i18n_none + ']' );
+
+ var temp = '';
+ var orgunits = json.user.orgunits;
+ for( var i = 0 ; i < orgunits.length ; i ++ )
+ {
+ temp += orgunits[i].name + "<br/>";
+ }
+ setInnerHTML( 'assignedOrgunitField', temp ? temp : '[' + i18n_none + ']' );
+
+ temp = '';
+ var roles = json.user.roles;
+ for( var i = 0 ; i < roles.length ; i ++ )
+ {
+ temp += roles[i].name + "<br/>";
+ }
+ setInnerHTML( 'roleField', temp ? temp : '[' + i18n_none + ']' );
+
+ showDetails();
+ });
}
// -----------------------------------------------------------------------------
@@ -99,18 +93,13 @@
function showUserGroupDetails( userGroupId )
{
- var request = new Request();
- request.setResponseTypeXML( 'userGroup' );
- request.setCallbackSuccess( userGroupReceived );
- request.send( 'getUserGroup.action?userGroupId=' + userGroupId );
-}
-
-function userGroupReceived( userGroupElement )
-{
- setInnerHTML( 'nameField', getElementValue( userGroupElement, 'name' ) );
- setInnerHTML( 'noOfGroupField', getElementValue( userGroupElement, 'noOfUsers' ) );
-
- showDetails();
+ jQuery.post( 'getUserGroup.action', { userGroupId: userGroupId },
+ function ( json ) {
+ setInnerHTML( 'nameField', json.userGroup.name );
+ setInnerHTML( 'noOfGroupField', json.userGroup.noOfUsers );
+
+ showDetails();
+ });
}
function removeUserGroup( userGroupId, userGroupName )
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/responseRole.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/responseRole.vm 2011-03-14 21:10:15 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/responseRole.vm 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<role>
- <name>$encoder.xmlEncode( $userAuthorityGroup.name )</name>
- <members>$userAuthorityGroup.members.size()</members>
- <dataSets>$userAuthorityGroup.dataSets.size()</dataSets>
- <reports>$userAuthorityGroup.reports.size()</reports>
-</role>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/responseUser.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/responseUser.vm 2011-09-05 04:00:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/responseUser.vm 1970-01-01 00:00:00 +0000
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<user>
- <username>$encoder.xmlEncode( $userCredentials.username )</username>
- <firstName>$encoder.xmlEncode( $userCredentials.user.firstName )</firstName>
- <surname>$encoder.xmlEncode( $userCredentials.user.surname )</surname>
- <email>$!encoder.xmlEncode( $userCredentials.user.email )</email>
- <phoneNumber>$!encoder.xmlEncode( $userCredentials.user.phoneNumber )</phoneNumber>
- <lastLogin>$!format.formatDate( $!userCredentials.lastLogin )</lastLogin>
- <orgunits>
- #foreach( $unit in $userCredentials.user.organisationUnits )
- <orgunit>$unit</orgunit>
- #end
- </orgunits>
- <roles>
- #foreach( $role in $userCredentials.userAuthorityGroups )
- <role>$role.name</role>
- #end
- </roles>
-</user>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/responseUserGroup.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/responseUserGroup.vm 2011-03-14 21:10:15 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/responseUserGroup.vm 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<userGroup>
- <name>$group.name</name>
- <id>$group.id</id>
- <noOfUsers>$memberCount</noOfUsers>
-</userGroup>