dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32211
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16452: PT 'co' bug fixed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 16452 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-08-20 11:10:35 +0200
message:
PT 'co' bug fixed.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/app/scripts/app.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/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-apps/src/main/webapp/dhis-web-pivot/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2014-08-13 15:40:54 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2014-08-20 09:09:22 +0000
@@ -929,13 +929,13 @@
delete favorite.id;
// Replace operand id characters
- //for (var i = 0; i < dimensions.length; i++) {
- //if (dimensions[i].dimension === ns.core.conf.finals.dimension.operand.objectName) {
- //for (var j = 0; j < dimensions[i].items.length; j++) {
- //dimensions[i].items[j].id = dimensions[i].items[j].id.replace('-', '.');
- //}
- //}
- //}
+ for (var i = 0; i < dimensions.length; i++) {
+ if (dimensions[i].dimension === ns.core.conf.finals.dimension.operand.objectName) {
+ for (var j = 0; j < dimensions[i].items.length; j++) {
+ dimensions[i].items[j].id = dimensions[i].items[j].id.replace('#', '.');
+ }
+ }
+ }
}
return favorite;
@@ -2826,9 +2826,9 @@
data = response.objects || response.dataElementOperands || [],
pager = response.pager;
- //for (var i = 0; i < data.length; i++) {
- //data[i].id = data[i].id.split('.').join('-');
- //}
+ for (var i = 0; i < data.length; i++) {
+ data[i].id = data[i].id.split('.').join('#');
+ }
store.loadStore(data, pager, append);
}
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2014-08-11 15:07:49 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2014-08-20 09:09:22 +0000
@@ -247,7 +247,7 @@
return;
}
- config.id = config.id.replace('#', '.');
+ config.id = config.id.replace('.', '#');
return config;
}();
@@ -929,6 +929,7 @@
xDim.ids = [];
for (var j = 0; j < items.length; j++) {
+console.log("xl", items[j].id);
xDim.ids.push(items[j].id);
}
}
@@ -1719,8 +1720,8 @@
for (var i = 0, id, splitId ; i < ids.length; i++) {
id = ids[i];
- if (id.indexOf('.') !== -1) {
- splitId = id.split('.');
+ if (id.indexOf('#') !== -1) {
+ splitId = id.split('#');
response.metaData.names[id] = response.metaData.names[splitId[0]] + ' ' + response.metaData.names[splitId[1]];
}
}
@@ -1899,7 +1900,7 @@
if (dimName === dx) {
for (var j = 0, index; j < items.length; j++) {
- index = items[j].indexOf('.');
+ index = items[j].indexOf('#');
if (index > 0) {
addCategoryDimension = true;
@@ -2285,8 +2286,7 @@
uuids = [];
// meta data uid
- //id = (xColAxis ? support.prototype.str.replaceAll(xColAxis.ids[j], '-', '') : '') + (xRowAxis ? support.prototype.str.replaceAll(xRowAxis.ids[i], '-', '') : '');
- id = (xColAxis ? xColAxis.ids[j] : '') + (xRowAxis ? xRowAxis.ids[i] : '');
+ id = ((xColAxis ? xColAxis.ids[j] : '') + (xRowAxis ? xRowAxis.ids[i] : '')).replace('#', '');
// value html element id
uuid = Ext.data.IdGenerator.get('uuid').generate();