dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #39001
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19801: DV operand + plugin updated.
------------------------------------------------------------
revno: 19801
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-08-19 23:30:33 +0200
message:
DV operand + plugin updated.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/chart.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/chart.js
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.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-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js 2015-08-09 17:35:21 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js 2015-08-19 21:30:33 +0000
@@ -1191,15 +1191,6 @@
delete favorite.id;
delete favorite.parentGraphMap;
-
- // 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('#', '.');
- }
- }
- }
}
return favorite;
@@ -3210,10 +3201,6 @@
data = response.objects || response.dataElementOperands || [],
pager = response.pager;
- for (var i = 0; i < data.length; i++) {
- data[i].id = data[i].id.split('.').join('#');
- }
-
store.loadStore(data, pager, append, fn);
},
callback: function() {
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/chart.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/chart.js 2015-08-05 12:57:59 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/chart.js 2015-08-19 21:30:33 +0000
@@ -736,7 +736,7 @@
west_fill_accordion_dataset: 56,
west_fill_accordion_eventdataitem: 81,
west_fill_accordion_programindicator: 81,
- west_fill_accordion_period: 303,
+ west_fill_accordion_period: 310,
west_fill_accordion_organisationunit: 58,
west_fill_accordion_group: 31,
west_maxheight_accordion_indicator: 350,
@@ -853,8 +853,6 @@
return;
}
- config.id = config.id.replace('.', '#');
-
return config;
}();
};
@@ -1831,8 +1829,18 @@
return false;
}(),
- ou = dimConf.organisationUnit.objectName,
- layout;
+ co = dimConf.category.objectName,
+ ou = dimConf.organisationUnit.objectName,
+ headerNames = function() {
+ var headerNames = [];
+
+ for (var i = 0; i < response.headers.length; i++) {
+ headerNames.push(response.headers[i].name);
+ }
+
+ return headerNames;
+ }(),
+ layout;
// set items from init/metaData/xLayout
for (var i = 0, dim, metaDataDim, items; i < dimensions.length; i++) {
@@ -2113,18 +2121,6 @@
}
}());
- // extend metadata
- (function() {
- for (var i = 0, id, splitId ; i < ids.length; i++) {
- id = ids[i];
-
- if (id.indexOf('#') !== -1) {
- splitId = id.split('#');
- response.metaData.names[id] = response.metaData.names[splitId[0]] + ' ' + response.metaData.names[splitId[1]];
- }
- }
- }());
-
// create value id map
(function() {
var valueHeaderIndex = response.nameHeaderMap[conf.finals.dimension.value.value].index,
@@ -2346,33 +2342,25 @@
paramString = '?',
addCategoryDimension = false,
map = xLayout.dimensionNameItemsMap,
- dx = dimConf.indicator.dimensionName,
+ dx = dimConf.indicator.dimensionName,
+ co = dimConf.category.dimensionName,
aggTypes = ['COUNT', 'SUM', 'STDDEV', 'VARIANCE', 'MIN', 'MAX'],
displayProperty = xLayout.displayProperty || init.userAccount.settings.keyAnalysisDisplayProperty || 'name';
for (var i = 0, dimName, items; i < axisDimensionNames.length; i++) {
dimName = axisDimensionNames[i];
- paramString += 'dimension=' + dimName;
-
- items = Ext.clone(dimensionNameIdsMap[dimName]);
-
- if (dimName === dx) {
- for (var j = 0, index; j < items.length; j++) {
- index = items[j].indexOf('#');
-
- if (index > 0) {
- addCategoryDimension = true;
- items[j] = items[j].substr(0, index);
- }
- }
-
- items = Ext.Array.unique(items);
- }
-
- if (dimName !== dimConf.category.dimensionName) {
- paramString += ':' + items.join(';');
- }
+ paramString += 'dimension=' + dimName;
+
+ items = Ext.clone(dimensionNameIdsMap[dimName]);
+
+ if (dimName === dx) {
+ items = Ext.Array.unique(items);
+ }
+
+ if (dimName !== co) {
+ paramString += ':' + items.join(';');
+ }
if (i < (axisDimensionNames.length - 1)) {
paramString += '&';
@@ -2521,7 +2509,7 @@
obj[conf.finals.data.domain] = xResponse.metaData.names[category];
for (var j = 0, id, value; j < columnIds.length; j++) {
- id = support.prototype.str.replaceAll(columnIds[j], '#', '') + support.prototype.str.replaceAll(rowIds[i], '#', '');
+ id = columnIds[j] + rowIds[i];
value = xResponse.idValueMap[id];
rowValues.push(value);
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js 2015-08-19 18:17:02 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js 2015-08-19 21:30:33 +0000
@@ -795,8 +795,6 @@
return;
}
- config.id = config.id.replace('.', '#');
-
return config;
}();
};
@@ -2065,18 +2063,6 @@
}
}());
- // extend metadata
- (function() {
- for (var i = 0, id, splitId ; i < ids.length; i++) {
- id = ids[i];
-
- if (id.indexOf('#') !== -1) {
- splitId = id.split('#');
- response.metaData.names[id] = response.metaData.names[splitId[0]] + ' ' + response.metaData.names[splitId[1]];
- }
- }
- }());
-
// create value id map
(function() {
var valueHeaderIndex = response.nameHeaderMap[conf.finals.dimension.value.value].index,
@@ -2311,16 +2297,6 @@
items = Ext.clone(dimensionNameIdsMap[dimName]);
if (dimName === dx) {
- //for (var j = 0, index; j < items.length; j++) {
- //index = items[j].indexOf('#');
-
- //if (index > 0) {
- //addCategoryDimension = true;
- //items[j] = items[j].substr(0, index);
- //items[j] = items[j].replace('#', '.');
- //}
- //}
-
items = Ext.Array.unique(items);
}
@@ -2475,7 +2451,7 @@
obj[conf.finals.data.domain] = xResponse.metaData.names[category];
for (var j = 0, id, value; j < columnIds.length; j++) {
- id = support.prototype.str.replaceAll(columnIds[j], '#', '.') + support.prototype.str.replaceAll(rowIds[i], '#', '.');
+ id = columnIds[j] + rowIds[i];
value = xResponse.idValueMap[id];
rowValues.push(value);
@@ -2926,10 +2902,7 @@
else {
for (var i = 0, id, name, mxl, ids; i < store.rangeFields.length; i++) {
id = failSafeColumnIdMap[store.rangeFields[i]];
-
- if (Ext.isString(id)) {
- name = xResponse.metaData.names[id.replace('#', '.')];
- }
+ name = xResponse.metaData.names[id];
if (ls && ls.labelMaxLength) {
var mxl = parseInt(ls.labelMaxLength);
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/chart.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/chart.js 2015-08-05 12:57:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/chart.js 2015-08-19 21:30:33 +0000
@@ -736,7 +736,7 @@
west_fill_accordion_dataset: 56,
west_fill_accordion_eventdataitem: 81,
west_fill_accordion_programindicator: 81,
- west_fill_accordion_period: 303,
+ west_fill_accordion_period: 310,
west_fill_accordion_organisationunit: 58,
west_fill_accordion_group: 31,
west_maxheight_accordion_indicator: 350,
@@ -853,8 +853,6 @@
return;
}
- config.id = config.id.replace('.', '#');
-
return config;
}();
};
@@ -1831,8 +1829,18 @@
return false;
}(),
- ou = dimConf.organisationUnit.objectName,
- layout;
+ co = dimConf.category.objectName,
+ ou = dimConf.organisationUnit.objectName,
+ headerNames = function() {
+ var headerNames = [];
+
+ for (var i = 0; i < response.headers.length; i++) {
+ headerNames.push(response.headers[i].name);
+ }
+
+ return headerNames;
+ }(),
+ layout;
// set items from init/metaData/xLayout
for (var i = 0, dim, metaDataDim, items; i < dimensions.length; i++) {
@@ -2113,18 +2121,6 @@
}
}());
- // extend metadata
- (function() {
- for (var i = 0, id, splitId ; i < ids.length; i++) {
- id = ids[i];
-
- if (id.indexOf('#') !== -1) {
- splitId = id.split('#');
- response.metaData.names[id] = response.metaData.names[splitId[0]] + ' ' + response.metaData.names[splitId[1]];
- }
- }
- }());
-
// create value id map
(function() {
var valueHeaderIndex = response.nameHeaderMap[conf.finals.dimension.value.value].index,
@@ -2346,33 +2342,25 @@
paramString = '?',
addCategoryDimension = false,
map = xLayout.dimensionNameItemsMap,
- dx = dimConf.indicator.dimensionName,
+ dx = dimConf.indicator.dimensionName,
+ co = dimConf.category.dimensionName,
aggTypes = ['COUNT', 'SUM', 'STDDEV', 'VARIANCE', 'MIN', 'MAX'],
displayProperty = xLayout.displayProperty || init.userAccount.settings.keyAnalysisDisplayProperty || 'name';
for (var i = 0, dimName, items; i < axisDimensionNames.length; i++) {
dimName = axisDimensionNames[i];
- paramString += 'dimension=' + dimName;
-
- items = Ext.clone(dimensionNameIdsMap[dimName]);
-
- if (dimName === dx) {
- for (var j = 0, index; j < items.length; j++) {
- index = items[j].indexOf('#');
-
- if (index > 0) {
- addCategoryDimension = true;
- items[j] = items[j].substr(0, index);
- }
- }
-
- items = Ext.Array.unique(items);
- }
-
- if (dimName !== dimConf.category.dimensionName) {
- paramString += ':' + items.join(';');
- }
+ paramString += 'dimension=' + dimName;
+
+ items = Ext.clone(dimensionNameIdsMap[dimName]);
+
+ if (dimName === dx) {
+ items = Ext.Array.unique(items);
+ }
+
+ if (dimName !== co) {
+ paramString += ':' + items.join(';');
+ }
if (i < (axisDimensionNames.length - 1)) {
paramString += '&';
@@ -2521,7 +2509,7 @@
obj[conf.finals.data.domain] = xResponse.metaData.names[category];
for (var j = 0, id, value; j < columnIds.length; j++) {
- id = support.prototype.str.replaceAll(columnIds[j], '#', '') + support.prototype.str.replaceAll(rowIds[i], '#', '');
+ id = columnIds[j] + rowIds[i];
value = xResponse.idValueMap[id];
rowValues.push(value);
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js 2015-08-05 12:57:59 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js 2015-08-19 21:30:33 +0000
@@ -736,7 +736,7 @@
west_fill_accordion_dataset: 56,
west_fill_accordion_eventdataitem: 81,
west_fill_accordion_programindicator: 81,
- west_fill_accordion_period: 303,
+ west_fill_accordion_period: 310,
west_fill_accordion_organisationunit: 58,
west_fill_accordion_group: 31,
west_maxheight_accordion_indicator: 350,
@@ -853,8 +853,6 @@
return;
}
- config.id = config.id.replace('.', '#');
-
return config;
}();
};
@@ -1831,8 +1829,18 @@
return false;
}(),
- ou = dimConf.organisationUnit.objectName,
- layout;
+ co = dimConf.category.objectName,
+ ou = dimConf.organisationUnit.objectName,
+ headerNames = function() {
+ var headerNames = [];
+
+ for (var i = 0; i < response.headers.length; i++) {
+ headerNames.push(response.headers[i].name);
+ }
+
+ return headerNames;
+ }(),
+ layout;
// set items from init/metaData/xLayout
for (var i = 0, dim, metaDataDim, items; i < dimensions.length; i++) {
@@ -2113,18 +2121,6 @@
}
}());
- // extend metadata
- (function() {
- for (var i = 0, id, splitId ; i < ids.length; i++) {
- id = ids[i];
-
- if (id.indexOf('#') !== -1) {
- splitId = id.split('#');
- response.metaData.names[id] = response.metaData.names[splitId[0]] + ' ' + response.metaData.names[splitId[1]];
- }
- }
- }());
-
// create value id map
(function() {
var valueHeaderIndex = response.nameHeaderMap[conf.finals.dimension.value.value].index,
@@ -2346,33 +2342,25 @@
paramString = '?',
addCategoryDimension = false,
map = xLayout.dimensionNameItemsMap,
- dx = dimConf.indicator.dimensionName,
+ dx = dimConf.indicator.dimensionName,
+ co = dimConf.category.dimensionName,
aggTypes = ['COUNT', 'SUM', 'STDDEV', 'VARIANCE', 'MIN', 'MAX'],
displayProperty = xLayout.displayProperty || init.userAccount.settings.keyAnalysisDisplayProperty || 'name';
for (var i = 0, dimName, items; i < axisDimensionNames.length; i++) {
dimName = axisDimensionNames[i];
- paramString += 'dimension=' + dimName;
-
- items = Ext.clone(dimensionNameIdsMap[dimName]);
-
- if (dimName === dx) {
- for (var j = 0, index; j < items.length; j++) {
- index = items[j].indexOf('#');
-
- if (index > 0) {
- addCategoryDimension = true;
- items[j] = items[j].substr(0, index);
- }
- }
-
- items = Ext.Array.unique(items);
- }
-
- if (dimName !== dimConf.category.dimensionName) {
- paramString += ':' + items.join(';');
- }
+ paramString += 'dimension=' + dimName;
+
+ items = Ext.clone(dimensionNameIdsMap[dimName]);
+
+ if (dimName === dx) {
+ items = Ext.Array.unique(items);
+ }
+
+ if (dimName !== co) {
+ paramString += ':' + items.join(';');
+ }
if (i < (axisDimensionNames.length - 1)) {
paramString += '&';
@@ -2521,7 +2509,7 @@
obj[conf.finals.data.domain] = xResponse.metaData.names[category];
for (var j = 0, id, value; j < columnIds.length; j++) {
- id = support.prototype.str.replaceAll(columnIds[j], '#', '') + support.prototype.str.replaceAll(rowIds[i], '#', '');
+ id = columnIds[j] + rowIds[i];
value = xResponse.idValueMap[id];
rowValues.push(value);