dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #27023
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13400: pt/dv/gis data element operand request migrated to web api
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 13400 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-12-23 13:55:51 +0100
message:
pt/dv/gis data element operand request migrated to web api
modified:
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/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-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 2013-12-23 08:33:30 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/app.js 2013-12-23 12:53:42 +0000
@@ -6473,7 +6473,7 @@
});
dataElementsByGroupStore = Ext.create('Ext.data.Store', {
- fields: ['id', 'name', 'dataElementId', 'optionComboId', 'operandName'],
+ fields: ['id', 'name'],
proxy: {
type: 'ajax',
url: '',
@@ -6498,10 +6498,10 @@
var path;
if (Ext.isString(uid)) {
- path = 'dataElementGroups/' + uid + '.json?domainType=aggregate&links=false&paging=false';
+ path = '/dataElementGroups/' + uid + '.json?domainType=aggregate&links=false&paging=false';
}
else if (uid === 0) {
- path = 'dataElements.json?domainType=aggregate&paging=false&links=false';
+ path = '/dataElements.json?domainType=aggregate&paging=false&links=false';
}
if (!path) {
@@ -6511,7 +6511,7 @@
this.setProxy({
type: 'ajax',
- url: gis.init.contextPath + gis.conf.finals.url.path_api + path,
+ url: gis.init.contextPath + '/api' + path,
reader: {
type: 'json',
root: 'dataElements'
@@ -6535,10 +6535,10 @@
if (Ext.isString(uid)) {
this.setProxy({
type: 'ajax',
- url: gis.init.contextPath + '/dhis-web-commons-ajax-json/getOperands.action?uid=' + uid,
+ url: gis.init.contextPath + '/api/dataElementOperands.json?links=false&dataElementGroup=' + uid,
reader: {
type: 'json',
- root: 'operands'
+ root: 'dataElementOperands'
}
});
@@ -6547,8 +6547,7 @@
scope: this,
callback: function() {
this.each(function(r) {
- r.set('id', r.data.dataElementId + '-' + r.data.optionComboId);
- r.set('name', r.data.operandName);
+ r.set('id', r.data.id.split('.').join('-'));
});
this.sortStore();
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-12-22 13:34:11 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-12-23 12:53:42 +0000
@@ -2489,7 +2489,7 @@
ns.app.stores.indicatorGroup = indicatorGroupStore;
dataElementAvailableStore = Ext.create('Ext.data.Store', {
- fields: ['id', 'name', 'dataElementId', 'optionComboId', 'operandName'],
+ fields: ['id', 'name'],
proxy: {
type: 'ajax',
reader: {
@@ -2536,10 +2536,10 @@
if (Ext.isString(uid)) {
this.setProxy({
type: 'ajax',
- url: ns.core.init.contextPath + '/dhis-web-commons-ajax-json/getOperands.action?uid=' + uid,
+ url: ns.core.init.contextPath + '/api/dataElementOperands.json?links=false&dataElementGroup=' + uid,
reader: {
type: 'json',
- root: 'operands'
+ root: 'dataElementOperands'
}
});
@@ -2547,8 +2547,7 @@
scope: this,
callback: function() {
this.each(function(r) {
- r.set('id', r.data.dataElementId + '-' + r.data.optionComboId);
- r.set('name', r.data.operandName);
+ r.set('id', r.data.id.split('.').join('-'));
});
ns.core.web.multiSelect.filterAvailable({store: dataElementAvailableStore}, {store: dataElementSelectedStore});
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2013-12-22 13:34:11 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2013-12-23 12:53:42 +0000
@@ -2217,7 +2217,7 @@
ns.app.stores.indicatorGroup = indicatorGroupStore;
dataElementAvailableStore = Ext.create('Ext.data.Store', {
- fields: ['id', 'name', 'dataElementId', 'optionComboId', 'operandName'],
+ fields: ['id', 'name'],
proxy: {
type: 'ajax',
reader: {
@@ -2264,10 +2264,10 @@
if (Ext.isString(uid)) {
this.setProxy({
type: 'ajax',
- url: ns.core.init.contextPath + '/dhis-web-commons-ajax-json/getOperands.action?uid=' + uid,
+ url: ns.core.init.contextPath + '/api/dataElementOperands.json?links=false&dataElementGroup=' + uid,
reader: {
type: 'json',
- root: 'operands'
+ root: 'dataElementOperands'
}
});
@@ -2275,8 +2275,7 @@
scope: this,
callback: function() {
this.each(function(r) {
- r.set('id', r.data.dataElementId + '-' + r.data.optionComboId);
- r.set('name', r.data.operandName);
+ r.set('id', r.data.id.split('.').join('-'));
});
ns.core.web.multiSelect.filterAvailable({store: dataElementAvailableStore}, {store: dataElementSelectedStore});