← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7929: Reorganize nested search form.

 

------------------------------------------------------------
revno: 7929
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-08-17 20:51:24 +0700
message:
  Reorganize nested search form.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js
  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/multiDataEntrySelect.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/smsReminderSelect.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/anonymousRegistration.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm	2012-08-17 12:39:05 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm	2012-08-17 13:51:24 +0000
@@ -60,27 +60,31 @@
 		<table id='advanced-search' class='hidden'>
 			<tr>
 				<td>$i18n.getString('use_data_from_level')</td>
-				<td><input type="radio" id='facilityLB1' name="facilityLB" value="selected" checked> $i18n.getString('selected')</td>
-				<td><input type="radio" id='facilityLB2' name="facilityLB" value="childrenOnly"> $i18n.getString('children_only')</td>
-				<td><input type="radio" id='facilityLB3' name="facilityLB" value="all"> $i18n.getString('all')</td>
+				<td>
+					<input type="radio" id='facilityLB1' name="facilityLB" value="selected" checked> $i18n.getString('selected')
+					<input type="radio" id='facilityLB2' name="facilityLB" value="childrenOnly"> $i18n.getString('children_only')
+					<input type="radio" id='facilityLB3' name="facilityLB" value="all"> $i18n.getString('all')
+				</td>
 			</tr>
 			<tr>
 				<td>$i18n.getString('show_hierachy_from_level')</td>
-				#foreach( $level in $levels )
-					<td><input type="radio" id='level${level.level}' name="level" value="${level.level}" checked> $level.name</td>
-				#end
+				<td>
+					<select id="level" name="level">
+					#foreach( $level in $levels )
+						<option value="${level.level}">$level.name</option>
+					#end
+					</select>
+				</td>
 			</tr>
 			<tr>
 				<td>$i18n.getString('report_date_from_to')</td>
-				<td colspan='3'>&nbsp;<input type="text" id='startDate' name='startDate' style='width:240px'></td>
-				<td colspan='4'><input type="text" id='endDate' name='endDate' style='width:240px'></td>
-				#set($cols = $levels.size() - 7)
-				<td colspan='$cols'><input type="button" id='searchBtn' value='$i18n.getString( "search" )' onclick='validateSearchEvents( false )'></td>
+				<td><input type="text" id='startDate' name='startDate' style='width:240px'></td>
+				<td><input type="text" id='endDate' name='endDate' style='width:240px'></td>
+				<td><input type="button" id='searchBtn' value='$i18n.getString( "search" )' onclick='validateSearchEvents( false )'></td>
 			</tr>
 			<tr>
 				<td valign="top">$i18n.getString('data_elements')</td>
-				#set($cols = $levels.size() + 3)
-				<td colspan='$cols'>
+				<td colspan='2'>
 					<table id='advancedSearchTB'>	
 						<tbody>
 							<tr id='advSearchBox0'>	
@@ -148,8 +152,6 @@
 	var i18n_report_date = '$encoder.jsEscape( $i18n.getString( "report_date" ) , "'")';
 	var i18n_search_events_by_dataelements = '$encoder.jsEscape( $i18n.getString( "search_events_by_dataelements" ) , "'")';
 	var i18n_list_all_events = '$encoder.jsEscape( $i18n.getString( "list_all_events" ) , "'")';
-	var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
-	var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
 	var i18n_no_compulsary_data_elements = '$encoder.jsEscape( $i18n.getString( "no_compulsary_data_elements" ) , "'")';
 	var i18n_remove_empty_events_success = '$encoder.jsEscape( $i18n.getString( "remove_empty_events_success" ) , "'")';
 	var i18n_confirm_remove_empty_events = '$encoder.jsEscape( $i18n.getString( "confirm_remove_empty_events" ) , "'")';

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2012-07-27 15:29:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2012-08-17 13:51:24 +0000
@@ -216,7 +216,7 @@
 	}
 	
 	params += '&facilityLB=' + $('input[name=facilityLB]:checked').val();
-	params += '&level=' + $('input[name=level]:checked').val();
+	params += '&level=' + $('select[id=level]').val();
 	params += '&orgunitIds=' + getFieldValue('orgunitId');
 	params += '&programStageId=' + getFieldValue('programStageId');
 	params += '&orderByOrgunitAsc=false';

