dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28772
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14416: ER, synced with web api changes + GIS, minor fix.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 14416 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-03-25 17:57:12 +0100
message:
ER, synced with web api changes + GIS, minor fix.
modified:
dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/app.js
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/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-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/app.js 2014-03-25 11:01:29 +0000
+++ dhis-2/dhis-web/dhis-web-event-reports/src/main/webapp/dhis-web-event-reports/app/scripts/app.js 2014-03-25 16:56:37 +0000
@@ -2647,10 +2647,10 @@
fields: ['id', 'name'],
proxy: {
type: 'ajax',
- url: ns.core.init.contextPath + '/api/programs/filtered.json?include=id,name&paging=false',
+ url: ns.core.init.contextPath + '/api/programs.json?include=id,name&paging=false',
reader: {
type: 'json',
- root: 'objects'
+ root: 'programs'
},
pageParam: false,
startParam: false,
@@ -2784,9 +2784,9 @@
}
else {
Ext.Ajax.request({
- url: ns.core.init.contextPath + '/api/programs/filtered.json?filter=id:eq:' + programId + '&include=programStages[id,name],attributes&paging=false',
+ url: ns.core.init.contextPath + '/api/programs.json?filter=id:eq:' + programId + '&include=programStages[id,name],attributes&paging=false',
success: function(r) {
- var objects = Ext.decode(r.responseText).objects,
+ var objects = Ext.decode(r.responseText).programs,
stages,
attributes,
stageId;
@@ -2873,9 +2873,9 @@
}
else {
Ext.Ajax.request({
- url: ns.core.init.contextPath + '/api/programStages/filtered.json?filter=id:eq:' + stageId + '&include=programStageDataElements[dataElement[id,name,type,optionSet[id,name]]]',
+ url: ns.core.init.contextPath + '/api/programStages.json?filter=id:eq:' + stageId + '&include=programStageDataElements[dataElement[id,name,type,optionSet[id,name]]]',
success: function(r) {
- var objects = Ext.decode(r.responseText).objects,
+ var objects = Ext.decode(r.responseText).programStages,
dataElements;
if (!objects.length) {
@@ -6021,27 +6021,27 @@
// root nodes
requests.push({
- url: init.contextPath + '/api/organisationUnits/filtered.json?userDataViewFallback=true&include=id,name,children[id,name]',
+ url: init.contextPath + '/api/organisationUnits.json?userDataViewFallback=true&include=id,name,children[id,name]',
success: function(r) {
- init.rootNodes = Ext.decode(r.responseText).objects || [];
+ init.rootNodes = Ext.decode(r.responseText).organisationUnits || [];
fn();
}
});
// organisation unit levels
requests.push({
- url: init.contextPath + '/api/organisationUnitLevels/filtered.json?include=id,name,level&paging=false',
+ url: init.contextPath + '/api/organisationUnitLevels.json?include=id,name,level&paging=false',
success: function(r) {
- init.organisationUnitLevels = Ext.decode(r.responseText).objects || [];
+ init.organisationUnitLevels = Ext.decode(r.responseText).organisationUnitLevels || [];
fn();
}
});
// user orgunits and children
requests.push({
- url: init.contextPath + '/api/organisationUnits/filtered.json?userOnly=true&include=id,name,children[id,name]&paging=false',
+ url: init.contextPath + '/api/organisationUnits.json?userOnly=true&include=id,name,children[id,name]&paging=false',
success: function(r) {
- var organisationUnits = Ext.decode(r.responseText).objects || [],
+ var organisationUnits = Ext.decode(r.responseText).organisationUnits || [],
ou = [],
ouc = [];
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js 2014-03-25 16:45:11 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js 2014-03-25 16:56:37 +0000
@@ -2651,7 +2651,7 @@
this.currentValue = this.getValue();
var value = this.getValue(),
- url = value ? gis.init.contextPath + '/api/maps.json?viewClass=sharing&include=id,name,access&filter=name:like:' + value : null,
+ url = value ? gis.init.contextPath + '/api/maps.json?viewClass=sharing&include=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
store = gis.store.maps;
store.page = 1;
@@ -2667,7 +2667,7 @@
text: GIS.i18n.prev,
handler: function() {
var value = searchTextfield.getValue(),
- url = value ? gis.init.contextPath + '/api/maps.json?viewClass=sharing&include=id,name,access&filter=name:like:' + value : null,
+ url = value ? gis.init.contextPath + '/api/maps.json?viewClass=sharing&include=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
store = gis.store.maps;
store.page = store.page <= 1 ? 1 : store.page - 1;
@@ -2679,7 +2679,7 @@
text: GIS.i18n.next,
handler: function() {
var value = searchTextfield.getValue(),
- url = value ? gis.init.contextPath + '/api/maps.json?viewClass=sharing&include=id,name,access&filter=name:like:' + value : null,
+ url = value ? gis.init.contextPath + '/api/maps.json?viewClass=sharing&include=id,name,access' + (value ? '&filter=name:like:' + value : '') : null;
store = gis.store.maps;
store.page = store.page + 1;