Merge authors: Jan Henrik Ă˜verland (janhenrik-overland) ------------------------------------------------------------ revno: 10230 [merge] committer: Jan Henrik Overland <janhenrik.overl...@gmail.com> branch nick: dhis2 timestamp: Thu 2013-03-14 19:38:41 +0100 message: (PT) Last week, last 4 weeks and last 12 weeks supported. modified: dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/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-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js' --- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-03-14 14:33:39 +0000 +++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-03-14 15:38:54 +0000 @@ -2387,14 +2387,56 @@ valueComponentMap: {}, items: [ { - xtype: 'panel', + xtype: 'container', layout: 'column', bodyStyle: 'border-style:none', items: [ { xtype: 'panel', - layout: 'anchor', - bodyStyle: 'border-style:none; padding:0 0 0 10px', + columnWidth: 0.35, + bodyStyle: 'border-style:none; padding:0 0 0 8px', + defaults: { + labelSeparator: '', + style: 'margin-bottom:2px', + listeners: { + added: function(chb) { + if (chb.xtype === 'checkbox') { + pt.cmp.dimension.relativePeriod.checkbox.push(chb); + relativePeriod.valueComponentMap[chb.relativePeriodId] = chb; + } + }, + change: function() { + rewind.xable(); + } + } + }, + items: [ + { + xtype: 'label', + text: 'Weeks', //i18n pt.i18n.months, + cls: 'pt-label-period-heading' + }, + { + xtype: 'checkbox', + relativePeriodId: 'LAST_WEEK', + boxLabel: 'Last week', //i18n pt.i18n.last_month + }, + { + xtype: 'checkbox', + relativePeriodId: 'LAST_4_WEEKS', + boxLabel: 'Last 4 weeks', //i18n pt.i18n.last_3_months + }, + { + xtype: 'checkbox', + relativePeriodId: 'LAST_12_WEEKS', + boxLabel: 'Last 12 weeks' //i18n pt.i18n.last_12_months, + } + ] + }, + { + xtype: 'panel', + columnWidth: 0.32, + bodyStyle: 'border-style:none', defaults: { labelSeparator: '', style: 'margin-bottom:2px', @@ -2436,8 +2478,8 @@ }, { xtype: 'panel', - layout: 'anchor', - bodyStyle: 'border-style:none; padding:0 0 0 32px', + columnWidth: 0.33, + bodyStyle: 'border-style:none', defaults: { labelSeparator: '', style: 'margin-bottom:2px', @@ -2470,11 +2512,18 @@ boxLabel: 'Last 4 quarters', //i18n pt.i18n.last_4_quarters } ] - }, + } + ] + }, + { + xtype: 'container', + layout: 'column', + bodyStyle: 'border-style:none', + items: [ { xtype: 'panel', - layout: 'anchor', - bodyStyle: 'border-style:none; padding:0 0 0 32px', + columnWidth: 0.35, + bodyStyle: 'border-style:none; padding:5px 0 0 10px', defaults: { labelSeparator: '', style: 'margin-bottom:2px', @@ -2504,21 +2553,14 @@ { xtype: 'checkbox', relativePeriodId: 'LAST_2_SIXMONTHS', - boxLabel: 'Last two six-months', //i18n pt.i18n.last_two_six_month + boxLabel: 'Last 2 six-months', //i18n pt.i18n.last_two_six_month } ] - } - ] - }, - { - xtype: 'panel', - layout: 'column', - bodyStyle: 'border-style:none', - items: [ + }, { xtype: 'panel', - layout: 'anchor', - bodyStyle: 'border-style:none; padding:5px 0 0 10px', + columnWidth: 0.32, + bodyStyle: 'border-style:none; padding:5px 0 0', defaults: { labelSeparator: '', style: 'margin-bottom:2px', @@ -2557,6 +2599,7 @@ } ] } + //{ //xtype: 'panel', //layout: 'anchor', @@ -2763,7 +2806,7 @@ { xtype: 'panel', layout: 'column', - bodyStyle: 'border-style:none; padding-bottom:6px', + bodyStyle: 'border-style:none; padding-bottom:4px', items: [ fixedPeriodAvailable, fixedPeriodSelected === modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js' --- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2013-03-14 14:33:39 +0000 +++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2013-03-14 15:38:54 +0000 @@ -131,18 +131,24 @@ conf.period = { relativePeriods: { - LAST_MONTH: 1, - LAST_3_MONTHS: 3, - LAST_12_MONTHS: 12, - LAST_QUARTER: 1, - LAST_4_QUARTERS: 4, - LAST_SIX_MONTH: 1, - LAST_2_SIXMONTHS: 2, - THIS_YEAR: 1, - LAST_YEAR: 1, - LAST_5_YEARS: 5 + 'LAST_WEEK': 1, + 'LAST_4_WEEKS': 4, + 'LAST_12_WEEKS': 12, + 'LAST_MONTH': 1, + 'LAST_3_MONTHS': 3, + 'LAST_12_MONTHS': 12, + 'LAST_QUARTER': 1, + 'LAST_4_QUARTERS': 4, + 'LAST_SIX_MONTH': 1, + 'LAST_2_SIXMONTHS': 2, + 'THIS_YEAR': 1, + 'LAST_YEAR': 1, + 'LAST_5_YEARS': 5 }, relativePeriodValueKeys: { + 'LAST_WEEK': 'lastWeek', + 'LAST_4_WEEKS': 'last4Weeks', + 'LAST_12_WEEKS': 'last12Weeks', 'LAST_MONTH': 'reportingMonth', 'LAST_3_MONTHS': 'last3Months', 'LAST_12_MONTHS': 'last12Months', @@ -155,6 +161,9 @@ 'LAST_5_YEARS': 'last5Years' }, relativePeriodParamKeys: { + 'lastWeek': 'LAST_WEEK', + 'last4Weeks': 'LAST_4_WEEKS', + 'last12Weeks': 'LAST_12_WEEKS', 'reportingMonth': 'LAST_MONTH', 'last3Months': 'LAST_3_MONTHS', 'last12Months': 'LAST_12_MONTHS',
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp