← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16758: Minor fix for ouwt

 

------------------------------------------------------------
revno: 16758
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2014-09-20 13:56:29 +0700
message:
  Minor fix for ouwt
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.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-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js	2014-09-18 10:53:08 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js	2014-09-20 06:56:29 +0000
@@ -427,7 +427,10 @@
         } else {
             selection.busy( true );
 
-            $.post( organisationUnitTreePath + "clearselected.action", function() {
+            $.ajax( {
+                url: organisationUnitTreePath + "clearselected.action",
+                type: 'POST'
+            }).done(function() {
                 var selected = selection.getSelected();
 
                 if( multipleSelectionAllowed ) {
@@ -458,7 +461,9 @@
                         fn();
                     } );
                 }
-            } );
+            }).always(function() {
+                selection.busy( false );
+            });
         }
     };
 
@@ -559,7 +564,7 @@
                     type:'POST',
                     timeout:10000,
                     complete: function() {
-                        selection.busy(false);
+                        selection.busy( false );
                         selection.responseReceived();
                     }
                 } );