dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36915
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18881: GIS more 'this' relative periods added.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 18881 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-04-10 17:33:56 +0200
message:
GIS more 'this' relative periods added.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/i18n/i18n_app.properties
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.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-apps/src/main/webapp/dhis-web-mapping/i18n/i18n_app.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/i18n/i18n_app.properties 2015-03-05 17:32:21 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/i18n/i18n_app.properties 2015-04-10 15:31:02 +0000
@@ -421,3 +421,8 @@
this_financial_year=This financial year
user_sub_units=User sub-units
user_sub_x2_units=User sub-x2-units
+this_week=This week
+this_quarter=This quarter
+this_month=This month
+this_sixmonth=This six-month
+this_bimonth=This bi-month
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js 2015-03-30 14:18:36 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js 2015-04-10 15:31:02 +0000
@@ -2776,37 +2776,38 @@
{id: 'FinancialApril', name: GIS.i18n.financial_april}
],
relativePeriods: [
+ {id: 'THIS_WEEK', name: GIS.i18n.this_week},
{id: 'LAST_WEEK', name: GIS.i18n.last_week},
+ {id: 'THIS_MONTH', name: GIS.i18n.this_month},
{id: 'LAST_MONTH', name: GIS.i18n.last_month},
+ {id: 'THIS_BIMONTH', name: GIS.i18n.this_bimonth},
{id: 'LAST_BIMONTH', name: GIS.i18n.last_bimonth},
+ {id: 'THIS_QUARTER', name: GIS.i18n.this_quarter},
{id: 'LAST_QUARTER', name: GIS.i18n.last_quarter},
+ {id: 'THIS_SIX_MONTH', name: GIS.i18n.this_sixmonth},
{id: 'LAST_SIX_MONTH', name: GIS.i18n.last_sixmonth},
{id: 'THIS_FINANCIAL_YEAR', name: GIS.i18n.this_financial_year},
{id: 'LAST_FINANCIAL_YEAR', name: GIS.i18n.last_financial_year},
{id: 'THIS_YEAR', name: GIS.i18n.this_year},
{id: 'LAST_YEAR', name: GIS.i18n.last_year}
],
- relativePeriodsMap: {
- 'LAST_WEEK': {id: 'LAST_WEEK', name: GIS.i18n.last_week},
- 'LAST_MONTH': {id: 'LAST_MONTH', name: GIS.i18n.last_month},
- 'LAST_BIMONTH': {id: 'LAST_BIMONTH', name: GIS.i18n.last_bimonth},
- 'LAST_QUARTER': {id: 'LAST_QUARTER', name: GIS.i18n.last_quarter},
- 'LAST_SIX_MONTH': {id: 'LAST_SIX_MONTH', name: GIS.i18n.last_sixmonth},
- 'LAST_FINANCIAL_YEAR': {id: 'LAST_FINANCIAL_YEAR', name: GIS.i18n.last_financial_year},
- 'THIS_YEAR': {id: 'THIS_YEAR', name: GIS.i18n.this_year},
- 'LAST_YEAR': {id: 'LAST_YEAR', name: GIS.i18n.last_year}
- },
+ relativePeriodsMap: {},
integratedRelativePeriodsMap: {
+ 'THIS_WEEK': 'THIS_WEEK',
'LAST_WEEK': 'LAST_WEEK',
'LAST_4_WEEKS': 'LAST_WEEK',
'LAST_12_WEEKS': 'LAST_WEEK',
+ 'THIS_MONTH': 'THIS_MONTH',
'LAST_MONTH': 'LAST_MONTH',
'LAST_3_MONTHS': 'LAST_MONTH',
'LAST_12_MONTHS': 'LAST_MONTH',
+ 'THIS_BIMONTH': 'THIS_BIMONTH',
'LAST_BIMONTH': 'LAST_BIMONTH',
'LAST_6_BIMONTHS': 'LAST_BIMONTH',
+ 'THIS_QUARTER': 'THIS_QUARTER',
'LAST_QUARTER': 'LAST_QUARTER',
'LAST_4_QUARTERS': 'LAST_QUARTER',
+ 'THIS_SIX_MONTH': 'THIS_SIX_MONTH',
'LAST_SIX_MONTH': 'LAST_SIX_MONTH',
'LAST_2_SIXMONTHS': 'LAST_SIX_MONTH',
'LAST_FINANCIAL_YEAR': 'LAST_FINANCIAL_YEAR',
@@ -2817,6 +2818,13 @@
}
};
+ // relativePeriodsMap
+ for (var i = 0, obj; i < conf.period.relativePeriods.length; i++) {
+ obj = conf.period.relativePeriods[i];
+
+ conf.period.relativePeriodsMap[obj.id] = obj.name;
+ }
+
conf.url = {};
conf.url.analysisFields = [