------------------------------------------------------------
revno: 16945
committer: Lars Helge Overland <[email protected]>
branch nick: dhis2
timestamp: Fri 2014-10-03 10:33:52 +0200
message:
Data entry, period option checking, checking for falsy instead of null
modified:
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-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-30 12:18:07 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2014-10-03 08:33:52 +0000
@@ -1216,8 +1216,8 @@
*/
dhis2.de.optionValidWithinPeriod = function( option, period )
{
- return ( option.startDate == null || option.startDate <= dhis2.de.periodChoices[ period ].endDate )
- && ( option.endDate == null || option.endDate >= dhis2.de.periodChoices[ period ].startDate )
+ return ( !option.startDate || option.startDate <= dhis2.de.periodChoices[ period ].endDate )
+ && ( !option.endDate || option.endDate >= dhis2.de.periodChoices[ period ].startDate )
}
/**
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp