← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20725: event-capture: make sure event progress indicator is shown when ever all inputs are ready

 

------------------------------------------------------------
revno: 20725
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-10-15 17:09:49 +0200
message:
  event-capture: make sure event progress indicator is shown when ever all inputs are ready
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html


--
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-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-10-15 14:25:38 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2015-10-15 15:09:49 +0000
@@ -146,6 +146,7 @@
         
         $scope.selectedProgramStage = null;
         $scope.eventFetched = false;
+        $scope.optionsReady = false;
         
         //Filtering
         $scope.reverse = false;
@@ -228,6 +229,9 @@
                         categoryIds.push(cat.id);
                     });
                 }
+                else{
+                    $scope.optionsReady = true;
+                }
                 
                 MetaDataFactory.getByIds('categories', categoryIds).then(function(categories){
                     $scope.selectedCategories = categories;                    

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html	2015-10-15 11:54:55 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/eventList.html	2015-10-15 15:09:49 +0000
@@ -1,5 +1,5 @@
 <div ng-if="selectedProgramStage && !eventRegistration && !editingEventInFull" class="small-vertical-spacing">
-    <i ng-if="!eventFetched && selectedOptions.length === selectedCategories.length" class="fa fa-spinner fa-spin fa-2x"></i>    
+    <i ng-if="!eventFetched && selectedOptions.length === selectedCategories.length && optionsReady" class="fa fa-spinner fa-spin fa-2x"></i>    
     <div ng-if="eventFetched" ng-switch="dhis2Events.length">                        
         <div ng-switch-when="undefined">
             <h4>