← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8470: Small change UI for patient registration form

 

------------------------------------------------------------
revno: 8470
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-10-11 11:30:21 +0700
message:
  Small change UI for patient registration form
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipForm.vm
  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/javascript/commons.js
  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/patientDashboard.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/relationshipList.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm
  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/singleEventSelect.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css


--
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/addRelationshipForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipForm.vm	2012-10-03 09:07:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipForm.vm	2012-10-11 04:30:21 +0000
@@ -10,15 +10,16 @@
 	});		
 </script>
 
-<h3>
+<h5>
 	<a href="javascript:loadPatientList();">$i18n.getString( 'patient_management' )</a>
 	&#8226; <a href="javascript:showPatientDashboardForm($!patient.id);">$i18n.getString( 'patient_dashboard' )</a>
 	&#8226; <a href="javascript:showRelationshipList( '$patient.id' )">$i18n.getString( "relationship_management" )</a>
+	
+</h5>
+<h3>
 	&raquo; $i18n.getString( 'seach_available_patient' )
+	&#8226; <a href="javascript:showAddRelationshipPatient( '$patient.id',false )" >$i18n.getString( 'add_new_patient' )</a>
 </h3>
-<h5>
-	$i18n.getString( "adding_new_relationship_for" ): $encoder.htmlEncode( $patient.getFullName() )
-</h5>
 
 <form id="relationshipSelectForm" name="relationshipSelectForm" method="post" action="showAddRelationshipForm.action">
 <input type="hidden" id="patientId" name="patientId" value="$patient.id"/>

=== 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	2012-10-03 08:45:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addRelationshipPatientForm.vm	2012-10-11 04:30:21 +0000
@@ -35,15 +35,15 @@
 	});		
 </script>
 
-<h3>
+<h5>
 	<a href="javascript:loadPatientList();">$i18n.getString( 'patient_management' )</a>
 	&#8226; <a href="javascript:showPatientDashboardForm($!patient.id);">$i18n.getString( 'patient_dashboard' )</a>
-	&#8226; <a href="javascript:showRelationshipList( '$patient.id' )">$i18n.getString( "relationship_management" )</a>
+	&#8226; <a href="javascript:showRelationshipList( '$patient.id' )">$i18n.getString( "relationship_management" )</a>	
+</h5>
+<h3>
 	&raquo; <a href="javascript:showAddRelationship('$patient.id')" >$i18n.getString( 'seach_available_patient' )</a>
 	&#8226; $i18n.getString( 'add_new_patient' )
-</h5>
-
-<h4>$i18n.getString("add_new_relationship_for"):  $patient.getFullName()</h4>
+</h3>
 																		
 <form id="patientForm" action="addRelationshipPatient.action" method="get" >
 <input type="hidden" id="relationshipId"  name="relationshipId" value="$patient.id"/> 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2012-10-09 03:53:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2012-10-11 04:30:21 +0000
