dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #35808
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18332: ER value persistance.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 18332 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-02-19 12:38:38 +0100
message:
ER value persistance.
modified:
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
--
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/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js 2015-02-18 15:51:19 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js 2015-02-19 11:36:06 +0000
@@ -1455,7 +1455,7 @@
valueId = value.getValue();
if (valueId && valueId !== defaultValueId) {
- config.value = valueId;
+ config.value = {id: valueId};
config.aggregationType = aggregationType.getValue();
}
=== 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-02-18 12:37:04 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js 2015-02-19 11:36:06 +0000
@@ -485,7 +485,7 @@
layout.endDate = config.endDate;
}
- // properties
+ // options
layout.showColTotals = Ext.isBoolean(config.colTotals) ? config.colTotals : (Ext.isBoolean(config.showColTotals) ? config.showColTotals : true);
layout.showRowTotals = Ext.isBoolean(config.rowTotals) ? config.rowTotals : (Ext.isBoolean(config.showRowTotals) ? config.showRowTotals : true);
layout.showColSubTotals = Ext.isBoolean(config.colSubTotals) ? config.colSubTotals : (Ext.isBoolean(config.showColSubTotals) ? config.showColSubTotals : true);
@@ -493,27 +493,33 @@
layout.showDimensionLabels = Ext.isBoolean(config.showDimensionLabels) ? config.showDimensionLabels : (Ext.isBoolean(config.showDimensionLabels) ? config.showDimensionLabels : true);
layout.hideEmptyRows = Ext.isBoolean(config.hideEmptyRows) ? config.hideEmptyRows : false;
layout.outputType = Ext.isString(config.outputType) && !Ext.isEmpty(config.outputType) ? config.outputType : 'EVENT';
- layout.aggregationType = Ext.isString(config.aggregationType) ? config.aggregationType : 'default';
-
layout.showHierarchy = Ext.isBoolean(config.showHierarchy) ? config.showHierarchy : 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';
layout.legendSet = Ext.isObject(config.legendSet) && Ext.isString(config.legendSet.id) ? config.legendSet : null;
+ // value
+ if ((Ext.isObject(config.value) && Ext.isString(config.value.id)) || Ext.isString(config.value)) {
+ layout.value = Ext.isString(config.value) ? {id: config.value} : config.value;
+ }
+
+ // aggregation type
+ if (layout.value && Ext.isString(config.aggregationType)) {
+ layout.aggregationType = config.aggregationType;
+ }
+
layout.parentGraphMap = Ext.isObject(config.parentGraphMap) ? config.parentGraphMap : null;
-
layout.sorting = Ext.isObject(config.sorting) && Ext.isDefined(config.sorting.id) && Ext.isString(config.sorting.direction) ? config.sorting : null;
layout.reportingPeriod = Ext.isObject(config.reportParams) && Ext.isBoolean(config.reportParams.paramReportingPeriod) ? config.reportParams.paramReportingPeriod : (Ext.isBoolean(config.reportingPeriod) ? config.reportingPeriod : false);
layout.organisationUnit = Ext.isObject(config.reportParams) && Ext.isBoolean(config.reportParams.paramOrganisationUnit) ? config.reportParams.paramOrganisationUnit : (Ext.isBoolean(config.organisationUnit) ? config.organisationUnit : false);
layout.parentOrganisationUnit = Ext.isObject(config.reportParams) && Ext.isBoolean(config.reportParams.paramParentOrganisationUnit) ? config.reportParams.paramParentOrganisationUnit : (Ext.isBoolean(config.parentOrganisationUnit) ? config.parentOrganisationUnit : false);
- layout.regression = Ext.isBoolean(config.regression) ? config.regression : false;
- layout.cumulative = Ext.isBoolean(config.cumulative) ? config.cumulative : false;
- layout.sortOrder = Ext.isNumber(config.sortOrder) ? config.sortOrder : 0;
- layout.topLimit = Ext.isNumber(config.topLimit) ? config.topLimit : 0;
+ //layout.regression = Ext.isBoolean(config.regression) ? config.regression : false;
+ //layout.cumulative = Ext.isBoolean(config.cumulative) ? config.cumulative : false;
+ //layout.sortOrder = Ext.isNumber(config.sortOrder) ? config.sortOrder : 0;
+ //layout.topLimit = Ext.isNumber(config.topLimit) ? config.topLimit : 0;
if (!validateSpecialCases()) {
return;
@@ -2064,10 +2070,13 @@
}
}
- // values
- if (view.value) {
+ // value
+ if (Ext.isString(view.value)) {
paramString += '&value=' + view.value;
}
+ else if (Ext.isObject(view.value) && Ext.isString(view.value.id)) {
+ paramString += '&value=' + view.value.id;
+ }
// aggregation type
if (view.aggregationType) {