------------------------------------------------------------
revno: 10654
committer: Morten Olav Hansen <[email protected]>
branch nick: dhis2
timestamp: Mon 2013-04-22 12:42:46 +0700
message:
  properly hide loader on event search if ajax call returns a redirect
modified:
  
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.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/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2013-04-22 05:36:33 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2013-04-22 05:42:46 +0000
@@ -647,9 +647,14 @@
         type: "POST",
         url: 'searchProgramStageInstances.action',
         data: params,
-        success: function ( html ) {
-            hideById( 'dataEntryInfor' );
-            setInnerHTML( 'listDiv', html );
+        dataType: 'text',
+        success: function ( data ) {
+            if ( data.indexOf( "<!DOCTYPE" ) != 0 ) {
+                hideById( 'dataEntryInfor' );
+                setInnerHTML( 'listDiv', data );
+            }
+
+            hideLoader();
         }
     } ).fail(function() {
         hideById( 'dataEntryInfor' );

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to