← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4857: Remove program stage and due date from single-event data entry screen; Change to jquery modal dia...

 

------------------------------------------------------------
revno: 4857
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-10-06 16:06:31 +0700
message:
  Remove program stage and due date from single-event data entry screen; Change to jquery modal dialog for beneficiary representative;  Remove thickbox and cluetip plugins from the patient module.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipPatientForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js
  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/updatePatientForm.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/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2011-10-06 05:25:34 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2011-10-06 09:06:31 +0000
@@ -437,4 +437,5 @@
 add_dependent													= Add dependent
 edit_profile													= Edit profile
 aggregate_details												= Aggregate details
-show_details													= Show details
\ No newline at end of file
+show_details													= Show details
+representative_info												= Representative's Information
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml	2011-10-06 05:25:34 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml	2011-10-06 09:06:31 +0000
@@ -362,10 +362,6 @@
 			<result name="success" type="velocity">/content.vm</result>
 			<param name="page">
 				/dhis-web-caseentry/updatePatientForm.vm</param>
-			<param name="stylesheets">
-				../dhis-web-commons/javascripts/jQuery/ui/css/ui.thickbox.css
-				,../dhis-web-commons/javascripts/jQuery/ui/css/jquery.cluetip.css
-			</param>
 			<param name="requiredAuthorities">F_PATIENT_UPDATE</param>
 		</action>
 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipPatientForm.vm	2011-09-27 04:24:12 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipPatientForm.vm	2011-10-06 09:06:31 +0000
@@ -56,14 +56,4 @@
 </p>
 
 </form> 	
-	
-<div id="hiddenModalContent" style="display:none">
-<style> 
-div#hiddenModalContent label { font-weight: bold;}  
-div#hiddenModalContent td {padding: 2px 5px}
-</style>
-<span>$i18n.getString( "duplicate_warning" )</span>
-<input type="button" value="$i18n.getString( 'create_new_patient' )"  id="btnCreateNew"/>
 
-<div id="thickboxContainer"></div>
-</div>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm	2011-10-06 04:38:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm	2011-10-06 09:06:31 +0000
@@ -45,23 +45,22 @@
                 #end
             </select>
         </td>
-		<td><label for="dueDate">$i18n.getString( "due_date" ) </label></td>
-        <td><input type="text" id="dueDate" name="dueDate" value="$!format.formatDate( $programStageInstance.dueDate )" readonly> </td>
-    </tr>
-    
-    <tr>
-        <td><label for="programStageId">$i18n.getString( "program_stage" )</label></td>
-        <td>
-            <select id="programStageId" name="programStageId" style="min-width:350px" onchange="javascript:loadDataEntry();" >
-            </select>
-        </td>
 		<td><label for="executionDate">$i18n.getString( "report_date" ) </label></td>
 		<td><input type="text" id="executionDate" name="executionDate" value="$!format.formatDate( $programStageInstance.executionDate )" >
 			<script type="text/javascript">
 			   datePickerValid( 'executionDate', false );
 			</script>  
-    </tr>
-	
+		</tr>
+		<tr id='nonSingleEventProgramDiv'>
+				<td><label for="programStageId">$i18n.getString( "program_stage" )</label></td>
+				<td>
+					<select id="programStageId" name="programStageId" style="min-width:350px" onchange="javascript:loadDataEntry();" >
+					</select>
+				</td>
+				<td><label for="dueDate">$i18n.getString( "due_date" ) </label></td>
+				<td><input type="text" id="dueDate" name="dueDate" value="$!format.formatDate( $programStageInstance.dueDate )" readonly> </td>
+			
+		</tr>
 	<tr>
 		<td></td>
 		<td>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2011-10-06 06:42:42 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2011-10-06 09:06:31 +0000
@@ -837,8 +837,11 @@
 function showSelectedDataRecoding( patientId )
 {
 	showLoader();
+	setInnerHTML('dataRecordingSelectDiv', "");
+	setInnerHTML('dataEntryFormDiv', "");
 	hideById('searchPatientDiv');
 	hideById('dataEntryFormDiv');
+	
 	jQuery('#dataRecordingSelectDiv').load( 'selectDataRecordingFromRegistration.action', 
 		{
 			patientId: patientId
@@ -854,9 +857,24 @@
 				}
 			});
 			
+			hideById('nonSingleEventProgramDiv');
 			hideById('patientInfoDiv');
+			
 			showById('dataRecordingSelectDiv');
 			
 			hideLoader();
 		});
 }
+
+function showRepresentativeInfo( patientId)
+{
+	$('#representativeInfo' ).dialog({
+			title: i18n_representative_info,
+			maximize: true, 
+			closable: true,
+			modal:true,
+			overlay:{background:'#000000', opacity:0.1},
+			width: 400,
+			height: 300
+		});
+}

=== 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	2011-10-06 06:42:42 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm	2011-10-06 09:06:31 +0000
@@ -106,7 +106,7 @@
 	var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
 	var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
 	var i18n_choose_this_person = '$encoder.jsEscape( $i18n.getString( "choose_this_person" ) , "'")';
