← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7796: Made filterFuturePeriods method in data entry remove current period. Reversing periods in data en...

 

------------------------------------------------------------
revno: 7796
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-07-31 22:02:10 +0200
message:
  Made filterFuturePeriods method in data entry remove current period. Reversing periods in data entry.
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/periodType.js
  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-commons-resources/src/main/webapp/cacheManifest.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm	2012-07-12 14:33:08 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm	2012-07-31 20:02:10 +0000
@@ -1,5 +1,5 @@
 CACHE MANIFEST
-# 2.9-SNAPSHOT Version 1
+# 2.9 Final
 NETWORK:
 *
 CACHE:

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/periodType.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/periodType.js	2012-07-19 08:05:48 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/periodType.js	2012-07-31 20:02:10 +0000
@@ -41,7 +41,7 @@
 
         for ( var j = 0; j < periods.length; j++ )
         {
-            if ( $.date( periods[j]['startDate'], dateFormat ).date().getTime() <= now )
+            if ( $.date( periods[j]['endDate'], dateFormat ).date().getTime() <= now )
             {
                 array[i++] = periods[j];
             }

=== 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	2012-07-14 18:16:59 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2012-07-31 20:02:10 +0000
@@ -555,6 +555,7 @@
     var periodType = dataSets[dataSetId].periodType;
     var allowFuturePeriods = dataSets[dataSetId].allowFuturePeriods;
     var periods = periodTypeFactory.get( periodType ).generatePeriods( currentPeriodOffset );
+    periods = periodTypeFactory.reverse( periods );
     
     if ( allowFuturePeriods == "false" )
     {
@@ -586,6 +587,7 @@
     var periodType = dataSets[dataSetId].periodType;
     var allowFuturePeriods = dataSets[dataSetId].allowFuturePeriods;
     var periods = periodTypeFactory.get( periodType ).generatePeriods( currentPeriodOffset );
+    periods = periodTypeFactory.reverse( periods );
     
     if ( allowFuturePeriods == "false" )
     {