← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17514: Ouwt. Fixes problem with unnecessary trigger causing the loaded event to be triggered too early, ...

 

------------------------------------------------------------
revno: 17514
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-11-17 21:47:30 +0100
message:
  Ouwt. Fixes problem with unnecessary trigger causing the loaded event to be triggered too early, causing havoc in data entry. Allows to remove workaround/fix.
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-11-16 11:32:57 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/ouwt.js	2014-11-17 20:47:30 +0000
@@ -369,17 +369,14 @@
                     selection.clearOrganisationUnits().always(function() {
                       selection.setOrganisationUnits( data.organisationUnits ).done(function() {
                           sync_and_reload();
-                          $( "#orgUnitTree" ).trigger( "ouwtLoaded" );
                       });
                     });
                 } ).fail( function() {
                     sync_and_reload();
-                    $( "#orgUnitTree" ).trigger( "ouwtLoaded" );
                 } );
             }
             else {
                 sync_and_reload();
-                $( "#orgUnitTree" ).trigger( "ouwtLoaded" );
             }
         } );
     };
@@ -459,11 +456,7 @@
             
           selection.busy( true );
 
-          if( selection.getSelected() && selection.getSelected().length === 0 ) {
-              setTimeout(doSync, 1000);
-          } else {
-              doSync();
-          }
+          doSync();
         }
     };