← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7509: css for default data entry form.

 

------------------------------------------------------------
revno: 7509
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-07-05 13:29:29 +0700
message:
  css for default data entry form.
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/patient.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
=== 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-07-04 01:37:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2012-07-05 06:29:29 +0000
@@ -69,7 +69,7 @@
 					#end
 
 					#if( $programStageDataElement.dataElement.type == "bool" )
-						<select style='width: 256px;' name="entryfield" data="{compulsory: $programStageDataElement.compulsory }" id="$id" onchange="saveOpt( $programStageDataElement.dataElement.id )" tabindex="$tabIndex">
+						<select name="entryfield" data="{compulsory: $programStageDataElement.compulsory }" id="$id" onchange="saveOpt( $programStageDataElement.dataElement.id )" tabindex="$tabIndex">
 							<option value="">[$i18n.getString( "select_value" )]</option>
 							<option value="true" #if( $patientDataValue.value == "true" ) selected="selected" #end>$i18n.getString( "yes" )</option>
 							<option value="false" #if( $patientDataValue.value == "false" ) selected="selected" #end>$i18n.getString( "no" )</option>
@@ -77,7 +77,7 @@
 					#elseif( $programStageDataElement.dataElement.type == "trueOnly" )
 						<input name="entryfield" type="checkbox" data="{compulsory: $programStageDataElement.compulsory, deType:'$programStageDataElement.dataElement.getType()'}" id="$id" name="entryfield" #if($patientDataValue.value=="true") checked #end onchange="saveVal( $programStageDataElement.dataElement.id )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" >
 					#elseif( $programStageDataElement.dataElement.type == "date" )
-						<input name="entryfield" style='width: 250px;' type="text" data="{compulsory: $programStageDataElement.compulsory }" id="$id" name="entryfield" value="$!encoder.htmlEncode( $patientDataValue.value )" onchange="saveVal( $programStageDataElement.dataElement.id )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" >
+						<input name="entryfield" type="text" data="{compulsory: $programStageDataElement.compulsory }" id="$id" name="entryfield" value="$!encoder.htmlEncode( $patientDataValue.value )" onchange="saveVal( $programStageDataElement.dataElement.id )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" >
 						<script type="text/javascript">
 							datePicker($programStageDataElement.programStage.id + '-' + $programStageDataElement.dataElement.id + '-val', false);
 						</script> 

=== 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	2012-06-28 04:07:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2012-07-05 06:29:29 +0000
@@ -347,11 +347,9 @@
 {				
 	if( programId == 0 )
 	{
-		jQuery('#enrollBtn').attr('value',i18n_enroll_to_program);
+		jQuery('#enrollBtn').attr('value',i18n_enroll);
 		hideEnrolmentField();
-
 		hideById('programEnrollmentDiv');
-		
 		return;
 	}
 		
@@ -366,22 +364,17 @@
 			showEnrolmentField();
 			
 			var type = jQuery('#enrollmentDiv [name=programId] option:selected').attr('type');
-			
-			if(type=='2')
-			{
+			if(type=='2'){
 				hideEnrolmentField();
 			}
-			else
-			{
+			else{
 				showEnrolmentField();
 				var type = jQuery('#programEnrollmentSelectDiv [name=programId] option:selected').attr('type');
 					
-				if( type=='2')
-				{
+				if( type=='2'){
 					hideById( 'dateOfIncidentTR');
 				}
-				else
-				{
+				else{
 					showById( 'dateOfIncidentTR');
 				}
 			}
@@ -392,6 +385,7 @@
 
 function validateProgramEnrollment()
 {	
+	jQuery('#loaderDiv').show();
 	$.ajax({
 		type: "GET",
 		url: 'validatePatientProgramEnrollment.action',
@@ -399,21 +393,18 @@
 		success: function(json) {
 			hideById('message');
 			var type = json.response;
-			if ( type == 'success' )
-			{
+			if ( type == 'success' ){
 				saveProgramEnrollment();
 			}
-			else if ( type == 'error' )
-			{
+			else if ( type == 'error' ){
 				setMessage( i18n_program_enrollment_failed + ':' + '\n' + message );
 			}
-			else if ( type == 'input' )
-			{
+			else if ( type == 'input' ){
 				setMessage( json.message );
 			}
+			jQuery('#loaderDiv').hide();
       }
     });
-    return false;
 }
 
 function saveProgramEnrollment()