← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18887: ER EV more 'this' relative periods added.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 18887 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2015-04-11 20:00:20 +0200
message:
  ER EV more 'this' relative periods added.
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/i18n/i18n_app.properties
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/i18n/i18n_app.properties
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/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-event-reports/i18n/i18n_app.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/i18n/i18n_app.properties	2015-04-01 15:34:05 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/i18n/i18n_app.properties	2015-04-11 17:59:06 +0000
@@ -193,3 +193,8 @@
 user_sub_x2_units=User sub-x2-units
 collapse_data_dimensions=Collapse data dimensions
 hide_na_data=Hide n/a data
+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-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-04-03 15:43:32 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-04-11 17:59:06 +0000
@@ -1525,15 +1525,7 @@
             },
 			store: Ext.create('Ext.data.Store', {
 				fields: ['id', 'text'],
-				data: [
-					{id: 'COUNT', text: NS.i18n.count},
-					{id: 'AVERAGE', text: NS.i18n.average},
-					{id: 'SUM', text: NS.i18n.sum},
-					{id: 'STDDEV', text: NS.i18n.stddev},
-					{id: 'VARIANCE', text: NS.i18n.variance},
-					{id: 'MIN', text: NS.i18n.min},
-					{id: 'MAX', text: NS.i18n.max}
-				]
+				data: ns.core.conf.aggregationType.data
 			}),
             resetData: function() {
                 this.setDisabled();
@@ -4769,6 +4761,11 @@
                 },
                 {
                     xtype: 'checkbox',
+                    relativePeriodId: rp[rp.push('THIS_WEEK') - 1],
+                    boxLabel: NS.i18n.this_week
+                },
+                {
+                    xtype: 'checkbox',
                     relativePeriodId: rp[rp.push('LAST_WEEK') - 1],
                     boxLabel: NS.i18n.last_week
                 },
@@ -4804,6 +4801,11 @@
                 },
                 {
                     xtype: 'checkbox',
+                    relativePeriodId: rp[rp.push('THIS_MONTH') - 1],
+                    boxLabel: NS.i18n.this_month
+                },
+                {
+                    xtype: 'checkbox',
                     relativePeriodId: rp[rp.push('LAST_MONTH') - 1],
                     boxLabel: NS.i18n.last_month
                 },
@@ -4840,6 +4842,11 @@
                 },
                 {
                     xtype: 'checkbox',
+                    relativePeriodId: rp[rp.push('THIS_BIMONTH') - 1],
+                    boxLabel: NS.i18n.this_bimonth
+                },
+                {
+                    xtype: 'checkbox',
                     relativePeriodId: rp[rp.push('LAST_BIMONTH') - 1],
                     boxLabel: NS.i18n.last_bimonth
                 },
@@ -4865,6 +4872,11 @@
                 },
                 {
                     xtype: 'checkbox',
+                    relativePeriodId: rp[rp.push('THIS_QUARTER') - 1],
+                    boxLabel: NS.i18n.this_quarter
+                },
+                {
+                    xtype: 'checkbox',
                     relativePeriodId: rp[rp.push('LAST_QUARTER') - 1],
                     boxLabel: NS.i18n.last_quarter
                 },
