← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12669: Patient search, cleaned up advanced search div

 

------------------------------------------------------------
revno: 12669
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-10-15 13:08:09 +0200
message:
  Patient search, cleaned up advanced search div
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/webapp/dhis-web-caseentry/javascript/commons.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.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/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/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	2013-10-14 09:03:56 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-10-15 11:08:09 +0000
@@ -672,7 +672,7 @@
 change = Change
 select_orgunit_for_search = Select orgunit for search
 select_other_orgunit = Select other orgunit
-clear_and_close = Clear and Close
+clear_and_close = Clear and close
 search_all_below_selected_orgunit = Search all below selected orgunit
 please_wait_loading=Loading
 nr=No
@@ -680,7 +680,7 @@
 identifiers_and_attributes = Identifiers and Attributes
 complete_confirm_message=Are you sure that you want to complete this event ?
 report_option = Report options
-active_and_completed_enrolments = Active and Completed Enrolments
+active_and_completed_enrolments = Active and completed enrollments
 hide_search_criteria = Hide search criteria
 there_are_active_search_filter_click_on_arrow_to_show_them = there are active search filter, click on arrow to show them.
 add_relative = Add relative
@@ -690,4 +690,5 @@
 all_in_system = All in system
 selected_items = Selected items
 dimension = Dimension
-events = Events
\ No newline at end of file
+events = Events
+add_filter=Add filter
\ No newline at end of file

=== 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	2013-10-14 15:20:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-10-15 11:08:09 +0000
@@ -59,14 +59,12 @@
 {
 	jQuery('#advancedSearchTB [name=clearSearchBtn]').attr('disabled', false);
 	var rowId = 'advSearchBox' + jQuery('#advancedSearchTB select[name=searchObjectId]').length + 1;
-	var contend  = '<td>' + getInnerHTML('searchingAttributeIdTD') + '</td>';
-		contend += '<td>' + searchTextBox ;
-		contend += '&nbsp;<input type="button" name="clearSearchBtn" class="normal-button" value="' + i18n_clear + '" onclick="removeAttributeOption(' + "'" + rowId + "'" + ');"></td>';
-		contend = '<tr id="' + rowId + '">' + contend + '</tr>';
+	var content  = '<td>' + getInnerHTML('searchingAttributeIdTD') + '</td>';
+	content += '<td>' + searchTextBox ;
+	content += '&nbsp;<input type="button" name="clearSearchBtn" class="normal-button" value="' + i18n_clear + '" onclick="removeAttributeOption(' + "'" + rowId + "'" + ');"></td>';
+	content = '<tr id="' + rowId + '">' + content + '</tr>';
 
-	jQuery('#advancedSearchTB').append( contend );
-	var rowspan = eval( jQuery('[name=addAndSearchBtn]').attr('rowspan') );
-	jQuery('[name=addAndSearchBtn]').attr('rowspan', rowspan + 1);
+	jQuery('#advancedSearchTB').append( content );
 }	
 
 function removeAttributeOption( rowId )
@@ -75,8 +73,6 @@
 	if( jQuery( '#advancedSearchTB tr' ).length == 2 ){
 		jQuery('#advancedSearchTB [name=clearSearchBtn]').attr('disabled', true);
 	}
-	var rowspan = eval( jQuery('[name=addAndSearchBtn]').attr('rowspan') );
-	jQuery('[name=addAndSearchBtn]').attr('rowspan', rowspan - 1);
 }	
 
 //------------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm	2013-10-11 04:31:33 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm	2013-10-15 11:08:09 +0000
@@ -15,7 +15,6 @@
 					setInnerHTML('enrollmentInfor', title);
 				}
 			</script>
-			&nbsp;&nbsp;&nbsp;<input type="button" class="normal-button" value='$i18n.getString( "change" )' onclick="advancedSearchOnclick();" >
 		</td>
 	</tr>
 	<tr>

=== 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	2013-10-15 10:30:38 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm	2013-10-15 11:08:09 +0000
@@ -12,7 +12,7 @@
 			<input type="text" id='orgunitName' readonly="readonly" #if( $organisationUnit ) value="$encoder.htmlEncode( $organisationUnit.name )" #else value="[$i18n.getString( 'please_select_village' )]" #end >
 		</td>
 		<td valign='bottom' id='criteriaBtnTD'>
-			<input type="button" style='width:130px' id='addPatientBtn' name='addPatientBtn' class='large-button' value='$i18n.getString( "add_new" )' onclick="showAddPatientForm(getFieldValue('programIdAddPatient'),'', '');" >
+			<input type="button" id='addPatientBtn' name='addPatientBtn' class='large-button' value='$i18n.getString( "add_new" )' onclick="showAddPatientForm(getFieldValue('programIdAddPatient'),'', '');" >
 		</td>
 	</tr>
 	<tr id='programAddPatientTR'>
