← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18443: ER ind cases fav bug fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 18443 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-02-27 10:59:25 +0100
message:
  ER ind cases fav bug fixed.
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-25 17:33:48 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js	2015-02-27 09:52:12 +0000
@@ -153,6 +153,7 @@
             },
             setRecord: function(record) {
                 if (Ext.isObject(record.legendSet) && record.legendSet.id) {
+                    this.rangeSetCmp.pendingValue = record.legendSet.id;
                     this.onRangeSetSelect(record.legendSet.id);
 
                     if (record.filter) {
@@ -369,6 +370,13 @@
                     displayField: nameProperty,
                     editable: false,
                     storage: {},
+                    pendingValue: null,
+                    setPendingValue: function() {
+                        if (this.pendingValue) {
+                            this.setValue(this.pendingValue);
+                            this.pendingValue = null;
+                        }
+                    },
                     store: Ext.create('Ext.data.Store', {
                         fields: [idProperty, nameProperty]
                     }),
@@ -388,6 +396,7 @@
 
                                     if (Ext.isObject(r) && Ext.isObject(r.legendSet)) {
                                         cb.store.add(r.legendSet);
+                                        cb.setPendingValue();
                                     }
                                 }
                             });
@@ -2719,6 +2728,11 @@
                 delete favorite.access;
                 delete favorite.lastUpdated;
                 delete favorite.created;
+
+                if (favorite.dataType === "individual_cases") {
+                    delete favorite.colSubTotals;
+                    delete favorite.rowSubTotals;
+                }
 			}
 
 			return favorite;

=== 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-25 17:13:48 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js	2015-02-27 09:52:12 +0000
@@ -188,9 +188,9 @@
                     '*',
                     'program[id,name]',
                     'programStage[id,name]',
-                    'columns[dimension,filter,items[id,' + init.namePropertyUrl + ']]',
-                    'rows[dimension,filter,items[id,' + init.namePropertyUrl + ']]',
-                    'filters[dimension,filter,items[id,' + init.namePropertyUrl + ']]',
+                    'columns[dimension,filter,legendSet[id,name],items[id,' + init.namePropertyUrl + ']]',
+                    'rows[dimension,filter,legendSet[id,name],items[id,' + init.namePropertyUrl + ']]',
+                    'filters[dimension,filter,legendSet[id,name],items[id,' + init.namePropertyUrl + ']]',
                     '!lastUpdated',
                     '!href',
                     '!created',
@@ -266,7 +266,7 @@
 					}
 
 					if (config.dimension !== conf.finals.dimension.category.objectName) {
-						var records = [];
+						//var records = [];
 
 						//if (!Ext.isArray(config.items)) {
 							//console.log('Dimension: items is not an array: ' + config);
@@ -1052,6 +1052,10 @@
 						xDim.objectName = dim.dimension;
 						xDim.dimensionName = dimConf.objectNameMap.hasOwnProperty(dim.dimension) ? dimConf.objectNameMap[dim.dimension].dimensionName || dim.dimension : dim.dimension;
 
+                        if (dim.legendSet) {
+                            xDim.legendSet = dim.legendSet;
+                        }
+
 						xDim.items = [];
 						xDim.ids = [];
 
@@ -1090,6 +1094,10 @@
 						xDim.objectName = dim.dimension;
 						xDim.dimensionName = dimConf.objectNameMap.hasOwnProperty(dim.dimension) ? dimConf.objectNameMap[dim.dimension].dimensionName || dim.dimension : dim.dimension;
 
+                        if (dim.legendSet) {
+                            xDim.legendSet = dim.legendSet;
+                        }
+
 						xDim.items = [];
 						xDim.ids = [];
 
@@ -1128,6 +1136,10 @@
 						xDim.objectName = dim.dimension;
 						xDim.dimensionName = dimConf.objectNameMap.hasOwnProperty(dim.dimension) ? dimConf.objectNameMap[dim.dimension].dimensionName || dim.dimension : dim.dimension;
 
+                        if (dim.legendSet) {
+                            xDim.legendSet = dim.legendSet;
+                        }
+
 						xDim.items = [];
 						xDim.ids = [];
 
@@ -1900,6 +1912,9 @@
                     nameMap = {},
                     ouIndex;
 
+                metaData.optionNames = {};
+                metaData.booleanNames = {};
+
                 nameMap['pe'] = 'eventdate';
                 nameMap['ou'] = 'ouname';