dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #38871
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19753: ER EV numeric boolean values.
------------------------------------------------------------
revno: 19753
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2015-08-09 17:59:13 +0200
message:
ER EV numeric boolean values.
modified:
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-visualizer/scripts/app.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/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/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js 2015-08-08 10:16:11 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js 2015-08-09 15:59:13 +0000
@@ -3405,8 +3405,8 @@
names = xResponse.metaData.names,
optionNames = xResponse.metaData.optionNames,
booleanNames = {
- 'true': NS.i18n.yes,
- 'false': NS.i18n.no
+ '1': NS.i18n.yes,
+ '0': NS.i18n.no
},
pager = xResponse.metaData.pager,
count = pager.page * pager.pageSize - pager.pageSize
@@ -3445,7 +3445,6 @@
for (var j = 0, str, header, name; j < dimensionHeaders.length; j++) {
header = dimensionHeaders[j];
str = row[header.index];
-
str = optionNames[header.name + str] || optionNames[str] || booleanNames[str] || names[str] || str;
name = web.report.query.format(str);
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js 2015-07-13 12:28:37 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js 2015-08-09 15:59:13 +0000
@@ -751,16 +751,16 @@
this.getData = function(idArray) {
var data = [], yes = {}, no = {};
- yes[idProperty] = 'true';
+ yes[idProperty] = '1';
yes[nameProperty] = NS.i18n.yes;
- no[idProperty] = 'false';
+ no[idProperty] = '0';
no[nameProperty] = NS.i18n.no;
for (var i = 0; i < idArray.length; i++) {
- if (idArray[i] === 'true' || idArray[i] === true) {
+ if (idArray[i] === '1' || idArray[i] === 1) {
data.push(yes);
}
- else if (idArray[i] === 'false' || idArray[i] === false) {
+ else if (idArray[i] === '0' || idArray[i] === 0) {
data.push(no);
}
}
@@ -770,7 +770,7 @@
this.searchStore = Ext.create('Ext.data.Store', {
fields: [idProperty, nameProperty],
- data: container.getData(['true', 'false'])
+ data: container.getData(['1', '0'])
});
// function
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js 2015-07-13 12:28:37 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/core.js 2015-08-09 15:59:13 +0000
@@ -2554,8 +2554,8 @@
names,
headers,
booleanNameMap = {
- 'true': EV.i18n.yes || 'Yes',
- 'false': EV.i18n.no || 'No'
+ '1': EV.i18n.yes || 'Yes',
+ '0': EV.i18n.no || 'No'
};
response = Ext.clone(response);