@@ -4890,6 +4902,11 @@
                 },
                 {
                     xtype: 'checkbox',
+                    relativePeriodId: rp[rp.push('THIS_SIX_MONTH') - 1],
+                    boxLabel: NS.i18n.this_sixmonth
+                },
+                {
+                    xtype: 'checkbox',
                     relativePeriodId: rp[rp.push('LAST_SIX_MONTH') - 1],
                     boxLabel: NS.i18n.last_sixmonth
                 },

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js	2015-04-09 06:29:13 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js	2015-04-11 17:59:06 +0000
@@ -27,6 +27,8 @@
 
 		// conf
 		(function() {
+
+            // finals
 			conf.finals = {
 				dimension: {
 					data: {
@@ -116,6 +118,7 @@
 			dimConf.objectNameMap[dimConf.organisationUnit.objectName] = dimConf.organisationUnit;
 			dimConf.objectNameMap[dimConf.dimension.objectName] = dimConf.dimension;
 
+            // period
 			conf.period = {
 				periodTypes: [
 					{id: 'Daily', name: NS.i18n.daily},
@@ -132,13 +135,33 @@
                 relativePeriods: []
 			};
 
+                // aggregation type
+            conf.aggregationType = {
+                data: [
+					{id: 'COUNT', name: NS.i18n.count, text: NS.i18n.count},
+					{id: 'AVERAGE', name: NS.i18n.average, text: NS.i18n.average},
+					{id: 'SUM', name: NS.i18n.sum, text: NS.i18n.sum},
+					{id: 'STDDEV', name: NS.i18n.stddev, text: NS.i18n.stddev},
+					{id: 'VARIANCE', name: NS.i18n.variance, text: NS.i18n.variance},
+					{id: 'MIN', name: NS.i18n.min, text: NS.i18n.min},
+					{id: 'MAX', name: NS.i18n.max, text: NS.i18n.max}
+                ],
+                idNameMap: {}
+            };
+
+            for (var i = 0, obj; i < conf.aggregationType.data.length; i++) {
+                obj = conf.aggregationType.data[i];
+                conf.aggregationType.idNameMap[obj.id] = obj.text;
+            }
+
+            // gui layout
 			conf.layout = {
 				west_width: 452,
 				west_fill: 2,
                 west_fill_accordion_indicator: 56,
                 west_fill_accordion_dataelement: 59,
                 west_fill_accordion_dataset: 31,
-                west_fill_accordion_period: 300,
+                west_fill_accordion_period: 330,
                 west_fill_accordion_organisationunit: 58,
                 west_maxheight_accordion_indicator: 450,
                 west_maxheight_accordion_dataset: 350,
@@ -167,6 +190,7 @@
 				multiselect_fill_reportingrates: 315
 			};
 
+            // report
 			conf.report = {
 				digitGroupSeparator: {
 					'comma': ',',
@@ -184,6 +208,7 @@
 				}
 			};
 
+            // url
             conf.url = {
                 analysisFields: [
                     '*',

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/i18n/i18n_app.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/i18n/i18n_app.properties	2015-04-08 13:50:25 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/i18n/i18n_app.properties	2015-04-11 17:59:06 +0000
@@ -218,3 +218,8 @@
 duplicate=Duplicate
 remove=Remove
 select=Select
+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-event-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js	2015-04-09 07:42:56 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js	2015-04-11 17:59:06 +0000
@@ -4426,22 +4426,27 @@
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_WEEK',
+                    relativePeriodId: rp[rp.push('THIS_WEEK') - 1],
+                    boxLabel: NS.i18n.this_week
+                },
+                {
+                    xtype: 'checkbox',
+                    relativePeriodId: rp[rp.push('LAST_WEEK') - 1],
                     boxLabel: NS.i18n.last_week
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_4_WEEKS',
+                    relativePeriodId: rp[rp.push('LAST_4_WEEKS') - 1],
                     boxLabel: NS.i18n.last_4_weeks
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_12_WEEKS',
+                    relativePeriodId: rp[rp.push('LAST_12_WEEKS') - 1],
                     boxLabel: NS.i18n.last_12_weeks
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_52_WEEKS',
+                    relativePeriodId: rp[rp.push('LAST_52_WEEKS') - 1],
                     boxLabel: NS.i18n.last_52_weeks
                 }
             ]
@@ -4461,22 +4466,27 @@
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_MONTH',
+                    relativePeriodId: rp[rp.push('THIS_MONTH') - 1],
+                    boxLabel: NS.i18n.this_month
+                },
+                {
+                    xtype: 'checkbox',
+                    relativePeriodId: rp[rp.push('LAST_MONTH') - 1],
                     boxLabel: NS.i18n.last_month
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_3_MONTHS',
+                    relativePeriodId: rp[rp.push('LAST_3_MONTHS') - 1],
                     boxLabel: NS.i18n.last_3_months
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_6_MONTHS',
+                    relativePeriodId: rp[rp.push('LAST_6_MONTHS') - 1],
                     boxLabel: NS.i18n.last_6_months
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_12_MONTHS',
+                    relativePeriodId: rp[rp.push('LAST_12_MONTHS') - 1],
                     boxLabel: NS.i18n.last_12_months,
                     checked: true
                 }
@@ -4497,12 +4507,17 @@
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_BIMONTH',
+                    relativePeriodId: rp[rp.push('THIS_BIMONTH') - 1],
+                    boxLabel: NS.i18n.this_bimonth
+                },
+                {
+                    xtype: 'checkbox',
+                    relativePeriodId: rp[rp.push('LAST_BIMONTH') - 1],
                     boxLabel: NS.i18n.last_bimonth
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_6_BIMONTHS',
+                    relativePeriodId: rp[rp.push('LAST_6_BIMONTHS') - 1],
                     boxLabel: NS.i18n.last_6_bimonths
                 }
             ]
@@ -4522,12 +4537,17 @@
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_QUARTER',
+                    relativePeriodId: rp[rp.push('THIS_QUARTER') - 1],
+                    boxLabel: NS.i18n.this_quarter
+                },
+                {
+                    xtype: 'checkbox',
+                    relativePeriodId: rp[rp.push('LAST_QUARTER') - 1],
                     boxLabel: NS.i18n.last_quarter
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_4_QUARTERS',
+                    relativePeriodId: rp[rp.push('LAST_4_QUARTERS') - 1],
                     boxLabel: NS.i18n.last_4_quarters
                 }
             ]
@@ -4547,12 +4567,17 @@
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_SIX_MONTH',
+                    relativePeriodId: rp[rp.push('THIS_SIX_MONTH') - 1],
+                    boxLabel: NS.i18n.this_sixmonth
+                },
+                {
+                    xtype: 'checkbox',
+                    relativePeriodId: rp[rp.push('LAST_SIX_MONTH') - 1],
                     boxLabel: NS.i18n.last_sixmonth
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_2_SIXMONTHS',
+                    relativePeriodId: rp[rp.push('LAST_2_SIXMONTHS') - 1],
                     boxLabel: NS.i18n.last_2_sixmonths
                 }
             ]
