dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40156
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20342: ER minor bug fixed.
------------------------------------------------------------
revno: 20342
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-09-24 13:42:19 +0300
message:
ER minor bug fixed.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.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-09-18 19:32:32 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js 2015-09-24 10:42:19 +0000
@@ -418,24 +418,27 @@
name: 'No range set'
});
- //cb.setValue(defaultRangeSetId);
-
- Ext.Ajax.request({
- url: ns.core.init.contextPath + '/api/dataElements/' + container.dataElement.id + '.json?fields=legendSet[id,name]',
- success: function(r) {
- r = Ext.decode(r.responseText);
-
- if (Ext.isObject(r) && Ext.isObject(r.legendSet)) {
- cb.store.add(r.legendSet);
-
- cb.setValue(r.legendSet.id);
- container.onRangeSetSelect(r.legendSet.id);
+ if (container.dataElement.isAttribute) {
+ cb.setPendingValue();
+ }
+ else {
+ Ext.Ajax.request({
+ url: ns.core.init.contextPath + '/api/dataElements/' + container.dataElement.id + '.json?fields=legendSet[id,name]',
+ success: function(r) {
+ r = Ext.decode(r.responseText);
+
+ if (Ext.isObject(r) && Ext.isObject(r.legendSet)) {
+ cb.store.add(r.legendSet);
+
+ cb.setValue(r.legendSet.id);
+ container.onRangeSetSelect(r.legendSet.id);
+ }
+ },
+ callback: function() {
+ cb.setPendingValue();
}
- },
- callback: function() {
- cb.setPendingValue();
- }
- });
+ });
+ }
},
select: function(cb, r) {
var id = Ext.Array.from(r)[0].data.id;
@@ -4709,7 +4712,7 @@
return 'Ext.ux.panel.DataElementBooleanContainer';
}
- return 'Ext.ux.panel.DataElementIntegerContainer';
+ return 'Ext.ux.panel.DataElementStringContainer';
};
// add