← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12377: minor bugfix in anonymousRegistration (deleting events)

 

------------------------------------------------------------
revno: 12377
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-10-02 12:14:05 +0200
message:
  minor bugfix in anonymousRegistration (deleting events)
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-09-09 11:23:06 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2013-10-02 10:14:05 +0000
@@ -820,14 +820,15 @@
 function removeEvent( programStageId ) {
     var s = "" + programStageId;
 
-    if( s.indexOf("local") != -1) {
-        if ( confirm( i18n_comfirm_delete_event ) ) {
-            DAO.store.delete( 'dataValues', programStageId ).always( function () {
+    if( s.indexOf("local") != -1 ) {
+        if( confirm(i18n_comfirm_delete_event) ) {
+            DAO.store.delete('dataValues', programStageId).always(function() {
                 updateOfflineEvents();
-            } );
+                setTimeout(updateOfflineEvents, 200);
+            });
         }
     } else {
-        removeItem( programStageId, '', i18n_comfirm_delete_event, 'removeCurrentEncounter.action' );
+        removeItem(programStageId, '', i18n_comfirm_delete_event, 'removeCurrentEncounter.action');
     }
 }