@@ -36,7 +36,7 @@
 			<span id="programLoader" style="display:none;" ><img src="../images/ajax-loader-bar.gif" /></span>
 		</td>
 		<td>
-			<input type="button" style='width:130px' id='listPatientBtn' style='260px;' value="$i18n.getString( 'list_all_patients' )" onclick="listAllPatient();">
+			<input type="button" id='listPatientBtn' style='260px;' value="$i18n.getString( 'list_all_patients' )" onclick="listAllPatient();">
         </td>
 	</tr>
 	<tr id='scheduleVisitTR' class='hidden'>
@@ -74,7 +74,7 @@
 		</td>
 		<td>
 			<input type='button' value='$i18n.getString("search")' onclick='searchByIdsOnclick();'>
-			<input type="button" style='width:130px' id='advancedSearchBtn' value='$i18n.getString( "advanced_search" )' onclick="advancedSearchOnclick();">
+			<input type="button" id='advancedSearchBtn' value='$i18n.getString( "advanced_search" )' onclick="advancedSearchOnclick();">
 		</td>
 	</tr>
 	
@@ -141,19 +141,6 @@
 			</td>
 		</tr>
 		<tbody id='advancedSearchTB'>
-			<tr>
-				<td></td>
-				<td></td>
-				<td name='addAndSearchBtn' rowspan='2' style='padding-bottom:2px;' valign='bottom' align="right" align="bottom">
-					<input type="button" class='normal-button' value='$i18n.getString( "search" )' onclick='validateAdvancedSearch();' id='searchPatientBtn'>
-				</td>
-				<td name='addAndSearchBtn' rowspan='2' style='padding-bottom:2px;' valign='bottom'>
-					<input type="button" class='normal-button' value='$i18n.getString( "add" )' onclick='addAttributeOption();'>
-				</td>
-				<td name='addAndSearchBtn' rowspan='2' style='padding-bottom:2px;' valign='bottom' align="right" align="bottom">
-					<input type="button" class='normal-button hidden' id='sendSmsToListBtn' value="$i18n.getString('sms')" onclick="setFieldValue('sendToList', true);showSendSmsForm();" >
-				</td>
-			</tr>
 			<tr id='advSearchBox0'>	       
 				<td>
 				  <select class='search-field' id="searchObjectId" name="searchObjectId" #if( $patientAttributes.size() == 0 ) disabled="disabled" #end onchange="searchObjectOnChange(this)">
@@ -173,12 +160,17 @@
 				  <em title="$i18n.getString( 'required' )" class="required">*</em></label>
 				</td>		
 				<td>
-					<input type="text" id="searchText" name="searchText" value="$!searchText" onkeyup='searchPatientsOnKeyUp( event );' style='width:200px;'>
+					<input type="text" id="searchText" name="searchText" class="searchInput" value="$!searchText" onkeyup='searchPatientsOnKeyUp( event );'>
 					<input type="button" class='normal-button' name="clearSearchBtn" value='$i18n.getString( "clear" )' disabled onclick="removeAttributeOption('advSearchBox0');" align='bottom'>
 				</td>
 			</tr>
 		</tbody>
 	</table>
+	<div style="padding: 15px 3px">
+		<input type="button" class='large-button' value='$i18n.getString( "add_filter" )' onclick='addAttributeOption();'>
+        <input type="button" class='large-button' value='$i18n.getString( "search" )' onclick='validateAdvancedSearch();' id='searchPatientBtn'>
+        <input type="button" class='large-button hidden' id='sendSmsToListBtn' value="$i18n.getString('sms')" onclick="setFieldValue('sendToList', true);showSendSmsForm();">
+    </div>
 </div>
 
 <script>
@@ -196,5 +188,5 @@
 	datePicker( 'startDueDate', true );
 	datePicker( 'endDueDate', true );
 	
-	var searchTextBox = '<input type="text" id="searchText" name="searchText" onkeyup="searchPatientsOnKeyUp( event );" style="width:202px;">';
+	var searchTextBox = '<input type="text" id="searchText" name="searchText" class="searchInput" 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/style/style.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css	2013-10-15 10:30:38 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css	2013-10-15 11:08:09 +0000
@@ -26,7 +26,7 @@
 
 input.large-button[type="button"] 
 {
-    width: 110px;
+    width: 130px;
 }
 
 select.search-field
@@ -46,12 +46,12 @@
 
 select 
 {
-    width: 265px;
+    width: 264px;
 }
 
 textarea 
 {
-    width: 265px;
+    width: 264px;
 }
 
 .button-list 
@@ -158,6 +158,11 @@
   border-radius: 3px;
 }
 
+.searchInput
+{
+  width: 240px;
+}
+
 /*----------------------------------------------------------------------------*/
 /* Button list
 /*----------------------------------------------------------------------------*/