← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7520: Case entry; Disabled caching for ajax requests, required for the async loading of html pages as i...

 

------------------------------------------------------------
revno: 7520
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-07-05 22:16:19 +0200
message:
  Case entry; Disabled caching for ajax requests, required for the async loading of html pages as internet explorer caches this by default
modified:
  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/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2012-07-05 07:55:20 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2012-07-05 20:16:19 +0000
@@ -1,22 +1,35 @@
 
+// Disable caching for ajax requests in general 
+
+$( document ).ready( function() {
+	$.ajaxSetup ({
+    	cache: false
+	});
+} );
+
 function dobTypeOnChange( container ){
 
 	var type = jQuery('#' + container + ' [id=dobType]').val();
-	if(type == 'V' || type == 'D'){
+	if(type == 'V' || type == 'D')
+	{
 		jQuery('#' + container + ' [id=age]').rules("remove");
 		jQuery('#' + container + ' [id=age]').css("display","none");
 		
 		jQuery('#' + container + ' [id=birthDate]').rules("add",{required:true});
 		datePickerValid( container + ' [id=birthDate]' );
 		jQuery('#' + container + ' [id=birthDate]').css("display","");
-	}else if(type == 'A'){
+	}
+	else if(type == 'A')
+	{
 		jQuery('#' + container + ' [id=age]').rules("add",{required:true, number: true});
 		jQuery('#' + container + ' [id=age]').css("display","");
 		
 		jQuery('#' + container + ' [id=birthDate]').rules("remove","required");
 		$('#' + container+ ' [id=birthDate]').datepicker("destroy");
 		jQuery('#' + container + ' [id=birthDate]').css("display","none");
-	}else {
+	}
+	else 
+	{
 		jQuery('#' + container + ' [id=age]').rules("remove");
 		jQuery('#' + container + ' [id=age]').css("display","");