← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17103: PT DV ER EV last 6 months and last 52 weeks implemented + GIS relative periods bug fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 17103 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-10-14 12:01:44 +0200
message:
  PT DV ER EV last 6 months and last 52 weeks implemented + GIS relative periods bug fixed.
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/i18n/en.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/styles/style.css
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/i18n/en.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/styles/style.css
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/en.properties
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/styles/style.css
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/i18n/en.properties
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/styles/style.css


--
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/en.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/i18n/en.properties	2014-10-07 10:08:29 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/i18n/en.properties	2014-10-14 09:42:40 +0000
@@ -169,3 +169,5 @@
 you_do_not_have_access_to_all_items_in_this_favorite=You do not have access to all items in this favorite
 show_col_subtotals=Show column sub-totals
 show_row_subtotals=Show row sub-totals
+last_52_weeks=Last 52 weeks
+last_6_months=Last 6 months

=== 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	2014-10-07 10:55:39 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2014-10-14 09:46:02 +0000
@@ -4110,7 +4110,7 @@
             bodyStyle: 'border-style:none; padding:0 0 0 8px',
             defaults: {
                 labelSeparator: '',
-                style: 'margin-bottom:2px',
+                style: 'margin-bottom:0',
                 listeners: intervalListeners
             },
             items: [
@@ -4133,6 +4133,11 @@
                     xtype: 'checkbox',
                     relativePeriodId: 'LAST_12_WEEKS',
                     boxLabel: NS.i18n.last_12_weeks
+                },
+                {
+                    xtype: 'checkbox',
+                    relativePeriodId: 'LAST_52_WEEKS',
+                    boxLabel: NS.i18n.last_52_weeks
                 }
             ]
         });