=== 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-08-17 09:17:56 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2012-08-17 13:51:24 +0000
@@ -212,7 +212,7 @@
 	var params = "";
 	var programStageId = jQuery('#programStageAddPatient').val();
 	if( getFieldValue('searchByProgramStage') == "true" && programStageId!=''){
-		var statusEvent = jQuery('#programStageAddPatientTR [id=statusEvent]:checked').val();
+		var statusEvent = jQuery('#programStageAddPatientTR [id=statusEvent]').val();
 		params += '&searchTexts=prgst_' + programStageId + '_' + statusEvent;
 	}
 	

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm	2012-08-16 02:08:22 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm	2012-08-17 13:51:24 +0000
@@ -31,6 +31,7 @@
 <script>
 	unSave = false;
 	var i18n_please_select = '[' + '$encoder.jsEscape( $i18n.getString( "please_select" ) , "'")' + ']';
+	var i18n_please_select_program_stage = '[' + '$encoder.jsEscape( $i18n.getString( "please_select_program_stage" ) , "'")' + ']';
 	var i18n_value_must_integer = '$encoder.jsEscape( $i18n.getString( "value_must_integer" ) , "'")';
 	var i18n_value_must_number = '$encoder.jsEscape( $i18n.getString( "value_must_number" ) , "'")';
 	var i18n_value_must_positive_integer = '$encoder.jsEscape( $i18n.getString( "value_must_positive_integer" ) , "'")';
@@ -54,9 +55,4 @@
 	var i18n_show_all_items = '$encoder.jsEscape( $i18n.getString( "show_all_items" ) , "'")';
 	var i18n_program_stage = '$encoder.jsEscape( $i18n.getString( "program_stage" ) , "'")';
 	var i18n_color_quick_help = '$encoder.jsEscape( $i18n.getString( "color_quick_help" ) , "'")';
-	var i18n_male = '$encoder.jsEscape( $i18n.getString( "male" ) , "'")';
-	var i18n_female = '$encoder.jsEscape( $i18n.getString( "female" ) , "'")';
-	var i18n_create_new_event = '$encoder.jsEscape( $i18n.getString( "create_new_event" ) , "'")';
-	
-	var searchTextBox = '<input type="text" id="searchText" name="searchText" onkeyup="searchPatientsOnKeyUp( event );">';
 </script>

=== 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-08-17 12:39:05 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm	2012-08-17 13:51:24 +0000
@@ -38,15 +38,14 @@
 					#end
 				</select>
 			</td>
-			<td colspan='2'>
-				<input type="radio" disabled id="statusEvent" name="statusEvent" value='1' checked> $i18n.getString("completed") 
-				<input type="radio" disabled id="statusEvent" name="statusEvent" value='2'> $i18n.getString("incomplete") 
-				<input type="radio" disabled id="statusEvent" name="statusEvent" value='3'> $i18n.getString("scheduled_in_future") 
-				<input type="radio" disabled id="statusEvent" name="statusEvent" value='4'> $i18n.getString("overdue") 
-			</td>
-			<td></td>
 			<td>
-				<input type="button" id='programStageActionBtn' value="$i18n.getString('send_sms_to_list')" onclick="showSendSmsForm();">
+				<select id="statusEvent" name="statusEvent">
+					<option value=''>[$i18n.getString("please_select_status")]</option>
+					<option value='1'>$i18n.getString("completed")</option>
+					<option value='2'>$i18n.getString("incomplete")</option>
+					<option value='3'>$i18n.getString("scheduled_in_future")</option> 
+					<option value='4'>$i18n.getString("overdue")</option>
+				</select>
 			</td>
 		</tr>
 		</thead>
@@ -64,7 +63,7 @@
 						<option value="attr_$attribute.id" valueType='$attribute.valueType'>$encoder.htmlEncode( $attribute.name )</option>
 					#end
 				  </select>
-				  <em title="$i18n.getString( "required" )" class="required">*</em></label>
+				  <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;'>
@@ -80,7 +79,19 @@
 				<td>
 					<input type="button" class='large-button' value='$i18n.getString( "search" )' onclick='validateAdvancedSearch();' id='searchPatientBtn'>
 				</td>
+				<td>
+					<input type="button" id='programStageActionBtn' value="$i18n.getString('send_sms_to_list')" onclick="showSendSmsForm();" class='hidden'>
+				</td>
 			</tr>
 		</tbody>
 	</table>
