dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #38865
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19751: ER numeric boolean values.
------------------------------------------------------------
revno: 19751
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2015-08-08 12:16:11 +0200
message:
ER numeric boolean values.
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-07-13 12:19:10 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js 2015-08-08 10:16:11 +0000
@@ -752,16 +752,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);
}
}
@@ -771,7 +771,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-reports/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js 2015-07-13 12:19:10 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/core.js 2015-08-08 10:16:11 +0000
@@ -1911,8 +1911,8 @@
names,
headers,
booleanNameMap = {
- 'true': ER.i18n.yes || 'Yes',
- 'false': ER.i18n.no || 'No'
+ '1': ER.i18n.yes || 'Yes',
+ '0': ER.i18n.no || 'No'
};
response = Ext.clone(response);