← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4172: Ajax Request stuff don't work does not work with IE9 ( Patient module ).

 

------------------------------------------------------------
revno: 4172
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-07-20 15:27:12 +0700
message:
  Ajax Request stuff don't work does not work with IE9 ( Patient module ).
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationshipPatient.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.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-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js	2011-07-20 06:34:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js	2011-07-20 08:27:12 +0000
@@ -253,6 +253,7 @@
 	if( getFieldValue('searchText') == '' )
 	{
 		$('#listPatientDiv').html( "<i style='color:red'>" + i18n_specify_a_search_criteria + "</i>" );
+		showById( 'listPatientDiv' );
 		return;
 	}
 	
@@ -271,6 +272,21 @@
 		});
 }
 
+function sortPatients()
+{
+	hideById( 'listPatientDiv' );
+	
+	contentDiv = 'listPatientDiv';
+	$( "#loaderDiv" ).show();
+	$('#listPatientDiv').load("searchPatient.action", 
+		{
+			sortPatientAttributeId: getFieldValue('sortPatientAttributeId')
+		}
+		, function(){
+			showById('listPatientDiv');
+			$( "#loaderDiv" ).hide();
+		});
+}
 // -----------------------------------------------------------------------------
 // Disable form
 // -----------------------------------------------------------------------------
@@ -692,7 +708,10 @@
 	
 	jQuery('#loaderDiv').show();
 	contentDiv = 'listPatientDiv';
-	jQuery('#listPatientDiv').load('searchPatient.action?listAll=true',{},
+	jQuery('#listPatientDiv').load('searchPatient.action',{
+			listAll:true,
+			sortPatientAttributeId: getFieldValue('sortPatientAttributeId')
+		},
 		function(){
 			showById('listPatientDiv');
 			jQuery('#loaderDiv').hide();

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationshipPatient.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationshipPatient.js	2011-07-19 03:48:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationshipPatient.js	2011-07-20 08:27:12 +0000
@@ -74,10 +74,12 @@
 		showById('listPatientDiv');
 		jQuery('#loaderDiv').hide();
 		
-		var isShowPatientList = setFieldValue( 'isShowPatientList', isShowPatientList );
-		if( !isShowPatientList )
+		if( getFieldValue( 'isShowPatientList' ) == 'false' )
 		{
 			showRelationshipList( getFieldValue('id') );
+		}else
+		{
+			loadPatientList();
 		}
       }
      });

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm	2011-07-19 03:48:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm	2011-07-20 08:27:12 +0000
@@ -48,7 +48,7 @@
 		<tr>
 			<td></td>
 			<td>
-			<select id="sortPatientAttributeId" name="sortPatientAttributeId" maxlength="30" style="width:20.2em" onchange="searchPatients()">
+			<select id="sortPatientAttributeId" name="sortPatientAttributeId" maxlength="30" style="width:20.2em" onchange="sortPatients();">
 					<option value="" selected >[ $i18n.getString( "sort_by" ) ]</option>
 					#foreach( $patientAttribute in $patientAttributes )
 						<option value="$patientAttribute.id" >$encoder.htmlEncode( $patientAttribute.name )</option>