dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15993
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5934: (DV) Last year period option implemented.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 5934 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-02-13 11:48:51 +0100
message:
(DV) Last year period option implemented.
modified:
dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/InitializeAction.java
dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties
dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module_fr_FR.properties
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/jsonInitialize.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-visualizer/src/main/java/org/hisp/dhis/visualizer/action/InitializeAction.java'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/InitializeAction.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/InitializeAction.java 2012-02-13 10:37:38 +0000
@@ -125,6 +125,13 @@
return last2SixMonths;
}
+ private List<Period> lastYear;
+
+ public List<Period> getLastYear()
+ {
+ return lastYear;
+ }
+
private List<Period> thisYear;
public List<Period> getThisYear()
@@ -171,6 +178,9 @@
rp.clear().setLast2SixMonths( true );
last2SixMonths = periodService.reloadPeriods( setNames( rp.getRelativePeriods() ) );
+ rp.clear().setLastYear( true );
+ lastYear = periodService.reloadPeriods( setNames( rp.getRelativePeriods() ) );
+
rp.clear().setThisYear( true );
thisYear = periodService.reloadPeriods( setNames( rp.getRelativePeriods() ) );
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties 2012-01-31 10:55:15 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties 2012-02-13 10:37:38 +0000
@@ -87,4 +87,5 @@
organisation_unit=Organisation unit
invalid_uid=Invalid uid
system_favorite_overwrite_not_allowed=* You are not allowed to overwrite a system favorite
-favorite_no_orgunits=Favorite has no organisation units
\ No newline at end of file
+favorite_no_orgunits=Favorite has no organisation units
+this_year=This year
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module_fr_FR.properties'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module_fr_FR.properties 2012-01-31 10:55:15 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module_fr_FR.properties 2012-02-13 10:47:38 +0000
@@ -87,4 +87,5 @@
organisation_unit=Unit\u00e9 d'organisation
invalid_uid=uid invalide
system_favorite_overwrite_not_allowed=* Vous n'\u00eates pas autoris\u00e9 \u00e0 \u00e9craser un favori du syst\u00e8me
-favorite_no_orgunits=Favoris n'a pas d'unit\u00e8s d'organisation
\ No newline at end of file
+favorite_no_orgunits=Favoris n'a pas d'unit\u00e8s d'organisation
+this_year=Ann\u00e9e en cours
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2012-02-10 14:53:26 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2012-02-13 10:37:38 +0000
@@ -2334,6 +2334,11 @@
{
xtype: 'checkbox',
paramName: 'thisYear',
+ boxLabel: DV.i18n.this_year
+ },
+ {
+ xtype: 'checkbox',
+ paramName: 'lastYear',
boxLabel: DV.i18n.last_year
},
{
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm 2012-01-31 10:55:15 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm 2012-02-13 10:37:38 +0000
@@ -86,6 +86,7 @@
organisation_unit:'$encoder.jsEscape($i18n.getString( 'organisation_unit' ) , "'")',
invalid_uid:'$encoder.jsEscape($i18n.getString( 'invalid_uid' ) , "'")',
system_favorite_overwrite_not_allowed:'$encoder.jsEscape($i18n.getString( 'system_favorite_overwrite_not_allowed' ) , "'")',
-favorite_no_orgunits:'$encoder.jsEscape($i18n.getString( 'favorite_no_orgunits' ) , "'")'
+favorite_no_orgunits:'$encoder.jsEscape($i18n.getString( 'favorite_no_orgunits' ) , "'")',
+this_year:'$encoder.jsEscape($i18n.getString( 'this_year' ) , "'")'
};
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/jsonInitialize.vm'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/jsonInitialize.vm 2011-12-22 15:30:18 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/jsonInitialize.vm 2012-02-13 10:37:38 +0000
@@ -1,1 +1,1 @@
-{"user":{"id":"$!currentUser.id","isAdmin":$auth.hasAccess( "dhis-web-visualizer", "addOrUpdateSystemChart" )},"rn":["$!{rootNode.id}","$!encoder.jsonEncode(${rootNode.name})"],"p":{"lastMonth":[#foreach($p in $lastMonth)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$lastMonth.size()),#end#end],"last12Months":[#foreach($p in $last12Months)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$last12Months.size()),#end#end],"lastQuarter":[#foreach($p in $lastQuarter)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$lastQuarter.size()),#end#end],"last4Quarters":[#foreach($p in $last4Quarters)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$last4Quarters.size()),#end#end],"lastSixMonth":[#foreach($p in $lastSixMonth)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$lastSixMonth.size()),#end#end],"last2SixMonths":[#foreach($p in $last2SixMonths)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$last2SixMonths.size()),#end#end],"thisYear":[#foreach($p in $thisYear)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$thisYear.size()),#end#end],"last5Years":[#foreach($p in $last5Years)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$last5Years.size()),#end#end]}}
\ No newline at end of file
+{"user":{"id":"$!currentUser.id","isAdmin":$auth.hasAccess( "dhis-web-visualizer", "addOrUpdateSystemChart" )},"rn":["$!{rootNode.id}","$!encoder.jsonEncode(${rootNode.name})"],"p":{"lastMonth":[#foreach($p in $lastMonth)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$lastMonth.size()),#end#end],"last12Months":[#foreach($p in $last12Months)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$last12Months.size()),#end#end],"lastQuarter":[#foreach($p in $lastQuarter)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$lastQuarter.size()),#end#end],"last4Quarters":[#foreach($p in $last4Quarters)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$last4Quarters.size()),#end#end],"lastSixMonth":[#foreach($p in $lastSixMonth)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$lastSixMonth.size()),#end#end],"last2SixMonths":[#foreach($p in $last2SixMonths)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$last2SixMonths.size()),#end#end],"lastYear":[#foreach($p in $lastYear)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$lastYear.size()),#end#end],"thisYear":[#foreach($p in $thisYear)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$thisYear.size()),#end#end],"last5Years":[#foreach($p in $last5Years)["$!{p.id}","$!encoder.jsonEncode(${p.name})"]#if($velocityCount<$last5Years.size()),#end#end]}}
\ No newline at end of file