-</div>
\ No newline at end of file
+</div>
+
+<script>
+	var i18n_male = '$encoder.jsEscape( $i18n.getString( "male" ) , "'")';
+	var i18n_female = '$encoder.jsEscape( $i18n.getString( "female" ) , "'")';
+	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 );">';
+</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-08-12 06:10:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm	2012-08-17 13:51:24 +0000
@@ -75,8 +75,6 @@
 	var i18n_search_by_name_identifier = '$encoder.jsEscape( $i18n.getString( "search_by_name_identifier" ) , "'")';
 	var i18n_search_by_program = '$encoder.jsEscape( $i18n.getString( "search_by_program" ) , "'")';
 	var i18n_create_new_patient = '$encoder.jsEscape( $i18n.getString( "create_new_patient" ) , "'")';
-	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" ), "'")' + ']';
@@ -97,9 +95,6 @@
 	var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
 	var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
 	var i18n_date_is_greater_then_or_equals_due_date = '$encoder.jsEscape( $i18n.getString( "date_is_greater_then_or_equals_due_date" ) , "'")';
-	var i18n_male = '$encoder.jsEscape( $i18n.getString( "male" ) , "'")';
-	var i18n_female = '$encoder.jsEscape( $i18n.getString( "female" ) , "'")';
-	var i18n_transgender = '$encoder.jsEscape( $i18n.getString( "transgender" ) , "'")';
 	var i18n_add_person_successfully = '$encoder.jsEscape( $i18n.getString( "add_person_successfully" ) , "'")';
 	var i18n_please_select_relationship_type = '$encoder.jsEscape( $i18n.getString( "please_select_relationship_type" ) , "'")';
 	var i18n_please_select_a_patient_for_setting_relationship = '$encoder.jsEscape( $i18n.getString( "please_select_a_patient_for_setting_relationship" ) , "'")';

=== 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-08-17 12:39:05 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm	2012-08-17 13:51:24 +0000
@@ -8,6 +8,7 @@
 			}
 		});
 		disable('advancedSearchBtn');
+		$("#searchObjectId option[value='prg']").remove();
 	});
 </script>
 
@@ -80,8 +81,6 @@
 	var i18n_search_by_name_identifier = '$encoder.jsEscape( $i18n.getString( "search_by_name_identifier" ) , "'")';
 	var i18n_search_by_program = '$encoder.jsEscape( $i18n.getString( "search_by_program" ) , "'")';
 	var i18n_create_new_patient = '$encoder.jsEscape( $i18n.getString( "create_new_patient" ) , "'")';
-	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" ), "'")' + ']';
@@ -106,11 +105,7 @@
     var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
 	var i18n_program_stage = '$encoder.jsEscape( $i18n.getString( "program_stage" ) , "'")';
 	var i18n_create_new_event = '$encoder.jsEscape( $i18n.getString( "create_new_event" ) , "'")';
-	var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
-	var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
 	var i18n_events = '$encoder.jsEscape( $i18n.getString( "events" ) , "'")';
-	var i18n_male = '$encoder.jsEscape( $i18n.getString( "male" ) , "'")';
-	var i18n_female = '$encoder.jsEscape( $i18n.getString( "female" ) , "'")';
 	var i18n_specify_search_criteria = '$encoder.jsEscape( $i18n.getString( "specify_search_criteria" ) , "'")';
 	var i18n_please_select = '$encoder.jsEscape( $i18n.getString( "please_select" ) , "'")';
 	var i18n_search_result = '$encoder.jsEscape( $i18n.getString( "search_result" ) , "'")';

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderSelect.vm	2012-08-17 09:17:56 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderSelect.vm	2012-08-17 13:51:24 +0000
@@ -50,5 +50,4 @@
 	var i18n_color_quick_help = '$encoder.jsEscape( $i18n.getString( "color_quick_help" ) , "'")';
 	var i18n_patient_details_and_history = '$encoder.jsEscape( $i18n.getString( "patient_details_and_history" ) , "'")';
 	var i18n_please_select_program_stage = '[' + '$encoder.jsEscape( $i18n.getString( "please_select_program_stage" ) , "'")' + ']';
-	var searchTextBox = '<input type="text" id="searchText" name="searchText">';
 </script>