-	
+	var i18n_representative_info = '$encoder.jsEscape( $i18n.getString( "representative_info" ) , "'")';
 	var i18n_select = '[' + '$encoder.jsEscape( $i18n.getString( "select" ), "'")' + ']';
 	var i18n_program_stages_history_plan = '$encoder.jsEscape( $i18n.getString( "program_stages_history_plan" ) , "'")';
 	

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm	2011-10-06 06:10:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm	2011-10-06 09:06:31 +0000
@@ -16,11 +16,6 @@
 		datePickerValid( 'patientForm [id=deathDate]' );
 		addEventForPatientForm('patientForm');
 		
-		jQuery("#btnRepresentativeInfo").cluetip(
-		{
-			local:"#representativeInfo"
-		});
-		
 		jQuery("#patientForm").validate({
 				 meta:"validate"
 				,errorElement:"span"
@@ -174,8 +169,9 @@
 		#set( $representative = $patient.representative ) 
 		<tr>
 			<td>$i18n.getString("representative")</td>
-			<td>$!patient.representative.getFullName() 
-				<a title="$i18n.getString('patient_info')" href="#" id="btnRepresentativeInfo" rel="#representativeInfo"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a></td>
+			<td> 
+				$!patient.representative.getFullName() <img src="../images/information.png" alt="$i18n.getString( 'show_details' )" onclick='showRepresentativeInfo()' style='cursor:pointer;'>
+			</td>
 		</tr>
 	#end
 	
@@ -274,56 +270,45 @@
 
 </form> 	
 
-<div id="hiddenModalContent" style="display:none">
-<style> 
-div#hiddenModalContent label { font-weight: bold;}  
-div#hiddenModalContent td {padding: 2px 5px}
-</style>
-<span>$i18n.getString( "duplicate_warning" )</span>
-<input type="button" value="$i18n.getString( 'create_new_patient' )"  id="btnCreateNew"/>
-
-<div id="thickboxContainer"></div>
-</div>
-
-<div id="representativeInfo" style="display:none">
-<table>
-	<tr>
-		<td class="bold">$i18n.getString("full_name"):</td>
-		<td>$!representative.getFullName()</td>
-	</tr>
-	<tr>
-		<td class="bold">$i18n.getString("gender"):</td>
-		<td> $!representative.gender</td>
-	</tr>
-	<tr>
-		<td class="bold">$i18n.getString("date_of_birth"):</td>
-		<td>$!format.formatDate( $!representative.birthDate )</td>
-	</tr>
-	<tr>
-		<td class="bold">$i18n.getString("age"):</td>
-		<td> $!representative.getAge() </td>
-	</tr>
-	<tr>
-		<td class="bold">$i18n.getString("blood_group"):</td>
-		<td>$!representative.getBloodGroup()</td>
-	</tr>
-	#foreach( $patientIdentifier in $representative.identifiers )
-	  <tr>  
-	  	<td class="bold">#if( $patientIdentifier.identifierType )$patientIdentifier.identifierType.name: #else $i18n.getString("system_identifier"): #end</td>      
-	      <td> $!patientIdentifier.identifier </td>
-	   </tr>
-	#end
-	<tr>
-		<td class="bold">$i18n.getString("programs"):</td>
-		<td>  
-			 #foreach( $program in $representative.programs )
-			 	#if( $velocityCount == 1 )
-	      			 $program.name
-	      		#else ,  $program.name 
-	      		#end
-			 #end  
-		</td>
-	</tr>
-	       
-</table>
+<div id="representativeInfo" style='font-size:12px;'>
+	<table id='patientInfoDiv'>
+		<tr>
+			<td class="bold">$i18n.getString("full_name"):</td>
+			<td>$!representative.getFullName()</td>
+		</tr>
+		<tr>
+			<td class="bold">$i18n.getString("gender"):</td>
+			<td> $!representative.gender</td>
+		</tr>
+		<tr>
+			<td class="bold">$i18n.getString("date_of_birth"):</td>
+			<td>$!format.formatDate( $!representative.birthDate )</td>
+		</tr>
+		<tr>
+			<td class="bold">$i18n.getString("age"):</td>
+			<td> $!representative.getAge() </td>
+		</tr>
+		<tr>
+			<td class="bold">$i18n.getString("blood_group"):</td>
+			<td>$!representative.getBloodGroup()</td>
+		</tr>
+		#foreach( $patientIdentifier in $representative.identifiers )
+		  <tr>  
+			<td class="bold">#if( $patientIdentifier.identifierType )$patientIdentifier.identifierType.name: #else $i18n.getString("system_identifier"): #end</td>      
+			  <td> $!patientIdentifier.identifier </td>
+		   </tr>
+		#end
+		<tr>
+			<td class="bold">$i18n.getString("programs"):</td>
+			<td>  
+				 #foreach( $program in $representative.programs )
+					#if( $velocityCount == 1 )
+						 $program.name
+					#else ,  $program.name 
+					#end
+				 #end  
+			</td>
+		</tr>
+			   
+	</table>
 </div>