dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32501
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16594: GIS path fix.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 16594 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-08-31 22:34:52 +0200
message:
GIS path fix.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/plugin.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-mapping/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js 2014-08-31 15:55:29 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js 2014-08-31 20:33:35 +0000
@@ -2358,7 +2358,7 @@
fields: ['id', 'name'],
proxy: {
type: 'ajax',
- url: gis.init.contextPath + gis.conf.finals.url.path_api + 'sharing/search',
+ url: gis.init.contextPath + '/api/sharing/search',
reader: {
type: 'json',
root: 'userGroups'
@@ -2463,7 +2463,7 @@
text: 'Save',
handler: function() {
Ext.Ajax.request({
- url: gis.init.contextPath + gis.conf.finals.url.path_api + 'sharing?type=map&id=' + sharing.object.id,
+ url: gis.init.contextPath + '/api/sharing?type=map&id=' + sharing.object.id,
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -2538,6 +2538,10 @@
gis.store.maps.on('load', function(store, records) {
var pager = store.proxy.reader.jsonData.pager;
+ if (!pager) {
+ return;
+ }
+
info.setText('Page ' + pager.page + ' of ' + pager.pageCount);
prevButton.enable();
@@ -2872,7 +2876,7 @@
};
Ext.Ajax.request({
- url: gis.init.contextPath + gis.conf.finals.url.path_api + 'maps/' + record.data.id,
+ url: gis.init.contextPath + '/api/maps/' + record.data.id,
method: 'PUT',
headers: {'Content-Type': 'application/json'},
params: Ext.encode(map),
@@ -3127,7 +3131,7 @@
fields: ['id', 'name'],
proxy: {
type: 'ajax',
- url: gis.init.contextPath + gis.conf.finals.url.path_api + 'mapLegendSets.json?fields=id,name&paging=false',
+ url: gis.init.contextPath + '/api/mapLegendSets.json?fields=id,name&paging=false',
reader: {
type: 'json',
root: 'mapLegendSets'
@@ -3594,7 +3598,7 @@
deleteLegendSet = function(id) {
if (id) {
Ext.Ajax.request({
- url: gis.init.contextPath + gis.conf.finals.url.path_api + 'mapLegendSets/' + id,
+ url: gis.init.contextPath + '/api/mapLegendSets/' + id,
method: 'DELETE',
success: function() {
legendSetStore.load();
@@ -3693,7 +3697,7 @@
var body = Ext.encode(getRequestBody());
Ext.Ajax.request({
- url: gis.init.contextPath + gis.conf.finals.url.path_api + 'mapLegendSets/',
+ url: gis.init.contextPath + '/api/mapLegendSets/',
method: 'POST',
headers: {'Content-Type': 'application/json'},
params: body,
@@ -3717,7 +3721,7 @@
body = Ext.encode(getRequestBody());
Ext.Ajax.request({
- url: gis.init.contextPath + gis.conf.finals.url.path_api + 'mapLegendSets/' + id,
+ url: gis.init.contextPath + '/api/mapLegendSets/' + id,
method: 'PUT',
headers: {'Content-Type': 'application/json'},
params: body,
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js 2014-08-26 12:21:53 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js 2014-08-31 20:31:28 +0000
@@ -704,7 +704,7 @@
fields: ['id', 'name', 'level'],
proxy: {
type: isPlugin ? 'jsonp' : 'ajax',
- url: gis.init.contextPath + gis.conf.finals.url.path_api + 'organisationUnitLevels.' + (isPlugin ? 'jsonp' : 'json') + '?fields=id,name,level&paging=false',
+ url: gis.init.contextPath + '/api/organisationUnitLevels.' + (isPlugin ? 'jsonp' : 'json') + '?fields=id,name,level&paging=false',
reader: {
type: 'json',
root: 'organisationUnitLevels'
@@ -2208,7 +2208,7 @@
legends = [];
Ext.Ajax.request({
- url: gis.init.contextPath + gis.conf.finals.url.path_api + 'mapLegendSets/' + view.legendSet.id + '.json?fields=' + gis.conf.url.mapLegendSetFields.join(','),
+ url: gis.init.contextPath + '/api/mapLegendSets/' + view.legendSet.id + '.json?fields=' + gis.conf.url.mapLegendSetFields.join(','),
scope: this,
success: function(r) {
legends = Ext.decode(r.responseText).mapLegends;
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/plugin.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/plugin.js 2014-08-31 15:55:29 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/plugin.js 2014-08-31 20:31:28 +0000
@@ -1096,7 +1096,7 @@
fields: ['id', 'name', 'level'],
proxy: {
type: isPlugin ? 'jsonp' : 'ajax',
- url: gis.init.contextPath + gis.conf.finals.url.path_api + 'organisationUnitLevels.' + (isPlugin ? 'jsonp' : 'json') + '?fields=id,name,level&paging=false',
+ url: gis.init.contextPath + '/api/organisationUnitLevels.' + (isPlugin ? 'jsonp' : 'json') + '?fields=id,name,level&paging=false',
reader: {
type: 'json',
root: 'organisationUnitLevels'
@@ -2600,7 +2600,7 @@
legends = [];
Ext.Ajax.request({
- url: gis.init.contextPath + gis.conf.finals.url.path_api + 'mapLegendSets/' + view.legendSet.id + '.json?fields=' + gis.conf.url.mapLegendSetFields.join(','),
+ url: gis.init.contextPath + '/api/mapLegendSets/' + view.legendSet.id + '.json?fields=' + gis.conf.url.mapLegendSetFields.join(','),
scope: this,
success: function(r) {
legends = Ext.decode(r.responseText).mapLegends;