dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #09829
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2660: Cannot run Show details button into case-dataentry-form.
------------------------------------------------------------
revno: 2660
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-01-20 13:06:45 +0700
message:
Cannot run Show details button into case-dataentry-form.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatient.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-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm 2010-12-08 07:17:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm 2011-01-20 06:06:45 +0000
@@ -77,4 +77,5 @@
var i18n_dob_type = '$encoder.jsEscape( $i18n.getString( "dob_type" ), "'")';
var i18n_date_of_birth = '$encoder.jsEscape( $i18n.getString( "date_of_birth" ), "'")';
var i18n_blood_group = '$encoder.jsEscape( $i18n.getString( "blood_group" ), "'")';
+ var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js 2010-12-08 07:17:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/dataEntry.js 2011-01-20 06:06:45 +0000
@@ -107,7 +107,7 @@
+ '<strong>' + i18n_dob_type + ':</strong> ' + dobType+ "<br>"
+ '<strong>' + i18n_date_of_birth + ':</strong> ' + birthDate+ "<br>"
+ '<strong>' + i18n_blood_group + ':</strong> ' + bloodGroup;
-
+
setInnerHTML( 'commonInfoField', commonInfo );
// ----------------------------------------------------------------------------
@@ -139,9 +139,13 @@
{
attributeValues = attributeValues + '<strong>' + attributes[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue + ': </strong>' + attributes[ i ].getElementsByTagName( "value" )[0].firstChild.nodeValue + '<br>';
}
-
+ attributeValues = ( attributeValues.length == 0 ) ? i18n_none : attributeValues;
setInnerHTML( 'attributeField', attributeValues );
+ // ----------------------------------------------------------------------------
+ // Get programs
+ // ----------------------------------------------------------------------------
+
var programs = patientElement.getElementsByTagName( "program" );
var programName = '';
@@ -151,8 +155,13 @@
programName = programName + programs[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue + '<br>';
}
+ programName = ( programName.length == 0 ) ? i18n_none : programName;
setInnerHTML( 'programField', programName );
+ // ----------------------------------------------------------------------------
+ // Show details
+ // ----------------------------------------------------------------------------
+
showDetails();
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2009-11-20 11:53:33 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm 2011-01-20 06:06:45 +0000
@@ -87,7 +87,8 @@
<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( "identifier" ):</label><br><span id="identifierField"></span></p>
+ <p><label>$i18n.getString( "common_info" ):</label><br><span id="commonInfoField"></span></p>
+ <p><label>$i18n.getString( "identifier" ):</label><br><span id="identifierField"></span></p>
<p><label>$i18n.getString( "attributes" ):</label><br><span id="attributeField"></span></p>
<p><label>$i18n.getString( "enrolled_in_program" ):</label><br><span id="programField"></span></p>
</div>
@@ -95,4 +96,14 @@
</tr>
</table>
-<span id="message"></span>
\ No newline at end of file
+<span id="message"></span>
+
+<script>
+ var i18n_id = '$encoder.jsEscape( $i18n.getString( "id" ), "'")';
+ var i18n_full_name = '$encoder.jsEscape( $i18n.getString( "full_name" ), "'")';
+ var i18n_gender = '$encoder.jsEscape( $i18n.getString( "gender" ), "'")';
+ var i18n_dob_type = '$encoder.jsEscape( $i18n.getString( "dob_type" ), "'")';
+ var i18n_date_of_birth = '$encoder.jsEscape( $i18n.getString( "date_of_birth" ), "'")';
+ var i18n_blood_group = '$encoder.jsEscape( $i18n.getString( "blood_group" ), "'")';
+ var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
+</script>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatient.vm 2010-12-08 07:17:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responsePatient.vm 2011-01-20 06:06:45 +0000
@@ -3,7 +3,7 @@
<id>$patient.id</id>
<fullName>$encoder.xmlEncode( $patient.getFullName() )</fullName>
<gender>$encoder.xmlEncode( $patient.gender )</gender>
- <dobType>#if($!patient.dobType) $encoder.xmlEncode( $!patient.dobType )#else $i18n.getString('none') #end</dobType>
+ <dobType>#if($!patient.dobType)$!patient.dobType#else $i18n.getString('none') #end</dobType>
<dateOfBirth>$format.formatDate( $!patient.birthDate )</dateOfBirth>
<age>$encoder.xmlEncode( $patient.getAge() )</age>
<bloodGroup>#if($!patient.bloodGroup) $patient.bloodGroup #else $i18n.getString('none') #end</bloodGroup>