@@ -4142,7 +4147,7 @@
             bodyStyle: 'border-style:none',
             defaults: {
                 labelSeparator: '',
-                style: 'margin-bottom:2px',
+                style: 'margin-bottom:0',
                 listeners: intervalListeners
             },
             items: [
@@ -4163,6 +4168,11 @@
                 },
                 {
                     xtype: 'checkbox',
+                    relativePeriodId: 'LAST_6_MONTHS',
+                    boxLabel: NS.i18n.last_6_months
+                },
+                {
+                    xtype: 'checkbox',
                     relativePeriodId: 'LAST_12_MONTHS',
                     boxLabel: NS.i18n.last_12_months,
                     checked: true
@@ -4175,7 +4185,7 @@
             bodyStyle: 'border-style:none',
             defaults: {
                 labelSeparator: '',
-                style: 'margin-bottom:2px',
+                style: 'margin-bottom:0',
                 listeners: intervalListeners
             },
             items: [
@@ -4202,7 +4212,7 @@
             bodyStyle: 'border-style:none; padding:5px 0 0 8px',
             defaults: {
                 labelSeparator: '',
-                style: 'margin-bottom:2px',
+                style: 'margin-bottom:0',
                 listeners: intervalListeners
             },
             items: [
@@ -4229,7 +4239,7 @@
             bodyStyle: 'border-style:none; padding:5px 0 0',
             defaults: {
                 labelSeparator: '',
-                style: 'margin-bottom:2px',
+                style: 'margin-bottom:0',
                 listeners: intervalListeners
             },
             items: [
@@ -4256,7 +4266,7 @@
             bodyStyle: 'border-style:none; padding:5px 0 0',
             defaults: {
                 labelSeparator: '',
-                style: 'margin-bottom:2px',
+                style: 'margin-bottom:0',
                 listeners: intervalListeners
             },
             items: [
@@ -4283,7 +4293,7 @@
             bodyStyle: 'border-style:none; padding:5px 0 0 8px',
             defaults: {
                 labelSeparator: '',
-                style: 'margin-bottom:2px',
+                style: 'margin-bottom:0',
                 listeners: intervalListeners
             },
             items: [

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/styles/style.css	2014-09-26 16:14:03 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/styles/style.css	2014-10-14 09:42:40 +0000
@@ -953,7 +953,7 @@
     font-size: 11px;
     font-weight: bold;
     color: #333;
-    line-height: 20px;
+    line-height: 18px;
 }
 .ns-label-period-heading-options {
     background-color: #e1e1e1;

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/i18n/en.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/i18n/en.properties	2014-09-29 15:12:43 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/i18n/en.properties	2014-10-14 09:46:02 +0000
@@ -193,3 +193,5 @@
 example6=Click Options to show trend lines, target lines, axis titles and more
 example7=Click Favorites to save your chart for later use
 example8=Click Download to save chart graphics to your computer
+last_52_weeks=Last 52 weeks
+last_6_months=Last 6 months

=== 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	2014-10-09 07:58:13 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js	2014-10-14 09:46:02 +0000
@@ -3745,7 +3745,7 @@
             bodyStyle: 'border-style:none; padding:0 0 0 8px',
             defaults: {
                 labelSeparator: '',
-                style: 'margin-bottom:2px',
+                style: 'margin-bottom:0',
                 listeners: intervalListeners
             },
             items: [
@@ -3768,6 +3768,11 @@
                     xtype: 'checkbox',
                     relativePeriodId: 'LAST_12_WEEKS',
                     boxLabel: NS.i18n.last_12_weeks
+                },
+                {
+                    xtype: 'checkbox',
+                    relativePeriodId: 'LAST_52_WEEKS',
+                    boxLabel: NS.i18n.last_52_weeks
                 }
             ]
         });
@@ -3777,7 +3782,7 @@
             bodyStyle: 'border-style:none',
             defaults: {
                 labelSeparator: '',
-                style: 'margin-bottom:2px',
+                style: 'margin-bottom:0',
                 listeners: intervalListeners
             },
             items: [
@@ -3798,6 +3803,11 @@
                 },
                 {
                     xtype: 'checkbox',
+                    relativePeriodId: 'LAST_6_MONTHS',
+                    boxLabel: NS.i18n.last_6_months
+                },
+                {
+                    xtype: 'checkbox',
                     relativePeriodId: 'LAST_12_MONTHS',
                     boxLabel: NS.i18n.last_12_months,
                     checked: true
@@ -3810,7 +3820,7 @@
             bodyStyle: 'border-style:none',
             defaults: {
                 labelSeparator: '',
-                style: 'margin-bottom:2px',
+                style: 'margin-bottom:0',
                 listeners: intervalListeners
             },
             items: [
@@ -3837,7 +3847,7 @@
             bodyStyle: 'border-style:none; padding:5px 0 0 8px',
             defaults: {
                 labelSeparator: '',
-                style: 'margin-bottom:2px',
+                style: 'margin-bottom:0',
                 listeners: intervalListeners
             },
             items: [
@@ -3864,7 +3874,7 @@
             bodyStyle: 'border-style:none; padding:5px 0 0',
             defaults: {
                 labelSeparator: '',
-                style: 'margin-bottom:2px',
+                style: 'margin-bottom:0',
                 listeners: intervalListeners
             },
             items: [
@@ -3891,7 +3901,7 @@
             bodyStyle: 'border-style:none; padding:5px 0 0',
             defaults: {
                 labelSeparator: '',
-                style: 'margin-bottom:2px',
+                style: 'margin-bottom:0',
                 listeners: intervalListeners
             },
             items: [
@@ -3918,7 +3928,7 @@
             bodyStyle: 'border-style:none; padding:5px 0 0 8px',
             defaults: {
                 labelSeparator: '',
-                style: 'margin-bottom:2px',
+                style: 'margin-bottom:0',
                 listeners: intervalListeners
             },
             items: [

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/styles/style.css	2014-08-25 10:14:13 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/styles/style.css	2014-10-14 09:46:02 +0000
@@ -942,7 +942,7 @@
     font-size: 11px;
     font-weight: bold;
     color: #333;
-    line-height: 20px;
+    line-height: 18px;
 }
 .ns-label-period-heading-options {
     background-color: #e1e1e1;

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js	2014-10-08 10:09:37 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js	2014-10-14 09:51:53 +0000
@@ -7349,7 +7349,7 @@
             var type = periodType.getValue(),
                 periodOffset = periodType.periodOffset,
                 generator = gis.init.periodGenerator,
-                periods = generator.generateReversedPeriods(type, type === 'Yearly' ? periodOffset - 5 : periodOffset);
+                periods;
                 
             if (type === 'relativePeriods') {
                 periodsByTypeStore.loadData(gis.conf.period.relativePeriods);
@@ -7358,6 +7358,8 @@
                 periodNext.disable();
             }
             else {
+                periods = generator.generateReversedPeriods(type, type === 'Yearly' ? periodOffset - 5 : periodOffset);
+                
                 for (var i = 0; i < periods.length; i++) {
                     periods[i].id = periods[i].iso;
                 }

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/en.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/en.properties	2014-10-06 18:46:34 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/en.properties	2014-10-14 09:05:50 +0000
@@ -169,3 +169,5 @@
 show=Show
 show_col_subtotals=Show column sub-totals
 show_row_subtotals=Show row sub-totals
+last_52_weeks=Last 52 weeks
+last_6_months=Last 6 months

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2014-10-07 10:55:39 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js	2014-10-14 09:05:50 +0000
@@ -2631,6 +2631,7 @@
             dataSetSelected,
             dataSet,
 			rewind,
+            relativePeriodDefaults,
             relativePeriod,
             fixedPeriodAvailable,
             fixedPeriodSelected,
@@ -3885,6 +3886,19 @@
 			}
 		});
 
+        relativePeriodDefaults = {
+            labelSeparator: '',
+            style: 'margin-bottom:0',
+            listeners: {
+                added: function(chb) {
+                    if (chb.xtype === 'checkbox') {
+                        period.checkboxes.push(chb);
+                        relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
+                    }
+                }
+            }
+        };
+
 		relativePeriod = {
 			xtype: 'panel',
 			hideCollapseTool: true,
@@ -3901,21 +3915,7 @@
 							xtype: 'panel',
 							columnWidth: 0.34,
 							bodyStyle: 'border-style:none; padding:0 0 0 8px',
-							defaults: {
-								labelSeparator: '',
-								style: 'margin-bottom:2px',
-								listeners: {
-									added: function(chb) {
-										if (chb.xtype === 'checkbox') {
-											period.checkboxes.push(chb);
-											relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
-										}
-									},
-									change: function() {
-										//rewind.xable();
-									}
-								}
-							},
+							defaults: relativePeriodDefaults,
 							items: [
 								{
 									xtype: 'label',
@@ -3936,6 +3936,11 @@
 									xtype: 'checkbox',
 									relativePeriodId: 'LAST_12_WEEKS',
 									boxLabel: NS.i18n.last_12_weeks
+								},
+								{
+									xtype: 'checkbox',
+									relativePeriodId: 'LAST_52_WEEKS',
+									boxLabel: NS.i18n.last_52_weeks
 								}
 							]
 						},
@@ -3943,21 +3948,7 @@
 							xtype: 'panel',
 							columnWidth: 0.33,
 							bodyStyle: 'border-style:none',
-							defaults: {
-								labelSeparator: '',
-								style: 'margin-bottom:2px',
-								listeners: {
-									added: function(chb) {
-										if (chb.xtype === 'checkbox') {
-											period.checkboxes.push(chb);
-											relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
-										}
-									},
-									change: function() {
-										//rewind.xable();
-									}
-								}
-							},
+							defaults: relativePeriodDefaults,
 							items: [
 								{
 									xtype: 'label',
@@ -3976,6 +3967,11 @@
 								},
 								{
 									xtype: 'checkbox',
+									relativePeriodId: 'LAST_6_MONTHS',
+									boxLabel: NS.i18n.last_6_months
+								},
+								{
+									xtype: 'checkbox',
 									relativePeriodId: 'LAST_12_MONTHS',
 									boxLabel: NS.i18n.last_12_months,
 									checked: true
@@ -3986,21 +3982,7 @@
 							xtype: 'panel',
 							columnWidth: 0.33,
 							bodyStyle: 'border-style:none',
-							defaults: {
-								labelSeparator: '',
-								style: 'margin-bottom:2px',
-								listeners: {
-									added: function(chb) {
-										if (chb.xtype === 'checkbox') {
-											period.checkboxes.push(chb);
-											relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
-										}
-									},
-									change: function() {
-										//rewind.xable();
-									}
-								}
-							},
+							defaults: relativePeriodDefaults,
 							items: [
 								{
 									xtype: 'label',
@@ -4030,21 +4012,7 @@
 							xtype: 'panel',
 							columnWidth: 0.34,
 							bodyStyle: 'border-style:none; padding:5px 0 0 8px',
-							defaults: {
-								labelSeparator: '',
-								style: 'margin-bottom:2px',
-								listeners: {
-									added: function(chb) {
-										if (chb.xtype === 'checkbox') {
-											period.checkboxes.push(chb);
-											relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
-										}
-									},
-									change: function() {
-										//rewind.xable();
-									}
-								}
-							},
+							defaults: relativePeriodDefaults,
 							items: [
 								{
 									xtype: 'label',
@@ -4067,21 +4035,7 @@
 							xtype: 'panel',
 							columnWidth: 0.33,
 							bodyStyle: 'border-style:none; padding:5px 0 0',
-							defaults: {
-								labelSeparator: '',
-								style: 'margin-bottom:2px',
-								listeners: {
-									added: function(chb) {
-										if (chb.xtype === 'checkbox') {
-											period.checkboxes.push(chb);
-											relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
-										}
-									},
-									change: function() {
-										//rewind.xable();
-									}
-								}
-							},
+							defaults: relativePeriodDefaults,
 							items: [
 								{
 									xtype: 'label',
@@ -4104,21 +4058,7 @@
 							xtype: 'panel',
 							columnWidth: 0.33,
 							bodyStyle: 'border-style:none; padding:5px 0 0',
-							defaults: {
-								labelSeparator: '',
-								style: 'margin-bottom:2px',
-								listeners: {
-									added: function(chb) {
-										if (chb.xtype === 'checkbox') {
-											period.checkboxes.push(chb);
-											relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
-										}
-									},
-									change: function() {
-										//rewind.xable();
-									}
-								}
-							},
+							defaults: relativePeriodDefaults,
 							items: [
 								{
 									xtype: 'label',
@@ -4137,24 +4077,6 @@
 								}
 							]
 						}
-
-						//{
-							//xtype: 'panel',
-							//layout: 'anchor',
-							//bodyStyle: 'border-style:none; padding:5px 0 0 46px',
-							//defaults: {
-								//labelSeparator: '',
-								//style: 'margin-bottom:2px',
-							//},
-							//items: [
-								//{
-									//xtype: 'label',
-									//text: 'Options',
-									//cls: 'ns-label-period-heading-options'
-								//},
-								//rewind
-							//]
-						//}
 					]
 				},
 				{
@@ -4166,21 +4088,7 @@
 							xtype: 'panel',
 							columnWidth: 0.35,
 							bodyStyle: 'border-style:none; padding:5px 0 0 8px',
-							defaults: {
-								labelSeparator: '',
-								style: 'margin-bottom:2px',
-								listeners: {
-									added: function(chb) {
-										if (chb.xtype === 'checkbox') {
-											period.checkboxes.push(chb);
-											relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
-										}
-									},
-									change: function() {
-										//rewind.xable();
-									}
-								}
-							},
+							defaults: relativePeriodDefaults,
 							items: [
 								{
 									xtype: 'label',

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/styles/style.css	2014-09-26 16:14:03 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/styles/style.css	2014-10-14 09:05:50 +0000
@@ -858,7 +858,7 @@
     font-size: 11px;
     font-weight: bold;
     color: #333;
-    line-height: 20px;
+    line-height: 18px;
 }
 .ns-label-period-heading-options {
     background-color: #e1e1e1;

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/i18n/en.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/i18n/en.properties	2014-10-08 21:49:29 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/i18n/en.properties	2014-10-14 09:37:49 +0000
@@ -242,3 +242,5 @@
 low_to_high=Low to high
 high_to_low=High to low
 sort_order=Sort order
+last_52_weeks=Last 52 weeks
+last_6_months=Last 6 months

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js	2014-10-14 08:36:36 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js	2014-10-14 09:37:49 +0000
@@ -2467,6 +2467,7 @@
             dataSetSelected,
             dataSet,
 			rewind,
+            relativePeriodDefaults,
             relativePeriod,
             fixedPeriodAvailable,
             fixedPeriodSelected,
@@ -3883,6 +3884,19 @@
 			}
 		});
 
+        relativePeriodDefaults = {
+            labelSeparator: '',
+            style: 'margin-bottom:0',
+            listeners: {
+                added: function(chb) {
+                    if (chb.xtype === 'checkbox') {
+                        period.checkboxes.push(chb);
+                        relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
+                    }
+                }
+            }
+        };
+
 		relativePeriod = {
 			xtype: 'panel',
 			hideCollapseTool: true,
@@ -3899,21 +3913,7 @@
 							xtype: 'panel',
 							columnWidth: 0.34,
 							bodyStyle: 'border-style:none; padding:0 0 0 8px',
-							defaults: {
-								labelSeparator: '',
-								style: 'margin-bottom:2px',
-								listeners: {
-									added: function(chb) {
-										if (chb.xtype === 'checkbox') {
-											period.checkboxes.push(chb);
-											relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
-										}
-									},
-									change: function() {
-										//rewind.xable();
-									}
-								}
-							},
+							defaults: relativePeriodDefaults,
 							items: [
 								{
 									xtype: 'label',
@@ -3934,6 +3934,11 @@
 									xtype: 'checkbox',
 									relativePeriodId: 'LAST_12_WEEKS',
 									boxLabel: NS.i18n.last_12_weeks
+								},
+								{
+									xtype: 'checkbox',
+									relativePeriodId: 'LAST_52_WEEKS',
+									boxLabel: NS.i18n.last_52_weeks
 								}
 							]
 						},
@@ -3941,21 +3946,7 @@
 							xtype: 'panel',
 							columnWidth: 0.33,
 							bodyStyle: 'border-style:none',
-							defaults: {
-								labelSeparator: '',
-								style: 'margin-bottom:2px',
-								listeners: {
-									added: function(chb) {
-										if (chb.xtype === 'checkbox') {
-											period.checkboxes.push(chb);
-											relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
-										}
-									},
-									change: function() {
-										//rewind.xable();
-									}
-								}
-							},
+							defaults: relativePeriodDefaults,
 							items: [
 								{
 									xtype: 'label',
@@ -3974,6 +3965,11 @@
 								},
 								{
 									xtype: 'checkbox',
+									relativePeriodId: 'LAST_6_MONTHS',
+									boxLabel: NS.i18n.last_6_months
+								},
+								{
+									xtype: 'checkbox',
 									relativePeriodId: 'LAST_12_MONTHS',
 									boxLabel: NS.i18n.last_12_months,
 									checked: true
@@ -3984,21 +3980,7 @@
 							xtype: 'panel',
 							columnWidth: 0.33,
 							bodyStyle: 'border-style:none',
-							defaults: {
-								labelSeparator: '',
-								style: 'margin-bottom:2px',
-								listeners: {
-									added: function(chb) {
-										if (chb.xtype === 'checkbox') {
-											period.checkboxes.push(chb);
-											relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
-										}
-									},
-									change: function() {
-										//rewind.xable();
-									}
-								}
-							},
+							defaults: relativePeriodDefaults,
 							items: [
 								{
 									xtype: 'label',
@@ -4028,21 +4010,7 @@
 							xtype: 'panel',
 							columnWidth: 0.34,
 							bodyStyle: 'border-style:none; padding:5px 0 0 8px',
-							defaults: {
-								labelSeparator: '',
-								style: 'margin-bottom:2px',
-								listeners: {
-									added: function(chb) {
-										if (chb.xtype === 'checkbox') {
-											period.checkboxes.push(chb);
-											relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
-										}
-									},
-									change: function() {
-										//rewind.xable();
-									}
-								}
-							},
+							defaults: relativePeriodDefaults,
 							items: [
 								{
 									xtype: 'label',
@@ -4065,21 +4033,7 @@
 							xtype: 'panel',
 							columnWidth: 0.33,
 							bodyStyle: 'border-style:none; padding:5px 0 0',
-							defaults: {
-								labelSeparator: '',
-								style: 'margin-bottom:2px',
-								listeners: {
-									added: function(chb) {
-										if (chb.xtype === 'checkbox') {
-											period.checkboxes.push(chb);
-											relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
-										}
-									},
-									change: function() {
-										//rewind.xable();
-									}
-								}
-							},
+							defaults: relativePeriodDefaults,
 							items: [
 								{
 									xtype: 'label',
@@ -4102,21 +4056,7 @@
 							xtype: 'panel',
 							columnWidth: 0.33,
 							bodyStyle: 'border-style:none; padding:5px 0 0',
-							defaults: {
-								labelSeparator: '',
-								style: 'margin-bottom:2px',
-								listeners: {
-									added: function(chb) {
-										if (chb.xtype === 'checkbox') {
-											period.checkboxes.push(chb);
-											relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
-										}
-									},
-									change: function() {
-										//rewind.xable();
-									}
-								}
-							},
+							defaults: relativePeriodDefaults,
 							items: [
 								{
 									xtype: 'label',
@@ -4135,24 +4075,6 @@
 								}
 							]
 						}
-
-						//{
-							//xtype: 'panel',
-							//layout: 'anchor',
-							//bodyStyle: 'border-style:none; padding:5px 0 0 46px',
-							//defaults: {
-								//labelSeparator: '',
-								//style: 'margin-bottom:2px',
-							//},
-							//items: [
-								//{
-									//xtype: 'label',
-									//text: 'Options',
-									//cls: 'ns-label-period-heading-options'
-								//},
-								//rewind
-							//]
-						//}
 					]
 				},
 				{
@@ -4164,21 +4086,7 @@
 							xtype: 'panel',
 							columnWidth: 0.35,
 							bodyStyle: 'border-style:none; padding:5px 0 0 8px',
-							defaults: {
-								labelSeparator: '',
-								style: 'margin-bottom:2px',
-								listeners: {
-									added: function(chb) {
-										if (chb.xtype === 'checkbox') {
-											period.checkboxes.push(chb);
-											relativePeriod.valueComponentMap[chb.relativePeriodId] = chb;
-										}
-									},
-									change: function() {
-										//rewind.xable();
-									}
-								}
-							},
+							defaults: relativePeriodDefaults,
 							items: [
 								{
 									xtype: 'label',

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/styles/style.css	2014-06-18 12:02:36 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/styles/style.css	2014-10-14 09:37:49 +0000
@@ -700,7 +700,7 @@
     font-size: 11px;
     font-weight: bold;
     color: #333;
-    line-height: 20px;
+    line-height: 18px;
 }
 .ns-label-period-heading-options {
     background-color: #e1e1e1;