@@ -4573,17 +4598,17 @@
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'THIS_FINANCIAL_YEAR',
+                    relativePeriodId: rp[rp.push('THIS_FINANCIAL_YEAR') - 1],
                     boxLabel: NS.i18n.this_financial_year
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_FINANCIAL_YEAR',
+                    relativePeriodId: rp[rp.push('LAST_FINANCIAL_YEAR') - 1],
                     boxLabel: NS.i18n.last_financial_year
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_5_FINANCIAL_YEARS',
+                    relativePeriodId: rp[rp.push('LAST_5_FINANCIAL_YEARS') - 1],
                     boxLabel: NS.i18n.last_5_financial_years
                 }
             ]
@@ -4603,17 +4628,17 @@
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'THIS_YEAR',
+                    relativePeriodId: rp[rp.push('THIS_YEAR') - 1],
                     boxLabel: NS.i18n.this_year
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_YEAR',
+                    relativePeriodId: rp[rp.push('LAST_YEAR') - 1],
                     boxLabel: NS.i18n.last_year
                 },
                 {
                     xtype: 'checkbox',
-                    relativePeriodId: 'LAST_5_YEARS',
+                    relativePeriodId: rp[rp.push('LAST_5_YEARS') - 1],
                     boxLabel: NS.i18n.last_5_years
                 }
             ]

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js	2015-04-09 08:55:30 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js	2015-04-11 17:59:06 +0000
@@ -658,10 +658,11 @@
 					{id: 'FinancialOct', name: NS.i18n.financial_oct},
 					{id: 'FinancialJuly', name: NS.i18n.financial_july},
 					{id: 'FinancialApril', name: NS.i18n.financial_april}
-				]
+				],
+                relativePeriods: []
 			};
 
-            // aggregation type
+                // aggregation type
             conf.aggregationType = {
                 data: [
 					{id: 'COUNT', name: NS.i18n.count, text: NS.i18n.count},