← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4402: More caching fixes

 

------------------------------------------------------------
revno: 4402
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2011-08-20 16:07:56 +0200
message:
  More caching fixes
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.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-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2011-08-20 10:40:14 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2011-08-20 14:07:56 +0000
@@ -764,9 +764,14 @@
     {
         storageManager.saveCompleteDataSet( params );
 
-        $.getJSON( 'registerCompleteDataSet.action', params, function()
-        {
-            storageManager.clearCompleteDataSet( params );
+        $.ajax( {
+        	url: 'registerCompleteDataSet.action', 
+        	data: params, 
+        	cache: false,
+        	success: function()
+	        {
+	            storageManager.clearCompleteDataSet( params );
+	        }
         } );
     }
     else
@@ -786,12 +791,18 @@
     {
         disableUndoButton();
 
-        $.getJSON( 'undoCompleteDataSet.action', params ).success( function()
-        {
-            storageManager.clearCompleteDataSet( params );
-        } ).error( function()
-        {
-            storageManager.clearCompleteDataSet( params );
+        $.ajax( {
+        	url: 'undoCompleteDataSet.action', 
+        	data: params,
+        	cache: false,
+        	success: function()
+	        {
+	            storageManager.clearCompleteDataSet( params );
+	        },
+	        error: function()
+	        {
+	            storageManager.clearCompleteDataSet( params );
+	        }
         } );
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js	2011-08-20 12:10:52 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/history.js	2011-08-20 14:07:56 +0000
@@ -74,13 +74,17 @@
     $( '#minLimit' ).val( '' );
     $( '#maxLimit' ).val( '' );
 
-    $.get( 'removeMinMaxLimits.action', 
+    $.ajax( {
+    	url: 'removeMinMaxLimits.action',
+    	data: 
     	{
     		dataElementId: currentDataElementId,
     		categoryOptionComboId: currentOptionComboId,
     		organisationUnitId: currentOrganisationUnitId
     	},
-    	refreshChart );
+    	success: refreshChart,
+    	cache: false
+    } );
 }
 
 function saveMinMaxLimit()