dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #39640
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20080: PT option: completed events only.
------------------------------------------------------------
revno: 20080
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-09-10 16:47:36 +0200
message:
PT option: completed events only.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/i18n_app.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/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-pivot/i18n/i18n_app.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/i18n_app.properties 2015-07-12 00:29:41 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/i18n_app.properties 2015-09-10 14:47:36 +0000
@@ -199,3 +199,6 @@
program_indicators=Program indicators
program=Program
select_program=Select program
+completed_only=Completed only
+events=Events
+include_completed_events_only=Include completed events only
=== 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 2015-09-06 14:46:34 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js 2015-09-10 14:47:36 +0000
@@ -629,6 +629,11 @@
style: 'margin-bottom:' + checkboxBottomMargin + 'px',
});
+ completedOnly = Ext.create('Ext.form.field.Checkbox', {
+ boxLabel: NS.i18n.include_completed_events_only,
+ style: 'margin-bottom:' + checkboxBottomMargin + 'px',
+ });
+
displayDensity = Ext.create('Ext.form.field.ComboBox', {
cls: 'ns-combo',
style: 'margin-bottom:' + comboBottomMargin + 'px',
@@ -799,6 +804,14 @@
]
};
+ events = {
+ bodyStyle: 'border:0 none',
+ style: 'margin-left:14px',
+ items: [
+ completedOnly
+ ]
+ };
+
style = {
bodyStyle: 'border:0 none',
style: 'margin-left:14px',
@@ -844,6 +857,7 @@
aggregationType: aggregationType.getValue(),
dataApprovalLevel: {id: dataApprovalLevel.getValue()},
showHierarchy: showHierarchy.getValue(),
+ completedOnly: completedOnly.getValue(),
displayDensity: displayDensity.getValue(),
fontSize: fontSize.getValue(),
digitGroupSeparator: digitGroupSeparator.getValue(),
@@ -867,6 +881,7 @@
aggregationType.setValue(Ext.isString(layout.aggregationType) ? layout.aggregationType : 'DEFAULT');
dataApprovalLevel.setValue(Ext.isObject(layout.dataApprovalLevel) && Ext.isString(layout.dataApprovalLevel.id) ? layout.dataApprovalLevel.id : 'DEFAULT');
showHierarchy.setValue(Ext.isBoolean(layout.showHierarchy) ? layout.showHierarchy : false);
+ completedOnly.setValue(Ext.isBoolean(layout.completedOnly) ? layout.completedOnly : false);
displayDensity.setValue(Ext.isString(layout.displayDensity) ? layout.displayDensity : 'normal');
fontSize.setValue(Ext.isString(layout.fontSize) ? layout.fontSize : 'normal');
digitGroupSeparator.setValue(Ext.isString(layout.digitGroupSeparator) ? layout.digitGroupSeparator : 'space');
@@ -901,6 +916,15 @@
{
bodyStyle: 'border:0 none; color:#222; font-size:12px; font-weight:bold',
style: 'margin-bottom:6px; margin-left:5px',
+ html: NS.i18n.events
+ },
+ events,
+ {
+ bodyStyle: 'border:0 none; padding:7px'
+ },
+ {
+ bodyStyle: 'border:0 none; color:#222; font-size:12px; font-weight:bold',
+ style: 'margin-bottom:6px; margin-left:5px',
html: NS.i18n.style
},
style,
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core.js 2015-09-06 21:38:21 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/core.js 2015-09-10 14:47:36 +0000
@@ -388,6 +388,8 @@
// showHierarchy: boolean (false)
+ // completedOnly: boolean (false)
+
// displayDensity: string ('normal') - 'compact', 'normal', 'comfortable'
// fontSize: string ('normal') - 'small', 'normal', 'large'
@@ -566,6 +568,8 @@
layout.showHierarchy = Ext.isBoolean(config.showHierarchy) ? config.showHierarchy : false;
+ layout.completedOnly = Ext.isBoolean(config.completedOnly) ? config.completedOnly : false;
+
layout.displayDensity = Ext.isString(config.displayDensity) && !Ext.isEmpty(config.displayDensity) ? config.displayDensity : 'normal';
layout.fontSize = Ext.isString(config.fontSize) && !Ext.isEmpty(config.fontSize) ? config.fontSize : 'normal';
layout.digitGroupSeparator = Ext.isString(config.digitGroupSeparator) && !Ext.isEmpty(config.digitGroupSeparator) ? config.digitGroupSeparator : 'space';
@@ -1723,6 +1727,10 @@
delete layout.showHierarchy;
}
+ if (!layout.completedOnly) {
+ delete layout.completedOnly;
+ }
+
if (layout.displayDensity === 'normal') {
delete layout.displayDensity;
}
@@ -2113,6 +2121,10 @@
paramString += '&hierarchyMeta=true';
}
+ if (xLayout.completedOnly) {
+ paramString += '&completedOnly=true';
+ }
+
// aggregation type
if (Ext.Array.contains(aggTypes, xLayout.aggregationType)) {
paramString += '&aggregationType=' + xLayout.aggregationType;