------------------------------------------------------------ revno: 16746 committer: Morten Olav Hansen <morte...@gmail.com> branch nick: dhis2 timestamp: Thu 2014-09-18 19:50:44 +0700 message: minor fix modified: dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyAprilPeriodType.java dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.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-api/src/main/java/org/hisp/dhis/period/SixMonthlyAprilPeriodType.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyAprilPeriodType.java 2014-09-17 10:47:53 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyAprilPeriodType.java 2014-09-18 12:50:44 +0000 @@ -79,12 +79,14 @@ @Override public String getIsoDate( DateTimeUnit dateTimeUnit ) { + int month = dateTimeUnit.getMonth(); + if ( dateTimeUnit.isIso8601() ) { - dateTimeUnit = getCalendar().fromIso( dateTimeUnit ); + month = getCalendar().fromIso( dateTimeUnit ).getMonth(); } - switch ( dateTimeUnit.getMonth() ) + switch ( month ) { case 4: return dateTimeUnit.getYear() + "AprilS1"; === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java 2014-09-17 10:47:53 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/SixMonthlyPeriodType.java 2014-09-18 12:50:44 +0000 @@ -80,12 +80,14 @@ @Override public String getIsoDate( DateTimeUnit dateTimeUnit ) { + int month = dateTimeUnit.getMonth(); + if ( dateTimeUnit.isIso8601() ) { - dateTimeUnit = getCalendar().fromIso( dateTimeUnit ); + month = getCalendar().fromIso( dateTimeUnit ).getMonth(); } - switch ( dateTimeUnit.getMonth() ) + switch ( month ) { case 1: return dateTimeUnit.getYear() + "S1"; === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2014-09-18 11:23:17 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2014-09-18 12:50:44 +0000 @@ -2082,7 +2082,7 @@ } else { dhis2.de.storageManager.loadForm( dataSetId ).done(function( data ) { def.resolve( data ); - }).error(function() { + }).fail(function() { def.resolve( "A form with that ID is not available. Please clear browser cache and try again." ); }); }
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp