dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19676
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8684: mobile: minor navigation fix
------------------------------------------------------------
revno: 8684
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-10-24 11:40:43 +0200
message:
mobile: minor navigation fix
modified:
dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.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/data-entry.vm'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm 2012-10-24 09:21:07 +0000
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm 2012-10-24 09:40:43 +0000
@@ -222,14 +222,17 @@
$(document).bind( 'pagechange', function (event, data) {
var pageId = data.toPage.attr('id');
- if( pageId == 'organisation-units-page' ) {
- loadOrganisationUnitsPage();
- } else if( pageId == 'data-sets-page' ) {
- loadDataSetsPage();
- } else if( pageId == 'period-page' ) {
- loadPeriodPage();
- } else if( pageId == 'data-entry-page' ) {
- loadDataEntryPage();
+ var pageLoaders = {
+ 'organisation-units-page': loadOrganisationUnitsPage,
+ 'data-sets-page': loadDataSetsPage,
+ 'period-page': loadPeriodPage,
+ 'data-entry-page': loadDataEntryPage
+ };
+
+ if( pageLoaders[pageId] ) {
+ pageLoaders[pageId].call();
+ } else {
+ $.mobile.showPageLoadingMsg($.mobile.pageLoadErrorMessageTheme, "Tried changing to invalid page.", true);
}
});
</script>