← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8617: mobile: refresh index listview just after dashboard is fetched, makes count in listview render co...

 

------------------------------------------------------------
revno: 8617
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-10-22 00:11:28 +0200
message:
  mobile: refresh index listview just after dashboard is fetched, makes count in listview render correctly without delay
modified:
  dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/index.vm


--
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-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/index.vm'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/index.vm	2012-10-21 15:54:35 +0000
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/index.vm	2012-10-21 22:11:28 +0000
@@ -30,12 +30,9 @@
     $(document).bind('pagebeforecreate',function(){
         $.mobile.showPageLoadingMsg();
 
-        getDashboard().then(
-                fm.getMetaData().then(
-                        fm.uploadDataValueSets()).always(function() {
+        getDashboard().always(function() {
             $('section[data-role="content"] ul').listview('refresh');
-            $.mobile.hidePageLoadingMsg();
-        }));
+        }).then( fm.getMetaData().then( fm.uploadDataValueSets()).always( $.mobile.hidePageLoadingMsg ));
     })
 </script>