@@ -122,7 +122,7 @@
 
 function getTrueFalseBox()
 {
-	var trueFalseBox  = '<select id="searchText" name="searchText">';
+	var trueFalseBox  = '<select class="search-field" id="searchText" name="searchText">';
 	trueFalseBox += '<option value="true">' + i18n_yes + '</option>';
 	trueFalseBox += '<option value="false">' + i18n_no + '</option>';
 	trueFalseBox += '</select>';
@@ -131,7 +131,7 @@
 	
 function getGenderSelector()
 {
-	var genderSelector = '<select id="searchText" name="searchText">';
+	var genderSelector = '<select class="search-field" id="searchText" name="searchText">';
 		genderSelector += '<option value="M">' + i18n_male + '</option>';
 		genderSelector += '<option value="F">' + i18n_female + '</option>';
 		genderSelector += '<option value="T">' + i18n_transgender + '</option>';
@@ -141,15 +141,15 @@
 
 function getAgeTextBox( container )
 {
-	var ageField = '<select id="dateOperator" style="width:30px;" name="dateOperator" ><option value="="> = </option><option value="<"> < </option><option value="<="> <= </option><option value=">"> > </option><option value=">="> >= </option></select>';
-	ageField += '<input type="text" id="searchText_' + container + '" name="searchText" style="width:230px;">';
+	var ageField = '<select id="dateOperator" style="width:40px;" name="dateOperator" ><option value="="> = </option><option value="<"> < </option><option value="<="> <= </option><option value=">"> > </option><option value=">="> >= </option></select>';
+	ageField += '<input type="text" id="searchText_' + container + '" name="searchText" style="width:145px;">';
 	return ageField;
 }
 
 function getDateField( container )
 {
-	var dateField = '<select id="dateOperator" name="dateOperator" style="width:30px"><option value=">"> > </option><option value=">="> >= </option><option value="="> = </option><option value="<"> < </option><option value="<="> <= </option></select>';
-	dateField += '<input type="text" id="searchText_' + container + '" name="searchText" maxlength="30" style="width:210px;" onkeyup="searchPatientsOnKeyUp( event );">';
+	var dateField = '<select id="dateOperator" name="dateOperator" style="width:40px"><option value=">"> > </option><option value=">="> >= </option><option value="="> = </option><option value="<"> < </option><option value="<="> <= </option></select>';
+	dateField += '<input type="text" id="searchText_' + container + '" name="searchText" maxlength="30" style="width:125px;" onkeyup="searchPatientsOnKeyUp( event );">';
 	return dateField;
 }
 

=== 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-10-06 14:57:31 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2012-10-11 04:30:21 +0000
@@ -14,6 +14,7 @@
 	enable('listPatientBtn');
 	enable('addPatientBtn');
 	enable('advancedSearchBtn');
+	enable('searchObjectId');
 	setFieldValue("orgunitName", orgUnitNames[0]);
 }
 

=== 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-10-11 03:29:05 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm	2012-10-11 04:30:21 +0000
@@ -9,11 +9,10 @@
 		<td width='33%'>
 			<div class="link-area">
 				<table width='100%'>
-					<tr><th>$i18n.getString("demographics")</th></tr>
-					<tr><th>
-						<a href="javascript:showUpdatePatientForm( '$patient.id', true );"><span class='bold'>&laquo;$i18n.getString("edit_profile")&raquo;</span></a>
+					<tr><th>$i18n.getString("demographics")
+						&#8226; <a href="javascript:showUpdatePatientForm( '$patient.id', true );"><span class='bold'>$i18n.getString("edit_profile")</span></a>
 						#if( $auth.hasAccess( "dhis-web-caseentry", "getPatientLocation" ) )
-						<a href="javascript:getPatientLocation( '$patient.id', true );"><span class='bold'> &laquo;$i18n.getString("change_location")&raquo;</span></a>
+						&#8226; <a href="javascript:getPatientLocation( '$patient.id', true );"><span class='bold'>$i18n.getString("change_location")</span></a>
 						#end
 					</th></tr>
 				</table>
@@ -90,9 +89,8 @@
 		<td width='33%'>
 			<div class="link-area" style='height:120px;'>
 				<table width='100%'>
-					<tr><th>$i18n.getString("active_programs")</th></tr>
-					<tr><th>
-							<a href='javascript:showProgramEnrollmentForm( "$patient.id" )'><span class='bold'>&laquo;$i18n.getString("enroll_program")&raquo;</span></a>
+					<tr><th>$i18n.getString("active_programs")
+						&#8226; <a href='javascript:showProgramEnrollmentForm( "$patient.id" )'><span class='bold'>$i18n.getString("enroll_program")</span></a>
 					</th></tr>
 				</table>
 				<div class="contentProviderTable" style='height:76px;'>
@@ -180,10 +178,9 @@
 		<td width='33%'>
 			<div class="link-area">
 				<table width='100%'>
-					<tr><th>$i18n.getString("relationships")</th></tr>
-					<tr><th>
-						<a href="javascript:setFieldValue( 'isShowPatientList', 'false' ); showRelationshipList( '$patient.id' );"><span class='bold'>&laquo;$i18n.getString("management")&raquo;</span></a>
-						<a href="javascript:showAddRelationshipPatient( '$patient.id', false );"><span class='bold'> &laquo;$i18n.getString("add_new_patient")&raquo;</span></a>
+					<tr><th>$i18n.getString("relationships")
+						&#8226; <a href="javascript:setFieldValue( 'isShowPatientList', 'false' ); showRelationshipList( '$patient.id' );"><span class='bold'>$i18n.getString("management")</span></a>
+						&#8226; <a href="javascript:showAddRelationshipPatient( '$patient.id', false );"><span class='bold'>$i18n.getString("add_new_patient")</span></a>
 					</th></tr>
 				</table>
 				<div class="contentProviderTable">

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/relationshipList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/relationshipList.vm	2012-09-24 05:02:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/relationshipList.vm	2012-10-11 04:30:21 +0000
@@ -2,13 +2,15 @@
 	hideById('mainLinkLbl');
 </script>
 
-<h3>
+<h5>
 	<a href="javascript:loadPatientList();">$i18n.getString( 'patient_management' )</a>
 	&#8226; <a href="javascript:showPatientDashboardForm($!patient.id);">$i18n.getString( 'patient_dashboard' )</a>
 	&#8226; $i18n.getString( "relationship_management" )
+</h5>
+<h3>	
 	&raquo; <a href="javascript:showAddRelationship('$patient.id')" >$i18n.getString( 'seach_available_patient' )</a>
 	&#8226; <a href="javascript:showAddRelationshipPatient( '$patient.id',false )" >$i18n.getString( 'add_new_patient' )</a>
-</h5>
+</h3>
 
 <input type="hidden" id="id" name="id" value="$patient.id">
 <table class="mainPageTable information">                           

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm	2012-10-05 03:29:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm	2012-10-11 04:30:21 +0000
@@ -10,7 +10,7 @@
 			<label>$i18n.getString( "registering_unit" )</label>
 		</td>
 		<td>
-			<input type="text" id='orgunitName' readonly="readonly" #if( $organisationUnit ) value="$encoder.htmlEncode( $organisationUnit.name )" #else value="[$i18n.getString( 'please_select_village' )]" #end >
+			<input type="text" class='search-field' id='orgunitName' readonly="readonly" #if( $organisationUnit ) value="$encoder.htmlEncode( $organisationUnit.name )" #else value="[$i18n.getString( 'please_select_village' )]" #end >
 		</td>
 		<td rowspan='2' valign='bottom'>
 			<input type="button" class='large-button' id='listPatientBtn' value="$i18n.getString( 'list_all_patients' )" onclick="javascript:listAllPatient();" disabled >
@@ -21,7 +21,7 @@
 	<tr id='programAddPatientTR' class='hidden'>
 		<td>$i18n.getString('program')</td>
 		<td>
-			<select id='programIdAddPatient' name='programIdAddPatient' onchange='enableBtn();'>
+			<select class='search-field' id='programIdAddPatient' name='programIdAddPatient' onchange='enableBtn();'>
 				<option value='' type='2'>[$i18n.getString("please_select")]</option>
 				#foreach($program in $programs)
 					<option value="$program.id" type='$program.type'>$program.name</option>
@@ -36,7 +36,7 @@
 		<tr id='programStageAddPatientTR' class='hidden'>
 			<td>$i18n.getString('status')</td>
 			<td>
-				<select id="statusEvent" name="statusEvent">
+				<select class='search-field' id="statusEvent" name="statusEvent">
 					<option value='4'>$i18n.getString("overdue")</option>
 					<option value='2'>$i18n.getString("incomplete")</option>
 					<option value='1'>$i18n.getString("completed")</option>
@@ -47,14 +47,14 @@
 		<tr id='dueDateTR' class='hidden'>
 			<td>$i18n.getString('due_date_from_to')</td>
 			<td>
-				<input type='textbox' id='startDueDate' name='startDueDate' style='width:105px;'>
-				<input type='textbox' id='endDueDate' name='endDueDate' style='width:105px;'>
+				<input type='textbox' class='search-field' id='startDueDate' name='startDueDate' style='width:105px;'>
+				<input type='textbox' class='search-field' id='endDueDate' name='endDueDate' style='width:105px;'>
 			</td>
 		</tr>
 		<tbody id='advancedSearchTB'>
 			<tr id='advSearchBox0'>	       
 				<td id='searchingAttributeIdTD'>
-				  <select id="searchObjectId" name="searchObjectId" #if( $patientAttributes.size() == 0 ) disabled="disabled" #end onchange="searchObjectOnChange(this)">
+				  <select class='search-field' id="searchObjectId" name="searchObjectId" #if( $patientAttributes.size() == 0 ) disabled="disabled" #end onchange="searchObjectOnChange(this)">
 					<option value="iden">$i18n.getString( "search_by_name_identifier" )</option>
 					<option value="prg">$i18n.getString( "search_by_program" )</option>
 					<option value="fixedAttr_birthDate">$i18n.getString( "date_of_birth" )</option>
@@ -68,7 +68,7 @@
 				  <em title="$i18n.getString( 'required' )" class="required">*</em></label>
 				</td>		
 				<td>
-					<input type="text" id="searchText" name="searchText" value="$!searchText" onkeyup='searchPatientsOnKeyUp( event );' style='margin-right:30px;'>
+					<input type="text" class='search-field' id="searchText" name="searchText" value="$!searchText" onkeyup='searchPatientsOnKeyUp( event );' style='margin-right:30px;'>
 				</td>	
 				<td></td>
 				<td>
@@ -99,7 +99,15 @@
 	var i18n_transgender = '$encoder.jsEscape( $i18n.getString( "transgender" ) , "'")';
 	var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
 	var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
-	var searchTextBox = '<input type="text" id="searchText" name="searchText" onkeyup="searchPatientsOnKeyUp( event );">';
+	
 	datePicker( 'startDueDate', true );
 	datePicker( 'endDueDate', true );
+	
+	var searchTextBox = '<input type="text" class="search-field" id="searchText" name="searchText" onkeyup="searchPatientsOnKeyUp( event );">';
+	var programComboBox = '<select class="search-field" id="searchText" name="searchText" >';
+	#foreach ( $program in $programs ) 
+		programComboBox += '<option value="$program.id">$program.name</option>';
+	#end
+	programComboBox += '</select>';
+	
 </script>
\ No newline at end of file

=== 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-09-24 05:50:08 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm	2012-10-11 04:30:21 +0000
@@ -4,6 +4,7 @@
 			enable('listPatientBtn');
 			enable('addPatientBtn');
 			enable('advancedSearchBtn');
+			enable('searchObjectId');
 		#else
 			disable('listPatientBtn');
 			disable('addPatientBtn');
@@ -123,17 +124,6 @@
 	// Search field
 	// ----------------------------------------------------------------
 	
-	var searchTextBox = '<input type="text" id="searchText" name="searchText" onkeyup="searchPatientsOnKeyUp( event );">';
-	var programComboBox = '<select id="searchText" name="searchText" >';
-	#foreach ( $program in $programs ) 
-		programComboBox += '<option value="$program.id">$program.name</option>';
-	#end
-	programComboBox += '</select>';
-	
-	// ----------------------------------------------------------------
-	// Search field
-	// ----------------------------------------------------------------
-	
 	#if( $status == 1 )
 		setFieldValue('selectedOrgunitText', i18n_please_select_village );
 	#elseif( $status == 2 )

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm	2012-10-05 07:22:56 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm	2012-10-11 04:30:21 +0000
@@ -134,12 +134,4 @@
 	var i18n_main_form_link = '$encoder.jsEscape( $i18n.getString( "single_event_with_registration" ) , "'")';
 	
 	datePickerValid( 'executionDateNewEvent', true );
-	
-	var searchTextBox = '<input type="text" id="searchText" name="searchText" onkeyup="searchPatientsOnKeyUp( event );">';
-	var programComboBox = '<select id="searchText" name="searchText">';
-	#foreach ( $program in $programs ) 
-		programComboBox += '<option value="$program.id">$program.name</option>';
-	#end
-	programComboBox += '</select>';
-	
 </script>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css	2012-10-11 03:29:05 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css	2012-10-11 04:30:21 +0000
@@ -29,11 +29,21 @@
     width: 260px;
 }
 
+input.search-field[type="text"] 
+{
+    width: 185px;
+}
+
 select 
 {
     width: 265px;
 }
 
+select.search-field
+{
+    width: 190px;
+}
+
 textarea 
 {
     width: 265px;
@@ -46,6 +56,16 @@
 	width:100%;
 }
 
+.search-input
+{
+    width:180px;
+}
+
+.search-select 
+{
+    width: 185px;
+}
+
 /*----------------------------------------------------------------------------*/
 /* Table
 /*----------------------------------------------------------------------------*/
@@ -102,7 +122,7 @@
   padding-left: 20px;
   margin-bottom: 15px;
   border-radius: 3px;
-  width:940px;
+  width:840px;
 }
 
 /*----------------------------------------------------------------------------*/
@@ -216,7 +236,7 @@
 
 .contentProviderTable
 {
-  height: 122px;
+  height: 100px;
   width: 100%;
   overflow-y: auto;
   overflow-x:hidden;