dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23506
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11448: (PT, DV) Integration fixes.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 11448 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-07-19 10:39:09 +0200
message:
(PT, DV) Integration fixes.
modified:
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/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/core.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2013-07-18 11:40:02 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2013-07-19 08:37:53 +0000
@@ -2107,7 +2107,6 @@
var that = this,
uuids = pt.uuidDimUuidsMap[uuid],
layoutConfig = Ext.clone(pt.layout),
- dimensions = [].concat(layoutConfig.columns, layoutConfig.rows),
objects = [],
dhis2,
menu;
@@ -2119,20 +2118,22 @@
objects.push(pt.uuidObjectMap[uuids[i]]);
}
- // clear layout items
- for (var i = 0; i < dimensions.length; i++) {
- dimensions[i].items = [];
+ // clear layoutConfig dimension items
+ for (var i = 0, a = [].concat(layoutConfig.columns, layoutConfig.rows); i < a.length; i++) {
+ a[i].items = [];
}
// add new items
for (var i = 0, obj, axis; i < objects.length; i++) {
obj = objects[i];
- axis = obj.axis === 'col' ? layoutConfig.columns : layoutConfig.rows;
-
- axis[obj.dim].items.push({
- id: obj.id,
- name: pt.xResponse.metaData.names[obj.id]
- });
+ axis = obj.axis === 'col' ? layoutConfig.columns || [] : layoutConfig.rows || [];
+
+ if (axis.length) {
+ axis[obj.dim].items.push({
+ id: obj.id,
+ name: pt.xResponse.metaData.names[obj.id]
+ });
+ }
}
// menu
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/core.js 2013-07-16 13:18:13 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/core.js 2013-07-19 08:37:53 +0000
@@ -1852,7 +1852,7 @@
// in or last item (one only) - rest as filter
if (dim.dimension === dimConf.indicator.objectName || (i === analytical.columns.length - 1)) {
- layoutConfig.filters = layoutConfig.filters.concat(layoutConfig.columns);
+ layoutConfig.filters.push(layoutConfig.columns.pop());
layoutConfig.columns = [dim];
}
else {
@@ -1878,7 +1878,7 @@
// in or last item (one only) - rest as filter
if (dim.dimension === dimConf.indicator.objectName || (i === analytical.rows.length - 1)) {
- layoutConfig.filters = layoutConfig.filters.concat(layoutConfig.rows);
+ layoutConfig.filters.push(layoutConfig.rows.pop());
layoutConfig.rows = [dim];
}
else {