dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18789
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7965: Don't load data entry form in person dashboard.
------------------------------------------------------------
revno: 7965
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-08-25 13:59:13 +0700
message:
Don't load data entry form in person dashboard.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/relationshipPatient.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.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/dataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2012-08-24 10:09:45 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2012-08-25 06:59:13 +0000
@@ -28,7 +28,41 @@
<input type='hidden' name='completed' id='completed' value='$!programStageInstance.completed'>
<input type='hidden' name='programStageId' id='programStageId' value='$!programStageInstance.programStage.id'>
-<div id='entryForm' #if($!programStageInstance.executionDate) class='visible' #else class='hidden' #end>
+
+<table class="mainPageTable" id='patientInfoDiv' class='hidden'>
+ <tr>
+ <td valign="top">
+ <table>
+ <tr>
+ <td class="bold">$i18n.getString( "full_name" ):</td>
+ <td>$encoder.htmlEncode( $programStageInstance.programInstance.patient.getFullName() )<td>
+ </tr>
+ <tr>
+ <td class="bold">$i18n.getString( "gender" ):</td>
+ <td>$i18n.getString("$programStageInstance.programInstance.patient.gender")</td>
+ </tr>
+ <tr>
+ <td class="bold">$i18n.getString( "date_of_birth" ):</td>
+ <td>$format.formatDate( $programStageInstance.programInstance.patient.birthDate ) $programStageInstance.programInstance.patient.getAge()<td>
+ </tr>
+ </table>
+ </tr>
+</table>
+
+<table id='executionDateTB' class='hidden'>
+ <tr>
+ <th class='text-column'><label for="executionDate">$i18n.getString( "report_date" ) </label></th>
+ <th><input type="text" id="executionDate" name="executionDate" class='criteria' value="$!format.formatDate( $programStageInstance.executionDate )" >
+ <script type="text/javascript">
+ datePickerValid( 'executionDate', false );
+ </script>
+ </th>
+ <th class='text-column'><label for="dueDate">$i18n.getString( "due_date" ) </label></th>
+ <th><input type="text" id="dueDate" name="dueDate" class='criteria' value="$!format.formatDate( $programStageInstance.dueDate )" readonly > </th>
+ </tr>
+</table>
+
+<div id='entryForm' #if($!programStageInstance.executionDate) class='visible' #else class='hidden' #end>
#if( $customDataEntryFormCode )
#parse( "/dhis-web-caseentry/customDataEntryForm.vm" )
#elseif( $sections )
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/relationshipPatient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/relationshipPatient.js 2012-08-16 02:08:22 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/relationshipPatient.js 2012-08-25 06:59:13 +0000
@@ -24,7 +24,7 @@
programStageInstanceId: programStageInstanceId
},function( )
{
- var executionDate = jQuery('#dataRecordingSelectDiv input[id=executionDate]').val();
+ var executionDate = jQuery('#executionDate').val();
var completed = jQuery('#entryFormContainer input[id=completed]').val();
var irregular = jQuery('#entryFormContainer input[id=irregular]').val();
showById('inputCriteriaDiv');
@@ -44,6 +44,21 @@
hideLoader();
hideById('contentDiv');
+
+ if(isDashboard){
+ showById('executionDateTB');
+ showById('patientInfoDiv');
+ $( '#dataEntryFormDiv' ).dialog(
+ {
+ title:i18n_program_stage,
+ maximize:true,
+ closable:true,
+ modal:false,
+ overlay:{background:'#000000', opacity:0.1},
+ width:1000,
+ height:500
+ });
+ }
} );
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm 2012-08-14 04:37:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm 2012-08-25 06:59:13 +0000
@@ -1,3 +1,7 @@
+<script>
+ isDashboard = true;
+</script>
+
<h4>$i18n.getString("patient_dashboard")
• <a href="javascript:showUpdatePatientForm( '$patient.id', true )">$i18n.getString( "edit_profile" )</a>
• <a href="javascript:setFieldValue( 'isShowPatientList', 'false' ); showRelationshipList( '$patient.id' );">$i18n.getString( "manage_relationship" )</a>
@@ -166,4 +170,4 @@
</tr>
</table>
-<div id='dataEntryFromDashboard'></div>
\ No newline at end of file
+<div id='dataEntryFormDiv'></div>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm 2012-08-06 09:34:34 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentSelectForm.vm 2012-08-25 06:59:13 +0000
@@ -100,7 +100,8 @@
<script>
var i18n_enroll = '$encoder.jsEscape( $i18n.getString( "enroll" ) , "'")';
var i18n_program_stage = '$encoder.jsEscape( $i18n.getString( "program_stage" ) , "'")';
-
+ var isDashboard = false;
+
jQuery('#programEnrollmentSelectDiv').ready(function()
{
validation( 'programEnrollmentSelectDiv', function(form){
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2012-08-17 13:51:24 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2012-08-25 06:59:13 +0000
@@ -110,6 +110,7 @@
unSave = false;
isAjax = true;
contentDiv = '';
+ var isDashboard = true;
// ----------------------------------------------------------------
// Search field