dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18393
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7740: (DV) Last 3 months included in favorites + Period duplicates and order when selecting overlapping...
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 7740 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-07-27 11:41:19 +0200
message:
(DV) Last 3 months included in favorites + Period duplicates and order when selecting overlapping rel periods fixed + Favorites list UI bug fixed.
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ChartPluginController.java
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/css/style.css
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.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-api/src/main/java/org/hisp/dhis/api/controller/ChartPluginController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ChartPluginController.java 2012-07-23 16:26:34 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ChartPluginController.java 2012-07-27 08:18:58 +0000
@@ -133,8 +133,20 @@
// Periods
// ---------------------------------------------------------------------
- List<Period> periods = rewind ? relativePeriods.getRewindedRelativePeriods() :
+ List<Period> allPeriods = rewind ? relativePeriods.getRewindedRelativePeriods() :
relativePeriods.getRelativePeriods();
+
+ List<Period> periods = new ArrayList<Period>();
+
+ for ( Period period : allPeriods )
+ {
+ if ( periods.contains( period ) )
+ {
+ periods.remove( period );
+ }
+
+ periods.add( period );
+ }
if ( p != null && p.size() > 0 )
{
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/css/style.css'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/css/style.css 2012-07-23 16:26:34 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/css/style.css 2012-07-27 09:36:51 +0000
@@ -615,6 +615,7 @@
font-size: 10px;
color: #444;
line-height: 16px;
+ height: 24px;
}
/* DV menu grid background now looks like a menu */
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2012-07-26 17:25:16 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2012-07-27 07:56:28 +0000
@@ -190,15 +190,16 @@
},
period: {
relativeperiodunits: {
+ reportingMonth: 1,
+ last3Months: 3,
+ last12Months: 12,
+ reportingQuarter: 1,
+ last4Quarters: 4,
lastSixMonth: 1,
+ last2SixMonths: 2,
thisYear: 1,
lastYear: 1,
- last5Years: 5,
- last12Months: 12,
- last4Quarters: 4,
- last2SixMonths: 2,
- reportingMonth: 1,
- reportingQuarter: 1
+ last5Years: 5
},
periodtypes: [
{id: 'Daily', name: 'Daily'},
@@ -242,7 +243,7 @@
west_maxheight_accordion_indicator: 478,
west_maxheight_accordion_dataelement: 478,
west_maxheight_accordion_dataset: 478,
- west_maxheight_accordion_relativeperiod: 396,
+ west_maxheight_accordion_relativeperiod: 423,
west_maxheight_accordion_fixedperiod: 478,
west_maxheight_accordion_organisationunit: 756,
west_maxheight_accordion_organisationunitgroup: 298,
@@ -1801,7 +1802,7 @@
DV.util.multiselect.filterAvailable(DV.cmp.dimension.dataset.available, DV.cmp.dimension.dataset.selected);
}
- DV.util.checkbox.setRelativePeriods(DV.c.period.rp);
+ DV.util.checkbox.setRelativePeriods(DV.c.relativeperiod.rp);
DV.cmp.dimension.relativeperiod.rewind.setValue(DV.c.relativeperiod.rewind);
DV.store.fixedperiod.selected.removeAll();
@@ -3179,6 +3180,11 @@
},
{
xtype: 'checkbox',
+ paramName: 'last3Months',
+ boxLabel: DV.i18n.last_3_months
+ },
+ {
+ xtype: 'checkbox',
paramName: 'last12Months',
boxLabel: DV.i18n.last_12_months,
checked: true