dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25305
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12519: Fixed bug - cannot search using name/identifier
------------------------------------------------------------
revno: 12519
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-10-09 13:18:16 +0700
message:
Fixed bug - cannot search using name/identifier
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
--
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-08 03:23:55 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-10-09 06:18:16 +0000
@@ -672,13 +672,16 @@
enrollments_in = enrollments in
program_infor = program
change = Change
-select_orgunit_for_search = Select organisation unit for search
-select_other_orgunit = Select other organisation unit
+select_orgunit_for_search = Select orgunit for search
+select_other_orgunit = Select other orgunit
clear_and_close = Clear and Close
-search_all_below_selected_orgunit = Search all below selected organisation unit
+search_all_below_selected_orgunit = Search all below selected orgunit
please_wait_loading=Loading.. please wait
nr=No
in = IN
identifiers_and_attributes = Identifiers and Attributes
complete_confirm_message=Are you sure that you want to complete this event ?
-report_option = Report options
\ No newline at end of file
+report_option = Report options
+active_and_completed_enrolments = Active and Completed Enrolments
+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.
\ 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-08 17:16:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-10-09 06:18:16 +0000
@@ -2356,18 +2356,43 @@
function searchByIdsOnclick()
{
- var value = getFieldValue('searchPatientByIds');
-
- if(jQuery("#advSearchBox0").find('input[id=searchObjectId]').val()=='iden'
- && jQuery("#advSearchBox0").find('input[id=searchText]').val()=='' ){
- jQuery("#advSearchBox0").find('input[id=searchText]').val(value);
- }
- else
- {
- addAttributeOption();
- jQuery("input[id=searchText]").last().val(value);
- }
- jQuery("#searchPatientBtn").click();
+ var params = "searchText=" + getFieldValue("searchByIds");
+ params += "&listAll=false";
+
+ if( getFieldValue('programIdAddPatient')=="" ){
+ params += "&programIds=" + getFieldValue('programIdAddPatient');
+ params += "&searchText=prg_" + getFieldValue('programIdAddPatient');
+ }
+
+ $.ajax({
+ url: 'searchRegistrationPatient.action',
+ type:"POST",
+ data: params,
+ success: function( html ){
+ setTableStyles();
+ statusSearching = 1;
+ setInnerHTML( 'listPatientDiv', html );
+ showById('listPatientDiv');
+ setFieldValue('listAll',false);
+
+ var value = getFieldValue('searchPatientByIds');
+ var searchObject = jQuery("[name=searchObjectId]")[1];
+ if(searchObject.value=='iden'){
+ jQuery("[name=searchText]")[0].value = value;
+ }
+ else{
+ addAttributeOption();
+ jQuery("input[id=searchText]").last().val(value);
+ }
+
+ jQuery( "#loaderDiv" ).hide();
+ }
+ });
+
+
+
+
+
}
function advancedSearchOnclick()